diff options
author | John Ericson <subscribe@JohnEricson.me> | 2018-09-18 16:52:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 16:52:30 -0400 |
commit | 35378f014161c1d794dc89b6969275396cb601de (patch) | |
tree | 8026f592376791dae1932b2b7a02377172c6b6f1 | |
parent | 5664e64a015354e8b5e3c0cc4e9e7fac0db5f3dc (diff) | |
parent | 2091133e789b22b33cdb85af99e36c5589faf1db (diff) | |
download | nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar.gz nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar.bz2 nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar.lz nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar.xz nixpkgs-35378f014161c1d794dc89b6969275396cb601de.tar.zst nixpkgs-35378f014161c1d794dc89b6969275396cb601de.zip |
Merge pull request #46857 from obsidiansystems/darwin-to-linux-prep
misc pkgs: various cross fixes in preparation for darwin->linux
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 3 | ||||
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 9 | ||||
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 6 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 1 |
12 files changed, 44 insertions, 37 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index ed185b4be1a..60db368c403 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -116,6 +116,7 @@ let version = "4.8.5"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -124,8 +125,9 @@ let version = "4.8.5"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 3f13562c1b8..361db92cb76 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -121,6 +121,7 @@ let version = "4.9.4"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -129,8 +130,9 @@ let version = "4.9.4"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 497ca40c3ae..2e51e9c0506 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -107,6 +107,7 @@ let version = "5.5.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -115,8 +116,9 @@ let version = "5.5.0"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 3f5d3172d12..e6825afcfa8 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -105,6 +105,7 @@ let version = "6.4.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -113,11 +114,9 @@ let version = "6.4.0"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - # maybe only needed on musl, PATH_MAX - # https://github.com/richfelker/musl-cross-make/blob/0867cdf300618d1e3e87a0a939fa4427207ad9d7/litecross/Makefile#L62 - "--disable-libmpx" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 30c1611f5fb..4dfbcf0f545 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -77,6 +77,7 @@ let version = "7.3.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -85,11 +86,9 @@ let version = "7.3.0"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - # maybe only needed on musl, PATH_MAX - # https://github.com/richfelker/musl-cross-make/blob/0867cdf300618d1e3e87a0a939fa4427207ad9d7/litecross/Makefile#L62 - "--disable-libmpx" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 727cd9cbdbd..04054df8bf8 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -72,6 +72,7 @@ let version = "8.2.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -80,11 +81,9 @@ let version = "8.2.0"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc - # maybe only needed on musl, PATH_MAX - # https://github.com/richfelker/musl-cross-make/blob/0867cdf300618d1e3e87a0a939fa4427207ad9d7/litecross/Makefile#L62 - "--disable-libmpx" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index dd6de818117..230409e9753 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -69,6 +69,7 @@ let version = "7-20170409"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -77,8 +78,9 @@ let version = "7-20170409"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index c74c27598ee..8b17ff9e558 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -94,8 +94,7 @@ callPackage ./common.nix { inherit stdenv; } { mv $bin/bin/getconf_ $bin/bin/getconf ''; - # Hack to get around eval issue. - separateDebugInfo = !stdenv.isDarwin; + separateDebugInfo = true; meta.description = "The GNU C Library"; } diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 31ca9f2c82e..daa9f66615c 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -53,12 +53,15 @@ in lib.init bootStages ++ [ else buildPackages.gcc; extraNativeBuildInputs = old.extraNativeBuildInputs + ++ lib.optionals + (hostPlatform.isLinux && !buildPlatform.isLinux) + [ buildPackages.patchelf buildPackages.paxctl ] + ++ lib.optional + (let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform)) + buildPackages.updateAutotoolsGnuConfigScriptsHook # without proper `file` command, libtool sometimes fails # to recognize 64-bit DLLs ++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file - ++ lib.optional - (hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl") - buildPackages.updateAutotoolsGnuConfigScriptsHook ; }); }) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e1ce3200e8c..c663c3743ed 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -83,9 +83,7 @@ rec { doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform; doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform; - outputs' = - outputs ++ - (if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []); + outputs' = outputs ++ lib.optional separateDebugInfo "debug"; fixedOutputDrv = attrs ? outputHash; noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated @@ -176,7 +174,7 @@ rec { // { # A hack to make `nix-env -qa` and `nix search` ignore broken packages. # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix. - name = assert validity.handled; name + lib.optionalString + name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); name + lib.optionalString # Fixed-output derivations like source tarballs shouldn't get a host # suffix. But we have some weird ones with run-time deps that are # just used for their side-affects. Those might as well since the diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index b29a96314d2..08703b6934e 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -251,7 +251,8 @@ in }; extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++ # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. - lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook; + lib.optional (!localSystem.isx86 || localSystem.libc == "musl") + prevStage.updateAutotoolsGnuConfigScriptsHook; }) @@ -292,7 +293,8 @@ in }; extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++ # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. - lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook; + lib.optional (!localSystem.isx86 || localSystem.libc == "musl") + prevStage.updateAutotoolsGnuConfigScriptsHook; }) # Construct the final stdenv. It uses the Glibc and GCC, and adds @@ -324,7 +326,8 @@ in extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++ # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64. - lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook; + lib.optional (!localSystem.isx86 || localSystem.libc == "musl") + prevStage.updateAutotoolsGnuConfigScriptsHook; cc = prevStage.gcc; @@ -357,7 +360,7 @@ in ++ [ /*propagated from .dev*/ linuxHeaders binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params ] - ++ lib.optionals (!localSystem.isx86) + ++ lib.optionals (!localSystem.isx86 || localSystem.libc == "musl") [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ]; overrides = self: super: { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b995e561f2..07133473b80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6509,7 +6509,6 @@ with pkgs; libcCross1 = if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode - else if stdenv.targetPlatform.libc == "musl" then musl else null; binutils1 = wrapBintoolsWith { bintools = binutils-unwrapped; |