mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-18 04:16:02 +00:00
gcc: Add support for grsecurity
This commit is contained in:
parent
f9cd53ba18
commit
06725e95eb
3 changed files with 13 additions and 3 deletions
|
@ -33,7 +33,7 @@ if test "$noSysDirs" = "1"; then
|
||||||
|
|
||||||
# The path to the Glibc binaries such as `crti.o'.
|
# The path to the Glibc binaries such as `crti.o'.
|
||||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||||
|
|
||||||
else
|
else
|
||||||
# Hack: support impure environments.
|
# Hack: support impure environments.
|
||||||
extraFlags="-isystem /usr/include"
|
extraFlags="-isystem /usr/include"
|
||||||
|
@ -214,7 +214,7 @@ postInstall() {
|
||||||
# previous gcc.
|
# previous gcc.
|
||||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||||
rm -rf $out/lib/gcc/*/*/install-tools
|
rm -rf $out/lib/gcc/*/*/install-tools
|
||||||
|
|
||||||
# More dependencies with the previous gcc or some libs (gccbug stores the build command line)
|
# More dependencies with the previous gcc or some libs (gccbug stores the build command line)
|
||||||
rm -rf $out/bin/gccbug
|
rm -rf $out/bin/gccbug
|
||||||
# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
|
# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
|
||||||
|
@ -240,6 +240,11 @@ postInstall() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Disable RANDMMAP on grsec, which causes segfaults when using
|
||||||
|
# precompiled headers.
|
||||||
|
# See https://bugs.gentoo.org/show_bug.cgi?id=301299#c31
|
||||||
|
paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
|
||||||
|
|
||||||
eval "$postInstallGhdl"
|
eval "$postInstallGhdl"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ let version = "4.6.3";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
||||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
||||||
in
|
in
|
||||||
(withArch +
|
(withArch +
|
||||||
withCpu +
|
withCpu +
|
||||||
withAbi +
|
withAbi +
|
||||||
|
|
|
@ -239,6 +239,11 @@ postInstall() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Disable RANDMMAP on grsec, which causes segfaults when using
|
||||||
|
# precompiled headers.
|
||||||
|
# See https://bugs.gentoo.org/show_bug.cgi?id=301299#c31
|
||||||
|
paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
|
||||||
|
|
||||||
eval "$postInstallGhdl"
|
eval "$postInstallGhdl"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue