Skip to content

Commit 4c0b4b6

Browse files
author
Tomáš Jelínek
authored
net-libs/nodejs: filter out -flto from *FLAGS; -Ofast workarounds (#779)
* net-libs/nodejs: filter out -flto from *FLAGS One should use the USE flag to enable LTO instead (which does not work with GCC 11 as of now). * app-editors/emacs: disable -ffinite-math-only Ebuild explicitly asks you to. * gui-apps/gammastep: disable -ffinite-math-only Builds but becomes basically useless, i.e. just throws out an error about an invalid brightness value. * www-client/firefox: fall back to -O3 ${SAFEST_FAST_MATH} for now
1 parent 82637ed commit 4c0b4b6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

sys-config/ltoize/files/package.cflags/lto.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ media-libs/mlt *FLAGS-=-flto*
6060
media-sound/pulseaudio *FLAGS-=-flto*
6161
media-video/ffmpeg *FLAGS-=-flto* #NOTE: Depending on your CPUFLAGS this may work with LTO. The SSE intrinsics seem to cause problems in some cases. Only x86 requires workaround
6262
media-video/mplayer *FLAGS-=-flto*
63+
net-libs/nodejs *FLAGS-=-flto* # LTO is controlled by a USE flag; currently won't build with LTO and GCC 11
6364
net-libs/webkit-gtk:3 *FLAGS-=-flto*
6465
net-libs/webkit-gtk:4 *FLAGS-=-flto*
6566
net-misc/autossh *FLAGS-=-flto* # Undefined references

sys-config/ltoize/files/package.cflags/optimizations.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ sys-apps/systemd /-O3/-O2 # causes homectl to fail with protocol error
99
# END: Deliberate -O3 workarounds
1010

1111
# BEGIN: -Ofast workarounds
12+
app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild
1213
dev-lang/python *FLAGS+='-fno-finite-math-only' # instrumentation tests hang/segfault during emerge
1314
dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge
1415
dev-python/numpy /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' /-funsafe-math-optimizations/'${SAFER_UNSAFE_MATH_OPTS}' *FLAGS-='-ffinite-math-only' # no compilation error, but -funsafe-math-optimizations (implied by -Ofast or -ffast-math) causes an undefined symbol error when trying to import numpy in python; '-ffinite-math-only' causes incorrect runtime handling of infinite values
1516
dev-python/pillow *FLAGS+='-fno-finite-math-only' # compiles fine but causes `import matplotlib.pyplot` to fail with `undefined symbol: __log_finite`
17+
dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular
1618
dev-scheme/guile *FLAGS+='-fno-finite-math-only' # build fails with `floating point exception`
19+
gui-apps/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly
1720
kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled
1821
<media-libs/opus-1.3.1-r1 /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled
1922
media-sound/mumble /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the libopus source throws an error if ffast-math is enabled
@@ -24,6 +27,6 @@ net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` return
2427
>=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error
2528
>=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'``
2629
>=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled
30+
www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation
2731
x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly
28-
dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular
2932
# END: -Ofast workarounds

0 commit comments

Comments
 (0)