[Buildroot] [PATCH v6 5/7] package: Introduce package-specific BINFMT_FLAT options.

Sonic Zhang sonic.adi at gmail.com
Thu Apr 18 10:06:30 UTC 2013


From: Sonic Zhang <sonic.zhang at analog.com>

Add new option <PKG>_FLAT_STACKSIZE. The document needs to be updated.

Signed-off-by: Sonic Zhang <sonic.zhang at analog.com>
Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

---

v4-change:
- Use late binding in make to expand package specific flat stack size
to TARGET_LDFLAGS.

v2-changes:
- Fix typo error in macro BINFMT_FLAT
---
 package/Makefile.in |    4 ++++
 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
-- 
1.7.0.4





More information about the buildroot mailing list