]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Take LINKER_FREEBSD_VERSION from numerical field after dash
authordim <dim@FreeBSD.org>
Wed, 19 Feb 2020 21:12:59 +0000 (21:12 +0000)
committerdim <dim@FreeBSD.org>
Wed, 19 Feb 2020 21:12:59 +0000 (21:12 +0000)
commitc5294e2e02b1e0682c919c458f9ec3dfd6c50a33
treede42c43278d035cd5be3cd01789ed1336af57f39
parent22d3316afc60c5370876fa82fcc0655bc3bb40d8
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. :)

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