Jerry James wrote:
> $ gcc -specs=/usr/lib/rpm/redhat/redhat-hardened-ld test.c -o test
> -lpthread /usr/bin/ld: /tmp/ccWdPlbg.o: `pthread_create@@GLIBC_2.2'
> non-PLT reloc for symbol defined in shared library and accessed from
> executable (rebuild file with -fPIC ?)

The problem is that both your test invocation above and the original 
invocation from CMake are passing
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld and not
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1. The code needs to be 
compiled with the redhat-hardened-cc1 specs (which will enable -fpie) so 
that it can be linked with the redhat-hardened-ld specs.

        Kevin Kofler
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to