about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/7
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/7')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/bintools/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/default.nix2
6 files changed, 3 insertions, 100 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/bintools/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/bintools/default.nix
deleted file mode 100644
index 38002439c205..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/7/bintools/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ lib, runCommand, stdenv, llvm, lld, version }:
-
-let
-  prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-";
-in runCommand "llvm-binutils-${version}" {
-  preferLocalBuild = true;
-  passthru = {
-    isLLVM = true;
-  };
-} ''
-   mkdir -p $out/bin
-   for prog in ${lld}/bin/*; do
-     ln -s $prog $out/bin/${prefix}$(basename $prog)
-   done
-   for prog in ${llvm}/bin/*; do
-     ln -sf $prog $out/bin/${prefix}$(basename $prog)
-   done
-
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
-   ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
-   ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
-   ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
-   ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
-   ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
-   ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
-   ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
-   ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
-   ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
-   ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
-
-   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
-''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix
index c3f2bcb73ffe..136a69e72161 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix
@@ -45,7 +45,7 @@ let
     ];
 
     patches = [
-      ./purity.patch
+      ../../common/clang/5-8-purity.patch
       # make clang -xhip use $PATH to find executables
       ./HIP-use-PATH-7.patch
       # Backport for the `--unwindlib=[libgcc|compiler-rt]` flag, which is
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch
deleted file mode 100644
index b30d0d0b5d5b..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Thu, 18 May 2017 11:56:12 -0500
-Subject: [PATCH] "purity" patch for 5.0
-
----
- lib/Driver/ToolChains/Gnu.cpp | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
-index fe3c0191bb..c6a482bece 100644
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
-   if (!Args.hasArg(options::OPT_static)) {
-     if (Args.hasArg(options::OPT_rdynamic))
-       CmdArgs.push_back("-export-dynamic");
--
--    if (!Args.hasArg(options::OPT_shared)) {
--      const std::string Loader =
--          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
--      CmdArgs.push_back("-dynamic-linker");
--      CmdArgs.push_back(Args.MakeArgString(Loader));
--    }
-   }
- 
-   CmdArgs.push_back("-o");
--- 
-2.11.0
-
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/codesign.patch
deleted file mode 100644
index 3cc12b94b200..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/codesign.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 19 Sep 2017 13:13:06 -0500
-Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
- needs it
-
----
- cmake/Modules/AddCompilerRT.cmake |  8 ------
- test/asan/CMakeLists.txt          | 52 ---------------------------------------
- test/tsan/CMakeLists.txt          | 47 -----------------------------------
- 3 files changed, 107 deletions(-)
-
-diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
-index bc5fb9ff7..b64eb4246 100644
---- a/cmake/Modules/AddCompilerRT.cmake
-+++ b/cmake/Modules/AddCompilerRT.cmake
-@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
-         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
-         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
-       endif()
--      if(APPLE)
--        # Ad-hoc sign the dylibs
--        add_custom_command(TARGET ${libname}
--          POST_BUILD  
--          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
--          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
--        )
--      endif()
-     endif()
-     install(TARGETS ${libname}
-       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
-2.14.1
-
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
index a644229ff07c..7354397d2bf0 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
   patches = [
     # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
     ../../common/compiler-rt/glibc.patch
-    ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ../../common/compiler-rt/7-12-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
     ./gnu-install-dirs.patch
     ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch
   ] ++ lib.optional (useLLVM) ./crtbegin-and-end.patch
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix
index 5c20086ce846..0607b5ebf42c 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/7/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix
@@ -149,7 +149,7 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools-unwrapped = callPackage ./bintools {};
+    bintools-unwrapped = callPackage ../common/bintools.nix { };
 
     bintoolsNoLibc = wrapBintoolsWith {
       bintools = tools.bintools-unwrapped;