diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/7/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 2ae2f8e758c..dcd129ff25a 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -4,6 +4,7 @@ , langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false +, langJit ? false , staticCompiler ? false , enableShared ? true , enableLTO ? true @@ -52,6 +53,8 @@ let majorVersion = "7"; ./riscv-pthread-reentrant.patch # https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html ./riscv-no-relax.patch + + ./0001-Fix-build-for-glibc-2.31.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optionals targetPlatform.isNetBSD [ @@ -90,7 +93,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = [ "out" "lib" "man" "info" ]; + outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib"; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -105,10 +108,10 @@ stdenv.mkDerivation ({ --replace 'if (stdinc)' 'if (0)' substituteInPlace libgcc/config/t-slibgcc-darwin \ - --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)" + --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)" substituteInPlace libgfortran/configure \ - --replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname" + --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname" ''; postPatch = '' @@ -206,6 +209,7 @@ stdenv.mkDerivation ({ langGo langObjC langObjCpp + langJit ; } ++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419" ++ optional targetPlatform.isNetBSD "--disable-libcilkrts" @@ -245,8 +249,8 @@ stdenv.mkDerivation ({ (import ../common/extra-target-flags.nix { inherit stdenv crossStageStatic libcCross threadsCross; }) - EXTRA_TARGET_FLAGS - EXTRA_TARGET_LDFLAGS + EXTRA_FLAGS_FOR_TARGET + EXTRA_LDFLAGS_FOR_TARGET ; passthru = { |