* [PATCH] Allow CRDA to be compiled with -Wl,--as-needed
@ 2008-11-27 15:46 Tony Vroon
0 siblings, 0 replies; 2+ messages in thread
From: Tony Vroon @ 2008-11-27 15:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
As libraries are passed in LDFLAGS, it is vital that they be specified after the object
files. Otherwise, --as-needed will discard the libraries as unused and linking will fail.
Signed-off-by: Tony Vroon <tony@linx.net>
--- crda-0.9.4/Makefile.orig 2008-11-27 14:44:02.000000000 +0000
+++ crda-0.9.4/Makefile 2008-11-27 14:45:59.000000000 +0000
@@ -35,15 +35,15 @@
crda: keys-ssl.c keys-gcrypt.c reglib.o crda.o
$(NQ) ' LD ' $@
- $(Q)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs libnl-1` -o $@ reglib.o crda.o
+ $(Q)$(CC) $(CFLAGS) `pkg-config --libs libnl-1` -o $@ reglib.o crda.o $(LDFLAGS)
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) -o $@ reglib.o regdbdump.o $(LDFLAGS)
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) -o $@ reglib.o intersect.o $(LDFLAGS)
verify: $(REG_BIN) regdbdump
$(NQ) ' CHK $(REG_BIN)'
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Allow CRDA to be compiled with -Wl,--as-needed
[not found] <20081130161758.883321007B@gold.linx.net>
@ 2008-12-01 21:10 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2008-12-01 21:10 UTC (permalink / raw)
To: Tony Vroon; +Cc: Luis Rodriguez, linux-wireless@vger.kernel.org
On Sun, Nov 30, 2008 at 08:17:58AM -0800, Tony Vroon wrote:
> As libraries are passed in LDFLAGS, it is vital that they be specified after the object
> files. Otherwise, --as-needed will discard the libraries as unused and linking will fail.
>
> Signed-off-by: Tony Vroon <tony@linx.net>
>
> --- crda-0.9.4/Makefile.orig 2008-11-27 14:44:02.000000000 +0000
> +++ crda-0.9.4/Makefile 2008-11-27 14:45:59.000000000 +0000
> @@ -35,15 +35,15 @@
>
> crda: keys-ssl.c keys-gcrypt.c reglib.o crda.o
> $(NQ) ' LD ' $@
> - $(Q)$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs libnl-1` -o $@ reglib.o crda.o
> + $(Q)$(CC) $(CFLAGS) `pkg-config --libs libnl-1` -o $@ reglib.o crda.o $(LDFLAGS)
>
> 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) -o $@ reglib.o regdbdump.o $(LDFLAGS)
>
> 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) -o $@ reglib.o intersect.o $(LDFLAGS)
>
> verify: $(REG_BIN) regdbdump
> $(NQ) ' CHK $(REG_BIN)'
Thanks Diego's patch came in first, I'll apply that, please pull in few
minutes to get all the new updates.
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-01 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20081130161758.883321007B@gold.linx.net>
2008-12-01 21:10 ` [PATCH] Allow CRDA to be compiled with -Wl,--as-needed Luis R. Rodriguez
2008-11-27 15:46 Tony Vroon
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).