From 9b502a9ae1f48f50daa2109baaf935ed1e7f8225 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 21 Jun 2013 19:18:52 -0400 Subject: [PATCH] llvm: Update to 3.3 Signed-off-by: Shea Levy --- pkgs/development/compilers/llvm/default.nix | 20 +++++++++---------- .../llvm/more-memory-for-bugpoint.patch | 15 ++++++++++++++ .../compilers/llvm/set_soname.patch | 12 ----------- 3 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/compilers/llvm/more-memory-for-bugpoint.patch delete mode 100644 pkgs/development/compilers/llvm/set_soname.patch diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 59e2bdc5509a..0212c4a1fd2e 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -1,30 +1,30 @@ { stdenv, fetchurl, perl, groff, cmake, python, libffi }: -let version = "3.2"; in +let version = "3.3"; in stdenv.mkDerivation { name = "llvm-${version}"; src = fetchurl { url = "http://llvm.org/releases/${version}/llvm-${version}.src.tar.gz"; - sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j"; + sha256 = "0y3mfbb5qzcpw3v5qncn69x1hdrrrfirgs82ypi2annhf0g6nxk8"; }; - patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334 - patchFlags = "-p0"; + # The default rlimits are too low for shared libraries. + patches = [ ./more-memory-for-bugpoint.patch ]; - preConfigure = "patchShebangs ."; - - propagatedBuildInputs = [ libffi ]; - buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11? + # libffi was propagated before, but it wasn't even being used, so + # unless something needs it just an input is fine. + buildInputs = [ perl groff cmake python libffi ]; # ToDo: polly, libc++; enable cxx11? # created binaries need to be run before installation... I coudn't find a better way preBuild = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/lib''; - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON" ]; + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON" "-DLLVM_ENABLE_FFI=ON" ]; enableParallelBuilding = true; - #doCheck = true; # tests are broken, don't know why + + doCheck = true; meta = { homepage = http://llvm.org/; diff --git a/pkgs/development/compilers/llvm/more-memory-for-bugpoint.patch b/pkgs/development/compilers/llvm/more-memory-for-bugpoint.patch new file mode 100644 index 000000000000..fa19ce4f5871 --- /dev/null +++ b/pkgs/development/compilers/llvm/more-memory-for-bugpoint.patch @@ -0,0 +1,15 @@ +diff -Naur llvm-3.3.src-orig/tools/bugpoint/bugpoint.cpp llvm-3.3.src/tools/bugpoint/bugpoint.cpp +--- llvm-3.3.src-orig/tools/bugpoint/bugpoint.cpp 2013-01-27 20:35:51.000000000 -0500 ++++ llvm-3.3.src/tools/bugpoint/bugpoint.cpp 2013-06-21 18:29:47.612731499 -0400 +@@ -48,9 +48,9 @@ + "is killed (default is 300s), 0 disables timeout")); + + static cl::opt +-MemoryLimit("mlimit", cl::init(-1), cl::value_desc("MBytes"), ++MemoryLimit("mlimit", cl::init(0), cl::value_desc("MBytes"), + cl::desc("Maximum amount of memory to use. 0 disables check." +- " Defaults to 100MB (800MB under valgrind).")); ++ " Check disabled by default.")); + + static cl::opt + UseValgrind("enable-valgrind", diff --git a/pkgs/development/compilers/llvm/set_soname.patch b/pkgs/development/compilers/llvm/set_soname.patch deleted file mode 100644 index 69ba74dddad8..000000000000 --- a/pkgs/development/compilers/llvm/set_soname.patch +++ /dev/null @@ -1,12 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=409267 -http://llvm.org/bugs/show_bug.cgi?id=12334 ---- tools/llvm-shlib/Makefile.orig 2012-03-26 18:14:13.071797115 +0200 -+++ tools/llvm-shlib/Makefile 2012-03-26 17:31:12.491196254 +0200 -@@ -67,6 +67,7 @@ - # Include everything from the .a's into the shared library. - LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ - -Wl,--no-whole-archive -+ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) - endif - - ifeq ($(HOST_OS),Linux)