linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors
@ 2014-09-24 21:01 Omar Sandoval
  2014-09-25  0:21 ` Christopher Li
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Sandoval @ 2014-09-24 21:01 UTC (permalink / raw)
  To: Christopher Li, linux-sparse; +Cc: Alain Kalker

llvm-config 3.5 no longer lists the non-LLVM libraries needed for linkage when
passed --libs. The --system-libs flag was added for this purpose. This adds
these libraries while silently doing nothing for older versions of LLVM.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index c3f3104..17bce6f 100644
--- a/Makefile
+++ b/Makefile
@@ -87,6 +87,7 @@ $(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_LIBS += $(shell llvm-config --system-libs 2>/dev/null)
 PROGRAMS += $(LLVM_PROGS)
 INST_PROGRAMS += sparse-llvm sparsec
 sparse-llvm.o: BASIC_CFLAGS += $(LLVM_CFLAGS)
-- 
2.1.0


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

* Re: [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors
  2014-09-24 21:01 [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors Omar Sandoval
@ 2014-09-25  0:21 ` Christopher Li
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2014-09-25  0:21 UTC (permalink / raw)
  To: Omar Sandoval; +Cc: Linux-Sparse, Alain Kalker

On Thu, Sep 25, 2014 at 5:01 AM, Omar Sandoval <osandov@osandov.com> wrote:
> llvm-config 3.5 no longer lists the non-LLVM libraries needed for linkage when
> passed --libs. The --system-libs flag was added for this purpose. This adds
> these libraries while silently doing nothing for older versions of LLVM.

Thanks for the patch. It looks fine. Applied.

BTW, the patch did not apply cleanly for me. It has some conflict.
I can't see why it failed. Since it is just one line, I just paste it.

Please double check the tip of chrisl repository. I just push it.

Chris

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

end of thread, other threads:[~2014-09-25  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 21:01 [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors Omar Sandoval
2014-09-25  0:21 ` Christopher Li

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