Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556520 - cross-arm-none-eabi/gcc-4.9.3: stage2 fails on armv7a-hardfloat-gnueabi host due to host/target flags bleeding between
Summary: cross-arm-none-eabi/gcc-4.9.3: stage2 fails on armv7a-hardfloat-gnueabi host ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-02 18:44 UTC by Marco Clocchiatti
Modified: 2020-08-15 08:43 UTC (History)
0 users

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


Attachments
gcc-config.logs.tar.xz (gcc-config.logs.tar.xz,57.47 KB, application/x-xz)
2015-08-02 18:45 UTC, Marco Clocchiatti
Details
cross-arm-none-eabi-info.log (cross-arm-none-eabi-info.log,14.74 KB, text/x-log)
2015-08-04 08:34 UTC, Marco Clocchiatti
Details
cross-arm-none-eabi-gcc-stage2.log.xz (cross-arm-none-eabi-gcc-stage2.log.xz,15.34 KB, application/x-xz)
2015-08-04 08:35 UTC, Marco Clocchiatti
Details
gcc-config.logs.tar.xz (gcc-config.logs.tar.xz,57.47 KB, application/x-xz)
2015-08-04 08:36 UTC, Marco Clocchiatti
Details
all logs (arm-none-eabi_LOGS.tar.xz,124.52 KB, application/x-xz)
2015-08-06 17:08 UTC, Marco Clocchiatti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Clocchiatti 2015-08-02 18:44:43 UTC
crossdev fails to compile cross-armv-none-eabi/gcc-4.9.3 stage2 on armv7a-hardfloat-linux-gnueabi system (udoo).

Reproducible: Always

Steps to Reproduce:
1. crossdev -t arm-none-eabi -s4 -S
Actual Results:  
$ crossdev -t arm-none-eabi -s4 -S
gawk: riga com.:8: (FILENAME=- FNR=1) attenzione: gensub: il terzo argomento `' trattato come 1
gawk: riga com.:8: (FILENAME=- FNR=5) attenzione: gensub: il terzo argomento `' trattato come 1
gawk: riga com.:8: (FILENAME=- FNR=10) attenzione: gensub: il terzo argomento `' trattato come 1
--------------------------------------------------
 * crossdev version:      20150716
 * Host Portage ARCH:     arm
 * Target Portage ARCH:   arm
 * Target System:         arm-none-eabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * libc:                  newlib-[stable]

 * 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
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  
gawk: riga com.:8: (FILENAME=- FNR=1) attenzione: gensub: il terzo argomento `' trattato come 1
gawk: riga com.:8: (FILENAME=- FNR=5) attenzione: gensub: il terzo argomento `' trattato come 1
gawk: riga com.:8: (FILENAME=- FNR=10) attenzione: gensub: il terzo argomento `' trattato come 1
 * 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 ...

 * 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

Expected Results:  
it should build fine.
Comment 1 Marco Clocchiatti 2015-08-02 18:45:36 UTC
Created attachment 408152 [details]
gcc-config.logs.tar.xz
Comment 2 Marco Clocchiatti 2015-08-04 08:34:32 UTC
Created attachment 408246 [details]
cross-arm-none-eabi-info.log

sorry. added missing logs.
Comment 3 Marco Clocchiatti 2015-08-04 08:35:15 UTC
Created attachment 408248 [details]
cross-arm-none-eabi-gcc-stage2.log.xz
Comment 4 Marco Clocchiatti 2015-08-04 08:36:14 UTC
Created attachment 408250 [details]
gcc-config.logs.tar.xz
Comment 5 Pacho Ramos gentoo-dev 2015-08-06 13:27:12 UTC
Try running commands with LC_ALL=C to get outputs in english and also provide emerge --info output
Comment 6 Marco Clocchiatti 2015-08-06 17:08:16 UTC
Created attachment 408420 [details]
all logs

emerge --info + all logs with LC_ALL=C
Comment 7 Alex Xu (Hello71) 2015-08-13 00:08:00 UTC
you may want to retry with CFLAGS and CXXFLAGS unset. if that does not apply to your scenario, wait for toolchain.
Comment 8 SpanKY gentoo-dev 2015-08-13 02:49:58 UTC
there's a mismatch between the float selection:
configure:3898: /var/tmp/portage/cross-arm-none-eabi/gcc-4.9.3/work/build/./gcc/xgcc -B/var/tmp/portage/cross-arm-none-eabi/gcc-4.9.3/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    -o conftest -g -O2 -pipe   conftest.c  >&5
/usr/libexec/gcc/arm-none-eabi/ld: error: /usr/arm-none-eabi/lib/libg.a(lib_a-atexit.o) uses VFP register arguments, conftest does not
/usr/libexec/gcc/arm-none-eabi/ld: failed to merge target specific data of file /usr/arm-none-eabi/lib/libg.a(lib_a-atexit.o)

most likely the CFLAGS from your host are leaking through.  normally that's not an issue as people are using flags that are incompatible.
Comment 9 Marco Clocchiatti 2015-08-13 05:17:53 UTC
sorry, these are cflags in my etc/portage:

cloc3Udoo ~ # grep FLAG /usr/arm-none-eabi/etc/portage/make.conf
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

and this are CFLAGS in cross-arm-none-eabi-gcc-stage2.log
---

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/cross-arm-none-eabi/gcc-4.9.3/work/gcc-4.9.3 ...
 * strip-flags: CFLAGS: changed '-O2 -march=armv7-a -pipe -mfpu=vfpv3-d16 -mfloat-abi=hard -mtls-dialect=gnu' to '-O2 -march=armv7-a -pipe -mfpu=vfpv3-d16 -mfloat-abi=hard'
 * strip-flags: CXXFLAGS: changed '-O2 -march=armv7-a -pipe -mfpu=vfpv3-d16 -mfloat-abi=hard -mtls-dialect=gnu' to '-O2 -march=armv7-a -pipe -mfpu=vfpv3-d16 -mfloat-abi=hard'
 * CFLAGS="-O2 -pipe"
 * CXXFLAGS=""
 * LDFLAGS="-Wl,-O1 -Wl,--as-needed"

 * PREFIX:          /usr
 * BINPATH:         /usr/armv7a-hardfloat-linux-gnueabi/arm-none-eabi/gcc-bin/4.9.3
 * LIBPATH:         /usr/lib/gcc/arm-none-eabi/4.9.3
 * DATAPATH:        /usr/share/gcc-data/arm-none-eabi/4.9.3
 * STDCXX_INCDIR:   /usr/lib/gcc/arm-none-eabi/4.9.3/include/g++-v4
---

it seems emerge overwrite CFLAGS.
where should I set them to build gcc?
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-15 08:43:41 UTC
We had a few CFLAGS/CXXFLAGS fixes a while ago. Please file a new bug if it's till happens.