Skip to content

Commit

Permalink
dev-lang/ghc: Filter LTO flags
Browse files Browse the repository at this point in the history
LTO does not seem to be supported upstream. Add 'filter-lto' and
'append-flags -fno-strict-aliasing' to src_configure.

See: http://brandon.si/code/initial-hacking-of-ghc-for-gcc-link-time-optimization/
Closes: https://bugs.gentoo.org/855596
Signed-off-by: hololeap <[email protected]>
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
hololeap authored and thesamesam committed Nov 19, 2023
1 parent 9dd4edd commit ccf74fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev-lang/ghc/ghc-9.0.2-r4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ src_prepare() {

src_configure() {
if ! use binary; then
# No upstream LTO support. bug #855596
filter-lto
append-flags -fno-strict-aliasing

# initialize build.mk
echo '# Gentoo changes' > mk/build.mk

Expand Down
4 changes: 4 additions & 0 deletions dev-lang/ghc/ghc-9.2.8.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,10 @@ src_prepare() {

src_configure() {
if ! use binary; then
# No upstream LTO support. bug #855596
filter-lto
append-flags -fno-strict-aliasing

# initialize build.mk
echo '# Gentoo changes' > mk/build.mk

Expand Down

0 comments on commit ccf74fc

Please sign in to comment.