From 519355391e32be5e078f53a3fe3cf74b7f274654 Mon Sep 17 00:00:00 2001 From: François Revol Date: Mon, 20 Apr 2015 03:03:08 +0200 Subject: [PATCH] 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. --- 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}" -- gitore 0.2.2