Trying to build cross-mips64el-unknown-linux-gnu/glibc-2.13-r2 on my amd64 desktop: * Building multilib glibc for ABIs: x86 amd64 * ABI: x86 * CBUILD: x86_64-pc-linux-gnu * CHOST: x86_64-pc-linux-gnu * CTARGET: mips64el-unknown-linux-gnu * CBUILD_OPT: * CTARGET_OPT: i686-pc-linux-gnu * CC: mips64el-unknown-linux-gnu-gcc -m32 * CFLAGS: -O2 -fno-strict-aliasing * Manual CC: mips64el-unknown-linux-gnu-gcc -m32 I don't see this bug when building cross-alpha-unknown-linux-gnu/glibc-2.13-r2, I'd imagine because alpha only has a single ABI.
is your crossdev up-to-date ? are you upgrading glibc, or doing it fresh ? crossdev -C mips64el && crossdev mips64el
Yeah, crossdev is 20110310. Tried wiping out all the mips crossdev installations and starting over. I even tried package.use.mask'ing cross-mips64-unknown-linux-gnu/glibc/glibc multilib. When I do that, it selects the 'amd64' ABI. So, it's picking up the host's ABI instead of the target architecture's.
your output looked weird to me, so i tried on my side. then i realized the multilib fixes i had i didnt push out. see if crossdev-20110705 works any better.
The build succeeds, but it didn't produce anything but n32 libs, even though USE="multilib" was set.
*** Bug 373815 has been marked as a duplicate of this bug. ***
that is expected behavior now. USE=multilib in the host build env is ignored by crossdev. if you dont specify the ABIs to crossdev with --abis, then you only get the default one.
Created attachment 283477 [details] gcc stage1 config.log with --abis "n32 o32 n64" This log shows that crossdev (or something) tries to pass -mabi= to the host compiler, which is an unknown flag, causing it to fail. This also happens if you pass one or two ABIs to crossdev.
Created attachment 283501 [details] cross-mips64el-unknown-linux-gnu-gcc-stage1.log for `crossdev -t mips64el-unknown-linux-gnu` (no --abis)
Created attachment 283503 [details] config.log for `crossdev -t mips64el-unknown-linux-gnu` (no --abis)
(In reply to comment #7) > Created attachment 283477 [details] > gcc stage1 config.log with --abis "n32 o32 n64" > > This log shows that crossdev (or something) tries to pass -mabi= to the host > compiler, which is an unknown flag, causing it to fail. > > This also happens if you pass one or two ABIs to crossdev. conftest.c:1:0: error: unknown ABI (n32) for -mabi= switch This is still the case with sys-devel/crossdev-20111018, same as it was two and a half months ago. Any work on this, vapier? This is easily reproducible with crossdev --abis "n32 o32 n64" -t mips64-unknown-linux-gnu.
vapier?
Try passing --without-headers. I don't recall if that's what gcc stage1 whines about or not, but MIPS stage1/2 cross-toolchains can be built w/o requiring the glibc headers being present first.
just tried it on my system. default works fine (so only n32). compiling for o32/64 fails to link, but the compile flag works. # crossdev mips64el-unknown-linux-gnu # echo 'main(){}' | mips64el-unknown-linux-gnu-gcc -x c - -o a.out # file a.out a.out: ELF 32-bit LSB executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped then building for all abis worked too. so i guess there's nothing to be done here ... upgrade :P. # crossdev --abis 'n32 o32 n64' mips64el-gentoo-linux-gnu # echo 'main(){}' | mips64el-gentoo-linux-gnu-gcc -x c - -o a.out # file a.out a.out: ELF 32-bit LSB executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped # echo 'main(){}' | mips64el-gentoo-linux-gnu-gcc -x c - -o a.out -mabi=n32 # file a.out a.out: ELF 32-bit LSB executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped # echo 'main(){}' | mips64el-gentoo-linux-gnu-gcc -x c - -o a.out -mabi=32 # file a.out a.out: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped # echo 'main(){}' | mips64el-gentoo-linux-gnu-gcc -x c - -o a.out -mabi=64 # file a.out a.out: ELF 64-bit LSB executable, MIPS, MIPS-III version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, with unknown capability 0x756e670000000f41 = 0x104000000070100, not stripped
oh, and for reference, here's what i'm using: cross-mips64el-gentoo-linux-gnu/binutils-2.22-r1 cross-mips64el-gentoo-linux-gnu/gcc-4.5.3-r2 cross-mips64el-gentoo-linux-gnu/glibc-2.13-r4 cross-mips64el-gentoo-linux-gnu/linux-headers-3.2-r1