From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E80F158094 for ; Sun, 9 Oct 2022 20:07:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 35930E0878; Sun, 9 Oct 2022 20:07:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1B387E0878 for ; Sun, 9 Oct 2022 20:07:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F2936340F85 for ; Sun, 9 Oct 2022 20:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 64162607 for ; Sun, 9 Oct 2022 20:07:50 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1665346054.902adb9437dbd55cf4a7e4a1691f6d3b314e1640.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang-common/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/clang-common/clang-common-15.0.2-r1.ebuild sys-devel/clang-common/clang-common-15.0.2.9999.ebuild sys-devel/clang-common/clang-common-16.0.0.9999.ebuild sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild sys-devel/clang-common/metadata.xml X-VCS-Directories: sys-devel/clang-common/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 902adb9437dbd55cf4a7e4a1691f6d3b314e1640 X-VCS-Branch: master Date: Sun, 9 Oct 2022 20:07:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0104cace-66f0-4ec9-87ae-0e68ed81f680 X-Archives-Hash: 6e4d56c2d214154d6d90475804c2584b commit: 902adb9437dbd55cf4a7e4a1691f6d3b314e1640 Author: Michał Górny gentoo org> AuthorDate: Sun Oct 9 20:07:34 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Oct 9 20:07:34 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=902adb94 sys-devel/clang-common: Introduce USE=stricter for more -Werror= Signed-off-by: Michał Górny gentoo.org> .../clang-common/clang-common-15.0.2-r1.ebuild | 25 +++++++++++++++++++++- .../clang-common/clang-common-15.0.2.9999.ebuild | 25 +++++++++++++++++++++- .../clang-common/clang-common-16.0.0.9999.ebuild | 25 +++++++++++++++++++++- .../clang-common-16.0.0_pre20221006-r1.ebuild | 25 +++++++++++++++++++++- sys-devel/clang-common/metadata.xml | 1 + 5 files changed, 97 insertions(+), 4 deletions(-) diff --git a/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild b/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild index 9962f257ccc0..a29bbbc806c9 100644 --- a/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild @@ -11,7 +11,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="default-compiler-rt default-libcxx default-lld llvm-libunwind" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + stricter +" PDEPEND=" sys-devel/clang:* @@ -82,6 +85,26 @@ src_install() { @gentoo-gcc-install.cfg EOF + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + + # constructs banned by C2x + -Werror=strict-prototypes + -Werror=deprecated-non-prototype + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + local tool for tool in clang{,++,-cpp}; do newins - "${tool}.cfg" <<-EOF diff --git a/sys-devel/clang-common/clang-common-15.0.2.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.2.9999.ebuild index 0ff52691cc71..993dddec4bf9 100644 --- a/sys-devel/clang-common/clang-common-15.0.2.9999.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.2.9999.ebuild @@ -11,7 +11,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="default-compiler-rt default-libcxx default-lld llvm-libunwind" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + stricter +" PDEPEND=" sys-devel/clang:* @@ -81,6 +84,26 @@ src_install() { @gentoo-gcc-install.cfg EOF + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + + # constructs banned by C2x + -Werror=strict-prototypes + -Werror=deprecated-non-prototype + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + local tool for tool in clang{,++,-cpp}; do newins - "${tool}.cfg" <<-EOF diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild index 0ff52691cc71..993dddec4bf9 100644 --- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild @@ -11,7 +11,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="default-compiler-rt default-libcxx default-lld llvm-libunwind" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + stricter +" PDEPEND=" sys-devel/clang:* @@ -81,6 +84,26 @@ src_install() { @gentoo-gcc-install.cfg EOF + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + + # constructs banned by C2x + -Werror=strict-prototypes + -Werror=deprecated-non-prototype + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + local tool for tool in clang{,++,-cpp}; do newins - "${tool}.cfg" <<-EOF diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild index 0ff52691cc71..993dddec4bf9 100644 --- a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild @@ -11,7 +11,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="default-compiler-rt default-libcxx default-lld llvm-libunwind" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + stricter +" PDEPEND=" sys-devel/clang:* @@ -81,6 +84,26 @@ src_install() { @gentoo-gcc-install.cfg EOF + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + + # constructs banned by C2x + -Werror=strict-prototypes + -Werror=deprecated-non-prototype + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + local tool for tool in clang{,++,-cpp}; do newins - "${tool}.cfg" <<-EOF diff --git a/sys-devel/clang-common/metadata.xml b/sys-devel/clang-common/metadata.xml index 31c80b4fb555..7ea033c083c9 100644 --- a/sys-devel/clang-common/metadata.xml +++ b/sys-devel/clang-common/metadata.xml @@ -11,5 +11,6 @@ Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang Use libc++ instead of libstdc++ as the default stdlib for clang Use lld as the default linker for clang + Default to stricter behavior known from newer clang versions, turning more warnings into errors