patches/binutils/2.20/120-sh-targets.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 12 23:51:25 2010 +0200 (2010-09-12)
changeset 2123 ff2181adbd28
parent 1614 3f76cdbceb6e
permissions -rw-r--r--
cc/gcc: disable complibs if not selected

Force gcc to not link with some companion libraries when
there are not needed (because selected-out).

There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.

Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to

So, explicitly tell gcc *not* to use unneeded companion libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
fr@1621
     1
--- binutils-2.20-dist/configure
fr@1621
     2
+++ binutils-2.20/configure
fr@1621
     3
@@ -3054,7 +3054,7 @@
yann@1614
     4
   am33_2.0-*-linux*)
yann@1614
     5
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
     6
     ;;
yann@1614
     7
-  sh-*-linux*)
yann@1614
     8
+  sh*-*-linux*)
yann@1614
     9
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
fr@1621
    10
     ;;
yann@1614
    11
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
fr@1621
    12
@@ -3390,7 +3390,7 @@
yann@1614
    13
   romp-*-*)
yann@1614
    14
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    15
     ;;
yann@1614
    16
-  sh-*-* | sh64-*-*)
yann@1614
    17
+  sh*-*-* | sh64-*-*)
yann@1614
    18
     case "${host}" in
yann@1614
    19
       i[3456789]86-*-vsta) ;; # don't add gprof back in
yann@1614
    20
       i[3456789]86-*-go32*) ;; # don't add gprof back in
fr@1621
    21
--- binutils-2.20-dist/configure.ac
fr@1621
    22
+++ binutils-2.20/configure.ac
yann@1614
    23
@@ -424,7 +424,7 @@
yann@1614
    24
   am33_2.0-*-linux*)
yann@1614
    25
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    26
     ;;
yann@1614
    27
-  sh-*-linux*)
yann@1614
    28
+  sh*-*-linux*)
yann@1614
    29
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    30
     ;;    
yann@1614
    31
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
yann@1614
    32
@@ -712,7 +712,7 @@
yann@1614
    33
   romp-*-*)
yann@1614
    34
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    35
     ;;
yann@1614
    36
-  sh-*-* | sh64-*-*)
yann@1614
    37
+  sh*-*-* | sh64-*-*)
yann@1614
    38
     case "${host}" in
yann@1614
    39
       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
yann@1614
    40
       i[[3456789]]86-*-go32*) ;; # don't add gprof back in