-fvisibility=hidden is no longer a requirement for dynamic X11.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 19 Nov 2013 15:00:39 -0500
changeset 80163746af784462
parent 8015 ba26f042e36d
child 8017 d84a30e5cbd5
-fvisibility=hidden is no longer a requirement for dynamic X11.

We don't clash with Xlib symbols anymore.
cmake/sdlchecks.cmake
configure.in
     1.1 --- a/cmake/sdlchecks.cmake	Tue Nov 19 11:04:05 2013 -0300
     1.2 +++ b/cmake/sdlchecks.cmake	Tue Nov 19 15:00:39 2013 -0500
     1.3 @@ -331,15 +331,8 @@
     1.4        set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES})
     1.5        set(SDL_VIDEO_DRIVER_X11 1)
     1.6  
     1.7 -      if(HAVE_GCC_FVISIBILITY)
     1.8 -        set(X11_SYMBOLS_PRIVATE TRUE)
     1.9 -      else()
    1.10 -        set(X11_SYMBOLS_PRIVATE FALSE)
    1.11 -      endif(HAVE_GCC_FVISIBILITY)
    1.12 -
    1.13        if(APPLE)
    1.14          set(X11_SHARED OFF)
    1.15 -        set(X11_SYMBOLS_PRIVATE TRUE)
    1.16        endif(APPLE)
    1.17  
    1.18        check_function_exists("shmat" HAVE_SHMAT)
    1.19 @@ -358,10 +351,6 @@
    1.20          if(NOT HAVE_DLOPEN)
    1.21            message_warn("You must have SDL_LoadObject() support for dynamic X11 loading")
    1.22            set(HAVE_X11_SHARED FALSE)
    1.23 -          if(X11_SYMBOLS_PRIVATE)
    1.24 -            message_warn("You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading")
    1.25 -            set(HAVE_X11_SHARED TRUE)
    1.26 -          endif(X11_SYMBOLS_PRIVATE)
    1.27          else(NOT HAVE_DLOPEN)
    1.28            set(HAVE_X11_SHARED TRUE)
    1.29          endif()
     2.1 --- a/configure.in	Tue Nov 19 11:04:05 2013 -0300
     2.2 +++ b/configure.in	Tue Nov 19 15:00:39 2013 -0500
     2.3 @@ -1140,18 +1140,12 @@
     2.4          AC_PATH_X
     2.5          AC_PATH_XTRA
     2.6          if test x$have_x = xyes; then
     2.7 -            # Only allow dynamically loaded X11 if the X11 function pointers
     2.8 -            # will not end up in the global namespace, which causes problems
     2.9 -            # with other libraries calling X11 functions.
    2.10 -            x11_symbols_private=$have_gcc_fvisibility
    2.11 -
    2.12              AC_ARG_ENABLE(x11-shared,
    2.13  AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
    2.14                            , enable_x11_shared=maybe)
    2.15  
    2.16              case "$host" in
    2.17                  *-*-darwin*)
    2.18 -                    x11_symbols_private=yes
    2.19                      x11_lib='/usr/X11R6/lib/libX11.6.dylib'
    2.20                      x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
    2.21                      xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
    2.22 @@ -1212,19 +1206,13 @@
    2.23              SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
    2.24  
    2.25              if test x$enable_x11_shared = xmaybe; then
    2.26 -                enable_x11_shared=$x11_symbols_private
    2.27 +                enable_x11_shared=yes
    2.28              fi
    2.29              if test x$have_loadso != xyes && \
    2.30                 test x$enable_x11_shared = xyes; then
    2.31                  AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
    2.32                  enable_x11_shared=no
    2.33              fi
    2.34 -            if test x$x11_symbols_private != xyes && \
    2.35 -               test x$enable_x11_shared = xyes; then
    2.36 -                AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading])
    2.37 -                enable_x11_shared=no
    2.38 -            fi
    2.39 -
    2.40              if test x$have_loadso = xyes && \
    2.41                 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
    2.42                  echo "-- dynamic libX11 -> $x11_lib"