From nobody Mon Oct 17 15:40:53 2022 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 4Mrh6F2tZ0z4gDQq; Mon, 17 Oct 2022 15: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 4Mrh6F2Nz1z3NlX; Mon, 17 Oct 2022 15: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=1666021253; 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=UZv9jT6MMYm1ZkSW4+lBchl66WUOquWcvgvXZfI7uXw=; b=wJVXmbEhi6E+OBOfAfvG7eO5Tmc8XgdYHqZvWt8aPe5iqCqJjyE286UpZDDQeEUPA7GUHT 7UZ8KkJifc0//qBsrXfbDGaeapw2JlmWiF14Ds32xPSYla5TNj4s5dmoC58xMzweKjW0Oo zzlLGSp98HscBS+3w4kYvr2oVH4R4+4hLXqM7fbWl2RCfEdRX3t5LBHcz0D+DOan1mcUP7 i3clF1icTS3G5WVGRkz2LrNwirOipHcOKcTUKLKr+LqzM8HJLmrMR7hOdlz9tCRN81tnOB zYg3ZkNlI2rtxj0G+XlnspbcV4qCBIATVXQnAPlMBHZGoac+DPWwzsjaLM3yyA== 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 4Mrh6F1VzBzsnq; Mon, 17 Oct 2022 15:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29HFer9v016463; Mon, 17 Oct 2022 15:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29HFerXl016462; Mon, 17 Oct 2022 15:40:53 GMT (envelope-from git) Date: Mon, 17 Oct 2022 15:40:53 GMT Message-Id: <202210171540.29HFerXl016462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 63d9ad6e46d2 - stable/13 - Revert "Avoid using TARGET_ARCH in llvm.build.mk" 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 63d9ad6e46d28c5310def9f5db954debf3d1c569 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666021253; 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=UZv9jT6MMYm1ZkSW4+lBchl66WUOquWcvgvXZfI7uXw=; b=YDShsLb4YT9zHNSit6EVa8OUhuChd4GJ8FO04imtW6cCLU2BnZ4ZDam/un55m8mCJL11zu R1NX4tXAeBV7NGSkCjCRuSoTPZDYFByKzaKKYxeItXYFKctfwvWpMDEIVIbq9a/WLP4ueo 5cIg6My2qa/nTUPLvTC84m6T42o0YKolnlVFeLSGllKYyb1qh12g6X4flZekh0VAcBC63/ UzGM/j3LfUBSr0Wy5Qv02o+NPBrzGBQgyA41SmcfN7unxZCwqwWfNRmoh1Kr8ZWkBsjt6V h6z/xnceILcHzXqbzNEA9LPgnHC9t5zJsxdy8Xe5ag+TQztwjRlZyoz8+JFHhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666021253; a=rsa-sha256; cv=none; b=pkaZM/1jJVU90Wthw7lnDN7DlSh+wkqMMCkwYt2xfuLZJEGyWB42XbKyuTd5qwe+X5UzGW EGw4OkLSfk1qF9+HJ5j2mDYGSUtHDhb5pJjtxGz+TvZhqNrIgg+HElO26s4eKqL+baLJ4o FIXbxmFaCyt+FMin6QqFgdLxM1YdeW0/fDFED9tMnmdCIKYB90xndJRVRhAZT8Ppy1h7Y5 IW/Wn0hdRA2cnkk/lx+ioEngysoQcOKcQMfc82D3Wr0zrwcGVU+1g64ohRewfV33tyEYaV N49bmBOD3GWppai+P2DQsFT4C/1INobNkicKHQQN5ZqyDrDBRjVjwhDMyhTsnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=63d9ad6e46d28c5310def9f5db954debf3d1c569 commit 63d9ad6e46d28c5310def9f5db954debf3d1c569 Author: Kyle Evans AuthorDate: 2022-10-14 03:04:47 +0000 Commit: Kyle Evans CommitDate: 2022-10-17 15:38:46 +0000 Revert "Avoid using TARGET_ARCH in llvm.build.mk" This reverts commit 8534e6be8110a8126268a38dc0557a2d15615ce9, and adds a cautionary note that there are dragons about that should be considered when changing it. PR: 267026 Reviewed by: dim, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D36981 (cherry picked from commit ed7910fbac07ee39d10528994e49ada2d0f2d754) --- lib/clang/llvm.build.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index e1f9c05de729..79621d706c6b 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -26,14 +26,19 @@ CFLAGS+= -DHAVE_VCS_VERSION_INC CFLAGS+= -DNDEBUG .endif +# Note that using TARGET_ARCH here is essential for a functional native-xtools +# build! For native-xtools, we're building binaries that will work on the +# *host* machine (MACHINE_ARCH), but they should default to producing binaries +# for the *target* machine (TARGET_ARCH). +TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} # Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it. # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${TARGET_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") TARGET_ABI= -gnueabihf -.elif ${MACHINE_ARCH:Marm*} +.elif ${TARGET_ARCH:Marm*} TARGET_ABI= -gnueabi .else TARGET_ABI= @@ -41,7 +46,7 @@ TARGET_ABI= VENDOR= unknown OS_VERSION= freebsd13.1 -LLVM_TARGET_TRIPLE?= ${MACHINE_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} +LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\"