about summary refs log tree commit diff
path: root/pkgs/development/libraries/pcre
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2010-10-06 10:29:45 +0000
committerPeter Simons <simons@cryp.to>2010-10-06 10:29:45 +0000
commitd095fbb13e4e91a336ef6af6721ef8012b0a928c (patch)
tree489ea0b90f150a0d6f33a32ec4b35a2f57473d5c /pkgs/development/libraries/pcre
parent5d962bc1b2a47251316f79d9a10b6aae62717b7a (diff)
pkgs/development/libraries/pcre: fixed build on Darwin
The gcc version used on Darwin crashes while compiling the C++ interface
of PCRE. Building that code with -O0 avoids the crash.

svn path=/nixpkgs/trunk/; revision=24107
Diffstat (limited to 'pkgs/development/libraries/pcre')
-rw-r--r--pkgs/development/libraries/pcre/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index fba3844bf8e45..1dd860aeaeb12 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -8,10 +8,14 @@ stdenv.mkDerivation {
     sha256 = "1zsqk352mx2zklf9bgpg9d88ckfdssbbbiyslhrycfckw8m3qpvr";
   };
 
+  # The compiler on Darwin crashes with an internal error while building the
+  # C++ interface. Disabling optimizations on that platform remedies the
+  # problem. In case we ever update the Darwin GCC version, the exception for
+  # that platform ought to be removed.
   configureFlags = ''
     ${if unicodeSupport then "--enable-unicode-properties" else ""}
     ${if !cplusplusSupport then "--disable-cpp" else ""}
-  '';
+  '' + stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-O0";
 
   meta = {
     homepage = "http://www.pcre.org/";