diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-10 10:44:10 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-10 10:44:10 +0200 |
commit | b8a1f577034d16a928997f9368907c9f3b1b1bba (patch) | |
tree | 964f0b36c6116cbd678c2cd73cdd3aaa7f41a515 /build/autoconf | |
parent | 6db06749e2037029adc96660aafa5339ed609e60 (diff) | |
download | UXP-b8a1f577034d16a928997f9368907c9f3b1b1bba.tar UXP-b8a1f577034d16a928997f9368907c9f3b1b1bba.tar.gz UXP-b8a1f577034d16a928997f9368907c9f3b1b1bba.tar.lz UXP-b8a1f577034d16a928997f9368907c9f3b1b1bba.tar.xz UXP-b8a1f577034d16a928997f9368907c9f3b1b1bba.zip |
Don't assume Intel architecture for compiler optimizations on Linux/gcc.
This only adds SSE2 flags when the CPU architecture is correct for it.
Resolves #1226
Diffstat (limited to 'build/autoconf')
-rw-r--r-- | build/autoconf/compiler-opts.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 82d0b43fc..0848d78d9 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -176,8 +176,13 @@ if test "$GNU_CC"; then CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" fi - CFLAGS="$CFLAGS -fno-math-errno -msse2 -mfpmath=sse" - CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno -msse2 -mfpmath=sse" + CFLAGS="$CFLAGS -fno-math-errno" + CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" + + if test "$CPU_ARCH" = x86; then + CFLAGS="$CFLAGS -msse2 -mfpmath=sse" + CXXFLAGS="$CXXFLAGS -msse2 -mfpmath=sse" + fi if test -z "$CLANG_CC"; then case "$CC_VERSION" in |