Florian Weimer <fweimer(a)redhat.com> writes:
On 06/26/2018 02:53 PM, Dave Love wrote:
> What has changed in the last month to affect building shared libraries
> in rawhide?
>
> I tried to rebuild libxsmm in rawhide, after changing the spec to use
> python2 explicitly, and it failed with
>
> /usr/bin/ld: build/intel64/libxsmm_main.o: relocation
> R_X86_64_PC32 against symbol `libxsmm_crc32_u64' can not be used
> when making a shared object; recompile with -fPIC
>
> The sources are compiled with -fpic and it's x86_64 only, so -fPIC
> v. -fpic shouldn't matter as I understand it.
It's related to annobin. libxsmm_crc32_u64 is a static function with
a target attribute, and the sources are compiled with
-ffunction-sections.
Thanks for such a swift analysis!
[I'm not sure why all the flags are as they are, but they're partly to
do hardening without the performance penalty from the full set of
optflags and global_ldflags (?).]