kfreebsd-support
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 25 Apr 2017 17:46:34 +0000 (17:46 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 25 Apr 2017 17:46:34 +0000 (17:46 +0000)
Gbp-Pq: Name kfreebsd-support.diff

compiler-rt/cmake/config-ix.cmake
lldb/cmake/LLDBDependencies.cmake
lldb/cmake/modules/LLDBConfig.cmake
lldb/scripts/Python/modules/CMakeLists.txt
lldb/scripts/utilsOsType.py
tools/llvm-shlib/CMakeLists.txt

index f8f55401fe5aca329036f55f6c6f005bcb8c69b5..66666e2a21409f1087d90fa701a766bc8f293496 100644 (file)
@@ -560,7 +560,8 @@ endif()
 
 if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
     (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR
-    (OS_NAME MATCHES "Windows" AND MSVC)))
+    (OS_NAME MATCHES "Windows" AND MSVC))
+    AND NOT (OS_NAME STREQUAL "kFreeBSD"))
   set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
 else()
   set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
index 7b5bed78cf457a3afbb880cebdf1c4f52109bf5f..37c4c6fcaac51f5665a95da507e87eda1d10e61d 100644 (file)
@@ -152,10 +152,7 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT __ANDROID_NDK__)
     endif()
   endif()
 endif()
-# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
-  list(APPEND LLDB_SYSTEM_LIBS execinfo)
-endif()
+list(APPEND LLDB_SYSTEM_LIBS ${Backtrace_LIBRARY})
 
 if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
   list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
index f5247a269822416065c0fd02d4e74096e00a60d2..b816313c202c7cdcf5b10086ad08f8a6fbe040b5 100644 (file)
@@ -410,3 +410,5 @@ if (NOT LLDB_DISABLE_CURSES)
     list(APPEND system_libs ${CURSES_LIBRARIES})
     include_directories(${CURSES_INCLUDE_DIR})
 endif ()
+
+find_package(Backtrace REQUIRED)
index 396d447ff267a20ea9adfaa658cf23695f3dc07e..09819e5d2a0b94567c0289a1beac3da507d5daf3 100644 (file)
@@ -5,7 +5,7 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
 endif ()
 
-# build the Python readline suppression module only on Linux
-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__)
+# build the Python readline suppression module only on Linux or GNU systems
+if ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT __ANDROID_NDK__)
    add_subdirectory(readline)
 endif()
index a2f0563bf8951c8f881bc5bb44db8131c4e406ab..6c82f55b0efaec46767890d3f986a688dc1e8e5d 100644 (file)
@@ -35,6 +35,7 @@ if sys.version_info.major >= 3:
         Linux = 3
         NetBSD = 4
         Windows = 5
+        kFreeBSD = 6
 else:
     class EnumOsType(object):
         values = ["Unknown",
@@ -42,7 +43,8 @@ else:
                   "FreeBSD",
                   "Linux",
                   "NetBSD",
-                  "Windows"]
+                  "Windows",
+                  "kFreeBSD"]
         class __metaclass__(type):
 #++---------------------------------------------------------------------------
 # Details:  Fn acts as an enumeration.
@@ -86,5 +88,7 @@ def determine_os_type():
         eOSType = EnumOsType.NetBSD
     elif strOS == "win32":
         eOSType = EnumOsType.Windows
+    elif strOS.startswith("gnukfreebsd"):
+        eOSType = EnumOsType.kFreeBSD
 
     return eOSType
index 755d141ccc66dddd18cdc3649e5d95707c6c8103..87658019022dc7c33870e628c81c35aa3179c105 100644 (file)
@@ -42,7 +42,7 @@ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
 set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
 
 list(REMOVE_DUPLICATES LIB_NAMES)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf"
   # GNU ld doesn't resolve symbols in the version script.
   set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")