summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/glibc/default.nix')
-rw-r--r--pkgs/development/libraries/glibc/default.nix52
1 files changed, 6 insertions, 46 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 7295e4d62f4f..976dbcde47ff 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -1,23 +1,16 @@
-{ lib, stdenv, fetchurl
+{ stdenv, callPackage
+, withLinuxHeaders ? true
 , installLocales ? true
 , profilingLibraries ? false
-, withGd ? false, gd ? null, libpng ? null
-, buildPlatform, hostPlatform
-, buildPackages
+, withGd ? false
 }:
 
 assert stdenv.cc.isGNU;
 
-let
-  build = import ./common.nix;
-  cross = if buildPlatform != hostPlatform then hostPlatform else null;
-  inherit (buildPackages) linuxHeaders;
-in
-  build cross ({
-    name = "glibc" + lib.optionalString withGd "-gd";
+callPackage ./common.nix { inherit stdenv; } {
+    name = "glibc" + stdenv.lib.optionalString withGd "-gd";
 
-    inherit lib stdenv buildPackages fetchurl linuxHeaders installLocales
-      profilingLibraries withGd gd libpng;
+    inherit withLinuxHeaders profilingLibraries installLocales withGd;
 
     NIX_NO_SELF_RPATH = true;
 
@@ -106,36 +99,3 @@ in
 
     meta.description = "The GNU C Library";
   }
-
-  //
-
-  (if cross != null
-   then {
-      preConfigure = ''
-        sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
-
-        cat > config.cache << "EOF"
-        libc_cv_forced_unwind=yes
-        libc_cv_c_cleanup=yes
-        libc_cv_gnu89_inline=yes
-        # Only due to a problem in gcc configure scripts:
-        libc_cv_sparc64_tls=${if cross.withTLS then "yes" else "no"}
-        EOF
-        export BUILD_CC=gcc
-        export CC="$crossConfig-gcc"
-        export AR="$crossConfig-ar"
-        export RANLIB="$crossConfig-ranlib"
-
-        dontStrip=1
-      '';
-
-      preInstall = null; # clobber the native hook
-
-      separateDebugInfo = false; # this is currently broken for crossDrv
-
-      # To avoid a dependency on the build system 'bash'.
-      preFixup = ''
-        rm $bin/bin/{ldd,tzselect,catchsegv,xtrace}
-      '';
-    }
-   else {}))