Apparently newer versions of binutils complain instead of silently ignoring the unknown -z option.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Not sure how to make kernel old way (config && make) with cross-toolchain.
Also, what is the idiomatic way to distinguish ld.bfd from ld.lld?
For Makefiles we have bsd.linker.mk that sets LINKER_TYPE, with a similar sort of approach to what you've done here. It uses sed to extract the first line of output from ld -v and then various bits of make magic to examine parts of that.
In ports we check ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld to determine if lld is the default linker (from when it was only so on some archs).
So I am leaving the check as is. IMO it is not worth additional complications to add sed there.
In ports we check ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld to determine if lld is the default linker (from when it was only so on some archs).