Re: [PATCH] sparse, llvm: fix link errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 05/10/2013 02:01 PM, Xi Wang wrote:
> 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'


> -sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS)
> +sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS) $(LLVM_LDFLAGS)

The EXTRA_OBJS is only mean for real objects.
the LDFLAGS should be not belong to here.

I can't duplicate the link error myself.
It seems that you only want the LLVM_LDFLAGS apply to
sparse-llvm only.

Can you try this patch?

Thanks


Chris

diff --git a/Makefile b/Makefile
index 35e3801..549e669 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ HAVE_LLVM=no
 else
 LLVM_PROGS := sparse-llvm
 $(LLVM_PROGS): LD := g++
-LDFLAGS += $(shell llvm-config --ldflags)
+$(LLVM_PROGS): 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)

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux