OSDN Git Service

configure.ac: Add support to enable read-only text segment on x86.
authorJeremy Huddleston <jeremyhu@freedesktop.org>
Sat, 29 Aug 2015 21:51:45 +0000 (14:51 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 21 Sep 2015 19:47:09 +0000 (12:47 -0700)
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.gentoo.org/240956
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
configure.ac

index 1ef5fbc..217281f 100644 (file)
@@ -1311,6 +1311,16 @@ AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
 AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
       [DEFINES="${DEFINES} -DGLX_USE_TLS"])
 
+dnl Read-only text section on x86 hardened platforms
+AC_ARG_ENABLE([glx-read-only-text],
+    [AS_HELP_STRING([--enable-glx-read-only-text],
+        [Disable writable .text section on x86 (decreases performance) @<:@default=disabled@:>@])],
+    [enable_glx_read_only_text="$enableval"],
+    [enable_glx_read_only_text=no])
+if test "x$enable_glx_read_only_text" = xyes; then
+    DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
+fi
+
 dnl
 dnl More DRI setup
 dnl