From 26dc84f99a8c2dfb7d00879bebff3e6324cc1944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 18 Sep 2009 14:30:10 +0000 Subject: [PATCH] BDW-GC: Tentative fix for Cygwin. svn path=/nixpkgs/trunk/; revision=17249 --- .../boehm-gc/cygwin-pthread-dl.patch | 24 +++++++++++++++++++ .../libraries/boehm-gc/default.nix | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/libraries/boehm-gc/cygwin-pthread-dl.patch diff --git a/pkgs/development/libraries/boehm-gc/cygwin-pthread-dl.patch b/pkgs/development/libraries/boehm-gc/cygwin-pthread-dl.patch new file mode 100644 index 000000000000..9515dc237d3f --- /dev/null +++ b/pkgs/development/libraries/boehm-gc/cygwin-pthread-dl.patch @@ -0,0 +1,24 @@ +Don't pass "-lpthread -ldl" on Cygwin. See +http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/3219 +for details. + +--- gc-7.1/configure 2008-05-04 02:52:50.000000000 +0200 ++++ gc-7.1/configure 2009-09-18 16:23:30.000000000 +0200 +@@ -4859,7 +4859,7 @@ + cat >>confdefs.h <<\_ACEOF + #define THREAD_LOCAL_ALLOC 1 + _ACEOF +- ++ THREADDLLIBS="" + win32_threads=true + ;; + *-*-darwin*) +@@ -5934,6 +5934,7 @@ + # dyld calls anyway + case "$host" in + *-*-darwin*) ;; ++ *-*-cygwin*) ;; + *) + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index e793a56ed5f6..6100efe6daab 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation { sha256 = "0c5zrsdw0rsli06lahcqwwz0prgah340fhfg7ggfgvz3iw1gdkp3"; }; + patches = + stdenv.lib.optional (stdenv.system == "i686-cygwin") + ./cygwin-pthread-dl.patch; + doCheck = true; meta = {