http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53246

             Bug #: 53246
           Summary: failure building cross compiler for arm7tdmi
                    (arm-none-eabi) in libgcc (multilib)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: patriciak784-gccmainl...@yahoo.de


I tried to build a cross compiler on the GCC 4.7 branch rev 187011 from svn on
my x86_64 linux machine with the following configure line:
../../tree/armcompilersource/gcctree4.7/configure --target=arm-none-eabi
--disable-decimal-float --prefix=/opt/myarmgcc --with-cpu=arm7tdmi
--with-arch=armv4t --with-mode=thumb --with-tune=arm7tdmi  --enable-languages=c
--disable-libssp --disable-libquadmath --disable-libquadmath-support
--disable-libgomp --disable-nls --with-newlib --disable-shared --enable-lto
--disable-threads --disable-tls --with-system-zlib

Make will fail trying to build the target libgcc for the fpu multilib
...
Running configure in multilib subdir fpu
pwd: /home/testuser/gccbuild/arm-none-eabi
mkdir fpu
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-none-eabi
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for arm-none-eabi-ar... /opt/myarmgcc/arm-none-eabi/bin/ar
checking for arm-none-eabi-lipo... arm-none-eabi-lipo
checking for arm-none-eabi-nm... /home/testuser/gccbuild/./gcc/nm
checking for arm-none-eabi-ranlib... /opt/myarmgcc/arm-none-eabi/bin/ranlib
checking for arm-none-eabi-strip... /opt/myarmgcc/arm-none-eabi/bin/strip
checking whether ln -s works... yes
checking for arm-none-eabi-gcc... /home/testuser/gccbuild/./gcc/xgcc
-B/home/testuser/gccbuild/./gcc/ -B/opt/myarmgcc/arm-none-eabi/bin/
-B/opt/myarmgcc/arm-none-eabi/lib/ -isystem /opt/myarmgcc/arm-none-eabi/include
-isystem /opt/myarmgcc/arm-none-eabi/sys-include  -mfloat-abi=hard
checking for suffix of object files... configure: error: in
`/home/testuser/gccbuild/arm-none-eabi/fpu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Fehler 1
make[1]: Leaving directory `/home/testuser/gccbuild'
make: *** [all] Fehler 2

config.log says:
configure:3625: checking for suffix of object files
configure:3647: /home/testuser/gccbuild/./gcc/xgcc
-B/home/testuser/gccbuild/./gcc/ -B/opt/myarmgcc/arm-none-eabi/bin/
-B/opt/myarmgcc/arm-none-eabi/lib/ -isystem /opt/myarmgcc/arm-none-eabi/include
-isystem /opt/myarmgcc/arm-none-eabi/sys-include  -mfloat-abi=hard -c -g -O2 
conftest.c >&5
conftest.c: In function 'main':
conftest.c:12:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
configure:3651: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3665: error: in `/home/testuser/gccbuild/arm-none-eabi/fpu/libgcc':
configure:3668: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.


I tried to disable the fpu multilib by adding --disable-fpu to the configure
line:
../../tree/armcompilersource/gcctree4.7/configure --target=arm-none-eabi
--disable-decimal-float --prefix=/opt/myarmgcc --with-cpu=arm7tdmi
--with-arch=armv4t --with-mode=thumb --with-tune=arm7tdmi  --enable-languages=c
--disable-libssp --disable-libquadmath --disable-libquadmath-support
--disable-libgomp --disable-nls --with-newlib --disable-shared --enable-lto
--disable-threads --disable-tls --with-system-zlib --disable-fpu

The gcc build now succeeds but if I execute arm-none-eabi-gcc -print-multi-lib,
it will report:
.;
thumb;@mthumb
fpu;@mfloat-abi=hard
So this GCC thinks it has a fpu multilib; but this has been disabled and no fpu
multilib part of libgcc has not been built.
This is a problem because building newlib with this GCC will fail because
newlib depends on the correctness of the output of -print-multi-lib

Please fix the configure process so that it won't fail builing the fpu multilib
part of libgcc and fix the output of gcc -print-multi-lib if gcc has been
configured with --disable-fpu.

Thank you

Reply via email to