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)
Jan 18 2024, 12:55 PM
Unknown Object (File)
Dec 20 2023, 12:43 AM
Unknown Object (File)
Aug 27 2023, 6:54 AM
Unknown Object (File)
Aug 13 2023, 6:17 AM
Unknown Object (File)
Jun 28 2023, 4:14 PM
Unknown Object (File)
Jun 16 2023, 9:52 AM
Unknown Object (File)
May 8 2023, 6:29 PM
Unknown Object (File)
May 6 2023, 4:49 PM
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).