Andrew Geissler | 9abfef9 | 2015-02-20 09:42:50 -0600 | [diff] [blame] | 1 | From 005cac73915ee6f6b67e9b01ae840b798c1fc80e Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrew Geissler <andrewg@us.ibm.com> |
| 3 | Date: Mon, 16 Feb 2015 13:43:51 -0600 |
| 4 | Subject: [PATCH] GCC 4.9: Make compiler use ELFv1 ABI and use -O2 |
| 5 | |
| 6 | GCC4.9 defaults to ELFv2 ABI support but we do not have all |
| 7 | of the needed tools to suppor this. |
| 8 | GCC4.9 also does not work well with -O3 so I've had to |
| 9 | knock us down to -O2 for now. |
| 10 | |
| 11 | Change-Id: Iacf49c46b1fb25776ba60d6506ccadff7b46bf60 |
| 12 | RTC: 123430 |
| 13 | --- |
| 14 | src/build/mkrules/cflags.env.mk | 9 ++++++--- |
| 15 | 1 files changed, 6 insertions(+), 3 deletions(-) |
| 16 | |
| 17 | diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk |
| 18 | index 8ca32b1..c729341 100644 |
| 19 | --- a/src/build/mkrules/cflags.env.mk |
| 20 | +++ b/src/build/mkrules/cflags.env.mk |
| 21 | @@ -28,7 +28,8 @@ |
| 22 | # Description: |
| 23 | # Configuration of the compiler, linker, etc. flags. |
| 24 | |
| 25 | -OPT_LEVEL ?= -O3 |
| 26 | +# TODO RTC 124305 - Get -O3 to work with gcc4.9 |
| 27 | +OPT_LEVEL ?= -O2 |
| 28 | |
| 29 | ifdef MODULE |
| 30 | COMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions |
| 31 | @@ -36,10 +37,12 @@ CFLAGS += -D__HOSTBOOT_MODULE=$(MODULE) |
| 32 | endif |
| 33 | |
| 34 | COMMONFLAGS += $(OPT_LEVEL) -nostdlib |
| 35 | +# TODO RTC: 123994 - ELFv2 ABI support (-mabi=elfv1) |
| 36 | CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\ |
| 37 | -Wall -Werror -mtraceback=no -pipe \ |
| 38 | - -ffunction-sections -fdata-sections -ffreestanding -mbig-endian |
| 39 | -ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian |
| 40 | + -ffunction-sections -fdata-sections -ffreestanding -mbig-endian \ |
| 41 | + -mabi=elfv1 |
| 42 | +ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian -mabi=elfv1 |
| 43 | CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall \ |
| 44 | -fuse-cxa-atexit |
| 45 | LDFLAGS += --nostdlib --sort-common -EB $(COMMONFLAGS) |
| 46 | -- |
| 47 | 1.7.4.1 |
| 48 | |