http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52867
Bug #: 52867
Summary: Compilation of gcc-4.4.7 with gcc-4.2.4 fails on arm
platform
Classification: Unclassified
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: surr...@gmail.com
Initial note: I don't know if it qualifies as a bug for GCC-4.2.4 (current
compiler) or GCC-4.4.7 (target compiler) so please adjust if necessary.
Architecture: ARM (D-Link DNS-323)
OS: chroot-ed Debian 5.0 Lenny
GCC used for compilation: 4.2.4
Delorian:/home/gab/dev/gcc-obj# gcc -v
Using built-in specs.
Target: arm-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release
--build=arm-linux-gnu --host=arm-linux-gnu --target=arm-linux-gnu
Thread model: posix
gcc version 4.2.4 (Debian 4.2.4-6)
GCC to be compiled: 4.4.7
GMP is fresh download, to be compiled together with GCC (5.0.4)
MPFR is fresh download, to be compiled together with GCC (3.1.0)
PPL is NOT installed (hope it's not mandatory)
Configure command:
export CFLAGS="-O0"
../gcc-4.4.7/configure --enable-languages=c,c++ --with-mode=arm --disable-nls
2>&1 | tee log.configure3
Description of error:
1. When compiling without CFLAGS="-O0" (defaults to "-g -O2"), compilation
fails while building fixincludes:
gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings
-pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I../../../gcc-4.4.7/fixincludes
-I../include -I../../../gcc-4.4.7/fixincludes/../include
../../../gcc-4.4.7/fixincludes/fixincl.c
../../../gcc-4.4.7/fixincludes/fixincl.c: In function 'run_compiles':
../../../gcc-4.4.7/fixincludes/fixincl.c:395: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
Trial-and-error showed that compile gets over this point if "-O0" is used. The
"-g" flag is irrelevant, it is "-O2" that causes the segfault.
2. When compiling again, it fails because mpfr.h is not found.
I got over it by issuing "make compile" in mpfr dir.
3. When compiling again, it fails while compiling gcc/c-common.c:
gcc -c -g -fkeep-inline-functions -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 -fno-common -DHAVE_CONFIG_H -I.
-I. -I../../gcc-4.4.7/gcc -I../../gcc-4.4.7/gcc/.
-I../../gcc-4.4.7/gcc/../include -I../../gcc-4.4.7/gcc/../libcpp/include
-I/home/gab/dev/gcc-obj/./gmp -I/home/gab/dev/gcc-4.4.7/gmp
-I/home/gab/dev/gcc-obj/./mpfr -I/home/gab/dev/gcc-4.4.7/mpfr
-I../../gcc-4.4.7/gcc/../libdecnumber -I../../gcc-4.4.7/gcc/../libdecnumber/dpd
-I../libdecnumber../../gcc-4.4.7/gcc/c-common.c -o c-common.o
../../gcc-4.4.7/gcc/c-common.c: In function 'c_define_builtins':
../../gcc-4.4.7/gcc/c-common.c:3963: error: total size of local objects too
large
../../gcc-4.4.7/gcc/c-common.c:4036: confused by earlier errors, bailing out
The bug is not reproducible, so it is likely a hardware or OS problem.
I could not find any way to proceed forward with this.
Problem is reproducible on the command line when make fails, just by repeating
the appropriate gcc commands.