pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lld: Update to 4.0.0



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Apr 14 01:14:38 2017 +0200
Changeset:	fc50b45c0c023a5b65684173389c54a59f815f4d

Modified Files:
	lld/Makefile
	lld/distinfo
Removed Files:
	lld/patches/patch-CMakeLists.txt
	lld/patches/patch-ELF_CMakeLists.txt
	lld/patches/patch-cmake_modules_CheckAtomic.cmake
	lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
	lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp

Log Message:
lld: Update to 4.0.0

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fc50b45c0c023a5b65684173389c54a59f815f4d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lld/Makefile                                       |   2 +-
 lld/distinfo                                       |  13 +--
 lld/patches/patch-CMakeLists.txt                   | 123 ---------------------
 lld/patches/patch-ELF_CMakeLists.txt               |  11 --
 lld/patches/patch-cmake_modules_CheckAtomic.cmake  | 111 -------------------
 ...atch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp |  13 ---
 ...-lib_ReaderWriter_MachO_MachOLinkingContext.cpp |  13 ---
 7 files changed, 5 insertions(+), 281 deletions(-)

diffs:
diff --git a/lld/Makefile b/lld/Makefile
index 1f7cae5dc3..60d520ea9e 100644
--- a/lld/Makefile
+++ b/lld/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.1 2016/09/12 22:49:23 kamil Exp $
 
