]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r358132:
authorDimitry Andric <dim@FreeBSD.org>
Mon, 2 Mar 2020 07:11:37 +0000 (07:11 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Mon, 2 Mar 2020 07:11:37 +0000 (07:11 +0000)
commit4cf7e89e0ce9c116e43ee35478a446ff101b229d
tree3e5729913377c08181c2cfcdabdf453c19b63b9f
parentc80ab54da4a1084e320e47fd3cd3d6b582d7f5d5
MFC r358132:

Take LINKER_FREEBSD_VERSION from numerical field after dash

Summary:
With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each
time we make a change that requires re-bootstrapping, but with the
linker variant, we instead take the entire part after "FreeBSD", as in
this example version output:

LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers)

E.g., LINKER_FREEBSD_VERSION is currently being set to
"c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006".  This means that
*any* new upstream lld version will cause re-bootstrapping.

We should only look at the numerical field we append after a dash
instead.  This review attempts to make it so.

The only thing I am not happy about is the post-processing of awk output
in Makefile.inc1.  I notice that our awk does not have gensub(), so it
can't substitute a numbered sub-regex with \1, \2, etc.  Suggestions
welcome. :)

Differential Revision: https://reviews.freebsd.org/D23691
Makefile.inc1
share/mk/bsd.linker.mk