patches/binutils/2.20.1/120-sh-targets.patch
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Thu Jul 28 22:09:31 2011 +0200 (2011-07-28)
changeset 2573 424fa2092ace
parent 1621 60446d2e5660
permissions -rw-r--r--
scripts/libc: do not build add-ons by default

Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
are built.
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
the chosen threading implementation, e.g. "nptl", so only this add-on is
built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
yann@2088
     1
yann@2088
     2
yann@2088
     3
diff -durN binutils-2.20.1.orig/configure binutils-2.20.1/configure
yann@2088
     4
--- binutils-2.20.1.orig/configure	2010-08-17 19:32:05.000000000 +0200
yann@2088
     5
+++ binutils-2.20.1/configure	2010-08-17 19:32:07.000000000 +0200
fr@1621
     6
@@ -3054,7 +3054,7 @@
yann@1614
     7
   am33_2.0-*-linux*)
yann@1614
     8
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
     9
     ;;
yann@1614
    10
-  sh-*-linux*)
yann@1614
    11
+  sh*-*-linux*)
yann@1614
    12
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
fr@1621
    13
     ;;
yann@1614
    14
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
fr@1621
    15
@@ -3390,7 +3390,7 @@
yann@1614
    16
   romp-*-*)
yann@1614
    17
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    18
     ;;
yann@1614
    19
-  sh-*-* | sh64-*-*)
yann@1614
    20
+  sh*-*-* | sh64-*-*)
yann@1614
    21
     case "${host}" in
yann@1614
    22
       i[3456789]86-*-vsta) ;; # don't add gprof back in
yann@1614
    23
       i[3456789]86-*-go32*) ;; # don't add gprof back in
yann@2088
    24
diff -durN binutils-2.20.1.orig/configure.ac binutils-2.20.1/configure.ac
yann@2088
    25
--- binutils-2.20.1.orig/configure.ac	2010-03-03 15:19:08.000000000 +0100
yann@2088
    26
+++ binutils-2.20.1/configure.ac	2010-08-17 19:32:07.000000000 +0200
yann@2088
    27
@@ -541,7 +541,7 @@
yann@1614
    28
   am33_2.0-*-linux*)
yann@1614
    29
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    30
     ;;
yann@1614
    31
-  sh-*-linux*)
yann@1614
    32
+  sh*-*-linux*)
yann@1614
    33
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    34
     ;;    
yann@1614
    35
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
yann@2088
    36
@@ -877,7 +877,7 @@
yann@1614
    37
   romp-*-*)
yann@1614
    38
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    39
     ;;
yann@1614
    40
-  sh-*-* | sh64-*-*)
yann@1614
    41
+  sh*-*-* | sh64-*-*)
yann@1614
    42
     case "${host}" in
yann@1614
    43
       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
yann@1614
    44
       i[[3456789]]86-*-go32*) ;; # don't add gprof back in