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>
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