gcc4: revert partially 419211519c79edc7af6fca9c6a3233129ec54d7d.
"* LINK_SPEC: Pass "-shared" to the linker only if it was passed to gcc; output
position-independent executables by default;" is reverted to workaround a
link failure on gcc4 with binutils 2.26: add-ons objects would fail to link
against an executable (being no more a shared object). This is possibly temporary
until the need for executable as shared objects is fully reviewed.
Diff
gcc/gcc/config/arm/haiku.h | 8 ++------
gcc/gcc/config/i386/haiku.h | 6 +-----
gcc/gcc/config/i386/haiku64.h | 7 ++-----
gcc/gcc/config/m68k/haiku.h | 6 +-----
gcc/gcc/config/mips/haiku.h | 6 +-----
gcc/gcc/config/rs6000/haiku.h | 6 +-----
6 files changed, 8 insertions(+), 31 deletions(-)
@@ -75,10 +75,6 @@
#undef LINK_SPEC
#define LINK_SPEC \
"%{!o*:-o %b} -m armelf \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
%{nostart|shared:-e 0;:--no-undefined} %{mbig-endian:-EB} \
%{mlittle-endian:-EL} -X"
#define LINK_SPEC "%{!o*:-o %b} -m armelf %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
@@ -53,11 +53,7 @@
#undef LINK_SPEC
#define LINK_SPEC \
"-m elf_i386_haiku \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
%{nostart|shared:-e 0;:--no-undefined}"
#define LINK_SPEC "-m elf_i386_haiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
@@ -64,11 +64,8 @@
#endif
#undef LINK_SPEC
#define LINK_SPEC \
"%{" SPEC_64 ":-m elf_x86_64_haiku} %{" SPEC_32 ":-m elf_i386_haiku} \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
%{nostart|shared:-e 0;:--no-undefined}"
#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64_haiku} %{" SPEC_32 ":-m elf_i386_haiku} \
%{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
@@ -108,11 +108,7 @@
#undef LINK_SPEC
#define LINK_SPEC \
"%{!o*:-o %b} -m m68kelf \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
--no-undefined %{nostart:-e 0}"
#define LINK_SPEC "%{!o*:-o %b} -m m68kelf %{!r:-shared} -no-undefined %{nostart:-e 0}"
@@ -40,9 +40,5 @@
while (0)
#undef LINK_SPEC
#define LINK_SPEC \
"%{!o*:-o %b} -m elf_mipsel_haiku \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
%{nostart:-e 0}"
#define LINK_SPEC "%{!o*:-o %b} -m elf_mipsel_haiku %{!r:-shared} %{nostart:-e 0}"
@@ -53,8 +53,4 @@
#undef LINK_SPEC
#define LINK_SPEC \
"%{!o*:-o %b} -m elf32ppchaiku \
%{shared:-shared;!r:%{fno-pic|fno-PIC|fno-pie|fno-PIE:;:%{!pie:-pie}} \
%{!static:--export-dynamic --allow-shlib-undefined}} %{static:-static} \
%{nostart|shared:-e 0;:--no-undefined}"
#define LINK_SPEC "%{!o*:-o %b} -m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"