summaryrefslogtreecommitdiffstats
path: root/openpower/package/hostboot/p8Patches/hostboot-0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
blob: 66bc026358380a73ebd9aaaeee805af022103868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 005cac73915ee6f6b67e9b01ae840b798c1fc80e Mon Sep 17 00:00:00 2001
From: Andrew Geissler <andrewg@us.ibm.com>
Date: Mon, 16 Feb 2015 13:43:51 -0600
Subject: [PATCH] GCC 4.9: Make compiler use ELFv1 ABI.

GCC4.9 defaults to ELFv2 ABI support but we do not have all
of the needed tools to suppor this.

Change-Id: Iacf49c46b1fb25776ba60d6506ccadff7b46bf60
RTC: 123430
---
 src/build/mkrules/cflags.env.mk |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/build/mkrules/cflags.env.mk b/src/build/mkrules/cflags.env.mk
index 8ca32b1..c729341 100644
--- a/src/build/mkrules/cflags.env.mk
+++ b/src/build/mkrules/cflags.env.mk
@@ -36,10 +37,12 @@ CFLAGS += -D__HOSTBOOT_MODULE=$(MODULE)
 endif
 
 COMMONFLAGS += $(OPT_LEVEL) -nostdlib
+# TODO RTC: 123994 - ELFv2 ABI support (-mabi=elfv1)
 CFLAGS += $(COMMONFLAGS) -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\
           -Wall -Werror -mtraceback=no -pipe \
-	  -ffunction-sections -fdata-sections -ffreestanding -mbig-endian
-ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian
+	  -ffunction-sections -fdata-sections -ffreestanding -mbig-endian \
+      -mabi=elfv1
+ASMFLAGS += $(COMMONFLAGS) -mcpu=power7 -mbig-endian -mabi=elfv1
 CXXFLAGS += $(CFLAGS) -nostdinc++ -fno-rtti -fno-exceptions -Wall \
 	    -fuse-cxa-atexit
 LDFLAGS += --nostdlib --sort-common -EB $(COMMONFLAGS)
-- 
1.7.4.1

OpenPOWER on IntegriCloud