From nobody Sat Apr 20 10:32:15 2024 X-Original-To: dev-commits-src-branches@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 4VM79r3Lwbz5HW4g; Sat, 20 Apr 2024 10:32:16 +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 4VM79q66mtz4PP3; Sat, 20 Apr 2024 10:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609135; 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=DIVhCP0Dpl3KW5fIsY6evqXwOMtxHhXjA1RBCqWM4IA=; b=CODTPmHVmJe7jMHORwuxycW+nidUmFMmPjy3paBIpiojsSIggbLjopVAv3HWNTZu/vgUKZ tJUnWI4ddGzp8QyWUpAminSfRe0ph3zykS/cY558Gx33IulU/BAipPlXZfFGHszrBDkf/q UehnZXxt+t1rXCinLER3jZoWlyqJPuVNGTG2xn+OmjZlFktrgDEl7hg6iJRKmPpVJIiBXJ q6qQsL3OtfnPxDm2Ygrf2asQVbdwsXknbWwHwzp3Dh4du93b4jYWE86tdnNIQVVFx3lyVT TM7RFFVs+ZmG59YuqSGeEHLIu0daA0BVI0CRHqt+Rt1NMe6ULSIGpR3hJ38ZNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609135; a=rsa-sha256; cv=none; b=w2ped51yALj4iyWOYjbMO+e8EE7x+pPJE51vYKQPBnZ1ZYXOaNUVHmsJFIUq9nL6hI0C8P 6fRq2lSXu1/QrRx7US7KT88oUOBl7QR+lYrFTKwsJhoPLCMhxyDQM/UCozL+Z6x/BCfIlf 9uskPwmWVTqzEnl3VgYNUCoFz4weNDWi5ET2jpKxhgltRVqeuOVCof7GjTnruSF7WSfZOR 3aqjygSrvH3WYY6T2c9AeTQNjLhTAN81C1yMRKV34whqquYw1Rozb3DyfLKd6tfa2cPAaU DaeKdGjIr+tB1Bo2plRNfPdQLjZ1bvant9EAlELCWAxtI1Ynztf1DyOzpi31mg== 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=1713609135; 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=DIVhCP0Dpl3KW5fIsY6evqXwOMtxHhXjA1RBCqWM4IA=; b=qS226x9VxoNCQRG9FyVUv229Dc94Mgp6PF3eD7EEL90CXUDQG/FnVn07dB2KjTcyT39BZ+ t3OpITBkQgybmbfaFxP2pCufUQemsqG+fDRBY7AQKeQHg835uO6OC7aAGQ75w/r/mN2RNU Z2r9iZpMqpEvJC6rN1f8fIke+Umjq9zpdras4yuureXX5JrVT1uAzEFDDCgFgsnkrGXJdz kbLWsTnlFl3EzDgQADbFOZiy/KXQ9i4+530f2uMUgSnYN9VrxQwLaXEhm2UqGSFQhAVYwe h6LEZeRAc6abxQUOQxgOqxrlALAkkdceBKwJB0VXgpM4adA8XYgIlkUKSS1+MA== 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 4VM79q5hNRzZ1t; Sat, 20 Apr 2024 10:32:15 +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 43KAWFiV009571; Sat, 20 Apr 2024 10:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAWF1p009568; Sat, 20 Apr 2024 10:32:15 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:32:15 GMT Message-Id: <202404201032.43KAWF1p009568@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: 7adf29b6244f - stable/14 - Add two FreeBSD customizations to libc++ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/14 X-Git-Reftype: branch X-Git-Commit: 7adf29b6244fe016ef869f287a66048195f9af29 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7adf29b6244fe016ef869f287a66048195f9af29 commit 7adf29b6244fe016ef869f287a66048195f9af29 Author: Dimitry Andric AuthorDate: 2024-01-07 11:32:29 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:14:10 +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