[coreboot-gerrit] New patch to review for coreboot: Move function/data sections to common CFLAGS
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Fri Jul 31 22:53:00 CEST 2015
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11105
-gerrit
commit acafc78e88380a3f98c307626ba1b67a9f4a122f
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Fri Jul 31 13:50:03 2015 -0700
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 at coreboot.org>
---
Makefile.inc | 3 ++-
toolchain.inc | 15 +++++----------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 14fa990..a29ee98 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
diff --git a/toolchain.inc b/toolchain.inc
index eea0560..195ed77 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -62,16 +62,11 @@ ARCHDIR-arm64 := arm64
ARCHDIR-riscv := riscv
ARCHDIR-mips := mips
-CFLAGS_arm += -ffunction-sections -fdata-sections
-
-CFLAGS_arm64 += -ffunction-sections -fdata-sections -mgeneral-regs-only
-
-CFLAGS_mips += -mips32r2 -G 0 -ffunction-sections -fdata-sections
-CFLAGS_mips += -mno-abicalls -fno-pic
-
-CFLAGS_x86_32 += -ffunction-sections -fdata-sections
-CFLAGS_riscv += -ffunction-sections -fdata-sections
-
+CFLAGS_arm +=
+CFLAGS_arm64 += -mgeneral-regs-only
+CFLAGS_mips += -mips32r2 -G 0 -mno-abicalls -fno-pic
+CFLAGS_riscv +=
+CFLAGS_x86_32 +=
CFLAGS_x86_64 += -mcmodel=large -mno-red-zone
# Some boards only provide 2K stacks, so storing lots of data there leads to
More information about the coreboot-gerrit
mailing list