aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/10/default.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/10/default.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
index 4a4cfce5cc4..4f05cd3144c 100644
--- a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
+++ b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
@@ -11,7 +11,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
@@ -47,7 +47,7 @@ with stdenv.lib;
with builtins;
let majorVersion = "10";
- version = "${majorVersion}.1.0";
+ version = "${majorVersion}.2.0";
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
@@ -81,7 +81,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
- sha256 = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2";
+ sha256 = "130xdkhmz1bc2kzx061s3sfwk36xah1fw5w332c0nzwwpdl47pdq";
};
inherit patches;
@@ -151,11 +151,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
@@ -239,8 +242,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 = {