about 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.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index caaacfe4f4368..65a622f046736 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -119,6 +119,17 @@ callPackage ./common.nix { inherit stdenv; } {
 
       # Get rid of more unnecessary stuff.
       rm -rf $out/var $bin/bin/sln
+
+      # Backwards-compatibility to fix e.g.
+      # "configure: error: Pthreads are required to build libgomp" during `gcc`-build
+      # because it's not actually needed anymore to link against `pthreads` since
+      # it's now part of `libc.so.6` itself, but the gcc build breaks if
+      # this doesn't work.
+      ln -sf $out/lib/libpthread.so.0 $out/lib/libpthread.so
+      ln -sf $out/lib/librt.so.1 $out/lib/librt.so
+      ln -sf $out/lib/libdl.so.2 $out/lib/libdl.so
+      ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so
+      touch $out/lib/libpthread.a
     ''
       # For some reason these aren't stripped otherwise and retain reference
       # to bootstrap-tools; on cross-arm this stripping would break objects.