Summary: | sys-boot/grub-0.97-r13: build fails when using gold | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Franz Trischberger <franz.trischberger> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex, esigra |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=439082 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315 | ||
Attachments: |
build.log
Force ld.bfd via --fuse-ld CFLAG |
Created attachment 353222 [details, diff]
Force ld.bfd via --fuse-ld CFLAG
Would it make more sense to « append-cflags "-fuse-ld=bfd" », instead of complaining about gold usage, until the bug is resolved upstream?
Comment on attachment 353222 [details, diff]
Force ld.bfd via --fuse-ld CFLAG
Whoops! Added the patch on the wrong BUG (the patch is for - as stated by the name - grub-2
So the bug actually has two parts. Firstly, ld.gold seems to assume that -Wl,-Ttext arguments are integers, instead of hex. Looks like this can be fixed by prepending '0x' but i'll confirm after I test. Secondly, there's actually a check in ./configure to see if the linker can link using these -Ttext addresses , but for whatever reason that check is always cached and so it never fails. I've got a patch that will un-cache this check, so at least it fails at configure time in a more-obvious fashion. OK. So, grub:0 fails to work when being linked with ld.gold, looks like forcing ld.bfd is the best option. Somehow i missed that we are forcing the 'cached' value of yes for the link test in our ebuild, so there's no need for that patch, either. "Fixed" in grub-0.97-r14 Commit message: Use new toolchain helpers for selecting the bfd linker http://sources.gentoo.org/sys-boot/grub/grub-0.97-r14.ebuild?r1=1.6&r2=1.7 http://sources.gentoo.org/sys-boot/grub/grub-2.00_p5107-r2.ebuild?r1=1.9&r2=1.10 http://sources.gentoo.org/sys-boot/grub/grub-2.02_beta2-r3.ebuild?r1=1.5&r2=1.6 http://sources.gentoo.org/sys-boot/grub/grub-2.02_beta2-r6.ebuild?r1=1.3&r2=1.4 http://sources.gentoo.org/sys-boot/grub/grub-2.02_beta2-r7.ebuild?r1=1.6&r2=1.7 http://sources.gentoo.org/sys-boot/grub/grub-9999-r1.ebuild?r1=1.29&r2=1.30 |
Created attachment 346066 [details] build.log 0.97 fails (tried r10-r13) to build with ld.gold. x86_64-pc-linux-gnu-gcc -m32 -Os -fno-stack-protector -fno-strict-aliasing -march=i686 -fno-reorder-functions -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 -DFSYS_EXT2FS=1 -DNO_BLOCK_FILES=1 -g -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 -Wl,-O1 -Wl,--as-needed -Wl,--build-id=none -o e2fs_stage1_5.exec e2fs_stage1_5_exec-start.o e2fs_stage1_5_exec-asm.o e2fs_stage1_5_exec-common.o e2fs_stage1_5_exec-char_io.o e2fs_stage1_5_exec-disk_io.o e2fs_stage1_5_exec-stage1_5.o e2fs_stage1_5_exec-fsys_ext2fs.o e2fs_stage1_5_exec-bios.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: -Ttext: invalid option value (expected an integer): 7C00 collect2: ld returned 1 exit status make[3]: *** [start_eltorito.exec] Error 1