Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655522 - cross-arm-none-eabi/gcc-7.3.0-r1 and cross-arm-none-eabi/gcc-6.4.0-r1: stage2 fails when C++ is enabled
Summary: cross-arm-none-eabi/gcc-7.3.0-r1 and cross-arm-none-eabi/gcc-6.4.0-r1: stage2...
Status: RESOLVED FIXED
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:
 
Reported: 2018-05-11 18:58 UTC by NiTr0
Modified: 2018-05-12 21:27 UTC (History)
1 user (show)

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


Attachments
stage2 log (cross-arm-none-eabi-gcc-stage2.log.xz,57.51 KB, application/x-xz)
2018-05-11 18:58 UTC, NiTr0
Details
gcc config log (gcc-config.logs.tar.xz,71.67 KB, application/x-xz)
2018-05-11 19:00 UTC, NiTr0
Details
info.log (cross-arm-none-eabi-info.log,18.86 KB, text/x-log)
2018-05-11 19:02 UTC, NiTr0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NiTr0 2018-05-11 18:58:47 UTC
Created attachment 530916 [details]
stage2 log

When I tried to compile toolchain for bare metal, I've got an error due to SSP (which should be disabled, because unsupported on bare metal ARM; ssp flag is enabled in 17.0 profile).

After disabling SSP by useflags - I've got error if I tried to build C++.

# USE='-ssp' crossdev --libc 2.5.0 --gcc 7.3.0-r1 -S -s4 -t arm-none-eabi
Unavailable repository 'haskell' referenced by masters entry in '/var/lib/layman/graaff/metadata/layout.conf'
Unavailable repository 'haskell' referenced by masters entry in '/var/lib/layman/graaff/metadata/layout.conf'
-                                                                                                                                                                       
 * crossdev version:      20171230
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         arm-none-eabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-7.3.0-r1
 * libc:                  newlib-2.5.0

 * CROSSDEV_OVERLAY:      /usr/local/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
                                                                                                                                                                        
 * leaving sys-devel/binutils in /usr/local/portage-crossdev
 * leaving sys-devel/gcc in /usr/local/portage-crossdev
 * leaving sys-libs/newlib in /usr/local/portage-crossdev
 * leaving sys-devel/gdb in /usr/local/portage-crossdev
 * leaving metadata/layout.conf alone in /usr/local/portage-crossdev
                                                                                                                                                                        
Unavailable repository 'haskell' referenced by masters entry in '/var/lib/layman/graaff/metadata/layout.conf'
Unavailable repository 'haskell' referenced by masters entry in '/var/lib/layman/graaff/metadata/layout.conf'
 * Log: /var/log/portage/cross-arm-none-eabi-binutils.log
 * Emerging cross-binutils ...                                                                                                                                    [ ok ]
 * Log: /var/log/portage/cross-arm-none-eabi-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                                  [ ok ]
 * Log: /var/log/portage/cross-arm-none-eabi-newlib.log
 * Emerging cross-newlib ...                                                                                                                                      [ ok ]
 * Log: /var/log/portage/cross-arm-none-eabi-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...

 * error: gcc failed :(
 * 
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-arm-none-eabi-info.log
 * /var/log/portage/cross-arm-none-eabi-gcc-stage2.log.xz
 * /var/tmp/portage/cross-arm-none-eabi/gcc*/temp/gcc-config.logs.tar.xz


According to logs - it seems like trouble is with libbacktrace:

checking for C compiler default output file name... 
configure: error: in `/var/tmp/portage/cross-arm-none-eabi/gcc-7.3.0-r1/work/build/arm-none-eabi/libbacktrace':
configure: error: C compiler cannot create executables
See `config.log' for more details.

and in config log it seems like it can't find symbol _exit:

configure:2999: /var/tmp/portage/cross-arm-none-eabi/gcc-7.3.0-r1/work/build/./gcc/xgcc -B/var/tmp/portage/cross-arm-none-eabi/gcc-7.3.0-r1/work/build/./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    -g -O2   conftest.c  >&5
/usr/arm-none-eabi/lib/libg.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
/usr/libexec/gcc/arm-none-eabi/ld: warning: creating a DT_TEXTREL in a shared object.
collect2: error: ld returned 1 exit status


Logs are in attach
Comment 1 NiTr0 2018-05-11 19:00:38 UTC
Created attachment 530918 [details]
gcc config log
Comment 2 NiTr0 2018-05-11 19:02:32 UTC
Created attachment 530920 [details]
info.log
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-05-12 09:07:36 UTC
Try to sync to latest tree and update crossdev.

Latest toolchain.eclass disables libstdcxx-time (bug #589672) and latest crossdev disables fortran with USE=-fortran (bug #589672)
Comment 4 NiTr0 2018-05-12 21:26:30 UTC
Thanks. Crossdev-20180508 works good.