svn commit: trunk/busybox: scripts

vda at busybox.net vda at busybox.net
Fri Jun 6 16:11:13 UTC 2008


Author: vda
Date: 2008-06-06 09:11:12 -0700 (Fri, 06 Jun 2008)
New Revision: 22252

Log:
Build system: track -Wl,-elf2flt in CFLAGS_busybox too.
Document in comments that it generally should be thers,
not in LDFLAGS



Modified:
   trunk/busybox/Makefile.flags
   trunk/busybox/scripts/Makefile.lib


Changeset:
Modified: trunk/busybox/Makefile.flags
===================================================================
--- trunk/busybox/Makefile.flags	2008-06-06 16:08:04 UTC (rev 22251)
+++ trunk/busybox/Makefile.flags	2008-06-06 16:11:12 UTC (rev 22252)
@@ -91,8 +91,13 @@
 LDLIBS += dmalloc
 endif
 
-LDFLAGS_ELF2FLT = -Wl,-elf2flt
-ifneq (,$(findstring $(LDFLAGS_ELF2FLT),$(LDFLAGS)))
+# If a flat binary should be built, CFLAGS_busybox="-Wl,-elf2flt"
+# env var should be set for make invocation.
+# Here we check whether CFLAGS_busybox indeed contains that flag.
+# (For historical reasons, we also check LDFLAGS, which doesn't
+# seem to be entirely correct variable to put "-Wl,-elf2flt" into).
+W_ELF2FLT = -Wl,-elf2flt
+ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
 SKIP_STRIP = y
 endif
 

Modified: trunk/busybox/scripts/Makefile.lib
===================================================================
--- trunk/busybox/scripts/Makefile.lib	2008-06-06 16:08:04 UTC (rev 22251)
+++ trunk/busybox/scripts/Makefile.lib	2008-06-06 16:11:12 UTC (rev 22252)
@@ -117,6 +117,7 @@
 
 cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
 
+# TODO: seems to be a wrong thing to do! LDFLAGS contains gcc's flags!
 ld_flags       = $(LDFLAGS) $(EXTRA_LDFLAGS)
 
 # Finds the multi-part object the current object will be linked into
@@ -146,6 +147,8 @@
 # Linking
 # ---------------------------------------------------------------------------
 
+# TODO: LDFLAGS usually is supposed to contain gcc's flags, not ld's.
+# but here we feed them to ld!
 quiet_cmd_ld = LD      $@
 cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
 	       $(filter-out FORCE,$^) -o $@




More information about the busybox-cvs mailing list