aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2013-05-10 17:01:24 -0400
committerChristopher Li <sparse@chrisli.org>2013-05-15 03:03:22 -0700
commitf79914429cb466d1085a2a6204b38101ca75c608 (patch)
treef020e0f01296bf977d1709a3f28af60eadc6ae53
parent652eb801d2141b57dca3215e71c55e8356b407a2 (diff)
downloadsparse-f79914429cb466d1085a2a6204b38101ca75c608.tar.gz
sparse, llvm: fix link errors
This patch fixes the following link errors. libLLVMSupport.a(Signals.o): In function `llvm::sys::PrintStackTrace(_IO_FILE*)': Signals.inc:269: undefined reference to `dladdr' Signals.inc:281: undefined reference to `dladdr' Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 35e38014..4f53903b 100644
--- a/Makefile
+++ b/Makefile
@@ -84,14 +84,14 @@ HAVE_LLVM=no
else
LLVM_PROGS := sparse-llvm
$(LLVM_PROGS): LD := g++
-LDFLAGS += $(shell llvm-config --ldflags)
+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_EXTRA_DEPS := sparse-llvm.o
sparse-llvm.o $(sparse-llvm_EXTRA_DEPS): BASIC_CFLAGS += $(LLVM_CFLAGS)
-sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS)
+sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS) $(LLVM_LDFLAGS)
endif
endif