⛏️ index : buildtools.git

author Jérôme Duval <jerome.duval@gmail.com> 2016-02-28 11:51:22.0 +01:00:00
committer Jérôme Duval <jerome.duval@gmail.com> 2016-02-28 15:33:41.0 +01:00:00
commit
661fb7cf18b38506538acdb9288c71dbf1e50ea4 [patch]
tree
fdd6dbd5b2d5ccd8d91e65d28eb15a73e6b99917
parent
b9cfe212c1860d9ddfa479850013ad400f7c359d
download
661fb7cf18b38506538acdb9288c71dbf1e50ea4.tar.gz

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(-)

diff --git a/gcc/gcc/config/arm/haiku.h b/gcc/gcc/config/arm/haiku.h
index dedc53b..f0c0d63 100644
--- a/gcc/gcc/config/arm/haiku.h
+++ a/gcc/gcc/config/arm/haiku.h
@@ -75,10 +75,6 @@
/* If ELF is the default format, we should not use /lib/elf.  */

#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"

diff --git a/gcc/gcc/config/i386/haiku.h b/gcc/gcc/config/i386/haiku.h
index 39e55ce..3379e19 100644
--- a/gcc/gcc/config/i386/haiku.h
+++ a/gcc/gcc/config/i386/haiku.h
@@ -53,11 +53,7 @@
/* If ELF is the default format, we should not use /lib/elf.  */

#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
diff --git a/gcc/gcc/config/i386/haiku64.h b/gcc/gcc/config/i386/haiku64.h
index 82a0420..76ba48e 100644
--- a/gcc/gcc/config/i386/haiku64.h
+++ a/gcc/gcc/config/i386/haiku64.h
@@ -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
diff --git a/gcc/gcc/config/m68k/haiku.h b/gcc/gcc/config/m68k/haiku.h
index a1f7750..358c19f 100644
--- a/gcc/gcc/config/m68k/haiku.h
+++ a/gcc/gcc/config/m68k/haiku.h
@@ -108,11 +108,7 @@

#undef	LINK_SPEC
/*#define LINK_SPEC "%{!o*:-o %b} -m elf_m68k_haiku -shared -no-undefined %{nostart:-e 0}"*/
#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}"

/* XXX: not sure for the rest there... */

diff --git a/gcc/gcc/config/mips/haiku.h b/gcc/gcc/config/mips/haiku.h
index 2393af6..f6d2efb 100644
--- a/gcc/gcc/config/mips/haiku.h
+++ a/gcc/gcc/config/mips/haiku.h
@@ -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}"

diff --git a/gcc/gcc/config/rs6000/haiku.h b/gcc/gcc/config/rs6000/haiku.h
index 4a6be20..4dff89e 100644
--- a/gcc/gcc/config/rs6000/haiku.h
+++ a/gcc/gcc/config/rs6000/haiku.h
@@ -53,8 +53,4 @@
/* If ELF is the default format, we should not use /lib/elf.  */

#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}}"