x86_64-pc-linux-gnu-gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-stack-protector -Wtrampolines -ffreestanding -m32 -Wl,-melf_i386 -Wl,--build-id=none -nostdlib -Wl,-N -Wl,-r,-d -o disk.module lib/disk_module-disk.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -shared may not be used together collect2: error: ld returned 1 exit status make[3]: *** [Makefile:24255: disk.module] Error 1 make[3]: Leaving directory '/var/tmp/portage/sys-boot/grub-2.02_beta3-r1/work/grub-2.02~beta3-pc/grub-core' make[2]: *** [Makefile:23525: all] Error 2 ----------------------------------------------------------------- This is an unstable amd64 chroot image (named hardened-no-multilib-libressl-unstable_20170131-164629) at a hardened host acting as a tinderbox. ----------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-6.3.0 * llvm-config --version: 3.9.1 Available Python interpreters, in order of preference: [1] python3.4 [2] python2.7 (fallback) java-config: -----------------------------------------------------------------
Created attachment 462394 [details] emerge-info.txt
Created attachment 462396 [details] config.log
Created attachment 462398 [details] emerge-history.txt
Created attachment 462400 [details] environment
Created attachment 462402 [details] etc.portage.tbz2
Created attachment 462404 [details] sys-boot:grub-2.02_beta3-r1:20170204-013232.log
I cannot reproduce this with gcc-6.3.0 and binutils-2.27. Downgrading to binutils-2.25.1 makes the toolchain unusable.
From #gentoo-hardened: [04:10:59] <Zorry> toralf: check your config.log you have error in the -no-pie check that way grub fail bug 608182 [04:11:02] <willikins> Zorry: https://bugs.gentoo.org/608182 "sys-boot/grub-2.02_beta3-r1 : collect2: error: ld returned 1 exit status"; Gentoo Linux, Current packages; CONF; toralf.foerster:floppym [04:29:25] <toralf> Zorry: ok, this is "just" the tinderbox, so something I do have to change ? [08:33:08] <Zorry> your toolchin is broken on that build [08:34:01] <Zorry> for that bug you are hitting is allready fixed [08:35:20] <toralf> Zorry: oh -ok, so that image needs an upgrade (usually done every 24 hours, but only @system is upgraded) -or- it is broken, will look on it, thx [08:37:47] <Zorry> /bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc.a when searching for -lgcc [08:38:00] <Zorry> is from the config.log Feel free to re-open this if you still encounter the problem with a rebuilt toolchain.