linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Christopher Li <sparse@chrisli.org>, linux-sparse@vger.kernel.org
Cc: Alain Kalker <a.c.kalker@gmail.com>
Subject: [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors
Date: Wed, 24 Sep 2014 14:01:01 -0700	[thread overview]
Message-ID: <1411592461-22810-1-git-send-email-osandov@osandov.com> (raw)

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


             reply	other threads:[~2014-09-24 21:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 21:01 Omar Sandoval [this message]
2014-09-25  0:21 ` [PATCH] sparse-llvm: Fix LLVM 3.5 linker errors 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=1411592461-22810-1-git-send-email-osandov@osandov.com \
    --to=osandov@osandov.com \
    --cc=a.c.kalker@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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).