Configuration sse2 sse4.1 tests suppressed system CFLAGS resulting in compilation fail.
GIMP version: 2.10, 2.99
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: All
Package: Sourcecode
Description of the bug
During configuration tests if cpu supports sse2 and sse4.1 within configure.ac
file
the system env variable CFLAGS parameters are suppressed by addition of -msse2
and -msse4.1
that results in the GIMP will be compiled with their support but the compilation process
will be failed due to system env CFLAGS could have sse2
and sse4.1
disabled [1].
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Setup system env CFLAGS with
-mno-sse2
or/and-mno-sse4.1
- Run configuration process and notice that SSE2 ans SSE4.1 tests are passed
COMPILE_SSE2_INTRINISICS =1
COMPILE_SSE4_1_INTRINISICS =1
- Run compilation
- Notice that compilation is failed.
[1] https://bugs.gentoo.org/702554
…
Expected result: System value of CFLAGS shouldn't be overwritten during configuration phase. Compilation shouldn't be failed
Actual result: Compilation process is failed due to suppressed system CFLAGS values during configuration phase.
Additional information
The issue could be resolved by replacing within conficuration.ac
from
CFLAGS="$intrinsics_save_CFLAGS $SSE2_EXTRA_CFLAGS"
CFLAGS="$intrinsics_save_CFLAGS $SSE4_1_EXTRA_CFLAGS"
to
CFLAGS="$SSE2_EXTRA_CFLAGS $intrinsics_save_CFLAGS"
CFLAGS="$SSE4_1_EXTRA_CFLAGS $intrinsics_save_CFLAGS"