patches/gcc/3.2.3/100-config.sub.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
yann@402
     1
When configuring a s390->s390 or cris->cris crosscompiler
yann@402
     2
(ok, I haven't hit this yet, but one of these days I'll get me an account
yann@402
     3
on an s390, and then I'll need this patch :-), you'll get the
yann@402
     4
following error:
yann@402
     5
yann@402
     6
+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
yann@402
     7
--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
yann@402
     8
--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
yann@402
     9
--enable-languages=c
yann@402
    10
--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
yann@402
    11
unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
yann@402
    12
--disable-shared
yann@402
    13
...
yann@402
    14
*** --with-headers is only supported when cross compiling
yann@402
    15
yann@402
    16
This error pops up only when you're using Daniel Jacobowitz's technique
yann@402
    17
of slightly changing the target and host tuples to make them different
yann@402
    18
enough to force gcc's build system to not try to pull in system libraries
yann@402
    19
or headers.  This technique is needed e.g. to build an x86 -> x86
yann@402
    20
cross-compiler.
yann@402
    21
(The LFS developers ran into the same bug that prompted me to use
yann@402
    22
this technique; they point people who run into it to
yann@402
    23
http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
yann@402
    24
way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
yann@402
    25
yann@402
    26
config-patches@gnu.org rejected this patch, on the grounds that there
yann@402
    27
is only one vendor of each of those two architectures, so the 
yann@402
    28
canonicalization is by definition correct.  When I pointed out the
yann@402
    29
difficulty this causes for people building s390 -> s390 or
yann@402
    30
cris -> cris compilers that are incompatible with the system
yann@402
    31
libraries and thus must be built like cross-compilers, he grumped and said 
yann@402
    32
"autoconf should let you specify a cross-compiler in some other way than
yann@402
    33
comparing tuple strings".
yann@402
    34
yann@402
    35
yann@402
    36
yann@402
    37
--- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
yann@402
    38
+++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
yann@402
    39
@@ -433,9 +433,12 @@
yann@402
    40
 	crds | unos)
yann@402
    41
 		basic_machine=m68k-crds
yann@402
    42
 		;;
yann@402
    43
-	cris | cris-* | etrax*)
yann@402
    44
+	cris | etrax*)
yann@402
    45
 		basic_machine=cris-axis
yann@402
    46
 		;;
yann@402
    47
+	cris-*)
yann@402
    48
+		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
yann@402
    49
+		;;
yann@402
    50
 	da30 | da30-*)
yann@402
    51
 		basic_machine=m68k-da30
yann@402
    52
 		;;
yann@402
    53
@@ -820,11 +823,17 @@
yann@402
    54
 	rtpc | rtpc-*)
yann@402
    55
 		basic_machine=romp-ibm
yann@402
    56
 		;;
yann@402
    57
-	s390 | s390-*)
yann@402
    58
+	s390)
yann@402
    59
 		basic_machine=s390-ibm
yann@402
    60
 		;;
yann@402
    61
-	s390x | s390x-*)
yann@402
    62
+	s390-*)
yann@402
    63
+		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
yann@402
    64
+		;;
yann@402
    65
+	s390x)
yann@402
    66
 		basic_machine=s390x-ibm
yann@402
    67
+		;;
yann@402
    68
+	s390x-*)
yann@402
    69
+		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
yann@402
    70
 		;;
yann@402
    71
 	sa29200)
yann@402
    72
 		basic_machine=a29k-amd