Cross-Compiling gcc 4 on Haiku broken
|Reported by:||bonefish||Owned by:||zooey|
|Keywords:||Cc:||siarzhuk, modeenf, mdisreali@…|
Tested with a gcc 4.4.4 only Haiku, hrev42291, trying to build gcc 4 cross-compiler from hrev42433 sources (both Haiku and buildtools) using Haiku's configure script and
--build-cross-tools-gcc4 x86 ....
gcc's configure script deduces from comparing host and target platform that it is building a native (not a cross-) compiler and errors out, complaining that
--with-headers is supported for several targets.
Attaching patches intended to remedy the situation by introducing a gcc configure option
--enable-cross-compiler and using it in Haiku's
build/scripts/build_cross_tools_gcc4 script (the patches might not be sufficient -- I don't have a good overview of all the components of the gcc build system). After applying the gcc patch, autoconf needs to be run to update configure script. It only works when the inclusion of
config/override.m4 in line 23 is commented out -- that file contains work-arounds for older autoconf versions which apparently break with a new one (yeah!).
With the patches applied the build goes further, but fails eventually with:
/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc/./prev-gcc/xgcc -B/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc/./prev-gcc/ -B/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools/i586-pc-haiku/bin/ -c -g -O2 -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Icp -I/Transfer/buildtools/gcc/gcc -I/Transfer/buildtools/gcc/gcc/cp -I/Transfer/buildtools/gcc/gcc/../include -I/Transfer/buildtools/gcc/gcc/../libcpp/include -I/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc/./gmp -I/Transfer/buildtools/gcc/gmp -I/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc/./mpfr -I/Transfer/buildtools/gcc/mpfr -I/Transfer/buildtools/gcc/gcc/../libdecnumber -I/Transfer/buildtools/gcc/gcc/../libdecnumber/dpd -I../libdecnumber /Transfer/buildtools/gcc/gcc/cp/call.c -o cp/call.o [...] /Transfer/buildtools/gcc/gcc/cp/call.c: In function 'build_operator_new_call': /Transfer/buildtools/gcc/gcc/cp/call.c:3101: internal compiler error: in gss_for_code, at gimple.c:131 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [cp/call.o] Error 1 make: *** Waiting for unfinished jobs.... rm gcc.pod gcov.pod make: Leaving directory `/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc/gcc' make: *** [all-stage2-gcc] Error 2 make: Leaving directory `/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc' make: *** [stage2-bubble] Error 2 make: Leaving directory `/Transfer/haiku-trunk/generated-gcc4-cross/cross-tools-build/gcc' make: *** [all] Error 2
After the "Waiting for unfinished jobs...." a gcc process remained that did not exit, consuming CPU time.