[Mesa-dev] [PATCH] build: Error on --enable-glx-tls when building with Clang.

Kenneth Graunke kenneth at whitecape.org
Tue Jan 8 12:36:11 PST 2013


Clang doesn't support the TLS mode we use, so building Mesa with Clang
and --enable-glx-tls simply causes every Piglit test under the sun to
crash when calling glGetString().  Good times.

To avoid catastrophic failure and confusion, simply bail in configure.
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 1414ce8..e7c6d8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -981,6 +981,10 @@ AC_ARG_ENABLE([glx-tls],
     [GLX_USE_TLS=no])
 AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
 
+if test "x$GLX_USE_TLS" = xyes -a "x$acv_mesa_CLANG" = xyes; then
+    AC_MSG_ERROR([Clang does not support building GLX with TLS])
+fi
+
 AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
       [DEFINES="${DEFINES} -DGLX_USE_TLS -DHAVE_PTHREAD"])
 
-- 
1.8.1



More information about the mesa-dev mailing list