Attention is currently required from: Stefan Reinauer, Jacob Garber. Keith Hui has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40811 )
Change subject: arch,toolchain,xcompile: Use GCC as linker ......................................................................
Patch Set 7:
(1 comment)
Patchset:
PS7: I have to manually edit this patch on my computer to get it in. Then I got a compile error:
i386-elf-gcc: error: unrecognized command-line option '--gc-sections'; did you mean '--data-sections'? i386-elf-gcc: error: unrecognized command-line option '--nmagic' make: *** [src/arch/x86/Makefile.inc:99: build/cbfs/fallback/bootblock.debug] Error 1
Commit b90aba43 replaced -nostartfiles linker flag with --nmagic which is not recognized by gcc.
I have to revert it for LTO to work, like so:
-LDFLAGS_common := --gc-sections -nostdlib --nmagic -static +LDFLAGS_common := -Wl,--gc-sections -nostdlib -nostartfiles -static
Also works is this change (output binary is identical):
LDFLAGS_common := -Wl,--gc-sections,--nmagic -nostdlib -nostartfiles -static
So far I only build tested for asus/p2b. Please help test more widely.