Page MenuHomeFreeBSD

multimedia/xmms: add -znotext to LDFLAGS on i386, for lld
ClosedPublic

Authored by emaste on Sep 14 2018, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 18 2024, 9:48 PM
Unknown Object (File)
Sep 9 2024, 4:10 AM
Unknown Object (File)
Sep 9 2024, 2:46 AM
Unknown Object (File)
Sep 8 2024, 10:31 PM
Unknown Object (File)
Sep 8 2024, 7:14 PM
Unknown Object (File)
Jan 18 2024, 12:55 PM
Unknown Object (File)
Dec 20 2023, 12:43 AM
Unknown Object (File)
Aug 27 2023, 6:54 AM
Subscribers

Details

Reviewers
tobik
Group Reviewers
Ports Committers
Summary

Example error:

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC

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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mat added a subscriber: mat.

Could probably be written in a shorter way, like this:

LDFLAGS+=      ${LDFLAGS_${ARCH}}
LDFLAGS_i386=  -Wl,-znotext
multimedia/xmms/Makefile
27 ↗(On Diff #48064)

missing blank line beteen .include and .if.

Update as suggested by @mat

multimedia/xmms/Makefile
26 ↗(On Diff #48065)

Aside, is this the best choice, or bsd.port.pre.mk?

tobik requested changes to this revision.Sep 14 2018, 10:15 PM
tobik added a subscriber: tobik.
tobik added inline comments.
multimedia/xmms/Makefile
26 ↗(On Diff #48065)

You should remove it. It is not needed now and it breaks the options that come after it. Options helpers that are set after including bsd.port.pre.mk or bsd.port.options.mk are not processed by the framework.

This revision now requires changes to proceed.Sep 14 2018, 10:15 PM
This revision is now accepted and ready to land.Sep 15 2018, 8:48 AM

Do I have an official approval for ports tree commit as well?

Committed as rP479840 (accidentally dropped the metadata).