[Mesa-dev] [PATCH v1 5/5] autotools: specify -msse manually for 32-bit build

Sergii Romantsov sergii.romantsov at gmail.com
Fri Oct 26 10:05:28 UTC 2018


While building of 32bit Mesa gcc doesn't specifies __SSE__ by default.
So it has to be done manually by flag '-msee'.
Added support of such specification to build-system.
That enables optimization for file src/util/rounding.h.

CC: Dylan Baker <dylan at pnwbakers.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108560
Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
---
 src/Makefile.am                         | 2 +-
 src/compiler/Makefile.am                | 6 ++++--
 src/glx/Makefile.am                     | 3 ++-
 src/intel/Makefile.am                   | 6 ++++--
 src/intel/Makefile.common.am            | 2 +-
 src/mesa/Makefile.am                    | 7 +++++--
 src/mesa/drivers/dri/common/Makefile.am | 3 ++-
 src/util/Makefile.am                    | 3 ++-
 8 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index c4fcd8a..cff6fc3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,7 +113,7 @@ EXTRA_DIST += \
 	getopt hgl SConscript \
 	$(top_srcdir)/include/GL/mesa_glinterop.h
 
-AM_CFLAGS = $(VISIBILITY_CFLAGS)
+AM_CFLAGS = $(VISIBILITY_CFLAGS) $(SSE_CFLAGS)
 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
 
 AM_CPPFLAGS = \
diff --git a/src/compiler/Makefile.am b/src/compiler/Makefile.am
index 73435a3..3ad87ce 100644
--- a/src/compiler/Makefile.am
+++ b/src/compiler/Makefile.am
@@ -43,11 +43,13 @@ AM_CPPFLAGS = \
 AM_CFLAGS = \
 	$(VISIBILITY_CFLAGS) \
 	$(WNO_OVERRIDE_INIT) \
-	$(MSVC2013_COMPAT_CFLAGS)
+	$(MSVC2013_COMPAT_CFLAGS) \
+	$(SSE_CFLAGS)
 
 AM_CXXFLAGS = \
 	$(VISIBILITY_CXXFLAGS) \
-	$(MSVC2013_COMPAT_CXXFLAGS)
+	$(MSVC2013_COMPAT_CXXFLAGS) \
+	$(SSE_CXXFLAGS)
 
 noinst_LTLIBRARIES = libcompiler.la
 
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index 8f9d80c..cb17c0f 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -45,7 +45,8 @@ AM_CFLAGS = \
 	$(LIBDRM_CFLAGS) \
 	$(DRI2PROTO_CFLAGS) \
 	$(GLPROTO_CFLAGS) \
-	$(X11_INCLUDES)
+	$(X11_INCLUDES) \
+	$(SSE_CFLAGS)
 
 lib_LTLIBRARIES = lib at GL_LIB@.la
 
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
index 95764b8..5f37a2a 100644
--- a/src/intel/Makefile.am
+++ b/src/intel/Makefile.am
@@ -44,10 +44,12 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = \
 	$(VISIBILITY_CFLAGS) \
-	$(WNO_OVERRIDE_INIT)
+	$(WNO_OVERRIDE_INIT) \
+	$(SSE_CFLAGS)
 
 AM_CXXFLAGS = \
-	$(VISIBILITY_CXXFLAGS)
+	$(VISIBILITY_CXXFLAGS) \
+	$(SSE_CXXFLAGS)
 
 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
diff --git a/src/intel/Makefile.common.am b/src/intel/Makefile.common.am
index 443cefc..3f9415e 100644
--- a/src/intel/Makefile.common.am
+++ b/src/intel/Makefile.common.am
@@ -21,7 +21,7 @@
 
 noinst_LTLIBRARIES += common/libintel_common.la
 
-common_libintel_common_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(EXPAT_CFLAGS)
+common_libintel_common_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(EXPAT_CFLAGS) $(SSE_CFLAGS)
 common_libintel_common_la_SOURCES = $(COMMON_FILES)
 common_libintel_common_la_LIBADD = $(EXPAT_LIBS)
 
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 195e440..b97f58e 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -114,11 +114,14 @@ AM_CFLAGS = \
 	$(VDPAU_CFLAGS) \
 	$(LLVM_CFLAGS) \
 	$(VISIBILITY_CFLAGS) \
-	$(MSVC2013_COMPAT_CFLAGS)
+	$(MSVC2013_COMPAT_CFLAGS) \
+	$(SSE_CFLAGS)
+
 AM_CXXFLAGS = \
 	$(LLVM_CFLAGS) \
 	$(VISIBILITY_CXXFLAGS) \
-	$(MSVC2013_COMPAT_CXXFLAGS)
+	$(MSVC2013_COMPAT_CXXFLAGS) \
+	$(SSE_CXXFLAGS)
 
 ARCH_LIBS =
 
diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
index 192b364..d653340 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -33,7 +33,8 @@ AM_CFLAGS = \
 	-I$(top_builddir)/src/util/ \
 	$(LIBDRM_CFLAGS) \
 	$(DEFINES) \
-	$(VISIBILITY_CFLAGS)
+	$(VISIBILITY_CFLAGS) \
+	$(SSE_CFLAGS)
 
 noinst_LTLIBRARIES = \
 	libdricommon.la \
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 24eeaa8..9f7fe98 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -50,7 +50,8 @@ libmesautil_la_CPPFLAGS = \
 	-I$(top_srcdir)/src/gallium/auxiliary \
 	$(VISIBILITY_CFLAGS) \
 	$(MSVC2013_COMPAT_CFLAGS) \
-	$(ZLIB_CFLAGS)
+	$(ZLIB_CFLAGS) \
+	$(SSE_CFLAGS)
 
 libmesautil_la_SOURCES = \
 	$(MESA_UTIL_FILES) \
-- 
2.7.4



More information about the mesa-dev mailing list