[haiku-bugs] [Haiku] #7824: Cross-Compiling gcc 4 on Haiku broken

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 16 Jul 2011 01:09:16 -0000

#7824: Cross-Compiling gcc 4 on Haiku broken
--------------------------+------------------------------
 Reporter:  bonefish      |        Owner:  bonefish
     Type:  bug           |       Status:  new
 Priority:  blocker       |    Milestone:  R1
Component:  Build System  |      Version:  R1/Development
 Keywords:                |   Blocked By:
 Blocking:                |  Has a Patch:  0
 Platform:  All           |
--------------------------+------------------------------
 Tested with a gcc 4.4.4 only Haiku, r42291, trying to build gcc 4 cross-
 compiler from r42433 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[3]: *** [cp/call.o] Error 1
 make[3]: *** Waiting for unfinished jobs....
 rm gcc.pod gcov.pod
 make[3]: Leaving directory `/Transfer/haiku-trunk/generated-gcc4-cross
 /cross-tools-build/gcc/gcc'
 make[2]: *** [all-stage2-gcc] Error 2
 make[2]: Leaving directory `/Transfer/haiku-trunk/generated-gcc4-cross
 /cross-tools-build/gcc'
 make[1]: *** [stage2-bubble] Error 2
 make[1]: 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.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7824>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: