pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lld: Backport patches from lld-git
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Oct 9 05:30:44 2016 +0200
Changeset: 4b0d2605c7e5e31344450dc4bfe87868cb0ba8f1
Modified Files:
lld/distinfo
Added Files:
lld/patches/patch-CMakeLists.txt
lld/patches/patch-ELF_CMakeLists.txt
lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp
Log Message:
lld: Backport patches from lld-git
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4b0d2605c7e5e31344450dc4bfe87868cb0ba8f1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lld/distinfo | 14 ++-
lld/patches/patch-CMakeLists.txt | 135 +++++++++++++++++++++
lld/patches/patch-ELF_CMakeLists.txt | 11 ++
...atch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp | 13 ++
...-lib_ReaderWriter_MachO_MachOLinkingContext.cpp | 13 ++
5 files changed, 180 insertions(+), 6 deletions(-)
diffs:
diff --git a/lld/distinfo b/lld/distinfo
index 2160974..180ce46 100644
--- a/lld/distinfo
+++ b/lld/distinfo
@@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.2 2016/09/19 22:32:41 kamil Exp $
-SHA1 (polly-3.8.1.src.tar.xz) = 918f3c74369a3605f3d624ea3f20c97bc3c921ad
-RMD160 (polly-3.8.1.src.tar.xz) = 766873d4b88e0e9c5670aeb45313d47cca7bd79a
-SHA512 (polly-3.8.1.src.tar.xz) = e5d0d1625be47579cd337fce6d6a1c5b64c8991a6b073778c8d8f237fccbd29f3a8ab815f191bd75c550ac4404c9581c948400cd5c71f56d3ea8fb07fec05536
-Size (polly-3.8.1.src.tar.xz) = 7799188 bytes
-SHA1 (patch-CMakeLists.txt) = 82b05a2ef4b83533a47474f5289110fe69a06fff
-SHA1 (patch-lib_External_isl_configure) = dad55f0d959b64f0cb910dad412bfe5bb3702ec9
+SHA1 (lld-3.8.1.src.tar.xz) = f9dffb129f3a6c67d24425a470500b318702889b
+RMD160 (lld-3.8.1.src.tar.xz) = a89056ab90f85e9c4921945907a008cec4bf5ad8
+SHA512 (lld-3.8.1.src.tar.xz) = f006110c36e3784741d5e815af1c27e61648d1289156f3c3fba157d1d2287e34f191b23b5e5d72bd6eed50d13d0838d73198236ca39b4825975934ddb472de81
+Size (lld-3.8.1.src.tar.xz) = 632288 bytes
+SHA1 (patch-CMakeLists.txt) = 46beb1b16c90fd568104d3d0e86ed9fbe049edb7
+SHA1 (patch-ELF_CMakeLists.txt) = bd14969a524e83df98908f26dab448ea250b21f9
+SHA1 (patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp) = aaf74f7e23e4faf142f4c9c265a049bd7f22c660
+SHA1 (patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp) = d0eaafa96436a3269d21ee0543e18d1c30849965
diff --git a/lld/patches/patch-CMakeLists.txt b/lld/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000..aab6c9e
--- /dev/null
+++ b/lld/patches/patch-CMakeLists.txt
@@ -0,0 +1,135 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig 2016-01-07 00:14:09.000000000 +0000
++++ CMakeLists.txt
+@@ -1,3 +1,130 @@
++cmake_minimum_required(VERSION 3.4.3)
++
++# If we are not building as a part of LLVM, build LLD as an
++# standalone project, using LLVM as an external library:
++if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++ project(lld)
++
++ if (POLICY CMP0022)
++ cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
++ endif()
++
++ option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
++
++ # Rely on llvm-config.
++ set(CONFIG_OUTPUT)
++ find_program(LLVM_CONFIG "llvm-config")
++ if(LLVM_CONFIG)
++ message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
++ set(CONFIG_COMMAND ${LLVM_CONFIG}
++ "--assertion-mode"
++ "--bindir"
++ "--libdir"
++ "--includedir"
++ "--prefix"
++ "--src-root")
++ execute_process(
++ COMMAND ${CONFIG_COMMAND}
++ RESULT_VARIABLE HAD_ERROR
++ OUTPUT_VARIABLE CONFIG_OUTPUT
++ )
++ if(NOT HAD_ERROR)
++ string(REGEX REPLACE
++ "[ \t]*[\r\n]+[ \t]*" ";"
++ CONFIG_OUTPUT ${CONFIG_OUTPUT})
++ else()
++ string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
++ message(STATUS "${CONFIG_COMMAND_STR}")
++ message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
++ endif()
++ else()
++ message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
++ endif()
++
++ list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
++ list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
++ list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
++ list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
++ list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
++ list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
++
++ if(NOT MSVC_IDE)
++ set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
++ CACHE BOOL "Enable assertions")
++ # Assertions should follow llvm-config's.
++ mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
++ endif()
++
++ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
++ set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
++ set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
++ set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files")
++ set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
++ set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
++
++ find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
++ NO_DEFAULT_PATH)
++
++ set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
++ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
++ if(EXISTS ${LLVMCONFIG_FILE})
++ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
++ include(${LLVMCONFIG_FILE})
++ else()
++ message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
++ endif()
++
++ # They are used as destination of target generators.
++ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
++ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++ if(WIN32 OR CYGWIN)
++ # DLL platform -- put DLLs into bin.
++ set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
++ else()
++ set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
++ endif()
++
++ include(AddLLVM)
++ include(HandleLLVMOptions)
++ include(CheckAtomic)
++ include(TableGen)
++
++ if (PYTHON_EXECUTABLE STREQUAL "")
++ set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
++ include(FindPythonInterp)
++ if( NOT PYTHONINTERP_FOUND )
++ message(FATAL_ERROR
++ "Unable to find Python interpreter, required for builds and testing.
++ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
++ endif()
++ else()
++ message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
++ endif()
++
++ # Import CMake library targets from LLVM and Clang.
++ include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
++
++ set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
++
++ set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
++
++ set(CMAKE_INCLUDE_CURRENT_DIR ON)
++ include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
++ # Next three include directories are needed when llvm-config is located in build directory.
++ # LLVM and Cland are assumed to be built together
++ if (EXISTS "${LLVM_OBJ_ROOT}/include")
++ include_directories("${LLVM_OBJ_ROOT}/include")
++ endif()
++ link_directories("${LLVM_LIBRARY_DIR}")
++
++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
++
++ set(LLD_BUILT_STANDALONE 1)
++endif()
++
++
+ set(LLD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(LLD_INCLUDE_DIR ${LLD_SOURCE_DIR}/include )
+ set(LLD_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/lld/patches/patch-ELF_CMakeLists.txt b/lld/patches/patch-ELF_CMakeLists.txt
new file mode 100644
index 0000000..3449b0f
--- /dev/null
+++ b/lld/patches/patch-ELF_CMakeLists.txt
@@ -0,0 +1,11 @@
+$NetBSD$
+
+--- ELF/CMakeLists.txt.orig 2016-01-07 00:14:04.000000000 +0000
++++ ELF/CMakeLists.txt
+@@ -23,4 +23,5 @@ add_lld_library(lldELF2
+ Support
+ )
+
+-add_dependencies(lldELF2 ELFOptionsTableGen)
++#add_dependencies(lldELF intrinsics_gen ELFOptionsTableGen)
++add_dependencies(lldELF ELFOptionsTableGen)
diff --git a/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp b/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
new file mode 100644
index 0000000..b2c5954
--- /dev/null
+++ b/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/ReaderWriter/ELF/ELFLinkingContext.cpp.orig 2016-01-11 21:40:40.000000000 +0000
++++ lib/ReaderWriter/ELF/ELFLinkingContext.cpp
+@@ -15,7 +15,7 @@
+ #include "lld/Core/SharedLibraryFile.h"
+ #include "llvm/ADT/STLExtras.h"
+ #include "llvm/ADT/Triple.h"
+-#include "llvm/Config/config.h"
++#include "llvm/Config/llvm-config.h"
+ #include "llvm/Support/ELF.h"
+ #include "llvm/Support/Errc.h"
+ #include "llvm/Support/FileSystem.h"
diff --git a/lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp b/lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp
new file mode 100644
index 0000000..33da90a
--- /dev/null
+++ b/lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/ReaderWriter/MachO/MachOLinkingContext.cpp.orig 2015-10-24 08:20:51.000000000 +0000
++++ lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+@@ -22,7 +22,7 @@
+ #include "llvm/ADT/STLExtras.h"
+ #include "llvm/ADT/StringExtras.h"
+ #include "llvm/ADT/Triple.h"
+-#include "llvm/Config/config.h"
++#include "llvm/Config/llvm-config.h"
+ #include "llvm/Support/Debug.h"
+ #include "llvm/Support/Errc.h"
+ #include "llvm/Support/Host.h"
Home |
Main Index |
Thread Index |
Old Index