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)
Feb 8 2025, 9:41 PM
Unknown Object (File)
Feb 8 2025, 6:31 AM
Unknown Object (File)
Jan 25 2025, 7:14 PM
Unknown Object (File)
Jan 20 2025, 6:26 PM
Unknown Object (File)
Nov 25 2024, 12:28 PM
Unknown Object (File)
Sep 5 2024, 12:46 PM
Unknown Object (File)
Aug 31 2024, 11:09 AM
Unknown Object (File)
Jun 4 2024, 1:21 PM
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.