commit:     8bfac183230c31f95a3ae809d8647f87eacfae38
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 24 22:56:06 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jun 24 22:56:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bfac183

dev-lang/erlang: add -fno-strict-aliasing workaround

Reported-by: Jonathan Davies
Closes: https://bugs.gentoo.org/797886
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/erlang/erlang-24.0.2.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dev-lang/erlang/erlang-24.0.2.ebuild 
b/dev-lang/erlang/erlang-24.0.2.ebuild
index 01313ebc6b1..40a0d0afa21 100644
--- a/dev-lang/erlang/erlang-24.0.2.ebuild
+++ b/dev-lang/erlang/erlang-24.0.2.ebuild
@@ -54,6 +54,11 @@ src_prepare() {
        default
 
        tc-export AR CPP CXX LD
+
+       # bug #797886: erlang's VM does unsafe casts for ints
+       # to pointers and back. This breaks on gcc-11 -flto.
+       append-flags -fno-strict-aliasing
+
        ./otp_build autoconf || die
 }
 

Reply via email to