- also use the incoming LDFLAGS and EXTRA_LDFLAGS
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 11 Apr 2008 12:31:57 +0000 (12:31 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 11 Apr 2008 12:31:57 +0000 (12:31 -0000)
  This isn't perfect since it will barf on linker flags with two args like -Wl,z,now et al.

scripts/Makefile.IMA

index d24651787ff13263fda807f27ac85883abed8c9a..73360f3e15d2af99ddf41fce615af88dfccb4c9d 100644 (file)
@@ -145,8 +145,10 @@ include libbb/Kbuild
 lib-all-y += $(patsubst %,libbb/%,$(sort $(lib-y)))
 lib-y:=
 
+comma:=,
 busybox: $(usage_stuff) include/applet_tables.h
        $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \
+               $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \
                -DGCC_COMBINE=1 \
                --combine $(WHOLE_PROGRAM) \
                -funit-at-a-time -Wno-error -std=gnu99  \