Re: [ptp-gadget][[PATCH 2/2] Use LDFLAGS in link step

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

 




Op 29 mei 2009, om 17:56 heeft Guennadi Liakhovetski het volgende geschreven:

On Fri, 29 May 2009, Koen Kooi wrote:

Signed-off-by: Koen Kooi <koen@xxxxxxxxxxxxxxxxxxxxx>
---
Makefile |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index d56d320..42f6003 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CPPFLAGS	:= -Wall -I$(KERNEL_SRC)/include

ptp:		ptp.o usbstring.o
-	$(CROSS_COMPILE)gcc -lpthread -o $@ $^
+	$(CROSS_COMPILE)gcc -lpthread ${LDFLAGS} -o $@ $^

ptp.o:		ptp.c usbstring.h
	$(CROSS_COMPILE)gcc $(CPPFLAGS) -c -o $@ $<

Not sure we want this one. First, you'd have to use $() instead of ${}

Right, that'll teach me to copy over the modified file instead of recreating the change :)

just for consistency. Secondly, what ld flags were missing there?

In my case '-Wl,--hash-style=gnu', which is checked by my buildsystem and raises a fatal error when the binary is linked without obeying the LDFLAGS env var. One could argue that the hashstyle for such a simple app doesn't matter since it doesn't need that many external symbols, but I like to be sure that every binary I build is using the LDFLAGS I specify.

regards,

Koen

Attachment: PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux