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