Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549512 - cross-msp430-elf/gcc-5.1.0 fails in stage2 due to link tests failing w/newlib
Summary: cross-msp430-elf/gcc-5.1.0 fails in stage2 due to link tests failing w/newlib
Status: RESOLVED DUPLICATE of bug 589672
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2015-05-15 02:41 UTC by Alex Orange
Modified: 2018-04-29 16:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cross-msp430-elf-info.log (cross-msp430-elf-info.log,16.82 KB, text/x-log)
2015-05-15 02:42 UTC, Alex Orange
Details
cross-msp430-elf-gcc-stage2.log.xz (cross-msp430-elf-gcc-stage2.log.xz,65.45 KB, application/x-xz)
2015-05-15 02:42 UTC, Alex Orange
Details
gcc-config.logs.tar.xz (gcc-config.logs.tar.xz,58.32 KB, application/x-xz)
2015-05-15 02:43 UTC, Alex Orange
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Orange 2015-05-15 02:41:35 UTC
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).
Comment 1 Alex Orange 2015-05-15 02:42:08 UTC
Created attachment 403300 [details]
cross-msp430-elf-info.log
Comment 2 Alex Orange 2015-05-15 02:42:27 UTC
Created attachment 403302 [details]
cross-msp430-elf-gcc-stage2.log.xz
Comment 3 Alex Orange 2015-05-15 02:43:05 UTC
Created attachment 403304 [details]
gcc-config.logs.tar.xz
Comment 4 SpanKY gentoo-dev 2015-05-18 16:08:52 UTC
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'
Comment 5 Joakim Gebart Nohlgård 2016-02-22 13:22:11 UTC
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.
Comment 6 Alex Orange 2016-05-24 01:28:49 UTC
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.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2018-04-29 16:05:19 UTC

*** This bug has been marked as a duplicate of bug 589672 ***