[Buildroot] [PATCH] gcc: Fix build failure related to -fPIC for x86_64 -> i686 builds
Jan Kundrát
jan.kundrat at cesnet.cz
Wed Apr 19 16:23:22 UTC 2017
> Without this patch, I cannot build the toolchain (both host-gcc-initial
> and -final) on Gentoo's amd64 using GCC 4.9.3:
>
>
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld:
> gcov.o: relocation R_X86_64_32 against `.rodata.str1.8' can not
> be used when making a shared object; recompile with -fPIC
One important piece I forgot to add -- I'm running "Hardened Gentoo GCC"
which enables PIE by default [1] [2]. As such, this might explain why other
are (presumably) not seeing this problem.
BTW, I cannot find my original submission on patchwork. Was that e-mail OK?
I see it in the ML archive [3].
With kind regards,
Jan
[1]
https://wiki.gentoo.org/wiki/Hardened/Toolchain#Automatic_generation_of_Position_Independent_Executables_.28PIEs.29
[2]
https://wiki.gentoo.org/wiki/Hardened/Toolchain#Toolchain_modifications_for_automatic_PIEs
[3] http://lists.busybox.net/pipermail/buildroot/2017-April/189441.html
More information about the buildroot
mailing list