[Mesa-dev] [PATCH] configure.ac: Add support to enable read-only text segment on x86.

Matt Turner mattst88 at gmail.com
Sat Aug 29 14:54:46 PDT 2015


From: Jeremy Huddleston <jeremyhu at freedesktop.org>

Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
Bugzilla: https://bugs.gentoo.org/240956
---
This is the last patch Gentoo carries :)

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

diff --git a/configure.ac b/configure.ac
index 90ba4fe..583d45b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -500,6 +500,16 @@ AC_LINK_IFELSE(
 LDFLAGS=$save_LDFLAGS
 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
 
+dnl Read-only text segment on x86 hardened platforms
+AC_ARG_ENABLE([glx-rts],
+    [AS_HELP_STRING([--enable-glx-rts],
+        [Use a read-only text segment on x86 for libGL @<:@default=disabled@:>@])],
+    [enable_glx_rts="$enableval"],
+    [enable_glx_rts=no])
+if test "x$enable_glx_rts" = xyes; then
+    DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
+fi
+
 dnl
 dnl Check if linker supports dynamic list files
 dnl
-- 
2.4.6



More information about the mesa-dev mailing list