From: "Diego 'Flameeyes' Pettenò" <flameeyes@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: [crda PATCH 1/5] Fix building with --as-needed LD flag.
Date: Mon, 01 Dec 2008 11:30:51 +0100 [thread overview]
Message-ID: <20081201103051.18024.82321.stgit@localhost> (raw)
In-Reply-To: <20081201103016.18024.80454.stgit@localhost>
=46rom: Diego E. 'Flameeyes' Petten=C3=B2 <flameeyes@gmail.com>
When using GNU ld --as-needed option, you need to ensure that the
order of parameters to the linker is formally correct, with libraries
coming after the object files. For this reason, don't use LDFLAGS for
passing the libraries, and make sure that LDLIBS goes at the end of
the line.
Signed-off-by: Diego E. 'Flameeyes' Petten=C3=B2 <flameeyes@gmail.com>
---
Makefile | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 91c4329..25a92fe 100644
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,9 @@ PUBKEY_DIR=3Dpubkeys
=20
CFLAGS +=3D -Wall -g
#CFLAGS +=3D -DUSE_OPENSSL `pkg-config --cflags openssl`
-#LDFLAGS +=3D `pkg-config --libs openssl`
+#LDLIBS +=3D `pkg-config --libs openssl`
CFLAGS +=3D -DUSE_GCRYPT
-LDFLAGS +=3D -lgcrypt
+LDLIBS +=3D -lgcrypt
=20
MKDIR ?=3D mkdir -p
INSTALL ?=3D install
@@ -35,15 +35,15 @@ keys-%.c: utils/key2pub.py $(PUBKEY_DIR)/$(wildcard=
*.pem)
=20
crda: keys-ssl.c keys-gcrypt.c reglib.o crda.o
$(NQ) ' LD ' $@
- $(Q)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs libnl-1` -o $@ regl=
ib.o crda.o
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o crda.o `pkg-config --li=
bs libnl-1` $(LDLIBS)
=20
regdbdump: keys-ssl.c keys-gcrypt.c reglib.o regdbdump.o
$(NQ) ' LD ' $@
- $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o regdbdump.o
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o regdbdump.o $(LDLIBS)
=20
intersect: keys-ssl.c keys-gcrypt.c reglib.o intersect.o
$(NQ) ' LD ' $@
- $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o intersect.o
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o intersect.o $(LDLIBS)
=20
verify: $(REG_BIN) regdbdump
$(NQ) ' CHK $(REG_BIN)'
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-12-01 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 10:30 [crda PATCH 0/5] Makefile improvement and fixes Diego 'Flameeyes' Pettenò
2008-12-01 10:30 ` Diego 'Flameeyes' Pettenò [this message]
2008-12-01 10:30 ` [crda PATCH 2/5] Fix dependencies for parallel make and others Diego 'Flameeyes' Pettenò
2008-12-01 10:31 ` [crda PATCH 3/5] Make it possible to switch gcrypt/openssl via knob Diego 'Flameeyes' Pettenò
2008-12-01 10:31 ` [crda PATCH 4/5] Don't use recursive make for verify target Diego 'Flameeyes' Pettenò
2008-12-01 10:31 ` [crda PATCH 5/5] Ignore built files Diego 'Flameeyes' Pettenò
2008-12-01 22:35 ` [crda PATCH 0/5] Makefile improvement and fixes Luis R. Rodriguez
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=20081201103051.18024.82321.stgit@localhost \
--to=flameeyes@gmail.com \
--cc=linux-wireless@vger.kernel.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).