Created attachment 201829 [details] patch Unless devel/cpu_features is built with -fPIC option, applications that links to libcpu_features.a fails to build. No ports depends on libcpu_features.a so far but a port I'm creating depends on the library. /usr/bin/ld: error: can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment; recompile object files with -fPIC >>> defined in /usr/local/lib/libcpu_features.a(cpuinfo_x86.c.o) >>> referenced by cpuinfo_x86.c >>> cpuinfo_x86.c.o:(.rodata+0x8) in archive /usr/local/lib/libcpu_features.a
A commit references this bug: Author: skreuzer Date: Wed Feb 13 02:11:18 UTC 2019 New revision: 492822 URL: https://svnweb.freebsd.org/changeset/ports/492822 Log: Generate position independent code PR: 235590 Submitted by: Koichiro Iwao <meta@FreeBSD.org> Changes: head/devel/cpu_features/Makefile
Port has been updated to pass -fPIC to cc. Thanks for the report