summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2013-05-03 00:39:38 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-05-05 20:55:50 (GMT)
commit9edf482d6b210d16a22fdf561da2a2f0fb84824d (patch)
tree0878ec178a31a75e72e5933d9c14a6f86cecd21b
parent57c05432917de3b9aec293d713acafde01ac9b07 (diff)
downloadbuildroot-9edf482d6b210d16a22fdf561da2a2f0fb84824d.tar.gz
buildroot-9edf482d6b210d16a22fdf561da2a2f0fb84824d.tar.bz2
package: Introduce package-specific BINFMT_FLAT options.
Add new option <PKG>_FLAT_STACKSIZE. The document needs to be updated. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Makefile.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index dd3bc7d..a449089 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -103,6 +103,10 @@ TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET
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))
+endif
+
ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0