From owner-dev-commits-src-branches@freebsd.org Wed Mar 17 10:27:57 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 735805A8E7C; Wed, 17 Mar 2021 10:27:57 +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 4F0mZM4Jb0z3FFj; Wed, 17 Mar 2021 10:27:55 +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 DD72B512A; Wed, 17 Mar 2021 10:27:51 +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 12HARphk096158; Wed, 17 Mar 2021 10:27:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12HARplq096157; Wed, 17 Mar 2021 10:27:51 GMT (envelope-from git) Date: Wed, 17 Mar 2021 10:27:51 GMT Message-Id: <202103171027.12HARplq096157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: edb96bf587fe - stable/13 - Fix crossbuild bootstrap tools build with Clang 12 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: edb96bf587fe89736d87fd12409cc734c52919a8 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: Wed, 17 Mar 2021 10:27:58 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=edb96bf587fe89736d87fd12409cc734c52919a8 commit edb96bf587fe89736d87fd12409cc734c52919a8 Author: Alex Richardson AuthorDate: 2021-02-10 11:05:02 +0000 Commit: Alex Richardson CommitDate: 2021-03-17 09:59:32 +0000 Fix crossbuild bootstrap tools build with Clang 12 Clang 12 no longer allows re-defining a weak symbol as non-weak. This happed here because we compile err.c with _err defined to err. To fix this, use the same approach as the libc namespace.h (cherry picked from commit 02af91c52e71e8a0f47251e637c9687f35d45dd9) --- tools/build/libc-bootstrap/namespace.h | 4 +++- tools/build/libc-bootstrap/un-namespace.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/build/libc-bootstrap/namespace.h b/tools/build/libc-bootstrap/namespace.h index 73e27f8cb02b..2c242f88072d 100644 --- a/tools/build/libc-bootstrap/namespace.h +++ b/tools/build/libc-bootstrap/namespace.h @@ -45,7 +45,9 @@ #define _writev(a, b, c) writev(a, b, c) #define _fsync(a) fsync(a) #define _getprogname() getprogname() -#define _err(...) err(__VA_ARGS__) +/* These two need to be renamed to build libc/gen/err.c */ +#define err _err +#define warn _warn #define _pthread_mutex_unlock pthread_mutex_unlock #define _pthread_mutex_lock pthread_mutex_lock diff --git a/tools/build/libc-bootstrap/un-namespace.h b/tools/build/libc-bootstrap/un-namespace.h index 398707791792..f08ab41ea543 100644 --- a/tools/build/libc-bootstrap/un-namespace.h +++ b/tools/build/libc-bootstrap/un-namespace.h @@ -36,5 +36,8 @@ * $FreeBSD$ */ #pragma once -/* This can be empty when building the FreeBSD compatible bootstrap files */ + +/* Undo the changes made by namespace.h */ +#undef err +#undef warn