Page MenuHomeFreeBSD

Only pass -F flag to linker if it is supported
AbandonedPublic

Authored by arichardson on Nov 3 2017, 11:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 27 2026, 1:08 PM
Unknown Object (File)
Apr 25 2026, 12:17 PM
Unknown Object (File)
Apr 16 2026, 6:58 AM
Unknown Object (File)
Apr 14 2026, 2:44 AM
Unknown Object (File)
Apr 10 2026, 2:16 AM
Unknown Object (File)
Apr 9 2026, 3:02 AM
Unknown Object (File)
Apr 8 2026, 1:08 AM
Unknown Object (File)
Apr 7 2026, 7:19 AM
Subscribers
None

Details

Reviewers
emaste
jhb
brooks
Summary

LLD only got support for the -F flag in LLVM r308167 so we shouldn't
be using the flag unconditionally.

Test Plan

I wasn't able to build libdl with LLD 4.0 without this change, now it works.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 12419
Build 12695: arc lint + arc unit

Event Timeline

Hmm, lib/Makefile only recurses into libdl if the linker supports filters (that was in the original commit that added libdl: rS320872), so this shouldn't be needed? The libdl library only works as a filter, so building a non-filter version will just build a broken one I think.

Hmm, I must have been building with -fuse-ld=lld but without setting XLD. Maybe I should add a .error instead?

If you get a build error now that is probably just as well as a .error. I'd be tempted to avoid adding a dedicated .error for an odd edge case if the build already fails.