From 7869d1654517c028aa76fc1dedc9b5ac301a867a Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 15 Oct 2020 17:23:57 +0900 Subject: llvmPackages: Multuple outputs for everythting Also begin to start work on cross compilation, though that will have to be finished later. The patches are based on the first version of https://reviews.llvm.org/D99484. It's very annoying to do the back-porting but the review has uncovered nothing super major so I'm fine sticking with what I've got. Beyond making the outputs work, I also strove to re-sync the packages, as they have been drifting pointlessly apart for some time. ---- Other misc notes, highly incomplete - lvm-config-native and llvm-config are put in `dev` because they are tools just for build time. - Clang no longer has an lld dep. That was introduced in db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help finding lld when it is used we should just pass it flags / put in the resource dir. Providing it at build time increases critical path length for no good reason. ---- A note on `nativeCC`: `stdenv` takes tools from the previous stage, so: 1. `pkgsBuildBuild`: `(?1, x, x)` 2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)` while: 1. `pkgsBuildBuild`: `(?1, x, x)` 2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)` 3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)` --- .../llvm/12/libunwind/gnu-install-dirs.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch (limited to 'pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch') diff --git a/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch new file mode 100644 index 000000000000..a791d6c43231 --- /dev/null +++ b/pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 48cb8e004e08..fec8144fb95a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD) + project(libunwind LANGUAGES C CXX ASM) + ++ include(GNUInstallDirs) ++ + set(PACKAGE_NAME libunwind) + set(PACKAGE_VERSION 12.0.0) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +@@ -115,17 +117,17 @@ set(CMAKE_MODULE_PATH + + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + if(LIBCXX_LIBDIR_SUBDIR) + string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) + string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) + endif() + elseif(LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX}) + else() + set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX}) + endif() + + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) -- cgit v1.2.3