Page MenuHomeFreeBSD

Make bsd.linker.mk work with the MacOS linker
ClosedPublic

Authored by arichardson on Feb 11 2018, 12:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 2:16 PM
Unknown Object (File)
Mar 12 2024, 4:42 PM
Unknown Object (File)
Mar 10 2024, 3:39 PM
Unknown Object (File)
Mar 8 2024, 3:32 PM
Unknown Object (File)
Mar 6 2024, 3:43 PM
Unknown Object (File)
Mar 6 2024, 6:21 AM
Unknown Object (File)
Jan 19 2024, 1:03 PM
Unknown Object (File)
Jan 10 2024, 8:43 PM
Subscribers
None

Details

Summary

This is not strictly required for crossbuilding but having lots of warnings
from bsd.linker.mk in the output was making it hard to see the actual
warning messages.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32836
Build 30246: arc lint + arc unit

Event Timeline

imp requested changes to this revision.Feb 11 2018, 6:06 PM
imp added inline comments.
share/mk/bsd.linker.mk
69

Were it not for the weird exit value, you could do this more simply as ld <blah> --version || ld <blah> -v || echo none.

I'm surprised that 'head' results in an exit of 141 though. Is head returning that?

This revision now requires changes to proceed.Feb 11 2018, 6:06 PM
share/mk/bsd.linker.mk
69

LD can print more than one line and head exits after the first line has been printed so it dies with a pipe closed error.

This is only a problem when changing the bmake shell to use -o pipefail, so I can remove it if you prefer.

Is there anything we'd do differently based on mac linker version?

Is there anything we'd do differently based on mac linker version?

I doubt the version matters, but we could avoid adding ld.bfd/ld.lld specific flags during bootstrapping.
There currently aren't any, but that might change (and silencing the warnings is quite useful).

I doubt the version matters, but we could avoid adding ld.bfd/ld.lld specific flags during bootstrapping.
There currently aren't any, but that might change (and silencing the warnings is quite useful).

Yeah, it's specifically the version I'm wondering about, although I suppose it would be just as strange to detect macos linker and use a fake version (e.g. 0.0.0)

This version looks good to me.

This revision is now accepted and ready to land.Aug 10 2020, 1:03 PM
This revision was automatically updated to reflect the committed changes.