aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-06 16:11:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-06 16:11:12 +0000
commit401de648a797c5931df1ade02c26270c82c3a345 (patch)
tree44741c8de0a3fc2dfda08f24f199917f8a905719
parent7bdf0c82da3713ec2a0f0090ba663c1167d10a67 (diff)
downloadbusybox-w32-401de648a797c5931df1ade02c26270c82c3a345.tar.gz
busybox-w32-401de648a797c5931df1ade02c26270c82c3a345.tar.bz2
busybox-w32-401de648a797c5931df1ade02c26270c82c3a345.zip
Build system: track -Wl,-elf2flt in CFLAGS_busybox too.
Document in comments that it generally should be thers, not in LDFLAGS
-rw-r--r--Makefile.flags9
-rw-r--r--scripts/Makefile.lib3
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.flags b/Makefile.flags
index cb2c8780a..e9405476b 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -91,8 +91,13 @@ ifeq ($(CONFIG_DMALLOC),y)
91LDLIBS += dmalloc 91LDLIBS += dmalloc
92endif 92endif
93 93
94LDFLAGS_ELF2FLT = -Wl,-elf2flt 94# If a flat binary should be built, CFLAGS_busybox="-Wl,-elf2flt"
95ifneq (,$(findstring $(LDFLAGS_ELF2FLT),$(LDFLAGS))) 95# env var should be set for make invocation.
96# Here we check whether CFLAGS_busybox indeed contains that flag.
97# (For historical reasons, we also check LDFLAGS, which doesn't
98# seem to be entirely correct variable to put "-Wl,-elf2flt" into).
99W_ELF2FLT = -Wl,-elf2flt
100ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
96SKIP_STRIP = y 101SKIP_STRIP = y
97endif 102endif
98 103
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e1e0ba481..22c64306b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -117,6 +117,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \
117 117
118cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) 118cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
119 119
120# TODO: seems to be a wrong thing to do! LDFLAGS contains gcc's flags!
120ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS) 121ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
121 122
122# Finds the multi-part object the current object will be linked into 123# Finds the multi-part object the current object will be linked into
@@ -146,6 +147,8 @@ $(obj)/%:: $(src)/%_shipped
146# Linking 147# Linking
147# --------------------------------------------------------------------------- 148# ---------------------------------------------------------------------------
148 149
150# TODO: LDFLAGS usually is supposed to contain gcc's flags, not ld's.
151# but here we feed them to ld!
149quiet_cmd_ld = LD $@ 152quiet_cmd_ld = LD $@
150cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \ 153cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
151 $(filter-out FORCE,$^) -o $@ 154 $(filter-out FORCE,$^) -o $@