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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 91B9315806E for ; Tue, 16 May 2023 23:13:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B66D9E0826; Tue, 16 May 2023 23:13:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 8D02EE0826 for ; Tue, 16 May 2023 23:13:41 +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 4ADF9340E9D for ; Tue, 16 May 2023 23:13:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7E327A34 for ; Tue, 16 May 2023 23:13:38 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1684278719.14dd0724ad00c2968202e46b4fc11f6f18cb440f.sam@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-16.0.3-r1.ebuild sys-devel/clang-common/clang-common-16.0.4.9999.ebuild sys-devel/clang-common/clang-common-17.0.0.9999.ebuild sys-devel/clang-common/clang-common-17.0.0_pre20230502.ebuild sys-devel/clang-common/clang-common-17.0.0_pre20230512.ebuild X-VCS-Directories: sys-devel/clang-common/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 14dd0724ad00c2968202e46b4fc11f6f18cb440f X-VCS-Branch: master Date: Tue, 16 May 2023 23:13:38 +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: 8a731eb8-e001-4f29-b068-abe5610e96f8 X-Archives-Hash: 1930b327aa26567cdf8c123f78e9aa3a commit: 14dd0724ad00c2968202e46b4fc11f6f18cb440f Author: Sam James gentoo org> AuthorDate: Tue May 16 23:11:59 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue May 16 23:11:59 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14dd0724 sys-devel/clang-common: add maybe-stddefs.h helper This is needed for musl (and any non-glibc target actually) with Clang, as GCC adds it by itself (but glibc covers for the compiler even if it doesn't), but neither Clang nor musl include it by themselves. See also: - https://www.openwall.com/lists/musl/2021/04/16/8 - https://reviews.llvm.org/D34158 - https://reviews.llvm.org/D106577 - https://reviews.llvm.org/D137043 Closes: https://bugs.gentoo.org/870001 Signed-off-by: Sam James gentoo.org> ...mmon-16.0.4.9999.ebuild => clang-common-16.0.3-r1.ebuild} | 12 +++++++++++- sys-devel/clang-common/clang-common-16.0.4.9999.ebuild | 10 ++++++++++ sys-devel/clang-common/clang-common-17.0.0.9999.ebuild | 10 ++++++++++ .../clang-common/clang-common-17.0.0_pre20230502.ebuild | 10 ++++++++++ .../clang-common/clang-common-17.0.0_pre20230512.ebuild | 10 ++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.3-r1.ebuild similarity index 92% copy from sys-devel/clang-common/clang-common-16.0.4.9999.ebuild copy to sys-devel/clang-common/clang-common-16.0.3-r1.ebuild index 5b4a6647f3ca..0d894d8b4232 100644 --- a/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.3-r1.ebuild @@ -10,7 +10,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE=" default-compiler-rt default-libcxx default-lld llvm-libunwind hardened stricter @@ -87,6 +87,8 @@ src_install() { @gentoo-runtimes.cfg @gentoo-gcc-install.cfg @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" EOF # Baseline hardening (bug #851111) @@ -101,6 +103,14 @@ src_install() { dodir /usr/include/gentoo + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () + # include + #endif + EOF + local fortify_level=$(usex hardened 3 2) # We have to do this because glibc's headers warn if F_S is set # without optimization and that would at the very least be very noisy diff --git a/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild index 5b4a6647f3ca..ffae670e7202 100644 --- a/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.4.9999.ebuild @@ -87,6 +87,8 @@ src_install() { @gentoo-runtimes.cfg @gentoo-gcc-install.cfg @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" EOF # Baseline hardening (bug #851111) @@ -101,6 +103,14 @@ src_install() { dodir /usr/include/gentoo + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () + # include + #endif + EOF + local fortify_level=$(usex hardened 3 2) # We have to do this because glibc's headers warn if F_S is set # without optimization and that would at the very least be very noisy diff --git a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild index 5b4a6647f3ca..ffae670e7202 100644 --- a/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-17.0.0.9999.ebuild @@ -87,6 +87,8 @@ src_install() { @gentoo-runtimes.cfg @gentoo-gcc-install.cfg @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" EOF # Baseline hardening (bug #851111) @@ -101,6 +103,14 @@ src_install() { dodir /usr/include/gentoo + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () + # include + #endif + EOF + local fortify_level=$(usex hardened 3 2) # We have to do this because glibc's headers warn if F_S is set # without optimization and that would at the very least be very noisy diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230502.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230502.ebuild index 5b4a6647f3ca..ffae670e7202 100644 --- a/sys-devel/clang-common/clang-common-17.0.0_pre20230502.ebuild +++ b/sys-devel/clang-common/clang-common-17.0.0_pre20230502.ebuild @@ -87,6 +87,8 @@ src_install() { @gentoo-runtimes.cfg @gentoo-gcc-install.cfg @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" EOF # Baseline hardening (bug #851111) @@ -101,6 +103,14 @@ src_install() { dodir /usr/include/gentoo + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () + # include + #endif + EOF + local fortify_level=$(usex hardened 3 2) # We have to do this because glibc's headers warn if F_S is set # without optimization and that would at the very least be very noisy diff --git a/sys-devel/clang-common/clang-common-17.0.0_pre20230512.ebuild b/sys-devel/clang-common/clang-common-17.0.0_pre20230512.ebuild index 5b4a6647f3ca..ffae670e7202 100644 --- a/sys-devel/clang-common/clang-common-17.0.0_pre20230512.ebuild +++ b/sys-devel/clang-common/clang-common-17.0.0_pre20230512.ebuild @@ -87,6 +87,8 @@ src_install() { @gentoo-runtimes.cfg @gentoo-gcc-install.cfg @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" EOF # Baseline hardening (bug #851111) @@ -101,6 +103,14 @@ src_install() { dodir /usr/include/gentoo + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include () + # include + #endif + EOF + local fortify_level=$(usex hardened 3 2) # We have to do this because glibc's headers warn if F_S is set # without optimization and that would at the very least be very noisy