Page MenuHomeFreeBSD

print/openprinting: fix build when lld is the system linker
ClosedPublic

Authored by emaste on Apr 5 2018, 1:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 7:29 PM
Unknown Object (File)
Fri, Apr 19, 3:06 PM
Unknown Object (File)
Wed, Mar 27, 10:52 AM
Unknown Object (File)
Feb 24 2024, 1:54 PM
Unknown Object (File)
Feb 24 2024, 1:54 PM
Unknown Object (File)
Feb 24 2024, 1:54 PM
Unknown Object (File)
Feb 24 2024, 1:37 PM
Unknown Object (File)
Feb 17 2024, 4:00 AM
Subscribers

Details

Summary

This port passes -Mmapfile to the linker, which is an invalid argument. Per GNU BFD ld's manpage, link map options are -M | --print-map to print a link map to stdout, or -Map mapfile to print a link map to mapfile. It appears that ld.bfd accepts -Mmapfile as a synonym for -M due to some quirk of its parser; lld simply fails with an unknown argument error.

This port's embedded copy of libtool was also too old to know that it should pass the -fuse-ld flag from LDFLAGS through to the linker, and also too old to match the sed expression in Mk/Uses/libtool.mk that patches in knowledge of -fuse-ld. Thus patch ltmain.sh to add -fuse-ld=bfd as a passthrough flag.

I do not know why libtool's authors believed that silently dropping unknown flags from a user's provided LDFLAGS is a sensible thing to do.

PR: 221809
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste edited the summary of this revision. (Show Details)
ler added a subscriber: ler.

LGTM

This revision is now accepted and ready to land.Apr 5 2018, 1:54 AM
This revision was automatically updated to reflect the committed changes.