From 304c4a514e187fdd05d9d70707f5fd58176c6561 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 21:00:04 +0100 Subject: [PATCH] grsecurity: fix gcc plugin Also needs mpfr and libmpc --- pkgs/build-support/grsecurity/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/grsecurity/default.nix b/pkgs/build-support/grsecurity/default.nix index 841effcfca11..fc4d1a26d7a7 100644 --- a/pkgs/build-support/grsecurity/default.nix +++ b/pkgs/build-support/grsecurity/default.nix @@ -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 '';