Mesa (10.6): configure.ac: Add support to enable read-only text segment on x86.

Emil Velikov evelikov at kemper.freedesktop.org
Thu Oct 1 09:28:56 UTC 2015


Module: Mesa
Branch: 10.6
Commit: 15020937bdd93303bdda2ff31154a0f23a60a044
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=15020937bdd93303bdda2ff31154a0f23a60a044

Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sat Aug 29 14:51:45 2015 -0700

configure.ac: Add support to enable read-only text segment on x86.

Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
Bugzilla: https://bugs.gentoo.org/240956
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
(cherry picked from commit 6dfc5e28f7d08094210d8cecd3ed4a5b393dafe9)

---

 configure.ac |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/configure.ac b/configure.ac
index 0f21282..aa60eb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1150,6 +1150,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




More information about the mesa-commit mailing list