patches/gcc/3.3/config.sub.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 When configuring a s390->s390 or cris->cris crosscompiler
     2 (ok, I haven't hit this yet, but one of these days I'll get me an account
     3 on an s390, and then I'll need this patch :-), you'll get the
     4 following error:
     5 
     6 + /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
     7 --target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
     8 --prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
     9 --enable-languages=c
    10 --with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
    11 unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
    12 --disable-shared
    13 ...
    14 *** --with-headers is only supported when cross compiling
    15 
    16 This error pops up only when you're using Daniel Jacobowitz's technique
    17 of slightly changing the target and host tuples to make them different
    18 enough to force gcc's build system to not try to pull in system libraries
    19 or headers.  This technique is needed e.g. to build an x86 -> x86
    20 cross-compiler.
    21 (The LFS developers ran into the same bug that prompted me to use
    22 this technique; they point people who run into it to
    23 http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
    24 way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
    25 
    26 config-patches@gnu.org rejected this patch, on the grounds that there
    27 is only one vendor of each of those two architectures, so the 
    28 canonicalization is by definition correct.  When I pointed out the
    29 difficulty this causes for people building s390 -> s390 or
    30 cris -> cris compilers that are incompatible with the system
    31 libraries and thus must be built like cross-compilers, he grumped and said 
    32 "autoconf should let you specify a cross-compiler in some other way than
    33 comparing tuple strings".
    34 
    35 
    36 
    37 --- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
    38 +++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
    39 @@ -433,9 +433,12 @@
    40  	crds | unos)
    41  		basic_machine=m68k-crds
    42  		;;
    43 -	cris | cris-* | etrax*)
    44 +	cris | etrax*)
    45  		basic_machine=cris-axis
    46  		;;
    47 +	cris-*)
    48 +		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
    49 +		;;
    50  	da30 | da30-*)
    51  		basic_machine=m68k-da30
    52  		;;
    53 @@ -820,11 +823,17 @@
    54  	rtpc | rtpc-*)
    55  		basic_machine=romp-ibm
    56  		;;
    57 -	s390 | s390-*)
    58 +	s390)
    59  		basic_machine=s390-ibm
    60  		;;
    61 -	s390x | s390x-*)
    62 +	s390-*)
    63 +		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
    64 +		;;
    65 +	s390x)
    66  		basic_machine=s390x-ibm
    67 +		;;
    68 +	s390x-*)
    69 +		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
    70  		;;
    71  	sa29200)
    72  		basic_machine=a29k-amd