Merge #1187 into p/stdenv

Tested building firefox, kdelibs, evince on x86_64-linux.
This commit is contained in:
Vladimír Čunát
2014-05-27 16:59:16 +02:00
39 changed files with 2138 additions and 45 deletions

View File

@@ -2,6 +2,7 @@
, python, libxml2Python, file, expat, makedepend
, libdrm, xorg, wayland, udev, llvm, libffi
, libvdpau, libelf
, grsecEnabled
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
, enableExtraFeatures ? false # not maintained
}:
@@ -41,6 +42,7 @@ stdenv.mkDerivation {
patches = [
./static-gallium.patch
./glx_ro_text_segm.patch # fix for grsecurity/PaX
# TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu),
# as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
];
@@ -79,7 +81,8 @@ stdenv.mkDerivation {
"--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
#"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
#"--enable-opencl" # ToDo: opencl seems to need libclc for clover
];
]
++ optional grsecEnabled "--enable-glx-rts"; # slight performance degradation, enable only for grsec
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];

View File

@@ -0,0 +1,25 @@
diff --git a/configure.ac b/configure.ac
index 5068913..3d4271e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,6 +429,20 @@ AC_SUBST([GLESv2_LIB_GLOB])
AC_SUBST([VG_LIB_GLOB])
AC_SUBST([GLAPI_LIB_GLOB])
+
+dnl readonly text segment on x86 hardened platforms
+AC_ARG_ENABLE([glx_rts],
+ [AS_HELP_STRING([--enable-glx-rts],
+ [on x86, use a readonly text segment 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"
+else
+ enable_glx_rts=no
+fi
+
+
dnl
dnl Arch/platform-specific settings
dnl