From nobody Mon Jul 24 00:40:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R8LtY3nFrz4p6Q9; Mon, 24 Jul 2023 00:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R8LtY3Ms1z474R; Mon, 24 Jul 2023 00:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690159253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7UkVswO2I/E5/2PiP10BlaoAvvl2BRMC2SoFX/Em+o=; b=gtuPxz2p6a5RE9vS/EIuz4KwF0UwAMs4w/fZB+iB0cw5iN4OD1zElSUU50FqnGDdk5O04j rUcHmC2JUL2bF04FZ+YG+R28Ih3Rtq37RjocVXLc/kIRwONGsxBAdMhjxQFAj3oeZN8ZOw qBBx862qbfsZL3QlqADUyg8D1+v7l3EfUBDdsTBjl4N2HK3kaNrrYpeBoZaifariHbZB+A 7+N26xoQ5D50Blc1ej8171uvEmK5rH2jjg5zxTZWx/8KvFsvAPFFjcY8Ji13KZwkbw8S/g UphmsZ8Hf3GvgFH73XKgYQGoFtBwmHG++pP3bbh/cJBVFfscgol1U60IgA4m7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690159253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7UkVswO2I/E5/2PiP10BlaoAvvl2BRMC2SoFX/Em+o=; b=APUd4MuZ6LkxArd+fs6Y9H7fmXnC7dc2WGy95oDRRQA2zzjSpy/HdgNsZanza3imZ978ak Mv0Qb4yHCB5YLJaZDqQVh0lF6hdAks0mpB16lWvUBq6/CnRXL5hrix7cLLsFe/sHQ5fsOy 1w67z2Z3HHB1ipCtagkaeJwI9/tbrPR0jtS2FT/Yem8m7K5TCKGhnHKho6yvAXy8gCEzCm fpBHzpcsF3YNxnqNTpLWbwutQaqJWu8vEuvakaFvSK/7G3CDo/jLr5a0Vm/FJjtnxRLfIJ GaG9owm7nIfrfuQSbylGWM1GP4aYolNOEjiCmJLWXY/rKX3Ojb9EgzqfN/BASg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690159253; a=rsa-sha256; cv=none; b=FL72tlYRahS2XPrTJTuAU8IjvRS6Qvo0O/NX8jnI4rxZLp/pQporUJvCb0f9hD/AcGOpFM EY+7RXP11VWDUkxHX7S2dIgIo8OfcBNHH9KV94oM0NkDwEfhvMkdFzYnIj2CZXoM5xK2JP lSvP3Dp9Bl60xpMHDyhAnHhhGxuZ8k/bUgTCe+cHq2XmAHj7V4NukJqQX/n9SrwWptpsKi 0159Em+kny+Zwl+4t021iupr3N0AZe5ovkefb3KmHLuCS8dH5FI3FTa1H9f9wg81Ibw4Np 5/XZC/6nq9XteDec96qzeNYjHVtanopGXExtASlzOnqR9Ot8FfIe05Fl7BoNXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R8LtY2RZzzxn0; Mon, 24 Jul 2023 00:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36O0eriv081734; Mon, 24 Jul 2023 00:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36O0erma081733; Mon, 24 Jul 2023 00:40:53 GMT (envelope-from git) Date: Mon, 24 Jul 2023 00:40:53 GMT Message-Id: <202307240040.36O0erma081733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c4177f5b41d4 - main - bsd.linker.mk: Handle Xcode 15 linker identification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4177f5b41d45f3c83a0ef329a50e4ae05da3878 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c4177f5b41d45f3c83a0ef329a50e4ae05da3878 commit c4177f5b41d45f3c83a0ef329a50e4ae05da3878 Author: Jessica Clarke AuthorDate: 2023-07-24 00:34:17 +0000 Commit: Jessica Clarke CommitDate: 2023-07-24 00:34:17 +0000 bsd.linker.mk: Handle Xcode 15 linker identification The upcoming Xcode 15 introduces a new linker (called ld-prime or ld-new in some documentation) to replace the classic ld64, which we need to handle. Previously, the linker would identify itself as: @(#)PROGRAM:ld PROJECT:ld64- Now, there are two cases. When the classic ld64 is in use, it identifies itself as: @(#)PROGRAM:ld-classic PROJECT:ld64- When the new linker is in use, it identifies itself as: @(#)PROGRAM:ld PROJECT:dyld- Thus, tweak the detection to allow a -classic suffix in the PROGRAM string and to allow a dyld- prefix instead of an ld64- prefix on the version number in the PROJECT string. MFC after: 1 week --- share/mk/bsd.linker.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 81275281be34..2a572fa01bcd 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -79,10 +79,10 @@ ${X_}LINKER_FREEBSD_VERSION:= ${_ld_version:[4]:C/.*-([^-]*)\)/\1/} .else ${X_}LINKER_FREEBSD_VERSION= 0 .endif -.elif ${_ld_version:[1]} == "@(\#)PROGRAM:ld" +.elif ${_ld_version:[1]:S/-classic$//} == "@(\#)PROGRAM:ld" # bootstrap linker on MacOS ${X_}LINKER_TYPE= mac -_v= ${_ld_version:[2]:S/PROJECT:ld64-//} +_v= ${_ld_version:[2]:S/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