From 0c0895f86f69c38c8998c7b46412a46474070779 Mon Sep 17 00:00:00 2001
From: Simon South <ssouth@simonsouth.com>
Date: Thu, 22 Oct 2015 03:47:26 -0400
Subject: [PATCH 3/4] gcc: LINK_SPEC: Gently refactor
Update LINK_SPEC (for arm, i386, x86_64 and ppc) with more compact but
functionally equivalent sequences.
---
gcc/gcc/config/arm/haiku.h | 6 +++---
gcc/gcc/config/i386/haiku.h | 4 ++--
gcc/gcc/config/i386/haiku64.h | 4 ++--
gcc/gcc/config/rs6000/haiku.h | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/gcc/gcc/config/arm/haiku.h b/gcc/gcc/config/arm/haiku.h
index 955ce97..b15fdc1 100644
a
|
b
|
|
78 | 78 | #define LINK_SPEC \ |
79 | 79 | "%{!o*:-o %b} -m armelf \ |
80 | 80 | %{shared|r|pie|fno-pic|fno-PIC|fno-pie|fno-PIE:; \ |
81 | | :-pie --allow-shlib-undefined --export-dynamic} %{nostart:-e 0} \ |
82 | | %{shared:-shared -e 0} %{!shared: %{!nostart: -no-undefined}} \ |
83 | | %{mbig-endian:-EB} %{mlittle-endian:-EL} -X" |
| 81 | :-pie --allow-shlib-undefined --export-dynamic} %{shared:-shared} \ |
| 82 | %{nostart|shared:-e 0;:-no-undefined} %{mbig-endian:-EB} \ |
| 83 | %{mlittle-endian:-EL} -X" |
84 | 84 | |
diff --git a/gcc/gcc/config/i386/haiku.h b/gcc/gcc/config/i386/haiku.h
index 5f54d1b..5320329 100644
a
|
b
|
Boston, MA 02111-1307, USA. */
|
56 | 56 | #define LINK_SPEC \ |
57 | 57 | "-m elf_i386_haiku \ |
58 | 58 | %{shared|r|pie|fno-pic|fno-PIC|fno-pie|fno-PIE:; \ |
59 | | :-pie --allow-shlib-undefined --export-dynamic} %{nostart:-e 0} \ |
60 | | %{shared:-shared -e 0} %{!shared: %{!nostart: -no-undefined}}" |
| 59 | :-pie --allow-shlib-undefined --export-dynamic} %{shared:-shared} \ |
| 60 | %{nostart|shared:-e 0;:-no-undefined}" |
61 | 61 | |
62 | 62 | /* A C statement (sans semicolon) to output to the stdio stream |
63 | 63 | 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 d231aac..c225cdc 100644
a
|
b
|
Boston, MA 02111-1307, USA. */
|
67 | 67 | #define LINK_SPEC \ |
68 | 68 | "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386_haiku} \ |
69 | 69 | %{shared|r|pie|fno-pic|fno-PIC|fno-pie|fno-PIE:; \ |
70 | | :-pie --allow-shlib-undefined --export-dynamic} %{nostart:-e 0} \ |
71 | | %{shared:-shared -e 0} %{!shared: %{!nostart: -no-undefined}}" |
| 70 | :-pie --allow-shlib-undefined --export-dynamic} %{shared:-shared} \ |
| 71 | %{nostart|shared:-e 0;:-no-undefined}" |
72 | 72 | |
73 | 73 | /* A C statement (sans semicolon) to output to the stdio stream |
74 | 74 | FILE the assembler definition of uninitialized global DECL named |
diff --git a/gcc/gcc/config/rs6000/haiku.h b/gcc/gcc/config/rs6000/haiku.h
index 7219804..dd228e1 100644
a
|
b
|
Boston, MA 02111-1307, USA. */
|
56 | 56 | #define LINK_SPEC \ |
57 | 57 | "%{!o*:-o %b} -m elf32ppchaiku \ |
58 | 58 | %{shared|r|pie|fno-pic|fno-PIC|fno-pie|fno-PIE:; \ |
59 | | :-pie --allow-shlib-undefined --export-dynamic} %{nostart:-e 0} \ |
60 | | %{shared:-shared -e 0} %{!shared: %{!nostart: -no-undefined}}" |
| 59 | :-pie --allow-shlib-undefined --export-dynamic} %{shared:-shared} \ |
| 60 | %{nostart|shared:-e 0;:-no-undefined}" |
61 | 61 | |
62 | 62 | #undef CC1_SPEC |
63 | 63 | #define CC1_SPEC \ |