diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-08-28 22:17:54 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-08-28 22:18:02 +0100 |
commit | 9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56 (patch) | |
tree | 7bd7683d78448502d64cddf30e5d2b2cd32393d1 /pkgs/development/compilers/gcc | |
parent | c4e8f4b442e2500273040a17d61996ee99c3956b (diff) | |
download | nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar.gz nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar.bz2 nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar.lz nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar.xz nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.tar.zst nixlib-9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56.zip |
hurd: cleanup unmaintained target
This has been not touched in 6 years. Let's remove it to cause less problems when adding new cross-compiling infrastructure. This also simplify gcc significantly.
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 50 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 52 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 52 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 52 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 52 |
7 files changed, 22 insertions, 338 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 101a6feeeae3..3e9ddacac1b4 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -24,7 +24,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -181,39 +180,7 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; postPatch = - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -379,21 +346,13 @@ stdenv.mkDerivation ({ ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread) + ++ optionals javaAwtGtk [ gmp mpfr ]) ); EXTRA_TARGET_FLAGS = optionals @@ -413,10 +372,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 1df87cc3d429..9b4444b905de 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -24,7 +24,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -190,39 +189,7 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; postPatch = - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -401,22 +368,13 @@ stdenv.mkDerivation ({ ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread) - ); + ++ optionals javaAwtGtk [ gmp mpfr ])); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -435,10 +393,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 1215c971f239..3fdec1ec3103 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -24,7 +24,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -188,39 +187,7 @@ stdenv.mkDerivation ({ ''; postPatch = - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -302,7 +269,7 @@ stdenv.mkDerivation ({ ] ++ optional (libelf != null) "--with-libelf=${libelf}" ++ optional (!(crossMingw && crossStageStatic)) - "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++ + "--with-native-system-header-dir=${getDev stdenv.cc.libc}/include" ++ # Basic configuration [ @@ -400,13 +367,6 @@ stdenv.mkDerivation ({ ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] @@ -414,8 +374,7 @@ stdenv.mkDerivation ({ ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread) - ); + )); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -434,10 +393,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 0fb390758954..099e26375f41 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -24,7 +24,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -192,39 +191,7 @@ stdenv.mkDerivation ({ ''; postPatch = - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -408,22 +375,13 @@ stdenv.mkDerivation ({ ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] ++ optional (zlib != null) zlib ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread) - ); + ++ optionals javaAwtGtk [ gmp mpfr ])); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -442,10 +400,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index c5541da07901..60e429cc4da1 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -17,7 +17,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -165,39 +164,7 @@ stdenv.mkDerivation ({ patchShebangs $configureScript done '' + ( - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -357,19 +324,9 @@ stdenv.mkDerivation ({ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] - ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread) - ); + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -388,10 +345,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 5d7be1637834..a05c1c718128 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -17,7 +17,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -160,39 +159,7 @@ stdenv.mkDerivation ({ patchShebangs $configureScript done '' + ( - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -346,19 +313,9 @@ stdenv.mkDerivation ({ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] - ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread) - ); + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -377,10 +334,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 124fdbcdf9d4..275b380e90f7 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -17,7 +17,6 @@ , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , # Strip kills static libs of other archs (hence no cross) stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null @@ -134,39 +133,7 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" ]; postPatch = - if targetPlatform.isHurd - then - # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not - # in glibc, so add the right `-I' flags to the default spec string. - assert libcCross != null -> libpthreadCross != null; - let - libc = if libcCross != null then libcCross else stdenv.glibc; - gnu_h = "gcc/config/gnu.h"; - extraCPPDeps = - libc.propagatedBuildInputs - ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross - ++ stdenv.lib.optional (libpthread != null) libpthread; - extraCPPSpec = - concatStrings (intersperse " " - (map (x: "-I${x.dev or x}/include") extraCPPDeps)); - extraLibSpec = - if libpthreadCross != null - then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" - else "-L${libpthread}/lib"; - in - '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." - sed -i "${gnu_h}" \ - -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' - - echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." - sed -i "${gnu_h}" \ - -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." - sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' - '' - else if targetPlatform != hostPlatform || stdenv.cc.libc != null then + if targetPlatform != hostPlatform || stdenv.cc.libc != null then # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let @@ -314,19 +281,9 @@ stdenv.mkDerivation ({ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross - - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? propagatedBuildInputs) - libcCross.propagatedBuildInputs )); - LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] - ++ optional (zlib != null) zlib - ++ optional (libpthread != null) libpthread) - ); + LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) @@ -345,10 +302,7 @@ stdenv.mkDerivation ({ ] else [ "-Wl,-rpath,${libcCross.out}/lib" "-Wl,-rpath-link,${libcCross.out}/lib" - ]) ++ optionals (libpthreadCross != null) [ - "-L${libpthreadCross}/lib" - "-Wl,${libpthreadCross.TARGET_LDFLAGS}" - ]); + ])); passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; |