Crossdev fails to build cross-compiler toolchain for sparc64 on i686. The error is: >> Unpacking source... * Checking gcc for __thread support ... [ !! ] * Could not find a gcc that supports the __thread directive! * Please update your binutils/gcc and try again. * ERROR: cross-sparc64-unknown-linux-gnu/glibc-2.11.2 failed: * No __thread support in gcc! *
Created attachment 250401 [details] info
Created attachment 250403 [details] glibc build log
# crossdev -S sparc64 -------------------------------------------------------------------------------- * crossdev version: 20101011 * Host Portage ARCH: x86 * Target Portage ARCH: sparc * Target System: sparc64-unknown-linux-gnu * Stage: 4 (C/C++ compiler) * binutils: binutils-[stable] * gcc: gcc-[stable] * headers: linux-headers-[stable] * libc: glibc-[stable] * PORTDIR_OVERLAY: /var/lib/layman/thebuell * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-linux-headers-quick.log * Emerging cross-linux-headers-quick ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-glibc-headers.log * Emerging cross-glibc-headers ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-linux-headers.log * Emerging cross-linux-headers ... [ ok ] * Log: /var/log/portage/cross-sparc64-unknown-linux-gnu-glibc.log * Emerging cross-glibc ... * glibc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-sparc64-unknown-linux-gnu-info.log * /var/log/portage/cross-sparc64-unknown-linux-gnu-glibc.log
run `emerge --debug cross-sparc64-unknown-linux-gnu/glibc` and post the output as an attachment
Created attachment 250539 [details] debug info as requested
dropping this bit of code from glibc will probably fix things: sparc) # 2.3.6 should have tls support on sparc64 # when using newer binutils case ${CTARGET/-*} in sparc64*) return 1 ;; *) return 0 ;; esac ;;
I'll try that out and let you know what happens. If it works, will a patch be making its way into portage?
not until the history of the code in question is found. i dont recall adding it, just propagating it.
which file (In reply to comment #6) > dropping this bit of code from glibc will probably fix things: > > sparc) > # 2.3.6 should have tls support on sparc64 > # when using newer binutils > case ${CTARGET/-*} in > sparc64*) return 1 ;; > *) return 0 ;; > esac > ;; > In which file can I find this particular fragment? I can't find it even though I've grepped the contents of glibc and also looked at its ebuild :(
Found the file in question; it's in /usr/portage/sys-libs/glibc/files/eblits/common.eblit, sorry. Now to redact that code and see if it helps.
I've now got past that problem now it's thrown up another problem; seems sparc64-unknown-linux-gnu-gcc needs -mlong-double-128 support to build this glibc. Agghhhhh... ;) Do I need to rebuild sparc64 stage1 gcc to include support for this?
Created attachment 250621 [details] new error
Created attachment 250623 [details] new error
i have no idea. i dont really use or are interested in sparc. this is really an area you'll need to investigate and report back.
OK, will do.
first added here with little documentation: http://sources.gentoo.org/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild?&r1=1.14&r2=1.15 then refined here: http://sources.gentoo.org/sys-libs/glibc/glibc-2.3.5.ebuild?r1=1.3&r2=1.4 so it seems that it's just a test that was never dropped as sparc64 isnt heavily tested ... http://sources.gentoo.org/sys-libs/glibc/files/eblits/common.eblit?r1=1.13&r2=1.14
Success, with 2.11.2 going stable on x86, glibc now builds OK for my i686 cross compilers hosted on SPARC. Unfortunately building stage2 now barfs. Will find the relevant bug for that and add to it.