I can bootstrap a cross-compiler with no target system library with GCC 4.3.3,
but using the same configuration options causes a failure when building GCC
4.4.3. It appears to be attempting to build the regex function of libiberty
for the target, and failing because there isn't a target system library
available. I'm not sure why 4.4.3 wants to build that when 4.3.3 did not. My
configuration options are based on what Codesourcery uses for arm-none-eabi in
their 2009q3 toolchain.
Configuration:
../gcc-%{version}/configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--target=arm-none-eabi \
--disable-libmudflap \
--disable-libssp \
--disable-libstdcxx-pch \
--enable-extra-sgxxlite-multilibs \
--with-gnu-as \
--with-gnu-ld \
'--with-specs=%{O2:%{!fno-remove-local-statics: -fremove-local-statics}}
%{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}'
\
--enable-languages=c \
--enable-shared \
--disable-lto \
--with-newlib \
--disable-nls \
--disable-libgomp \
--without-headers \
--disable-decimal-float \
--disable-libffi \
--with-system-zlib \
--enable-version-specific-runtime-libs \
--enable-interwork \
--enable-poison-system-directories
Failure when building 4.4.3:
checking for a 64-bit type... unsigned long long
checking for pid_t... no
checking for working strncmp... no
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
Adding multilib support to Makefile in ../../../../gcc-4.4.3/libiberty
with_multisubdir=thumb
make[2]: Entering directory
`/home/eric/rpmbuild/BUILD/arm-none-eabi-gcc-bootstrap-4.4.3/gcc-arm-none-eabi/arm-none-eabi/libiberty'
if [ x"-fPIC" != x ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
if [ x"-fPIC" != x ]; then \
/home/eric/rpmbuild/BUILD/arm-none-eabi-gcc-bootstrap-4.4.3/gcc-arm-none-eabi/./gcc/xgcc
-B/home/eric/rpmbuild/BUILD/arm-none-eabi-gcc-bootstrap-4.4.3/gcc-arm-none-eabi/./gcc/
-B/usr/arm-none-eabi/bin/ -B/usr/arm-none-eabi/lib/ -isystem
/usr/arm-none-eabi/include -isystem /usr/arm-none-eabi/sys-include -c
-DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-4.4.3/libiberty/../include -W
-Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fPIC
../../../gcc-4.4.3/libiberty/regex.c -o pic/regex.o; \
else true; fi
../../../gcc-4.4.3/libiberty/regex.c:51:25: error: sys/types.h: No such file or
directory
[...lots more errors due to missing sys/types.h omitted here...]
../../../gcc-4.4.3/libiberty/regex.c:8112: warning: incompatible implicit
declaration of built-in function 'free'
../../../gcc-4.4.3/libiberty/regex.c:8121: error: 'regex_t' has no member named
'fastmap_accurate'
make[2]: *** [regex.o] Error 1
make[2]: Leaving directory
`/home/eric/rpmbuild/BUILD/arm-none-eabi-gcc-bootstrap-4.4.3/gcc-arm-none-eabi/arm-none-eabi/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory
`/home/eric/rpmbuild/BUILD/arm-none-eabi-gcc-bootstrap-4.4.3/gcc-arm-none-eabi'
make: *** [all] Error 2
--
Summary: building arm cross-compiler fails when attempting to
build regex library
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric at brouhaha dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: arm-none-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43073