patches/gcc/3.2.3/100-config.sub.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 26 15:12:33 2008 +0000 (2008-07-26)
branch1.2
changeset 730 823ac8f8e9fd
permissions -rw-r--r--
Backport #849 from trunk:
Remove garbage files left behind by downloads from sourceforge.net.

/branches/1.2/scripts/build/debug/500-strace.sh | 4 4 0 0 ++++
/branches/1.2/scripts/build/debug/200-duma.sh | 5 4 1 0 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
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