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
F103225092: D14318.diff
Fri, Nov 22, 10:02 AM
Unknown Object (File)
Tue, Nov 19, 4:57 PM
Unknown Object (File)
Sat, Nov 16, 1:29 AM
Unknown Object (File)
Sat, Nov 16, 12:24 AM
Unknown Object (File)
Sun, Nov 10, 11:20 PM
Unknown Object (File)
Wed, Nov 6, 11:14 PM
Unknown Object (File)
Oct 17 2024, 4:13 PM
Unknown Object (File)
Oct 16 2024, 9:19 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.