diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh index bdf15be5a99..de4566c12dd 100644 --- a/pkgs/development/compilers/gcc/4.6/builder.sh +++ b/pkgs/development/compilers/gcc/4.6/builder.sh @@ -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" } diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index af111322698..ef75cf71f58 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -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 + diff --git a/pkgs/development/compilers/gcc/4.8/builder.sh b/pkgs/development/compilers/gcc/4.8/builder.sh index b781fa6c7ef..7c9b9420dda 100644 --- a/pkgs/development/compilers/gcc/4.8/builder.sh +++ b/pkgs/development/compilers/gcc/4.8/builder.sh @@ -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" }