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, Nov 10, 11:20 PM
Unknown Object (File)
Wed, Nov 6, 11:14 PM
Unknown Object (File)
Thu, Oct 17, 4:13 PM
Unknown Object (File)
Oct 16 2024, 9:19 PM
Unknown Object (File)
Oct 14 2024, 9:36 AM
Unknown Object (File)
Oct 12 2024, 9:00 PM
Unknown Object (File)
Oct 11 2024, 10:20 AM
Unknown Object (File)
Oct 8 2024, 9:51 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested changes to this revision.Feb 11 2018, 6:06 PM
imp added inline comments.
share/mk/bsd.linker.mk
57 ↗(On Diff #39177)

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
57 ↗(On Diff #39177)

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.