summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-07-03 10:30:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2008-07-03 10:30:44 +0200
commit8a03bff03ebf36b7460e6ec43259bc8b40731ece (patch)
tree6a4e56c0d3d60206e5f70419ab5fa24b618f8241 /arch
parent7c37b54184893d4fe4e23933e6a8deae1c9d62a2 (diff)
downloadbarebox-8a03bff03ebf36b7460e6ec43259bc8b40731ece.tar.gz
barebox-8a03bff03ebf36b7460e6ec43259bc8b40731ece.tar.xz
[arm] Add cleanup flags only when modules are disabled. Otherwise
we remove functions from the binary which are needed for modules
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3fe69bb2de..4767ccd237 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -26,9 +26,11 @@ TEXT_BASE = $(CONFIG_TEXT_BASE)
CPPFLAGS += -mabi=apcs-gnu -DTEXT_BASE=$(TEXT_BASE) -P
CFLAGS += -msoft-float
+ifndef CONFIG_MODULES
# Add cleanup flags
CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_uboot += -static --gc-sections
+endif
ifeq ($(incdir-y),)
incdir-y := $(machine-y)