This error occurs on some hosts. We suspect it occurs only on 32-bit hosts. It appears that some magic is occurring where a constant is too large. Host: CentOS 6.4 32-bit Host GCC: 4.4.7 20120313 (Red Hat 4.4.7-3) Target: arm-rtems4.11 Component Versions: gcc-4.7.2 gmp-5.0.5 mpc-0.8.2 mpfr-3.0.1 newlib-2.0.0 Configure command: ../gcc-4.7.2/configure \ --prefix=/home/joel/rtems-4.11-work/tools \ --bindir=/home/joel/rtems-4.11-work/tools/bin \ --exec_prefix=/home/joel/rtems-4.11-work/tools \ --includedir=/home/joel/rtems-4.11-work/tools/include \ --libdir=/home/joel/rtems-4.11-work/tools/lib \ --libexecdir=/home/joel/rtems-4.11-work/tools/libexec \ --mandir=/home/joel/rtems-4.11-work/tools/share/man \ --infodir=/home/joel/rtems-4.11-work/tools/share/info \ --datadir=/home/joel/rtems-4.11-work/tools/share \ --build=i686-linux-gnu --host=i686-linux-gnu \ --target=arm-rtems4.11 \ --disable-libstdcxx-pch \ --with-gnu-as --with-gnu-ld --verbose \ --with-newlib \ --with-system-zlib \ --disable-nls --without-included-gettext \ --disable-win32-registry \ --enable-version-specific-runtime-libs \ --disable-lto \ --enable-threads \ --disable-plugin \ --enable-newlib-io-c99-formats \ --enable-newlib-iconv \ --enable-obsolete \ --enable-languages="$languages" Failure output: /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/./gcc/xgcc -B/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/./gcc/ -nostdinc -B/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/newlib/ -isystem /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/newlib/targ-include -isystem /home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/gcc-4.7.2/newlib/libc/include -B/home/joel/rtems-4.11-work/tools/arm-rtems4.11/bin/ -B/home/joel/rtems-4.11-work/tools/arm-rtems4.11/lib/ -isystem /home/joel/rtems-4.11-work/tools/arm-rtems4.11/include -isystem /home/joel/rtems-4.11-work/tools/arm-rtems4.11/sys-include -g -O2 -mthumb -O2 -I../../../../gcc-4.7.2/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fno-inline -I. -I. -I../../.././gcc -I../../../../gcc-4.7.2/libgcc -I../../../../gcc-4.7.2/libgcc/. -I../../../../gcc-4.7.2/libgcc/../gcc -I../../../../gcc-4.7.2/libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../gcc-4.7.2/libgcc/libgcc2.c In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.c:30:0: ../../../../gcc-4.7.2/libgcc/../gcc/coretypes.h:188:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/coretypes.h:195:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/options.h:6:0, from ../../.././gcc/tm.h:14, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:139:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:147:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:186:1: warning: enumeration values exceed range of largest integer [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:190:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/flag-types.h:193:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/options.h:8:0, from ../../.././gcc/tm.h:14, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm-opts.h:42:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm-opts.h:45:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:14:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../.././gcc/options.h:3626:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/options.h:4750:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:15:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../.././gcc/insn-constants.h:28:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/insn-constants.h:186:1: warning: enumeration values exceed range of largest integer [enabled by default] ../../.././gcc/insn-constants.h:191:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../.././gcc/insn-constants.h:213:1: warning: enumeration values exceed range of largest integer [enabled by default] In file included from ../../.././gcc/tm.h:25:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:31: ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:128:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:335:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1403:7: error: size of array 'call_via' is too large ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1420:20: error: size of array 'thumb_call_via_label' is too large ../../../../gcc-4.7.2/libgcc/../gcc/config/arm/arm.h:1466:7: error: size of array 'aapcs_cprc_failed' is too large In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.c:58:0: ../../../../gcc-4.7.2/libgcc/libgcc2.h:499:22: error: size of array '__popcount_tab' is too large ../../../../gcc-4.7.2/libgcc/libgcc2.h:505:1: error: size of array '__clz_tab' is too large In file included from ../../../../gcc-4.7.2/libgcc/libgcc2.h:507:0, from ../../../../gcc-4.7.2/libgcc/libgcc2.c:58: ../../../../gcc-4.7.2/libgcc/longlong.h:63:1: error: size of array '__clz_tab' is too large ../../../../gcc-4.7.2/libgcc/libgcc2.c: In function '__muldi3': ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: overflow in implicit constant conversion [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: right shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:22: warning: integer overflow in expression [-Woverflow] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: left shift count is negative [enabled by default] ../../../../gcc-4.7.2/libgcc/libgcc2.c:553:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] make[4]: *** [_muldi3.o] Error 1 make[4]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/thumb/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/libgcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build/arm-rtems4.11/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/joel/rtems-4.11-work/rtems-source-builder/rtems/build/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2-1/arm-rtems4.11-gcc-4.7.2-newlib-2.0.0-1-4.7.2/build'
Created attachment 29747 [details] Preprocessed code that fails to build I don't think this code is in error. At least I don't see how. I think something has gone wrong with the arm cross-compiler being used to build it.
Created attachment 29748 [details] Full build log In case there is something useful in the build log. Host: CentOS 6.4. FYI We first saw this back in Oct 2012. But could not reproduce it on another machine. I believe it has now been reproduced on 32-bit CentOS and Ubuntu hosts.
Adding another data point. This also fails on gcc63.fsffrance.org which is: $ ssh joel@gcc63.fsffrance.org Linux deluxe 2.6.26-2-sparc64-smp #1 SMP Sun Mar 4 22:02:58 UTC 2012 sparc64 $ cat /etc/issue Debian GNU/Linux 5.0 \n \l
Created attachment 29771 [details] xgcc dumps from a cygwin build that also fails. The file contains all the gcc trace and dump output I could figure out. If more is needed I am happy to collect it so please let me know what I need to add.
A cygwin cross-compile also fails as it is a 32bit host. The failure is not specific to Linux. This means RTEMS users have problems building from source on Windows as cygwin currently us not working and MinGW has issues (gcc-4.7.2 contains path elements great than the Windows max. limit and this effects MinGW utils, eg rm).
It looks to me like libcpp/configure.ac is not setting 'need_64bit_hwint' to 'yes'. It looks like the RTEMS ptch to change arm-rtems*eabi to arm-rtems* needs to have this added.
Created attachment 29796 [details] Patch to libcpp/configure.ac for 4.8 and newers
Patch committed to 4.7, 4.8 and SVN head. Closing.
(In reply to comment #8) > Patch committed to 4.7, 4.8 and SVN head. > > Closing. Can you please commit this also to the 4.6 branch.
Wrong patch applied to 4.7. Need to apply to 4.6 as well.
Created attachment 29797 [details] Patch for 4.6 and 4.7
Fixed per email from Sebastian Huber. Closing.