summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/4.9
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-08-28 22:17:54 +0100
committerJörg Thalheim <joerg@thalheim.io>2018-08-28 22:18:02 +0100
commit9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56 (patch)
tree7bd7683d78448502d64cddf30e5d2b2cd32393d1 /pkgs/development/compilers/gcc/4.9
parentc4e8f4b442e2500273040a17d61996ee99c3956b (diff)
downloadnixlib-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/4.9')
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix51
1 files changed, 3 insertions, 48 deletions
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; };