mesa: use grsec at build time, override at run time
This is needed for grsecurity kernels to be able to build stuff (e.g. pango). With grsec the libGL is slower, but we don't care much at build time, so we can share binaries among grsec and nogrsec. This adds 2-3 MB to nogrsec closures that use mesa drivers (libGL is doubled).
This commit is contained in:
parent
d674594ce3
commit
255d86ea99
1 changed files with 6 additions and 2 deletions
|
@ -5484,13 +5484,17 @@ let
|
|||
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
mesa_original = callPackage ../development/libraries/mesa {
|
||||
grsecEnabled = config.grsecurity or false;
|
||||
# makes it slower, but during runtime we link against just mesa_drivers
|
||||
# through /run/opengl-driver*, which is overriden according to config.grsecurity
|
||||
grsecEnabled = true;
|
||||
};
|
||||
|
||||
mesa_noglu = if stdenv.isDarwin
|
||||
then darwinX11AndOpenGL // { driverLink = mesa_noglu; }
|
||||
else mesa_original;
|
||||
mesa_drivers = mesa_original.drivers;
|
||||
mesa_drivers = let
|
||||
mo = mesa_original.override { grsecEnabled = config.grsecurity or false; };
|
||||
in mo.drivers;
|
||||
mesa_glu = callPackage ../development/libraries/mesa-glu { };
|
||||
mesa = if stdenv.isDarwin then darwinX11AndOpenGL
|
||||
else buildEnv {
|
||||
|
|
Loading…
Reference in a new issue