commit: 036c5283994e19f567c9c674a8567a8b49879aa1 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Jan 13 05:33:07 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jan 13 05:33:07 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036c5283
sys-apps/systemd: fix build w/ clang+ssp Bug: https://bugs.gentoo.org/890004 Signed-off-by: Sam James <sam <AT> gentoo.org> .../systemd/files/252-no-stack-protector-bpf.patch | 26 ++++++++++++++++++++++ sys-apps/systemd/systemd-252.4-r1.ebuild | 1 + 2 files changed, 27 insertions(+) diff --git a/sys-apps/systemd/files/252-no-stack-protector-bpf.patch b/sys-apps/systemd/files/252-no-stack-protector-bpf.patch new file mode 100644 index 000000000000..4e4d1a1bafa5 --- /dev/null +++ b/sys-apps/systemd/files/252-no-stack-protector-bpf.patch @@ -0,0 +1,26 @@ +https://github.com/systemd/systemd/pull/26050 + +From d6a0784a350fb27698ed04f7ada17137324b31bb Mon Sep 17 00:00:00 2001 +From: Sam James <[email protected]> +Date: Fri, 13 Jan 2023 05:17:56 +0000 +Subject: [PATCH] bpf: disable -fstack-protector in meson + +In Gentoo, we recently started making Clang behave the same way as +our GCC, with -fstack-protector and some friends enabled by default. + +SSP doesn't make sense for BPF, so disable it explicitly. + +See also e.g. https://www.spinics.net/lists/netdev/msg556400.html. + +Bug: https://bugs.gentoo.org/890004 +--- a/src/core/bpf/meson.build ++++ b/src/core/bpf/meson.build +@@ -7,6 +7,7 @@ endif + bpf_clang_flags = [ + '-std=gnu11', + '-Wno-compare-distinct-pointer-types', ++ '-fno-stack-protector', + '-O2', + '-target', + 'bpf', + diff --git a/sys-apps/systemd/systemd-252.4-r1.ebuild b/sys-apps/systemd/systemd-252.4-r1.ebuild index 6391f42dbf34..e3c0075dcfaa 100644 --- a/sys-apps/systemd/systemd-252.4-r1.ebuild +++ b/sys-apps/systemd/systemd-252.4-r1.ebuild @@ -241,6 +241,7 @@ src_unpack() { src_prepare() { local PATCHES=( "${FILESDIR}/252-tmpfiles-ub.patch" + "${FILESDIR}/252-no-stack-protector-bpf.patch" ) if ! use vanilla; then
