Chia-I Wu <olva...@gmail.com> writes:
> On Mon, Feb 21, 2011 at 8:12 PM, Tom Fogal <tfo...@sci.utah.edu> wrote:
> > From: Tom Fogal <tfo...@alumni.unh.edu>
> >
> > Without this, we do not actually respect the request for TLS.
>
> What is your setup?

    ./configure                           \
        CFLAGS="-g -DUSE_MGL_NAMESPACE"   \
        CXXFLAGS="-g -DUSE_MGL_NAMESPACE" \
        --prefix=${PF}                    \
        --without-demos                   \
        --with-driver=xlib                \
        --disable-gallium                 \
        --disable-egl                     \
        --with-max-width=16384            \
        --with-max-height=16384           \
        --enable-glx-tls

Others are hitting this too:

  http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg05292.html

Note I was wrong in that email, it was not an x86-only issue.

> The macro should be defined as part of $(CFLAGS).  It may not be a
> good practice as the variable is normally considered a user variable,
> but mesa does not quite support that.

So is the correct fix to check the flag in configure.ac and append the
define there?

AHHH-ha!  I think I see the problem.  We were only applying the flags
if users were doing DRI builds.

I'll apply the attached in a day or so, unless I hear some complaints.
Thanks!

-tom

diff --git a/configure.ac b/configure.ac
index e1702ba..fbc7436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -890,6 +890,9 @@ AC_ARG_ENABLE([glx-tls],
     [GLX_USE_TLS=no])
 AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
 
+AS_IF([test "x$GLX_USE_TLS" = xyes],
+      [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"])
+
 dnl
 dnl More DRI setup
 dnl
@@ -945,11 +948,6 @@ esac
 
 dnl Set DRI_DIRS, DEFINES and LIB_DEPS
 if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
-    # Use TLS in GLX?
-    if test "x$GLX_USE_TLS" = xyes; then
-        DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
-    fi
-
     # Platform specific settings and drivers to build
     case "$host_os" in
     linux*)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to