⛏️ index : buildtools.git

author François Revol <revol@free.fr> 2015-04-20 3:03:08.0 +02:00:00
committer François Revol <revol@free.fr> 2015-04-20 3:06:37.0 +02:00:00
commit
519355391e32be5e078f53a3fe3cf74b7f274654 [patch]
tree
ee0d6f4a105160d128bd93da1ca5180c1924283b
parent
0dfb79fe88a5811c679ae5caa8345e099c620ceb
download
519355391e32be5e078f53a3fe3cf74b7f274654.tar.gz

gcc: force -fPIC instead of -fpic by default on ppc

Works around "relocation truncated to fit: R_PPC_GOT16 against symbol" issue
mentioned in #10240. PIC uses a larger GOT which doesn't overflow, unlike pic.

Diff

 gcc/gcc/config/rs6000/haiku.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/gcc/config/rs6000/haiku.h b/gcc/gcc/config/rs6000/haiku.h
index 1bfb3d9..d89ce0b 100644
--- a/gcc/gcc/config/rs6000/haiku.h
+++ b/gcc/gcc/config/rs6000/haiku.h
@@ -54,3 +54,6 @@

#undef	LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf32ppchaiku %{!r:-shared} -no-undefined %{nostart:-e 0}"

#undef CC1_SPEC
#define CC1_SPEC "%{!no-fpic:%{!fno-pic:%{!fno-pie:%{!fpie:%{!fPIC:%{!fPIE:-fPIC}}}}}} %{!Wmultichar: -Wno-multichar} %(cc1_cpu) %{profile:-p}"