From nobody Sat Apr 06 20:17:50 2024 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 4VBmqy3J6Qz5HGsf; Sat, 6 Apr 2024 20:17:50 +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 4VBmqy20LJz4KPR; Sat, 6 Apr 2024 20:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712434670; 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=FvdXMa0T4MsOO4Aw+GCwhQ84JqKeLr6hbFCbBVW82DQ=; b=a1DC3tRAJ/MHVYwlfWWwx/03SuxB1ryn1fUFuk8xR4T/r1BK+oWQcASCGkoCko3fv1kQOC j7VWU4XtBMNc0Z66wnEJtuNJCOAvmB0BtrmHXU56nMJwAqRndsMSDHEQ+u4X9cyXnYEPvL n+nAlBr0piWoAQ4UC/PQ5qiHwEZJzfTumf0X95tfkJpmdbIbEyXWv/8l3EDiQPCqWr0AeU yapGjnhBytgq008+5RCmy4XeFLIKsQYciwdUCnHc62e9ha5CGFh1pS4QW/ORZdEM/wnBSJ IJPlbbVVmQ8ylNWeX0O93Hi+Onutu7gHib67+QolRu/dffxSON2FGEI7ofjHVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712434670; a=rsa-sha256; cv=none; b=k+/FcImKfqOwmxybYFmwnCSo52nCPLkOjwy8pSV6EQj/PnNT6Jw9VxdMyGU9lLIKQ2ZZ7q LffAKabQSyVTm8dz3P21JpfypPaZyfpsQ83/N+UHmBMNPZt2oSsTOqNejnUGMdbsCewhKF YcovcMkyywdWqnJdu40CAfF9iyrxB7fXZx4JOxzaNWRF9F1eWT28ek/+bdp37WAhIatjZX Tdcn87xXTndLWEH4mxR+B2lcDaFwnxRlaEZkDuRYeS3/3M/1nAnwAvVxsIksbw3scWrXr7 UGzwRJEKjW3bGrfn3vtgn39zKJ/utIXwG+IPV5QPdUMoBp9juDW8soiU/JEUBQ== 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=1712434670; 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=FvdXMa0T4MsOO4Aw+GCwhQ84JqKeLr6hbFCbBVW82DQ=; b=pw9ZAUBGZ2N6ZGbjvP0dgiXc6wvq0CG1NmJmQkSVNv/8UeQSgUXfnM6OQXzrM+ouTqYTrC RZao6GYPMX+GyxzsA5Q1nv2rEB73B9DFWfdgEyFp+A1ORI5jeu47MWSqLAhOgq44AebgOD 5HPjAreZJQk/GfRsQGnSX5dAZyJlCfLagOtuAH5LsCyrKnvzowBZdh4WsAK7mWLJdO4erI rmQTsnQgLha1pjHHOY+AmQPdcVpwL3QJd8QiA8zsTncc/qC95aA5/ahyZ87x8u239sWyTo 1yBEPcFrZdcY81YNYAoXg+Yj0+lYJPXbKQCFp9V/ox/qIdr+nkC/6bZfUfwsIQ== 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 4VBmqy1cWlzxgC; Sat, 6 Apr 2024 20:17:50 +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 436KHo8k029574; Sat, 6 Apr 2024 20:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 436KHoFH029571; Sat, 6 Apr 2024 20:17:50 GMT (envelope-from git) Date: Sat, 6 Apr 2024 20:17:50 GMT Message-Id: <202404062017.436KHoFH029571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 412fa3436f0d - main - Add two FreeBSD customizations to libc++ 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 412fa3436f0d1fe4a7e5e3b66783aa40f599125e Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=412fa3436f0d1fe4a7e5e3b66783aa40f599125e commit 412fa3436f0d1fe4a7e5e3b66783aa40f599125e Author: Dimitry Andric AuthorDate: 2024-01-07 11:32:29 +0000 Commit: Dimitry Andric CommitDate: 2024-04-06 20:13:25 +0000 Add two FreeBSD customizations to libc++ This is intended to better support ports usage of older clang versions: * Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler version checks, to avoid any warnings about support. This makes some ports that use -Werror fall over. * When using clang < 15.0, avoid using a type visibility attribute on the std namespace, as older versions of clang do not support this. PR: 276104 MFC after: 1 month --- contrib/llvm-project/libcxx/include/__config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index f52fb0441293..959082502a49 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -32,6 +32,7 @@ // Warn if a compiler version is used that is not supported anymore // LLVM RELEASE Update the minimum compiler versions +#if defined(_LIBCPP_ENABLE_COMPILER_VERSION_CHECKS) // FreeBSD customization # if defined(_LIBCPP_CLANG_VER) # if _LIBCPP_CLANG_VER < 1600 # warning "Libc++ only supports Clang 16 and later" @@ -45,6 +46,7 @@ # warning "Libc++ only supports GCC 13 and later" # endif # endif +#endif // _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS // The attributes supported by clang are documented at https://clang.llvm.org/docs/AttributeReference.html @@ -725,7 +727,8 @@ typedef __char32_t char32_t; # define _LIBCPP_TEMPLATE_VIS # endif -# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) +# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) \ + && _LIBCPP_CLANG_VER >= 1500 // FreeBSD customization # define _LIBCPP_TYPE_VISIBILITY_DEFAULT __attribute__((__type_visibility__("default"))) # else # define _LIBCPP_TYPE_VISIBILITY_DEFAULT