From 64b3350537ad8ecfd8b4d3fd8fb31b7deb41d014 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 13 Mar 2018 20:06:43 -0500 Subject: [PATCH 1/2] glibc: don't use bootstrap libgcc_s Fixes #36947 --- pkgs/development/libraries/glibc/default.nix | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 8b17ff9e55850..ce0a689cdb7f6 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -31,22 +31,6 @@ callPackage ./common.nix { inherit stdenv; } { # does not work. hardeningDisable = [ "stackprotector" "fortify" ]; - # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for - # any program we run, because the gcc will have been placed at a new - # store path than that determined when built (as a source for the - # bootstrap-tools tarball) - # Building from a proper gcc staying in the path where it was installed, - # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without - # any special hack. - preInstall = '' - if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then - mkdir -p $out/lib - cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 - # the .so It used to be a symlink, but now it is a script - cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so - fi - ''; - postInstall = '' if test -n "$installLocales"; then make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales From ff30d7b957db573ae76a9a53c34c1f27eb1ee379 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Fri, 27 Jul 2018 21:32:04 +0300 Subject: [PATCH 2/2] all-packages.nix: Remove gcc7 i686 workarounds The underlying problem with libgcc is worked around. (cherry picked from commit afea12f8c33d7399ff140826cc443fafdf86365c) --- pkgs/top-level/all-packages.nix | 79 +++++++++++---------------------- 1 file changed, 26 insertions(+), 53 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec338f5b913c9..5892e16342abb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7113,67 +7113,51 @@ with pkgs; llvmPackages = recurseIntoAttrs llvmPackages_5; - llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ + llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 { isl = isl_0_14; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; - }); + }; - llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 ({ + llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_37.tools; targetLlvmLibraries = targetPackages.llvmPackages_37.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; - }); + }; - llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 ({ + llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_38.tools; targetLlvmLibraries = targetPackages.llvmPackages_38.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; - }); + }; - llvmPackages_39 = callPackage ../development/compilers/llvm/3.9 ({ + llvmPackages_39 = callPackage ../development/compilers/llvm/3.9 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_39.tools; targetLlvmLibraries = targetPackages.llvmPackages_39.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; - }); + }; - llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({ + llvmPackages_4 = callPackage ../development/compilers/llvm/4 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_4.tools; targetLlvmLibraries = targetPackages.llvmPackages_4.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; - }); + }; - llvmPackages_5 = callPackage ../development/compilers/llvm/5 ({ + llvmPackages_5 = callPackage ../development/compilers/llvm/5 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_5.tools; targetLlvmLibraries = targetPackages.llvmPackages_5.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' - }); + }; - llvmPackages_6 = callPackage ../development/compilers/llvm/6 ({ + llvmPackages_6 = callPackage ../development/compilers/llvm/6 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_6.tools; targetLlvmLibraries = targetPackages.llvmPackages_6.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' - }); + }; - llvmPackages_7 = callPackage ../development/compilers/llvm/7 ({ + llvmPackages_7 = callPackage ../development/compilers/llvm/7 { inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_7.tools; targetLlvmLibraries = targetPackages.llvmPackages_7.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' - }); + }; manticore = callPackage ../development/compilers/manticore { }; @@ -7308,11 +7292,9 @@ with pkgs; }; # For beta and nightly releases use the nixpkgs-mozilla overlay - rust = callPackage ../development/compilers/rust ({ + rust = callPackage ../development/compilers/rust { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' - }); + }; inherit (rust) cargo rustc; buildRustCrate = callPackage ../build-support/rust/build-rust-crate { }; @@ -7911,11 +7893,9 @@ with pkgs; stdenv = gccStdenv; }; spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { }; - spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix ({ + spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix { inherit (darwin) libobjc; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' - })); + }; spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { }; spidermonkey = spidermonkey_31; @@ -10087,22 +10067,15 @@ with pkgs; hyena = callPackage ../development/libraries/hyena { mono = mono4; }; - icu58 = callPackage (import ../development/libraries/icu/58.nix fetchurl) ({ + icu58 = callPackage (import ../development/libraries/icu/58.nix fetchurl) { nativeBuildRoot = buildPackages.icu58.override { buildRootOnly = true; }; - } // - (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' - })); - icu59 = callPackage ../development/libraries/icu/59.nix ({ + }; + icu59 = callPackage ../development/libraries/icu/59.nix { nativeBuildRoot = buildPackages.icu59.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' - })); - icu60 = callPackage ../development/libraries/icu/60.nix ({ + }; + icu60 = callPackage ../development/libraries/icu/60.nix { nativeBuildRoot = buildPackages.icu60.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' - })); + }; icu = icu59;