From nobody Mon Oct 17 15:40:54 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 4Mrh6H1Dk9z4gDQy; Mon, 17 Oct 2022 15:40: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 4Mrh6H0FZZz3Ngf; Mon, 17 Oct 2022 15:40:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666021255; 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=CcNl8LE0pzsIp7kvdJIJJX7mQ/mRxYXwa8yUtbftDPQ=; b=L/DG1yrP4xeA2izIoD39K3C02oxFnu9D4jtqBvJhOISpFsRtmQAyFC6fAZcPOg2fyfBt3R +7O2Vs6dWAaqSuVDEdXX2NZ+JSPr6rJFIMqSox4L4u5Mb6VvcAcSgNjpy3SIyJb3GJk+vt ufIrFrPWvTilsGj1sMvop1R/GW7rVCVi4veIdT3KFUVnDOGmc3gEPq2KBe+liKoPYEp3pw hPfmiqTNVTJfZOm+g2zYapiBaAdJKiX9H7/ZlrG63SLzUnKuVOxey9wkyhV7HmtGt0+HD6 S91/Q1xmNbVyxpK6mO98EIdoKFd/aDPaOBPNqRVgc31Iyj54YP47tl0X75M8vQ== 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 4Mrh6G6TYZzsYf; Mon, 17 Oct 2022 15:40:54 +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 29HFesld016576; Mon, 17 Oct 2022 15:40:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29HFesWQ016575; Mon, 17 Oct 2022 15:40:54 GMT (envelope-from git) Date: Mon, 17 Oct 2022 15:40:54 GMT Message-Id: <202210171540.29HFesWQ016575@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: e2f3e8c5e89c - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: e2f3e8c5e89c745429968220a12e2de9e79b4a07 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666021255; 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=CcNl8LE0pzsIp7kvdJIJJX7mQ/mRxYXwa8yUtbftDPQ=; b=SFLultS+zH+EP60zYQfQMi054QYUbNAbz/FHEUQX3BnVQs2m4TllE1HoS5pkYChaDV0P8O 2JbxG+1ZtYQ9K8af8AnrLUK5R17EWcGGnEnHpfUWOoTT0LZo/rw4jmTJldTS3yzoviRvzG YfUqIRBphYS7bhlqIqRFs03wayXTkTyovpkIS6ek4buFWOe6X/7VsL0V3M49tQW5g8e7Jz JLBpzN2AAsLjrtuDulZff4J0tc1eDhLAhuqAqL4CYScPxqvZ8ku+P7xZFJsJS7HEcagNJp UDUOEcUhUc+fDb6i9pb5+llS+azMESL5BhEPPdfcXZ/+ZCWwYKofTsr1D6TZWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666021255; a=rsa-sha256; cv=none; b=Upht9LcbQQLUWaa7KxVEC1G/nfIIeUTY0Q+mnRnNel+78weWcCNp9MyPmW4y0gz8sBAkhn PRtgX0r42A4CUnoQGPjqzblAq128bJz1oy01Wpo9cwx9NxU44cRQTi+umDCkfMbqAhsPpY pQ3oT9ZT9e1bbn5OwqRkPTG1kZRH1cU+Sp+LPX9SD2TiVP9AlEQrvKKslI9/T6oX6htjCF 6GBd/Hx73HwFiuM6kC+0QCJZi/ByeS1fsAv3AgKqdLAILYnpxqv9mlM7bptCihbiKu1nYy p1gmwTbP/Q8vHgnX2/SOz5BsAWcTAiez3M4HdpaizEiP7eBZTVDbjhnNpB1oHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e2f3e8c5e89c745429968220a12e2de9e79b4a07 commit e2f3e8c5e89c745429968220a12e2de9e79b4a07 Author: Kyle Evans AuthorDate: 2022-10-14 03:04:47 +0000 Commit: Kyle Evans CommitDate: 2022-10-17 15:40:17 +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 1cd7b5f518cd..22d6b02c78a5 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= freebsd12.4 -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}\"