Bug 1272358. Add support for SSSE3 flags to configure. r=glandium
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 13 May 2016 10:14:33 -0400
changeset 297388 6a50a177ebef2b99751b519df44de186e0c41833
parent 297387 2ff220d4ffed0902acc637344441e7313c314769
child 297389 4e32b246de9859e7de6e136b2269ad68e8824eb3
push id30256
push userkwierso@gmail.com
push dateFri, 13 May 2016 23:43:52 +0000
treeherdermozilla-central@2afd8fa9bb5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1272358
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1272358. Add support for SSSE3 flags to configure. r=glandium Adds a SSSE3_FLAGS variable that we can use for building source that requires SSSE3
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -860,16 +860,17 @@ MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
 
 dnl ========================================================
 dnl GNU specific defaults
 dnl ========================================================
 if test "$GNU_CC"; then
     MMX_FLAGS="-mmmx"
     SSE_FLAGS="-msse"
     SSE2_FLAGS="-msse2"
+    SSSE3_FLAGS="-mssse3"
     # FIXME: Let us build with strict aliasing. bug 414641.
     CFLAGS="$CFLAGS -fno-strict-aliasing"
     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
     WARNINGS_AS_ERRORS='-Werror'
     DSO_CFLAGS=''
     DSO_PIC_CFLAGS='-fPIC'
     ASFLAGS="$ASFLAGS -fPIC"
@@ -1377,16 +1378,19 @@ case "$target" in
         CFLAGS="$CFLAGS -W3 -Gy"
         CXXFLAGS="$CXXFLAGS -W3 -Gy"
         if test "$CPU_ARCH" = "x86"; then
             dnl VS2012+ defaults to -arch:SSE2.
             CFLAGS="$CFLAGS -arch:IA32"
             CXXFLAGS="$CXXFLAGS -arch:IA32"
             SSE_FLAGS="-arch:SSE"
             SSE2_FLAGS="-arch:SSE2"
+            dnl MSVC allows the use of intrinsics without any flags
+            dnl and doesn't have a separate arch for SSSE3
+            SSSE3_FLAGS="-arch:SSE2"
         fi
         dnl VS2013+ requires -FS when parallel building by make -jN.
         dnl If nothing, compiler sometimes causes C1041 error.
         CFLAGS="$CFLAGS -FS"
         CXXFLAGS="$CXXFLAGS -FS"
         # khuey says we can safely ignore MSVC warning C4251
         # MSVC warning C4244 (implicit type conversion may lose data) warns
         # and requires workarounds for perfectly valid code.  Also, GCC/clang
@@ -1596,16 +1600,17 @@ case "$target" in
     fi
     ;;
 
 esac
 
 AC_SUBST_LIST(MMX_FLAGS)
 AC_SUBST_LIST(SSE_FLAGS)
 AC_SUBST_LIST(SSE2_FLAGS)
+AC_SUBST_LIST(SSSE3_FLAGS)
 
 AC_SUBST(MOZ_LINKER)
 if test -n "$MOZ_LINKER"; then
   AC_DEFINE(MOZ_LINKER)
 fi
 
 dnl Only one oddball right now (QNX), but this gives us flexibility
 dnl if any other platforms need to override this in the future.