linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparse, llvm: fix link errors
@ 2013-05-10 21:01 Xi Wang
  2013-05-11 18:24 ` Christopher Li
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Wang @ 2013-05-10 21:01 UTC (permalink / raw)
  To: sparse; +Cc: linux-sparse, Xi Wang, Pekka Enberg

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>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 35e3801..4f53903 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
 
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-15 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 21:01 [PATCH] sparse, llvm: fix link errors Xi Wang
2013-05-11 18:24 ` Christopher Li
2013-05-12  2:10   ` Xi Wang
2013-05-15 10:09     ` Christopher Li
2013-05-15 12:02       ` Pekka Enberg

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).