diff options
Diffstat (limited to 'sys-devel/clang-common/clang-common-17.0.0.9999.ebuild')
-rw-r--r-- | sys-devel/clang-common/clang-common-17.0.0.9999.ebuild | 10 |
1 files changed, 10 insertions, 0 deletions
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..51e0f70c6470 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 (<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 |