commit: 198f908bda13bb49d06565450ccd2ceacd53d74b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 27 08:40:52 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 27 08:41:17 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=198f908b
sys-devel/clang-common: restore maybe-stddef changes to 16.0.4
Lost in bump (race when rebasing).
Fixes: 8f9dfc3b1e4f0b8bdda3951c675b5af922cf1b99
Signed-off-by: Sam James <sam <AT> gentoo.org>
...lang-common-16.0.4.ebuild => clang-common-16.0.4-r1.ebuild} | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sys-devel/clang-common/clang-common-16.0.4.ebuild
b/sys-devel/clang-common/clang-common-16.0.4-r1.ebuild
similarity index 93%
rename from sys-devel/clang-common/clang-common-16.0.4.ebuild
rename to sys-devel/clang-common/clang-common-16.0.4-r1.ebuild
index 4acd801b683d..358dca01c333 100644
--- a/sys-devel/clang-common/clang-common-16.0.4.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.4-r1.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 (<stdc-predef.h>) &&
!defined(__GLIBC__)
+ # include <stdc-predef.h>
+ #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