diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/9/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/gcc/9/default.nix | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix index fadfdfa47a8..305ed56df78 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix @@ -12,7 +12,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null @@ -31,6 +31,11 @@ , buildPackages }: +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + # LTO needs libelf and zlib. assert libelf != null -> zlib != null; @@ -153,11 +158,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf @@ -176,7 +184,7 @@ stdenv.mkDerivation ({ preConfigure = import ../common/pre-configure.nix { inherit (stdenv) lib; - inherit version hostPlatform gnatboot langAda langGo; + inherit version hostPlatform gnatboot langAda langGo langJit; }; dontDisableStatic = true; @@ -242,8 +250,8 @@ stdenv.mkDerivation ({ (import ../common/extra-target-flags.nix { inherit stdenv crossStageStatic langD libcCross threadsCross; }) - EXTRA_TARGET_FLAGS - EXTRA_TARGET_LDFLAGS + EXTRA_FLAGS_FOR_TARGET + EXTRA_LDFLAGS_FOR_TARGET ; passthru = { |