summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2015-07-31 13:50:03 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-08-09 21:03:11 +0200
commitd146ac6a33a9ba578c7dce0abf8b4ca65689b425 (patch)
tree8dd20f8f24f07f1b6304bda46066ba40ad2a7a71 /Makefile.inc
parentd0d487aaf481a5d1667f32eb87213cd33b80921a (diff)
downloadcoreboot-d146ac6a33a9ba578c7dce0abf8b4ca65689b425.tar.xz
Move function/data sections to common CFLAGS
Instead of adding -ffunction-sections and -fdata-sections to every architecture, just add it to CFLAGS_common, thus making sure that new architectures will pick it up automatically. Change-Id: I38e878851226565b7791d05e222cb4e502e0c8a3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/11105 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 6ebf6d46b7..706ab8086f 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -270,6 +270,8 @@ CFLAGS_common += -pipe -g -nostdinc
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
CFLAGS_common += -Wstrict-aliasing -Wshadow
+CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
+CFLAGS_common += -ffunction-sections -fdata-sections
ifeq ($(CONFIG_COMPILER_GCC),y)
# cf. commit f69a99db (coreboot: x86: enable gc-sections)
@@ -279,7 +281,6 @@ endif
ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y)
CFLAGS_common += -Werror
endif
-CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
ifneq ($(GDB_DEBUG),)
CFLAGS_common += -Og
else