mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
gcc: Add support for grsecurity
This commit is contained in:
parent
f9cd53ba18
commit
06725e95eb
|
@ -33,7 +33,7 @@ if test "$noSysDirs" = "1"; then
|
|||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
|
||||
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraFlags="-isystem /usr/include"
|
||||
|
@ -214,7 +214,7 @@ postInstall() {
|
|||
# previous gcc.
|
||||
rm -rf $out/libexec/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)
|
||||
rm -rf $out/bin/gccbug
|
||||
# Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
|
||||
|
@ -240,6 +240,11 @@ postInstall() {
|
|||
fi
|
||||
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"
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ let version = "4.6.3";
|
|||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
||||
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
||||
in
|
||||
in
|
||||
(withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
|
|
|
@ -239,6 +239,11 @@ postInstall() {
|
|||
fi
|
||||
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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue