patches/gcc/3.2.3/config.sub.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
     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