pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Try to handle multilib with librt=builtin
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Fri Jun 8 16:57:46 2018 +0200
Changeset: 06c99a483ecfb005ed992f2bc2eb2c8a001cf1da
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-CMakeLists.txt
compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
Added Files:
compiler-rt-netbsd/patches/patch-cmake_Modules_CompilerRTUtils.cmake
compiler-rt-netbsd/patches/patch-cmake_Modules_HandleCompilerRT.cmake
Log Message:
compiler-rt-netbsd: Try to handle multilib with librt=builtin
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=06c99a483ecfb005ed992f2bc2eb2c8a001cf1da
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 6 ++++--
compiler-rt-netbsd/patches/patch-CMakeLists.txt | 15 +++++++++++++--
.../patches/patch-cmake_Modules_CompilerRTUtils.cmake | 16 ++++++++++++++++
.../patches/patch-cmake_Modules_HandleCompilerRT.cmake | 11 +++++++++++
compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake | 16 ++++++++++++++--
5 files changed, 58 insertions(+), 6 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 7c59b15df1..2268243564 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -1,7 +1,9 @@
$NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
-SHA1 (patch-CMakeLists.txt) = 79d5b0e64ab46624b544ee84734e7a31a8de41df
-SHA1 (patch-cmake_config-ix.cmake) = c2ac835eb5cddaf2d4820b0d21e36e18d29bd1a5
+SHA1 (patch-CMakeLists.txt) = 0fdcf55dbe69cabd031528735420215fa7c671e7
+SHA1 (patch-cmake_Modules_CompilerRTUtils.cmake) = 4867cf598d1b080c7077aaf021cf64effe0c1e54
+SHA1 (patch-cmake_Modules_HandleCompilerRT.cmake) = 2456af23f62cc919aba7358b8af25ef86cc64dc1
+SHA1 (patch-cmake_config-ix.cmake) = 3962a19ae0c07c194e8dbc56ebfc4b2c5e5ff41b
SHA1 (patch-lib_asan_asan__posix.cc) = 0f596061c078eaab0b5b4b183550aa7820677f46
SHA1 (patch-lib_esan_esan__interceptors.cpp) = d65c31b0d44330c669bf6d81a3cfa51954078c32
SHA1 (patch-lib_fuzzer_FuzzerLoop.cpp) = 01456bfacb94c06e008eefc660781d3c7bb1c2e7
diff --git a/compiler-rt-netbsd/patches/patch-CMakeLists.txt b/compiler-rt-netbsd/patches/patch-CMakeLists.txt
index 0212725d70..af64e77e12 100644
--- a/compiler-rt-netbsd/patches/patch-CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-CMakeLists.txt
@@ -2,7 +2,18 @@ $NetBSD$
--- CMakeLists.txt.orig 2018-06-01 09:39:33.000000000 +0000
+++ CMakeLists.txt
-@@ -330,6 +330,10 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuch
+@@ -313,9 +313,7 @@ append_list_if(COMPILER_RT_HAS_WD4800_FL
+ # Set common link flags.
+ append_list_if(COMPILER_RT_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs SANITIZER_COMMON_LINK_FLAGS)
+
+-if (COMPILER_RT_RUNTIME_LIBRARY STREQUAL "builtins")
+- list(APPEND SANITIZER_COMMON_LINK_LIBS ${COMPILER_RT_BUILTINS_LIBRARY})
+-else()
++if (NOT COMPILER_RT_RUNTIME_LIBRARY STREQUAL "builtins")
+ if (ANDROID)
+ append_list_if(COMPILER_RT_HAS_GCC_LIB gcc SANITIZER_COMMON_LINK_LIBS)
+ else()
+@@ -330,6 +328,10 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuch
list(APPEND SANITIZER_COMMON_LINK_LIBS zircon)
endif()
@@ -13,7 +24,7 @@ $NetBSD$
if (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++")
if (SANITIZER_CXX_ABI_INTREE)
if (NOT LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_shared OR HAVE_LIBUNWIND))
-@@ -370,7 +374,7 @@ foreach(path IN ITEMS ${LLVM_MAIN_SRC_DI
+@@ -370,7 +372,7 @@ foreach(path IN ITEMS ${LLVM_MAIN_SRC_DI
${LLVM_MAIN_SRC_DIR}/../libcxx
${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR})
if(IS_DIRECTORY ${path})
diff --git a/compiler-rt-netbsd/patches/patch-cmake_Modules_CompilerRTUtils.cmake b/compiler-rt-netbsd/patches/patch-cmake_Modules_CompilerRTUtils.cmake
new file mode 100644
index 0000000000..21f76bdbe9
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-cmake_Modules_CompilerRTUtils.cmake
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- cmake/Modules/CompilerRTUtils.cmake.orig 2018-06-01 09:39:33.000000000 +0000
++++ cmake/Modules/CompilerRTUtils.cmake
+@@ -140,6 +140,11 @@ macro(test_target_arch arch def)
+
+ set(TARGET_${arch}_CFLAGS ${ARGN})
+ set(TARGET_${arch}_LINK_FLAGS ${ARGN})
++ if (COMPILER_RT_RUNTIME_LIBRARY STREQUAL "builtins")
++ include(HandleCompilerRT)
++ find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY_${arch} ${ARGN})
++ list(APPEND TARGET_${arch}_LINK_FLAGS ${COMPILER_RT_BUILTINS_LIBRARY_${arch}})
++ endif()
+ set(argstring "")
+ foreach(arg ${ARGN})
+ set(argstring "${argstring} ${arg}")
diff --git a/compiler-rt-netbsd/patches/patch-cmake_Modules_HandleCompilerRT.cmake b/compiler-rt-netbsd/patches/patch-cmake_Modules_HandleCompilerRT.cmake
new file mode 100644
index 0000000000..c614a7fe1c
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-cmake_Modules_HandleCompilerRT.cmake
@@ -0,0 +1,11 @@
+$NetBSD$
+
+--- cmake/Modules/HandleCompilerRT.cmake.orig 2018-06-01 09:36:57.000000000 +0000
++++ cmake/Modules/HandleCompilerRT.cmake
+@@ -1,5 +1,5 @@
+ function(find_compiler_rt_library name variable)
+- set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${SANITIZER_COMMON_CFLAGS}
++ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${SANITIZER_COMMON_CFLAGS} ${ARGN}
+ "--rtlib=compiler-rt" "--print-libgcc-file-name")
+ if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET)
+ list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}")
diff --git a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
index a4fa94d64c..daa69ce5ae 100644
--- a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
+++ b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
@@ -2,7 +2,19 @@ $NetBSD$
--- cmake/config-ix.cmake.orig 2018-06-01 09:39:33.000000000 +0000
+++ cmake/config-ix.cmake
-@@ -547,7 +547,7 @@ else()
+@@ -13,10 +13,7 @@ function(check_linker_flag flag out_var)
+ endfunction()
+
+ check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
+-if (COMPILER_RT_RUNTIME_LIBRARY STREQUAL "builtins")
+- include(HandleCompilerRT)
+- find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
+-else()
++if (NOT COMPILER_RT_RUNTIME_LIBRARY STREQUAL "builtins")
+ if (ANDROID)
+ check_library_exists(gcc __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_LIB)
+ else()
+@@ -547,7 +544,7 @@ else()
endif()
if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
@@ -11,7 +23,7 @@ $NetBSD$
set(COMPILER_RT_HAS_PROFILE TRUE)
else()
set(COMPILER_RT_HAS_PROFILE FALSE)
-@@ -595,7 +595,7 @@ else()
+@@ -595,7 +592,7 @@ else()
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
Home |
Main Index |
Thread Index |
Old Index