From owner-dev-commits-src-branches@freebsd.org Tue Sep 7 12:10:08 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F18D5662934; Tue, 7 Sep 2021 12:10:08 +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 4H3kbz3vZkz4rvn; Tue, 7 Sep 2021 12:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B9FDA121E0; Tue, 7 Sep 2021 12:10:03 +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 187CA3MX089748; Tue, 7 Sep 2021 12:10:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 187CA3eP089746; Tue, 7 Sep 2021 12:10:03 GMT (envelope-from git) Date: Tue, 7 Sep 2021 12:10:03 GMT Message-Id: <202109071210.187CA3eP089746@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: 92f73068bf69 - stable/13 - Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path 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: 92f73068bf695960c884a44bf31f972305f947bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2021 12:10:09 -0000 The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=92f73068bf695960c884a44bf31f972305f947bf commit 92f73068bf695960c884a44bf31f972305f947bf Author: Jessica Clarke AuthorDate: 2021-08-24 13:55:31 +0000 Commit: Jessica Clarke CommitDate: 2021-09-07 12:08:18 +0000 Makefile.inc1: Make sure sub-makes see MK_CLANG_BOOTSTRAP=no when XCC is a path Currently we override MK_CLANG_BOOTSTRAP to no so we don't build a bootstrap compiler, but subdirectories don't see that and so the hack in bsd.sys.mk to prefer our includes over Clang's resource dir for external toolchains is not enabled unless you use -DWITHOUT_CLANG_BOOTSTRAP explicitly on top of XCC (which tools/build/make.py does not do), causing duplicate definition errors when building rtld-elf due to the use of -ffreestanding (Clang's stdint.h will use the system one when hosted, but its own when freestanding, and only has glibc's preprocessor guards, not FreeBSD's). This broke when dropping CLANG_BOOTSTRAP from BROKEN_OPTIONS. Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux") MFC after: 1 week Reviewed by: imp, arichardson Differential Revision: https://reviews.freebsd.org/D31529 (cherry picked from commit ab3a18095faebe306989f25288c44968f4144063) --- Makefile.inc1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 3429d8312d3e..81567af5897b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -94,6 +94,9 @@ X${COMPILER}?= ${${COMPILER}} # a cross compiler. .if ${XCC:N${CCACHE_BIN}:M/*} MK_CLANG_BOOTSTRAP= no +# Make sure sub-makes see the option as disabled so the hack in bsd.sys.mk to +# work around incompatible headers in Clang's resource directory is enabled. +.MAKEOVERRIDES+= MK_CLANG_BOOTSTRAP .endif # Pull in compiler metadata from buildworld/toolchain if possible to avoid