git: 7f9318a022ef - main - bsd.linker.mk: Use :C not :S for regex
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jul 2023 00:53:49 UTC
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7f9318a022ef0e5104fd429dc2d9ac37b9916353 commit 7f9318a022ef0e5104fd429dc2d9ac37b9916353 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2023-07-24 00:50:55 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2023-07-24 00:50:55 +0000 bsd.linker.mk: Use :C not :S for regex Whilst ^ and $ are supported with C, those are special cases, and general regex syntax like groups and alternations are not. Use the correct modifier so we get a version number out that's not 0 (which is what happens when it can't be parsed by the later code). Fixes: c4177f5b41d4 ("bsd.linker.mk: Handle Xcode 15 linker identification") MFC after: 1 week --- share/mk/bsd.linker.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 2a572fa01bcd..1086642ffb57 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -82,7 +82,7 @@ ${X_}LINKER_FREEBSD_VERSION= 0 .elif ${_ld_version:[1]:S/-classic$//} == "@(\#)PROGRAM:ld" # bootstrap linker on MacOS ${X_}LINKER_TYPE= mac -_v= ${_ld_version:[2]:S/PROJECT:(ld64|dyld)-//} +_v= ${_ld_version:[2]:C/PROJECT:(ld64|dyld)-//} # Convert version 409.12 to 409.12.0 so that the echo + awk below works .if empty(_v:M[1-9]*.[0-9]*.[0-9]*) && !empty(_v:M[1-9]*.[0-9]*) _v:=${_v}.0