From: Josh Triplett <josh@joshtriplett.org>
To: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] build: allow use of LLVM_CONFIG to override llvm-config config script
Date: Tue, 15 Apr 2014 11:00:45 -0700 [thread overview]
Message-ID: <20140415180045.GA2707@leaf> (raw)
In-Reply-To: <1397582569-7043-1-git-send-email-cody@linux.vnet.ibm.com>
On Tue, Apr 15, 2014 at 10:22:49AM -0700, Cody P Schafer wrote:
> On systems like ubuntu 12.04, llvm-config is llvm 2.9, but
> llvm-config-3.0 and llvm-config-3.3 (for example) are versions 3.0 and
> 3.3 respectively. Allow overriding the name/path of the llvm-config
> script so people can use these versioned config scripts
>
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> Makefile | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c3f3104..bbdc088 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -30,9 +30,10 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c && \
> $(CC) -c -Wp,-MD,.gcc-test.d .gcc-test.c 2>/dev/null && \
> echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
> HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
> -HAVE_LLVM:=$(shell llvm-config --version >/dev/null 2>&1 && echo 'yes')
> -HAVE_LLVM_VERSION:=$(shell llvm-config --version | grep "^[3-9].*" >/dev/null 2>&1 && echo yes)
> -LLVM_VERSION=$(shell llvm-config --version)
> +LLVM_CONFIG=llvm-config
> +HAVE_LLVM:=$(shell $(LLVM_CONFIG) --version >/dev/null 2>&1 && echo 'yes')
> +HAVE_LLVM_VERSION:=$(shell $(LLVM_CONFIG) --version | grep "^[3-9].*" >/dev/null 2>&1 && echo yes)
> +LLVM_VERSION=$(shell $(LLVM_CONFIG) --version)
>
> GCC_BASE = $(shell $(CC) --print-file-name=)
> BASIC_CFLAGS = -DGCC_BASE=\"$(GCC_BASE)\"
> @@ -84,9 +85,9 @@ HAVE_LLVM=no
> else
> LLVM_PROGS := sparse-llvm
> $(LLVM_PROGS): LD := g++
> -LLVM_LDFLAGS := $(shell llvm-config --ldflags)
> -LLVM_CFLAGS := $(shell llvm-config --cflags | sed -e "s/-DNDEBUG//g")
> -LLVM_LIBS := $(shell llvm-config --libs)
> +LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags)
> +LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g")
> +LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs)
> PROGRAMS += $(LLVM_PROGS)
> INST_PROGRAMS += sparse-llvm sparsec
> sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
> --
> 1.9.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-04-15 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 17:22 [PATCH] build: allow use of LLVM_CONFIG to override llvm-config config script Cody P Schafer
2014-04-15 18:00 ` Josh Triplett [this message]
2014-04-15 22:05 ` Christopher Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140415180045.GA2707@leaf \
--to=josh@joshtriplett.org \
--cc=cody@linux.vnet.ibm.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).