# crossdev -S sparc ------------------------------------------------------------------------------------------------------------------------------------ * crossdev version: 20110310 * Host Portage ARCH: x86 * Target Portage ARCH: sparc * Target System: sparc-unknown-linux-gnu * Stage: 4 (C/C++ compiler) * ABIs: default * binutils: binutils-[stable] * gcc: gcc-[stable] * headers: linux-headers-[stable] * libc: glibc-[stable] * PORTDIR_OVERLAY: /var/lib/layman * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-linux-headers-quick.log * Emerging cross-linux-headers-quick ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-glibc-headers.log * Emerging cross-glibc-headers ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-linux-headers.log * Emerging cross-linux-headers ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-glibc.log * Emerging cross-glibc ... * glibc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-sparc-unknown-linux-gnu-info.log * /var/log/portage/cross-sparc-unknown-linux-gnu-glibc.log
Created attachment 268311 [details] cross-sparc-unknown-linux-gnu-info.log
Created attachment 268315 [details] cross-sparc-unknown-linux-gnu-glibc.log
Looking through the logs, I just saw this: checking for sparcv9-unknown-linux-gnu-gcc... (cached) i686-pc-linux-gnu-gcc checking version of i686-pc-linux-gnu-gcc ... 4.4.5, ok also, checking whether i686-pc-linux-gnu-gcc -pipe -ggdb -fcall-used-g6 -O2 -fno-strict-aliasing -fno-unwind-tables supports -mlong-double-128... no configure: error: this configuration requires -mlong-double-128 support * ERROR: cross-sparc-unknown-linux-gnu/glibc-2.11.3 failed (compile phase): Seems it thinks I'm building a multilibbed gcc on 32bit x86? I'm sure this might be related to the failures to build 32bit x86 stage2 g++ on SPARC?
is your tree up-to-date ? this issue should already be fixed
I'm afraid not, with a fresh sync of the tree, and a crossdev -C sparc, then reran crossdev -S sparc. Same error. :(
seems to be due to the wonky CTARGET_OPT munging that is done specifically for sparc targets.
This issue seems to be unresolved still, crossdev still cannot build any glibc for sparc or sparc64 targets. It seems like the compiler confusion is indeed the cause for this. I have found the following work-around: 1. Start your toolchain build with crossdev as normal. 2. After crossdev fails to build glibc, run this command to properly build glibc for your target: env CC=<your target compiler> HOSTCC=<your native compiler> emerge --resume Example: env CC=sparc-unknown-linux-gnu-gcc HOSTCC=x86_64-pc-linux-gnu-gcc emerge --resume 3. Run crossdev again to build the final gcc compiler and finish the toolchain.
THanks, that has now got the sparc cross compiler working again on x86. Now if I can get the x86 cross compiler working on sparc... Much appreciated.
Just ran into this problem now when trying to upgrade to 2.12.26 on a stable x86-system (haven't encountered any problems upgrading during the previous last six months though when I setup this system...).
(In reply to comment #9) > Just ran into this problem now when trying to upgrade to 2.12.26 on a stable > x86-system (haven't encountered any problems upgrading during the previous last > six months though when I setup this system...).´ Don't know where that last 6 came from.... it should be 2.12.2 only ofcourse ;) And manually setting the CC and HOSTCC seems to work fine.
*** Bug 379787 has been marked as a duplicate of this bug. ***
This problem is also present on AMD64 platforms.
i don't think it does. if you have evidence of the contrary, please file a new bug report with full logs/info attached.
The bug is specific to having sparc as a target for crossdev. It doesn't matter what the host is, I've seen the problem on x86-, amd64- and powerpc hosts.
yes, CHOST does not matter, only CTARGET (sparc*)
Bug report has been filed for SPARC target on AMD64.
*** Bug 388779 has been marked as a duplicate of this bug. ***
Similar bug here. Due to #397449 had to force an ABI: crossdev -A default sparc-unknown-linux-gnu glibc fails here as: configure: error: linker with -z relro support required * ERROR: cross-sparc-unknown-linux-gnu/glibc-2.15-r3 failed (compile phase): * failed to configure glibc It's config.log is quite clear (note the --host v9 skew): (comes from gentoo-x86/sys-libs/glibc/files/eblits/common.eblit) setup_target_flags() { ... case $(tc-arch) in sparc) ... elif { is_crosscompile && want_nptl; } || ...; then CTARGET_OPT="sparcv9-unknown-linux-gnu" fi $ /subvolumes/var_tmp/portage/cross-sparc-unknown-linux-gnu/glibc-2.15-r3/work/glibc-2.15/configure --disable-stackguard-rand omization --enable-add-ons=nptl,c_stubs,libidn,ports --enable-kernel=2.6.9 --without-selinux --without-cvs --enable-bind-now -- build=x86_64-pc-linux-gnu --host=sparcv9-unknown-linux-gnu --disable-profile --without-gd --with-headers=/usr/sparc-unknown-lin ux-gnu/usr/include --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib/misc /glibc --enable-obsolete-rpc ... configure:2444: checking for sparcv9-unknown-linux-gnu-gcc configure:2471: result: x86_64-pc-linux-gnu-gcc And from now on it thinks x86_64 is it's host: (Easily notable with 'cc1: warning: unknown register name: g6 [enabled by default]' in every test it runs) configure:6365: checking for -z relro option configure:6406: x86_64-pc-linux-gnu-gcc -pipe -fcall-used-g6 -O2 -fno-strict-aliasing -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_F ORTIFY_SOURCE -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -fPIC -shared -o conftest.so conftest.c -nostartfiles -nostdlib -Wl,-z,relro 1>&5 cc1: warning: unknown register name: g6 [enabled by default] configure:6409: $? = 0 configure:6412: readelf -Wl conftest.so > conftest.ph configure:6415: $? = 0 configure:6421: gawk -v commonpagesize=0x2000 -f conftest.awk conftest.ph > conftest.cps ... configure:6424: $? = 0 configure:6429: result: broken configure:6435: error: linker with -z relro support required Worth a separate bug report?
Current ~arch 'crossdev sparc' fails thusly: configure:6406: x86_64-pc-linux-gnu-gcc -pipe -fcall-used-g6 -O2 -fno-strict-aliasing -U_FORTIFY_SOURCE -U_FORTIFY_SOURCE -U_F ORTIFY_SOURCE -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -fPIC -shared -o conftest.so conftest.c -nostartfiles -nostdlib -Wl,-z,relro 1>&5 cc1: warning: unknown register name: g6 [enabled by default] configure:6409: $? = 0 configure:6412: readelf -Wl conftest.so > conftest.ph configure:6415: $? = 0 configure:6421: gawk -v commonpagesize=0x2000 -f conftest.awk conftest.ph > conftest.cps (the same reason as in comment #18)
glibc-2.16/configure.in snippet: > test -n "$base_machine" || case "$machine" in Looks like for glibc-2.16 is will be easier to set machine=/base_machine= for configure by hands instead of --host faking.
@toolchain, any news on this? Thanks
tested currently and checking for sparc64-unknown-linux-gnu-gcc... (cached) gcc Could reproduce it.
Seems to be fixed for sparc64-unknown-linux-gnu when using unstable sources, just did a successful build on amd64 with: crossdev -v --ex-gcc -t sparc64-unknown-linux-gnu
Indeed, unstable sources builds just fine here too.
*** Bug 513848 has been marked as a duplicate of this bug. ***
i've finally sat down, absorbed this code, and rewrote it. i think the result should work now. at least, it does for me using `crossdev -S sparc`. please let us know if it still fails for you. http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f8a59c05ff00ddafbfbfffecdac6e71cf175fbd
Works for me now. Thanks.