Created attachment 326346 [details] emerge --info # binutils-config --linker ld.gold * Setting default linker to ld.gold for x86_64-pc-linux-gnu-2.22.90 ... [ ok ] # MAKEOPTS=-j1 emerge -1 seabios Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) sys-firmware/seabios-1.7.0 * seabios-1.7.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * seabios-1.7.0-bins.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking seabios-1.7.0.tar.gz to /var/tmp/portage/sys-firmware/seabios-1.7.0/work >>> Unpacking seabios-1.7.0-bins.tar.xz to /var/tmp/portage/sys-firmware/seabios-1.7.0/work >>> Source unpacked in /var/tmp/portage/sys-firmware/seabios-1.7.0/work >>> Preparing source in /var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0 ... make -j1 out/bios.bin Working around non-functional -combine Build default config # # configuration written to /var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0/.config # Working around non-functional -combine Build Kconfig config file Compiling whole program out/ccode32flat.o Compiling whole program out/code32seg.o Compiling whole program out/ccode16.o Compiling to assembler out/asm-offsets.s Generating offset file out/asm-offsets.h Compiling (16bit) out/romlayout.o Building ld scripts Version: 1.7.0-20121011_223928-rook Fixed space: 0xe05b-0x10000 total: 8101 slack: 8 Percent slack: 0.1% 16bit size: 39056 32bit segmented size: 1418 32bit flat size: 14742 32bit flat init size: 57200 Linking out/rom16.o Stripping out/rom16.strip.o Linking out/rom32seg.o Stripping out/rom32seg.strip.o Linking out/rom.o ld: error: out/rom16.strip.o: unsupported ELF file type 2 ld: error: out/rom32seg.strip.o: unsupported ELF file type 2 make: *** [out/rom.o] Error 1 * ERROR: sys-firmware/seabios-1.7.0 failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-firmware/seabios-1.7.0'`, * the complete build log and the output of `emerge -pqv '=sys-firmware/seabios-1.7.0'`. * The complete build log is located at '/var/tmp/portage/sys-firmware/seabios-1.7.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-firmware/seabios-1.7.0/temp/environment'. * Working directory: '/var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0' * S: '/var/tmp/portage/sys-firmware/seabios-1.7.0/work/seabios-1.7.0' When using ld.bfd as the linker, seabios builds successfully.
Gold doesn't support 16-bit real mode code, which is what a BIOS is, so until it does its can't be considered a full replacement to ld.bfd.
Until gold supports 16-bit real mode there's nothing for the virtualization guys to do here. You're building a BIOS, there's no other options other than what we need. Given that gold creates Grub's that aren't bootable, that should have been the first warning this wouldn't work. Kicking this over to toolchain to see how they want to triage this.
you could file a bug upstream, but i suspect they aren't interested in supporting it in gold ... if the -fuse-ld flag ever goes mainline, we'll probably want to update packages to start using that.
*** Bug 485078 has been marked as a duplicate of this bug. ***
> if the -fuse-ld flag ever goes mainline, we'll probably want to update > packages to start using that. It's available in 4.8.
Commit message: Use new toolchain helpers for selecting the bfd linker http://sources.gentoo.org/sys-firmware/seabios/seabios-1.7.5-r1.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-firmware/seabios/seabios-1.7.5.ebuild?r1=1.4&r2=1.5
i've added helpers for ebuilds: http://sources.gentoo.org/eclass/toolchain-funcs.eclass?r1=1.134&r2=1.135
Commit message: Use new toolchain helpers for selecting the bfd linker http://sources.gentoo.org/sys-firmware/ipxe/ipxe-1.0.0_p20130624.ebuild?r1=1.7&r2=1.8 http://sources.gentoo.org/sys-firmware/ipxe/ipxe-1.0.0_p20130925.ebuild?r1=1.5&r2=1.6
afaik gold doesn't plan on supporting this, and all the known packages that need it use the bfd-fallback helpers. if you find packages that still fail, please file new bugs for each one.