summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2013-09-11 12:53:44 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-09-12 22:12:15 (GMT)
commit71701eb6d77f2fe03124f559ed0d1a9e559b3d17 (patch)
tree1d77d097a956335657f9e7ecdd59a513ad910ce2
parent4fc45ccca5de28fec0b1f777f3b6c920b02c2dcf (diff)
downloadbuildroot-71701eb6d77f2fe03124f559ed0d1a9e559b3d17.tar.gz
buildroot-71701eb6d77f2fe03124f559ed0d1a9e559b3d17.tar.bz2
nommu/flat: build packages with the correct FLAGS
When building for nommu flat targets the CFLAGS/CXXFLAGS/LDFLAGS must be adjusted accordingly. For gcc this means passing along -Wl,-elf2flt to signal the linker. For ld this means -elf2flt. Also correct the error in STACKSIZE settings from commit 9edf482d which is setting gcc flags as ld flags and will surely fail (no package uses it at the moment so it was never seen). Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 91ae1b9..dd365be 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -115,7 +115,11 @@ TARGET_CXXFLAGS = $(TARGET_CFLAGS)
TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
ifeq ($(BR2_BINFMT_FLAT),y)
-TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE))
+TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
+ -Wl$(comma)-elf2flt)
+TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
+ -Wl$(comma)-elf2flt)
+TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-elf2flt)
endif
ifeq ($(BR2_BINFMT_FLAT_SHARED),y)