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 21 2024, 5:08 AM
Unknown Object (File)
Dec 22 2023, 12:25 AM
Unknown Object (File)
Dec 20 2023, 4:18 AM
Unknown Object (File)
Nov 28 2023, 12:04 PM
Unknown Object (File)
Nov 25 2023, 11:37 AM
Unknown Object (File)
Nov 25 2023, 4:40 AM
Unknown Object (File)
Nov 22 2023, 9:50 PM
Unknown Object (File)
Nov 22 2023, 9:04 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.