summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2024-04-12 10:40:05 -0700
committerPatrick McLean <chutzpah@gentoo.org>2024-04-12 10:41:55 -0700
commitb9442bb7d4da6f324a2830b20269f930b4fb8ccb (patch)
tree7e3ece899b31379d4928fc2fb13468f4455d4f4f /sys-apps/iproute2
parentdev-util/ruff: add 0.3.7, drop 0.3.5 (diff)
downloadgentoo-b9442bb7d4da6f324a2830b20269f930b4fb8ccb.tar.gz
gentoo-b9442bb7d4da6f324a2830b20269f930b4fb8ccb.tar.bz2
gentoo-b9442bb7d4da6f324a2830b20269f930b4fb8ccb.zip
sys-apps/iproute2: Make sure that CFLAGS is in LDFLAGS
Upstream build system does not automatically add it, and GCC recommends that CFLAGS always be in LDFLAGS. Upstream GCC recommendation is here: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto Bug: https://bugs.gentoo.org/929233 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r--sys-apps/iproute2/iproute2-6.8.0-r1.ebuild (renamed from sys-apps/iproute2/iproute2-6.8.0.ebuild)7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys-apps/iproute2/iproute2-6.8.0.ebuild b/sys-apps/iproute2/iproute2-6.8.0-r1.ebuild
index f8e1ae63ceec..bfc78c186a70 100644
--- a/sys-apps/iproute2/iproute2-6.8.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.8.0-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit edo toolchain-funcs
+inherit edo toolchain-funcs flag-o-matic
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
@@ -104,6 +104,11 @@ src_configure() {
fi
popd >/dev/null || die
+ # build system does not pass CFLAGS to LDFLAGS, as is recommended by GCC upstream
+ # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto
+ # https://bugs.gentoo.org/929233
+ append-ldflags ${CFLAGS}
+
# run "configure" script first which will create "config.mk"...
# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
edo ./configure --color=auto --libbpf_force $(usex bpf on off)