From nobody Sat Apr 20 10:34:22 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 4VM7DH0Lp7z5HWWj; Sat, 20 Apr 2024 10:34:23 +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 4VM7DG2ZT6z4SPh; Sat, 20 Apr 2024 10:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609262; 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=Ek9/bzdA82lPmiG5b8dXxT4kmxqj78zqh9LJcahgPIA=; b=RO95UW5ttnmJG3z+JiQ5Yk7sFS4NcAvMGxtL/cyPo7BZ2nie/J2uoIVFCFbHNiQTe9JFuy /HFsY8pkDfYMcasrJejpj+yVUSq6Zp+EMoi+umbLCbi/4a/yDqT2jvk5JSfsW9tRbtRBQC YqKIKSpNKjJb12LnS6N8VesNYaiLBlFSAxYPSm69Q3ZgBRcnsBHOmlGDUtwNjpEcg8T5vH guV+V9JiOqakQSQQtqKzSA8XywUXDkl6HY9N7XRW82bDbjxJvIrShhnuJha4jxleeNuKQW EK+KxXNth660MCx1EiObWs0yriFY84jzBB0gi1OWWlpGMYbReKxos/XnwvYk6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609262; a=rsa-sha256; cv=none; b=OrIYWAoA4vMhcF7N5TApHfrTV1UoT7gUOQpFKW+cw3Z0lvjgpKV4CWWiM6MIXXAaEhKyv1 4RsGjVwTJV5Q4grhumOtOkCpCxqINOPnPItLOGWsYLk5KTNlFkHVqExSkkQe5yYQSEg+Km vfJTqg/S6Gpb7CtJDG+cAcopMNg8QFlOdffsgsA8UWJhw4P4USU+8YRfldCbUlid5UOqlZ bUftnmEbU0Uvj5hNS02hjaxDhEKaMRMICmz0xT/iLTVzarGlJQgWddL1bGzSliaz8HUQE6 Okq1LmGECXoBGWAzwLWnMC8iX85qGOAH9hnxsWwLrtDu1eudlxS8XdTb73M3Fg== 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=1713609262; 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=Ek9/bzdA82lPmiG5b8dXxT4kmxqj78zqh9LJcahgPIA=; b=rEKTjaHDmDJ/wH1E54b7/2jvAWGXfSp5MmgJfQcVk+iHN1h8i/GEBk/fnBrvmOgjKulxD2 +ItNBmpvABD1D3vwItdmbOgCqk89iXHpbfr/Gk2ZRZvC/3JrF3I6SNizG6dX7ZiiPGCJMu 2UpOg0j2fbj9j2DjzvSezM+/RMli4pyCs6TG61glHvJ2tzYDIxFMtPTamBykTbK1ha1Use Uin2+9Ryg2PulUdE3YrqNw9kvRUm4kmlqun6KrVv3ikWN93T7jA4Cdpe8sOl9JiHLJRlC9 9nIKxP+HAWcx56T7WwTnTXBy8b+hrz0JiGjepBnKG0LzY+n/76JDkExPwDAfWQ== 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 4VM7DG2BhrzYn4; Sat, 20 Apr 2024 10:34:22 +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 43KAYMkR013459; Sat, 20 Apr 2024 10:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAYMSC013456; Sat, 20 Apr 2024 10:34:22 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:34:22 GMT Message-Id: <202404201034.43KAYMSC013456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 335f7960dc37 - stable/13 - 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/13 X-Git-Reftype: branch X-Git-Commit: 335f7960dc37e3f149c0d795909e2d3948c4a554 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=335f7960dc37e3f149c0d795909e2d3948c4a554 commit 335f7960dc37e3f149c0d795909e2d3948c4a554 Author: Dimitry Andric AuthorDate: 2024-01-07 11:32:29 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:24:41 +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 (cherry picked from commit 412fa3436f0d1fe4a7e5e3b66783aa40f599125e) --- 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