summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-07-28 03:58:13 +0100
committerSam James <sam@gentoo.org>2021-07-28 03:59:31 +0100
commit7ea2cf10a9f26e915cada4262066dacd87513a62 (patch)
tree9bbd05f0f45e2f309a04b3cfbe9e3db3c7e58fd9 /net-misc
parentapp-text/asciidoc: update $HOMEPAGE (diff)
downloadgentoo-7ea2cf10a9f26e915cada4262066dacd87513a62.tar.gz
gentoo-7ea2cf10a9f26e915cada4262066dacd87513a62.tar.bz2
gentoo-7ea2cf10a9f26e915cada4262066dacd87513a62.zip
net-misc/dhcp: avoid undefined/broken runtime behaviour with -O3
-fstrict-aliasing (enabled by -O3) breaks code within dhcp which violates the no-strict-aliasing rule. So, let's tag on an option to avoid assuming that rule / avoid the optimisation which is unsafe here. Bug: https://bugs.gentoo.org/787935 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/dhcp-4.4.2_p1-r1.ebuild (renamed from net-misc/dhcp/dhcp-4.4.2_p1.ebuild)4
1 files changed, 4 insertions, 0 deletions
diff --git a/net-misc/dhcp/dhcp-4.4.2_p1.ebuild b/net-misc/dhcp/dhcp-4.4.2_p1-r1.ebuild
index 4b86781a388a..57fd8dd47f48 100644
--- a/net-misc/dhcp/dhcp-4.4.2_p1.ebuild
+++ b/net-misc/dhcp/dhcp-4.4.2_p1-r1.ebuild
@@ -159,6 +159,10 @@ src_configure() {
#define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
EOF
+ # Breaks with -O3 because of reliance on undefined behaviour
+ # bug #787935
+ append-flags -fno-strict-aliasing
+
# https://bugs.gentoo.org/720806
if use ppc || use arm || use hppa; then
append-libs -latomic