diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-10-15 13:57:28 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-10-15 13:59:18 +0200 |
commit | 3ee33f35f88ee8558b27f0f3cc6eb0259b312724 (patch) | |
tree | ec4f6b2feb817cbbc2a580db7a97ecc0b299f4ee /pkgs/development/compilers | |
parent | 5a21efdcdf7c3f4349192036e661247e2cd07916 (diff) | |
parent | 75e419173959f3e96a6569268f310e80f4f836b4 (diff) | |
download | nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar.gz nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar.bz2 nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar.lz nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar.xz nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.tar.zst nixlib-3ee33f35f88ee8558b27f0f3cc6eb0259b312724.zip |
Merge branch 'staging'
Contains security fixes in X server and X libs. On Hydra, the amount to rebuild on master is now higher than on staging; the comparison looks OK.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/llvm/3.5/llvm.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.8/llvm.nix | 7 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/llvm.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/4/llvm.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/5/llvm.nix | 6 |
5 files changed, 23 insertions, 8 deletions
diff --git a/pkgs/development/compilers/llvm/3.5/llvm.nix b/pkgs/development/compilers/llvm/3.5/llvm.nix index 0be3af192b42..94f39183345f 100644 --- a/pkgs/development/compilers/llvm/3.5/llvm.nix +++ b/pkgs/development/compilers/llvm/3.5/llvm.nix @@ -33,6 +33,12 @@ in stdenv.mkDerivation rec { propagatedBuildInputs = [ ncurses zlib ]; + prePatch = '' + substituteInPlace CMakeLists.txt \ + --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \ + --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" + ''; + # hacky fix: created binaries need to be run before installation preBuild = '' mkdir -p $out/ diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index 558bdcc5ce6a..f8b8948e749e 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -44,7 +44,11 @@ in stdenv.mkDerivation rec { # 10.9. This is a temporary measure until nixpkgs darwin support is # updated. postPatch = stdenv.lib.optionalString stdenv.isDarwin '' - sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc + sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc + + substituteInPlace CMakeLists.txt \ + --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \ + --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" ''; # hacky fix: created binaries need to be run before installation @@ -75,7 +79,6 @@ in stdenv.mkDerivation rec { ''; postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' - install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib ''; diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index 5f90e508c5e2..809c49ac24a2 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -82,6 +82,10 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace ./projects/compiler-rt/cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' + + substituteInPlace CMakeLists.txt \ + --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$lib/lib")" \ + --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}. + stdenv.lib.optionalString (enableSharedLibraries) '' @@ -130,8 +134,6 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" - install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib - install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${version}.dylib ''; diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 20ab9b44b65c..e90603ffefae 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -58,6 +58,10 @@ in stdenv.mkDerivation rec { postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace ./projects/compiler-rt/cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' + + substituteInPlace cmake/modules/AddLLVM.cmake \ + --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir INSTALL_NAME_DIR "$lib/lib")" \ + --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}. + stdenv.lib.optionalString (enableSharedLibraries) '' @@ -121,8 +125,6 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" - install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib - install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib ''; diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index 946c04a2ab4e..011eab5678c1 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -58,6 +58,10 @@ in stdenv.mkDerivation rec { postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace ./projects/compiler-rt/cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' + + substituteInPlace cmake/modules/AddLLVM.cmake \ + --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir INSTALL_NAME_DIR "$lib/lib")" \ + --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}. + stdenv.lib.optionalString (enableSharedLibraries) '' @@ -129,8 +133,6 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" - install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib - install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib ''; |