1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/3.2.3/100-config.sub.patch Mon Mar 30 21:17:21 2009 +0000
1.3 @@ -0,0 +1,72 @@
1.4 +When configuring a s390->s390 or cris->cris crosscompiler
1.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
1.6 +on an s390, and then I'll need this patch :-), you'll get the
1.7 +following error:
1.8 +
1.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
1.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
1.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
1.12 +--enable-languages=c
1.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
1.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
1.15 +--disable-shared
1.16 +...
1.17 +*** --with-headers is only supported when cross compiling
1.18 +
1.19 +This error pops up only when you're using Daniel Jacobowitz's technique
1.20 +of slightly changing the target and host tuples to make them different
1.21 +enough to force gcc's build system to not try to pull in system libraries
1.22 +or headers. This technique is needed e.g. to build an x86 -> x86
1.23 +cross-compiler.
1.24 +(The LFS developers ran into the same bug that prompted me to use
1.25 +this technique; they point people who run into it to
1.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
1.27 +way of avoiding this problem. I think the tuple tweak is the way to go, though.)
1.28 +
1.29 +config-patches@gnu.org rejected this patch, on the grounds that there
1.30 +is only one vendor of each of those two architectures, so the
1.31 +canonicalization is by definition correct. When I pointed out the
1.32 +difficulty this causes for people building s390 -> s390 or
1.33 +cris -> cris compilers that are incompatible with the system
1.34 +libraries and thus must be built like cross-compilers, he grumped and said
1.35 +"autoconf should let you specify a cross-compiler in some other way than
1.36 +comparing tuple strings".
1.37 +
1.38 +
1.39 +
1.40 +--- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003
1.41 ++++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003
1.42 +@@ -433,9 +433,12 @@
1.43 + crds | unos)
1.44 + basic_machine=m68k-crds
1.45 + ;;
1.46 +- cris | cris-* | etrax*)
1.47 ++ cris | etrax*)
1.48 + basic_machine=cris-axis
1.49 + ;;
1.50 ++ cris-*)
1.51 ++ basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
1.52 ++ ;;
1.53 + da30 | da30-*)
1.54 + basic_machine=m68k-da30
1.55 + ;;
1.56 +@@ -820,11 +823,17 @@
1.57 + rtpc | rtpc-*)
1.58 + basic_machine=romp-ibm
1.59 + ;;
1.60 +- s390 | s390-*)
1.61 ++ s390)
1.62 + basic_machine=s390-ibm
1.63 + ;;
1.64 +- s390x | s390x-*)
1.65 ++ s390-*)
1.66 ++ basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
1.67 ++ ;;
1.68 ++ s390x)
1.69 + basic_machine=s390x-ibm
1.70 ++ ;;
1.71 ++ s390x-*)
1.72 ++ basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
1.73 + ;;
1.74 + sa29200)
1.75 + basic_machine=a29k-amd