-DISTNAME=	lld-3.8.1.src
+DISTNAME=	lld-4.0.0.src
 PKGNAME=	${DISTNAME:S/.src//}
 CATEGORIES=	devel
 MASTER_SITES=	http://llvm.org/releases/${PKGVERSION_NOREV}/
diff --git a/lld/distinfo b/lld/distinfo
index 3b5839a1b6..b3e4e87ebf 100644
--- a/lld/distinfo
+++ b/lld/distinfo
@@ -1,11 +1,6 @@
 $NetBSD: distinfo,v 1.2 2016/09/19 22:32:41 kamil Exp $
 
-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) = eec1be7944252c52a05965b49dd3199a696a79ce
-SHA1 (patch-ELF_CMakeLists.txt) = bd14969a524e83df98908f26dab448ea250b21f9
-SHA1 (patch-cmake_modules_CheckAtomic.cmake) = 5be759652a046d6a8793ccc4f85820dd8225d96f
-SHA1 (patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp) = aaf74f7e23e4faf142f4c9c265a049bd7f22c660
-SHA1 (patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp) = d0eaafa96436a3269d21ee0543e18d1c30849965
+SHA1 (lld-4.0.0.src.tar.xz) = 2ec36514d742df3e1151814cba4546cdda597fd8
+RMD160 (lld-4.0.0.src.tar.xz) = 71a13e211501af16798e5fc02a0d9cb59af34ea8
+SHA512 (lld-4.0.0.src.tar.xz) = 66b2c9cc57f5e94ad7e7da1b1bcc08cbbaee1b55c6efa64b2424b9d8776c70b842c2a31c188a99b447be6a8621ad1b1e70573bbfcf5d6b1aa986b03b3b3350f3
+Size (lld-4.0.0.src.tar.xz) = 592728 bytes
diff --git a/lld/patches/patch-CMakeLists.txt b/lld/patches/patch-CMakeLists.txt
deleted file mode 100644
index 109eef5683..0000000000
--- a/lld/patches/patch-CMakeLists.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-$NetBSD$
-
---- CMakeLists.txt.orig	2016-01-07 00:14:09.000000000 +0000
-+++ CMakeLists.txt
-@@ -1,3 +1,118 @@
-+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}/share/llvm/cmake") # this will change in 3.9.0
-+  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(cmake/modules/CheckAtomic.cmake)
-+  include(TableGen)
-+
-+  # Import CMake library targets from LLVM and Clang.
-+  #include("${LLVM_CMAKE_PATH}/share/llvm/cmake/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
deleted file mode 100644
index 3449b0ff49..0000000000
--- a/lld/patches/patch-ELF_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-$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-cmake_modules_CheckAtomic.cmake b/lld/patches/patch-cmake_modules_CheckAtomic.cmake
deleted file mode 100644
index 668981ea38..0000000000
--- a/lld/patches/patch-cmake_modules_CheckAtomic.cmake
+++ /dev/null
@@ -1,111 +0,0 @@
-$NetBSD$
-
---- cmake/modules/CheckAtomic.cmake.orig	2016-10-09 03:38:58.827088427 +0000
-+++ cmake/modules/CheckAtomic.cmake
-@@ -0,0 +1,106 @@
-+# atomic builtins are required for threading support.
-+
-+INCLUDE(CheckCXXSourceCompiles)
-+
-+# Sometimes linking against libatomic is required for atomic ops, if
-+# the platform doesn't support lock-free atomics.
-+
-+function(check_working_cxx_atomics varname)
-+  set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-+  set(CMAKE_REQUIRED_FLAGS "-std=c++11")
-+  CHECK_CXX_SOURCE_COMPILES("
-+#include <atomic>
-+std::atomic<int> x;
-+int main() {
-+  return x;
-+}
-+" ${varname})
-+  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-+endfunction(check_working_cxx_atomics)
-+
-+function(check_working_cxx_atomics64 varname)
-+  set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-+  set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}")
-+  CHECK_CXX_SOURCE_COMPILES("
-+#include <atomic>
-+#include <cstdint>
-+std::atomic<uint64_t> x (0);
-+int main() {
-+  uint64_t i = x.load(std::memory_order_relaxed);
-+  return 0;
-+}
-+" ${varname})
-+  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-+endfunction(check_working_cxx_atomics64)
-+
-+
-+# This isn't necessary on MSVC, so avoid command-line switch annoyance
-+# by only running on GCC-like hosts.
-+if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
-+  # First check if atomics work without the library.
-+  check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
-+  # If not, check if the library exists, and atomics work with it.
-+  if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-+    check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
-+    if( HAVE_LIBATOMIC )
-+      list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+      check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
-+      if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
-+	message(FATAL_ERROR "Host compiler must support std::atomic!")
-+      endif()
-+    else()
-+      message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
-+    endif()
-+  endif()
-+endif()
-+
-+# Check for 64 bit atomic operations.
-+if(MSVC)
-+  set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
-+else()
-+  check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
-+endif()
-+
-+# If not, check if the library exists, and atomics work with it.
-+if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
-+  check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
-+  if(HAVE_CXX_LIBATOMICS64)
-+    list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+    check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
-+    if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
-+      message(FATAL_ERROR "Host compiler must support std::atomic!")
-+    endif()
-+  else()
-+    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
-+  endif()
-+endif()
-+
-+## TODO: This define is only used for the legacy atomic operations in
-+## llvm's Atomic.h, which should be replaced.  Other code simply
-+## assumes C++11 <atomic> works.
-+CHECK_CXX_SOURCE_COMPILES("
-+#ifdef _MSC_VER
-+#include <Intrin.h> /* Workaround for PR19898. */
-+#include <windows.h>
-+#endif
-+int main() {
-+#ifdef _MSC_VER
-+        volatile LONG val = 1;
-+        MemoryBarrier();
-+        InterlockedCompareExchange(&val, 0, 1);
-+        InterlockedIncrement(&val);
-+        InterlockedDecrement(&val);
-+#else
-+        volatile unsigned long val = 1;
-+        __sync_synchronize();
-+        __sync_val_compare_and_swap(&val, 1, 0);
-+        __sync_add_and_fetch(&val, 1);
-+        __sync_sub_and_fetch(&val, 1);
-+#endif
-+        return 0;
-+      }
-+" LLVM_HAS_ATOMICS)
-+
-+if( NOT LLVM_HAS_ATOMICS )
-+  message(STATUS "Warning: LLVM will be built thread-unsafe because atomic builtins are missing")
-+endif()
diff --git a/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp b/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
deleted file mode 100644
index b2c595419b..0000000000
--- a/lld/patches/patch-lib_ReaderWriter_ELF_ELFLinkingContext.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 33da90ad98..0000000000
--- a/lld/patches/patch-lib_ReaderWriter_MachO_MachOLinkingContext.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$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