Skip to content

Commit

Permalink
[configure] make sure the gcc-4.9 SSE workaround is only enabled on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex committed Feb 20, 2015
1 parent d6f8a65 commit 7c8ce2f
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions configure.in
Expand Up @@ -591,20 +591,6 @@ OBJDUMP="${OBJDUMP:-objdump}"
READELF="${READELF:-readelf}"
NM="${NM:-nm}"

# Workaround a build issue on i386 with gcc 4.9:
# including <algorithm> pulls in SSE intrinsics.
# possible GCC bug? ideas welcome
if test "$GCC_CXX" = "yes"; then
GCC_VERSION=$($CXX -dumpversion)
GCC_MAJOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $1}')
GCC_MINOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $2}')

if (test "$GCC_MAJOR_VER" -eq "4" && test "$GCC_MINOR_VER" -ge "9") || (test "$GCC_MAJOR_VER" -gt "4"); then
CXXFLAGS="$CXXFLAGS -msse"
AC_MSG_NOTICE("detected gcc version $GCC_VERSION - enabling SSE")
fi
fi

# host detection and setup
case $host in
i*86*-linux-android*)
Expand All @@ -625,6 +611,19 @@ case $host in
use_cpu="i686"
fi
USE_STATIC_FFMPEG=1
# Workaround a build issue on i386 with gcc 4.9:
# including <algorithm> pulls in SSE intrinsics.
# possible GCC bug? ideas welcome
if test "$GCC_CXX" = "yes"; then
GCC_VERSION=$($CXX -dumpversion)
GCC_MAJOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $1}')
GCC_MINOR_VER=$(echo $GCC_VERSION | awk -F"." '{print $2}')

if (test "$GCC_MAJOR_VER" -eq "4" && test "$GCC_MINOR_VER" -ge "9") || (test "$GCC_MAJOR_VER" -gt "4"); then
CXXFLAGS="$CXXFLAGS -msse"
AC_MSG_NOTICE("detected gcc version $GCC_VERSION - enabling SSE")
fi
fi
;;
x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
ARCH="x86_64-linux"
Expand Down

0 comments on commit 7c8ce2f

Please sign in to comment.