Can't build gcc for msp430. Failing in stage two with the following error message (in the log file): checking for library containing clock_gettime... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. Reproducible: Always Steps to Reproduce: 1. sudo crossdev -s4 -t msp430 Actual Results: -------------------------------------------------------------------------------- * crossdev version: 20141030 * Host Portage ARCH: amd64 * Target Portage ARCH: * * Target System: msp430-elf * Stage: 4 (C/C++ compiler) * ABIs: default * binutils: >=binutils-2.24.90 * gcc: >=gcc-4.9.1 * libc: >=newlib-2.1.0 * CROSSDEV_OVERLAY: /usr/local/portage * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: * Portage flags: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - * leaving sys-devel/binutils in /usr/local/portage * leaving sys-devel/gcc in /usr/local/portage * leaving sys-libs/newlib in /usr/local/portage * leaving sys-devel/gdb in /usr/local/portage * leaving metadata/layout.conf alone in /usr/local/portage _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - * Log: /var/log/portage/cross-msp430-elf-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-msp430-elf-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-msp430-elf-newlib.log * Emerging cross-newlib ... [ ok ] * Log: /var/log/portage/cross-msp430-elf-gcc-stage2.log * Emerging cross-gcc-stage2 ... * gcc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-msp430-elf-info.log * /var/log/portage/cross-msp430-elf-gcc-stage2.log.xz * /var/tmp/portage/cross-msp430-elf/gcc*/temp/gcc-config.logs.tar.xz Expected Results: A complete toolchain including gcc, buildutils and newlib (or at least the msp430 headers). Please note this is a different problem then the one I'm having with 4.9.2 (i.e. I don't believe they're duplicates).
Created attachment 403300 [details] cross-msp430-elf-info.log
Created attachment 403302 [details] cross-msp430-elf-gcc-stage2.log.xz
Created attachment 403304 [details] gcc-config.logs.tar.xz
looks like newlib is broken: configure:3949: $? = 1 configure:3965: /var/tmp/portage/cross-msp430-elf/gcc-5.1.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-msp430-elf/gcc-5.1.0/work/build/./gcc/ -B/usr/msp430-elf/bin/ -B/usr/msp430-elf/lib/ -isystem /usr/msp430-elf/include -isystem /usr/msp430-elf/sys-include -o conftest -g -O2 conftest.c >&5 /usr/msp430-elf/lib/libcrt.a(crt_callexit.o): In function `.Loc.118.1': /var/tmp/portage/cross-msp430-elf/newlib-2.2.0.20150225/work/newlib-2.2.0.20150225/libgloss/msp430/crt0.S:118: undefined reference to `_exit'
What I did to work around this build issue is to add EXTRA_ECONF="--enable-libstdcxx-time=no" to /etc/portage/env/cross-msp430-elf/gcc.conf the same workaround fixes it on cross-arm-none-eabi/gcc as well.
This is now a problem on gcc-4.9.3 as well. Joakim's solution works for me. It seems like perhaps this is something that should be added to the cross-compilation setup.
*** This bug has been marked as a duplicate of bug 589672 ***