Ticket #12430: 0003-gcc-LINK_SPEC-Gently-refactor.patch

File 0003-gcc-LINK_SPEC-Gently-refactor.patch, 3.2 KB (added by simonsouth, 9 years ago)

Gently refactor LINK_SPEC: Consolidate sequences; use more compact notation

  • gcc/gcc/config/arm/haiku.h

    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  
    7878#define LINK_SPEC \
    7979  "%{!o*:-o %b} -m armelf \
    8080   %{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"
    8484
  • gcc/gcc/config/i386/haiku.h

    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. */  
    5656#define LINK_SPEC \
    5757  "-m elf_i386_haiku \
    5858   %{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}"
    6161
    6262/* A C statement (sans semicolon) to output to the stdio stream
    6363   FILE the assembler definition of uninitialized global DECL named
  • gcc/gcc/config/i386/haiku64.h

    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. */  
    6767#define LINK_SPEC \
    6868  "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386_haiku} \
    6969   %{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}"
    7272
    7373/* A C statement (sans semicolon) to output to the stdio stream
    7474   FILE the assembler definition of uninitialized global DECL named
  • gcc/gcc/config/rs6000/haiku.h

    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. */  
    5656#define LINK_SPEC \
    5757  "%{!o*:-o %b} -m elf32ppchaiku \
    5858   %{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}"
    6161
    6262#undef CC1_SPEC
    6363#define CC1_SPEC \