Created attachment 388746 [details] emerge --info I tried to create an arm-none-eabi cross toolchain on my netbook. While this worked on my PCs (amd64), there are some issues on the netbook (x86). Despite fixing the make.conf, compilation of newlib still fails. The problem seems to be here that emerge seems to use the host system's /etc/portage/make.conf instead of the one created by crossdef at /usr/arm-none-eabi/etc/portage/make.conf. This leads to arm-none-eabi-gcc being called with unrecognised options in the CFLAGS.
Created attachment 388748 [details] Newlib build log
I have reported the fix to make.conf in bug report 528542.
the target make.conf is irrelevant here. this is a cross-xxx package which is, by design, installed in ROOT=/. the newlib itself specifically attempts to filter out incompatible flags: CHOST=${CTARGET} strip-unsupported-flags please run `emerge cross-arm-none-eabi/newlib --debug >& log` and attach the log file here for us to figure out.
Created attachment 403574 [details] Newlib build log with debug information This is the build log with the patch mentioned above integrated in my system. Unfortunately, I had to compress the file.
your CFLAGS were stripped correctly: + CFLAGS='-O2 -pipe -ggdb' your CXXFLAGS were not because you don't have a arm-none-eabi-g++, so it used g++ instead: + CXXFLAGS='-march=core2 -mtune=generic -O2 -pipe -ggdb' however, that shouldn't really matter as newlib doesn't have C++, so it shouldn't be checking CXXFLAGS at all. all that said, your first log doesn't match your 2nd (first uses -march=atom while 2nd uses -march=core2), and your 2nd shows it actually passing, not failing: >>> Completed installing newlib-2.2.0 into /var/tmp/portage/cross-arm-none-eabi/newlib-2.2.0/image/ so please post a log that matches & shows build failures.
Created attachment 403608 [details] Newlib build log with debug information Sorry for the wrong log file - now here's the one from the correct machine (building of newlib fails).
(In reply to Florian Kluge from comment #6) have you hardcoded `CC=gcc` on your system ? the log shows: ++ cmdline=($(tc-get${comp}) -Werror -c -o /dev/null) +++ tc-getCC +++ tc-getPROG CC gcc +++ _tc-getPROG CHOST CC gcc +++ local tuple=CHOST +++ local v var vars=CC +++ local prog=gcc +++ var=CC +++ for v in '${vars}' +++ [[ -n gcc ]] +++ export CC=gcc +++ CC=gcc +++ echo gcc +++ return 0 if you have, then that's invalid, so shouldn't be surprised when it fails ;)
Yes, I had CC=gcc in make.conf. This was a relic from some experiments with distcc. Removing these settings allowed for a proper installation. Thanks for your help!