mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
grsecurity: fix gcc plugin
Also needs mpfr and libmpc
This commit is contained in:
parent
a3d5686652
commit
304c4a514e
@ -123,12 +123,14 @@ let
|
||||
grsecurityOverrider = args: grkern: {
|
||||
# Apparently as of gcc 4.6, gcc-plugin headers (which are needed by PaX plugins)
|
||||
# include libgmp headers, so we need these extra tweaks
|
||||
buildInputs = args.buildInputs ++ [ pkgs.gmp ];
|
||||
# As of gcc5 we also need libmpc
|
||||
buildInputs = args.buildInputs ++ [ pkgs.gmp pkgs.libmpc pkgs.mpfr ];
|
||||
preConfigure = ''
|
||||
extraIncludes="-I${pkgs.gmp}/include -I${pkgs.libmpc}/include -I${pkgs.mpfr}/include"
|
||||
${args.preConfigure or ""}
|
||||
sed -i 's|-I|-I${pkgs.gmp}/include -I|' scripts/gcc-plugin.sh
|
||||
sed -i 's|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
|
||||
sed -i 's|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
|
||||
sed -i "s|-I|$extraIncludes -I|" scripts/gcc-plugin.sh
|
||||
sed -i "s|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += $extraIncludes|" tools/gcc/Makefile
|
||||
sed -i "s|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += $extraIncludes|" tools/gcc/Makefile
|
||||
rm localversion-grsec
|
||||
echo ${localver grkern} > localversion-grsec
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user