The migration to the LLVM project's lld linker as the system linker (/usr/bin/ld) for FreeBSD is in progress - it is the case for arm64 and amd64 today, and i386 will switch once ports issues are addressed - see exp-run in PR214864. Linking multimedia/xvid with lld as /usr/bin/ld on i386 produces errors of the form: /usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC >>> defined in bitstream/x86_asm/cbp_mmx.o >>> referenced by ../../src/bitstream/x86_asm/cbp_mmx.asm >>> bitstream/x86_asm/cbp_mmx.o:(calc_cbp_mmx)
A commit references this bug: Author: riggs Date: Sun Aug 5 10:24:49 UTC 2018 New revision: 476404 URL: https://svnweb.freebsd.org/changeset/ports/476404 Log: Set LLD_UNSAFE on i386 in preparation for switch to lld on FreeBSD 12 PR: 230208 Reported by: emaste Changes: head/multimedia/xvid/Makefile
A commit references this bug: Author: emaste Date: Tue Sep 18 16:04:20 UTC 2018 New revision: 480032 URL: https://svnweb.freebsd.org/changeset/ports/480032 Log: multimedia/xvid: link with -znotext on i386 This port links some non-PIC code, which fails with lld as it defaults to disallowing relocations against read-only segments. For i386 we can just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's existing default. PR: 214864, 230208 Approved by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17195 Changes: head/multimedia/xvid/Makefile