yann@1: When configuring a s390->s390 or cris->cris crosscompiler yann@1: (ok, I haven't hit this yet, but one of these days I'll get me an account yann@1: on an s390, and then I'll need this patch :-), you'll get the yann@1: following error: yann@1: yann@1: + /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure yann@1: --target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu yann@1: --prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2 yann@1: --enable-languages=c yann@1: --with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390- yann@1: unknown-linux-gnu --enable-threads=no --without-headers --with-newlib yann@1: --disable-shared yann@1: ... yann@1: *** --with-headers is only supported when cross compiling yann@1: yann@1: This error pops up only when you're using Daniel Jacobowitz's technique yann@1: of slightly changing the target and host tuples to make them different yann@1: enough to force gcc's build system to not try to pull in system libraries yann@1: or headers. This technique is needed e.g. to build an x86 -> x86 yann@1: cross-compiler. yann@1: (The LFS developers ran into the same bug that prompted me to use yann@1: this technique; they point people who run into it to yann@1: http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different yann@1: way of avoiding this problem. I think the tuple tweak is the way to go, though.) yann@1: yann@1: config-patches@gnu.org rejected this patch, on the grounds that there yann@1: is only one vendor of each of those two architectures, so the yann@1: canonicalization is by definition correct. When I pointed out the yann@1: difficulty this causes for people building s390 -> s390 or yann@1: cris -> cris compilers that are incompatible with the system yann@1: libraries and thus must be built like cross-compilers, he grumped and said yann@1: "autoconf should let you specify a cross-compiler in some other way than yann@1: comparing tuple strings". yann@1: yann@1: yann@1: yann@1: --- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003 yann@1: +++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003 yann@1: @@ -433,9 +433,12 @@ yann@1: crds | unos) yann@1: basic_machine=m68k-crds yann@1: ;; yann@1: - cris | cris-* | etrax*) yann@1: + cris | etrax*) yann@1: basic_machine=cris-axis yann@1: ;; yann@1: + cris-*) yann@1: + basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'` yann@1: + ;; yann@1: da30 | da30-*) yann@1: basic_machine=m68k-da30 yann@1: ;; yann@1: @@ -820,11 +823,17 @@ yann@1: rtpc | rtpc-*) yann@1: basic_machine=romp-ibm yann@1: ;; yann@1: - s390 | s390-*) yann@1: + s390) yann@1: basic_machine=s390-ibm yann@1: ;; yann@1: - s390x | s390x-*) yann@1: + s390-*) yann@1: + basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'` yann@1: + ;; yann@1: + s390x) yann@1: basic_machine=s390x-ibm yann@1: + ;; yann@1: + s390x-*) yann@1: + basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'` yann@1: ;; yann@1: sa29200) yann@1: basic_machine=a29k-amd