From nobody Tue Aug 01 21:06:54 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 4RFnjb0b8rz4prWb; Tue, 1 Aug 2023 21:06:55 +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 4RFnjV6kzXz3LvV; Tue, 1 Aug 2023 21:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690924015; 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=srRm5G0pK8vNuyLp5Su+eJw8O9gqVtLli+aaO8lmQew=; b=Fg3Fuzm2yLjlsoiHdDvmcJpvSMMlmo+Y3ynt3GGqUbTy4MuW+1cXJc4/yq6zfCaVQS1w89 uaRJNa2JQKWy0zKqXZ+eZ0Ft8qftBHo4qk2uikZOdcCoHrZVHZ9vBP7eKvyFQI68fZE8V8 tZGy369bkawd+5ttsV5h4u+L8KJoCOs2NFNLxCMdT+KOpB06orUau5UnLymBgERVY3pKI9 I/WSCa4TE7X+codYT43BMBdGCnzXd9bb4mrYzQ6IEOUZY/HkUQsi8+Pnw1wkRIYX3Sq5ik //mrTj8c2EkxUC7vDKH+/btf1NzjQjT/K9DaNobvt0BQoX4CRs4CkXsEtNmazg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690924015; a=rsa-sha256; cv=none; b=X0Gq0GogWDpy9mXvkeCY6fudREUMpq3VATj4US9en/ATrsOc2jgcdQaIFiGBFW1NofuyLT 8y9zPZ1vNgVEyuBq6dV9Sd+WPFgCQSwIJAecQGFOpTw+8J9H82+kGWwE6uS4NLyo/JJCV8 i4HaCJYskvunhxqC3+ibmgENcUUowAyZ1a8B9Q0uQPs63rE9dadJ+9/LShcKUXrpqjwgSe SMoN5qA3fn6jmWCq6gaDlzG3CfPkzEavOJLYC5I4VEoSRNGJH6sSCP2l0RrX34uefAsewK HT8FSkwtuag5CVa8Lu7uHwS1xK0LPolE30iHK/FHUH67e3ePZjDR6FwGu/si1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690924015; 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=srRm5G0pK8vNuyLp5Su+eJw8O9gqVtLli+aaO8lmQew=; b=l/a5pGaBhaGdykgQJCkedaipDyrt+bgZJvVSoLw+hls6vp/dxKcgyiFak0+2NswJHDclhj o+CWMCkKOTaeX7zYQUK6ZnIxDdqaEWMq4uHkwpEH3R6ur1KPMn/O5hFHBJq4NJsaCzVBod RUG0O8ArnB5fmXGSWu5eOp28MObdAU0pXxukLHQL+ewefGlK5fReqUIM3QpzXJhbMvqRWG xzmI9PLP/SNpgzcXoKR3gasELw25YDoS0rGwOoTjDQ6h0S4pKOD8vru1q7THiBLyunChS3 B0l6umNGRNpXTUNgREOCxl2Ryc9UH83dElYpAKWlKnkuclXHwLmpFnZVxEiBXg== 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 4RFnjV5KQszsgr; Tue, 1 Aug 2023 21:06:54 +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 371L6s1F013968; Tue, 1 Aug 2023 21:06:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371L6sYN013967; Tue, 1 Aug 2023 21:06:54 GMT (envelope-from git) Date: Tue, 1 Aug 2023 21:06:54 GMT Message-Id: <202308012106.371L6sYN013967@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 4948a2403ee3 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4948a2403ee31876f37cadef96a135cd11e1b7a1 Auto-Submitted: auto-generated The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=4948a2403ee31876f37cadef96a135cd11e1b7a1 commit 4948a2403ee31876f37cadef96a135cd11e1b7a1 Author: Jessica Clarke AuthorDate: 2023-07-24 00:34:17 +0000 Commit: Jessica Clarke CommitDate: 2023-08-01 20:42:53 +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 (cherry picked from commit c4177f5b41d45f3c83a0ef329a50e4ae05da3878) --- 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 7209d7f173ae..bcbdc0c1131d 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