mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-27 12:26:41 +00:00
rebase of the patch for v8
This commit is contained in:
parent
1334346979
commit
6de1dbd14a
237
debian/patches/kfreebsd/compiler-rt_lib.diff
vendored
237
debian/patches/kfreebsd/compiler-rt_lib.diff
vendored
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -86,9 +86,14 @@
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -84,9 +84,14 @@
|
||||
extern "C" {
|
||||
// <sys/umtx.h> must be included after <errno.h> and <sys/types.h> on
|
||||
// FreeBSD 9.2 and 10.0.
|
||||
@ -17,9 +17,9 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux.c
|
||||
#endif // SANITIZER_FREEBSD
|
||||
|
||||
#if SANITIZER_NETBSD
|
||||
@@ -466,10 +471,12 @@ bool FileExists(const char *filename) {
|
||||
}
|
||||
@@ -468,10 +473,12 @@ bool FileExists(const char *filename) {
|
||||
|
||||
#if !SANITIZER_NETBSD
|
||||
tid_t GetTid() {
|
||||
-#if SANITIZER_FREEBSD
|
||||
+#if SANITIZER_FREEBSD && !SANITIZER_KFREEBSD
|
||||
@ -30,8 +30,8 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux.c
|
||||
+ return (uptr)pthread_self();
|
||||
#elif SANITIZER_OPENBSD
|
||||
return internal_syscall(SYSCALL(getthrid));
|
||||
#elif SANITIZER_NETBSD
|
||||
@@ -1143,10 +1150,10 @@ bool LibraryNameIs(const char *full_name
|
||||
#elif SANITIZER_SOLARIS
|
||||
@@ -1167,10 +1174,10 @@ bool LibraryNameIs(const char *full_name
|
||||
// Call cb for each region mapped by map.
|
||||
void ForEachMappedRegion(link_map *map, void (*cb)(const void *, uptr)) {
|
||||
CHECK_NE(map, nullptr);
|
||||
@ -44,11 +44,11 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux.c
|
||||
char *base = (char *)map->l_addr;
|
||||
Elf_Ehdr *ehdr = (Elf_Ehdr *)base;
|
||||
char *phdrs = base + ehdr->e_phoff;
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
@@ -35,10 +35,12 @@
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
|
||||
@@ -36,10 +36,12 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#if SANITIZER_FREEBSD
|
||||
@ -63,7 +63,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_l
|
||||
#endif
|
||||
|
||||
#if SANITIZER_OPENBSD
|
||||
@@ -523,9 +525,9 @@ void GetThreadStackAndTls(bool main, upt
|
||||
@@ -528,9 +530,9 @@ void GetThreadStackAndTls(bool main, upt
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -75,10 +75,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_l
|
||||
#define Elf_Phdr XElf32_Phdr
|
||||
#define dl_phdr_info xdl_phdr_info
|
||||
#define dl_iterate_phdr(c, b) xdl_iterate_phdr((c), (b))
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
|
||||
@@ -16,7 +16,7 @@
|
||||
#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \
|
||||
!defined(__OpenBSD__) && !defined(__APPLE__) && !defined(_WIN32) && \
|
||||
@ -118,11 +118,11 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
|
||||
#if __LP64__ || defined(_WIN64)
|
||||
# define SANITIZER_WORDSIZE 64
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
@@ -49,7 +49,7 @@
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
|
||||
@ -131,40 +131,42 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
#include <net/route.h>
|
||||
#endif
|
||||
|
||||
@@ -86,7 +86,11 @@
|
||||
# include <sys/signal.h>
|
||||
# include <sys/timespec.h>
|
||||
# include <sys/timex.h>
|
||||
@@ -109,7 +109,11 @@ typedef struct user_fpregs elf_fpregset_
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
#include <glob.h>
|
||||
#include <obstack.h>
|
||||
-#include <mqueue.h>
|
||||
+#if SANITIZER_KFREEBSD
|
||||
+# include <mqueue.h>
|
||||
+#else
|
||||
# include <sys/mqueue.h>
|
||||
+# include <sys/mqueue.h>
|
||||
+#endif
|
||||
# include <sys/msg.h>
|
||||
# include <sys/ipc.h>
|
||||
# include <sys/msg.h>
|
||||
@@ -95,7 +99,11 @@
|
||||
# include <sys/mtio.h>
|
||||
# include <sys/consio.h>
|
||||
# include <sys/kbio.h>
|
||||
#include <net/if_ppp.h>
|
||||
#include <netax25/ax25.h>
|
||||
#include <netipx/ipx.h>
|
||||
@@ -146,6 +150,12 @@ typedef struct user_fpregs elf_fpregset_
|
||||
#include <linux/if_ppp.h>
|
||||
#endif
|
||||
|
||||
+#if SANITIZER_KFREEBSD
|
||||
+# include <link.h>
|
||||
+#else
|
||||
# include <sys/link_elf.h>
|
||||
+# include <sys/link_elf.h>
|
||||
+#endif
|
||||
# include <netinet/ip_mroute.h>
|
||||
# include <netinet/in.h>
|
||||
# include <net/ethernet.h>
|
||||
@@ -286,7 +294,7 @@ namespace __sanitizer {
|
||||
+
|
||||
#if SANITIZER_LINUX
|
||||
#include <link.h>
|
||||
#include <sys/vfs.h>
|
||||
@@ -256,7 +266,7 @@ namespace __sanitizer {
|
||||
#endif
|
||||
|
||||
|
||||
-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
|
||||
+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_KFREEBSD
|
||||
-#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_KFREEBSD
|
||||
unsigned struct_shminfo_sz = sizeof(struct shminfo);
|
||||
unsigned struct_shm_info_sz = sizeof(struct shm_info);
|
||||
int shmctl_ipc_stat = (int)IPC_STAT;
|
||||
@@ -316,7 +324,7 @@ namespace __sanitizer {
|
||||
@@ -286,7 +296,7 @@ namespace __sanitizer {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -173,7 +175,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
|
||||
#elif SANITIZER_FREEBSD
|
||||
unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
|
||||
@@ -496,7 +504,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
@@ -466,7 +476,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
#endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
|
||||
|
||||
@ -182,16 +184,16 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
|
||||
unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);
|
||||
#endif
|
||||
@@ -547,7 +555,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
@@ -519,7 +529,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
|
||||
unsigned IOCTL_TIOCSTI = TIOCSTI;
|
||||
unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
|
||||
-#if ((SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID)
|
||||
+#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_KFREEBSD
|
||||
-#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
+#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_KFREEBSD
|
||||
unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
|
||||
unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
|
||||
#endif
|
||||
@@ -989,7 +997,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
|
||||
@@ -958,7 +968,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
|
||||
CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
|
||||
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
|
||||
|
||||
@ -200,7 +202,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_TYPE_SIZE(glob_t);
|
||||
CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
|
||||
CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
|
||||
@@ -1009,8 +1017,10 @@ CHECK_SIZE_AND_OFFSET(addrinfo, ai_sockt
|
||||
@@ -978,8 +988,10 @@ CHECK_SIZE_AND_OFFSET(addrinfo, ai_sockt
|
||||
CHECK_SIZE_AND_OFFSET(addrinfo, ai_protocol);
|
||||
CHECK_SIZE_AND_OFFSET(addrinfo, ai_protocol);
|
||||
CHECK_SIZE_AND_OFFSET(addrinfo, ai_addrlen);
|
||||
@ -211,7 +213,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
|
||||
CHECK_TYPE_SIZE(hostent);
|
||||
CHECK_SIZE_AND_OFFSET(hostent, h_name);
|
||||
@@ -1032,7 +1042,9 @@ CHECK_SIZE_AND_OFFSET(msghdr, msg_contro
|
||||
@@ -1001,7 +1013,9 @@ CHECK_SIZE_AND_OFFSET(msghdr, msg_contro
|
||||
CHECK_SIZE_AND_OFFSET(msghdr, msg_controllen);
|
||||
CHECK_SIZE_AND_OFFSET(msghdr, msg_flags);
|
||||
|
||||
@ -221,7 +223,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
|
||||
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
|
||||
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
|
||||
@@ -1074,7 +1086,9 @@ CHECK_SIZE_AND_OFFSET(pollfd, fd);
|
||||
@@ -1043,7 +1057,9 @@ CHECK_SIZE_AND_OFFSET(pollfd, fd);
|
||||
CHECK_SIZE_AND_OFFSET(pollfd, events);
|
||||
CHECK_SIZE_AND_OFFSET(pollfd, revents);
|
||||
|
||||
@ -231,7 +233,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
|
||||
CHECK_TYPE_SIZE(sigset_t);
|
||||
|
||||
@@ -1114,7 +1128,9 @@ CHECK_TYPE_SIZE(__kernel_fd_set);
|
||||
@@ -1083,7 +1099,9 @@ CHECK_TYPE_SIZE(__kernel_fd_set);
|
||||
#endif
|
||||
|
||||
#if !SANITIZER_ANDROID
|
||||
@ -241,7 +243,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_SIZE_AND_OFFSET(wordexp_t, we_wordc);
|
||||
CHECK_SIZE_AND_OFFSET(wordexp_t, we_wordv);
|
||||
CHECK_SIZE_AND_OFFSET(wordexp_t, we_offs);
|
||||
@@ -1147,13 +1163,14 @@ CHECK_TYPE_SIZE(ether_addr);
|
||||
@@ -1116,13 +1134,14 @@ CHECK_TYPE_SIZE(ether_addr);
|
||||
|
||||
#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
|
||||
CHECK_TYPE_SIZE(ipc_perm);
|
||||
@ -259,7 +261,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
|
||||
@@ -1192,7 +1209,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netma
|
||||
@@ -1161,7 +1180,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netma
|
||||
#ifdef ifa_dstaddr
|
||||
#undef ifa_dstaddr
|
||||
#endif
|
||||
@ -268,7 +270,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
|
||||
# else
|
||||
COMPILER_CHECK(sizeof(((__sanitizer_ifaddrs *)nullptr)->ifa_dstaddr) ==
|
||||
@@ -1218,15 +1235,19 @@ CHECK_SIZE_AND_OFFSET(timeb, timezone);
|
||||
@@ -1187,15 +1206,19 @@ CHECK_SIZE_AND_OFFSET(timeb, timezone);
|
||||
CHECK_SIZE_AND_OFFSET(timeb, dstflag);
|
||||
#endif
|
||||
|
||||
@ -289,7 +291,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_SIZE_AND_OFFSET(passwd, pw_gecos);
|
||||
#endif
|
||||
|
||||
@@ -1292,7 +1313,7 @@ CHECK_SIZE_AND_OFFSET(cookie_io_function
|
||||
@@ -1261,7 +1284,7 @@ CHECK_SIZE_AND_OFFSET(cookie_io_function
|
||||
CHECK_SIZE_AND_OFFSET(cookie_io_functions_t, close);
|
||||
#endif
|
||||
|
||||
@ -298,36 +300,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platfor
|
||||
CHECK_TYPE_SIZE(sem_t);
|
||||
#endif
|
||||
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/asan/asan_linux.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "sanitizer_internal_defs.h"
|
||||
#include "sanitizer_platform.h"
|
||||
|
||||
-#if SANITIZER_FREEBSD
|
||||
+#if SANITIZER_FREEBSD && !SANITIZER_KFREEBSD
|
||||
// FreeBSD's dlopen() returns a pointer to an Obj_Entry structure that
|
||||
// incorporates the map structure.
|
||||
# define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
@@ -43,7 +43,7 @@
|
||||
# else
|
||||
# define internal_syscall_ptr syscall
|
||||
# endif
|
||||
-#elif defined(__x86_64__) && (SANITIZER_FREEBSD || SANITIZER_MAC)
|
||||
+#elif defined(__x86_64__) && ((SANITIZER_FREEBSD && !SANITIZER_KFREEBSD) || SANITIZER_MAC)
|
||||
# define internal_syscall __syscall
|
||||
# define internal_syscall64 __syscall
|
||||
# define internal_syscall_ptr __syscall
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/asan/asan_linux.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/asan/asan_linux.cc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/asan/asan_linux.cc
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/asan/asan_linux.cc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/asan/asan_linux.cc
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
@ -358,10 +334,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/asan/asan_linux.cc
|
||||
#define ucontext_t xucontext_t
|
||||
#endif
|
||||
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
// Other platforms should be easy to add, and probably work as-is.
|
||||
@ -371,38 +347,38 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/ubsan/ubsan_platform.h
|
||||
(defined(__sun__) && defined(__svr4__)) || \
|
||||
defined(_WIN32) || defined(__Fuchsia__) || defined(__rtems__)
|
||||
# define CAN_SANITIZE_UB 1
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
@@ -196,7 +196,7 @@ ASM_SYMBOL_INTERCEPTOR(setjmp):
|
||||
#elif defined(__APPLE__)
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
@@ -197,7 +197,7 @@ ASM_SYMBOL_INTERCEPTOR(setjmp):
|
||||
lea 16(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xorq ___tsan_darwin_setjmp_xor_key(%rip), %rsi
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||
lea 16(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xor %fs:0x30, %rsi // magic mangling of rsp (see libc setjmp)
|
||||
@@ -244,7 +244,7 @@ ASM_SYMBOL_INTERCEPTOR(_setjmp):
|
||||
#elif defined(__APPLE__)
|
||||
@@ -246,7 +246,7 @@ ASM_SYMBOL_INTERCEPTOR(_setjmp):
|
||||
lea 16(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xorq ___tsan_darwin_setjmp_xor_key(%rip), %rsi
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||
lea 16(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xor %fs:0x30, %rsi // magic mangling of rsp (see libc setjmp)
|
||||
@@ -299,7 +299,7 @@ ASM_SYMBOL_INTERCEPTOR(sigsetjmp):
|
||||
#elif defined(__APPLE__)
|
||||
@@ -302,7 +302,7 @@ ASM_SYMBOL_INTERCEPTOR(sigsetjmp):
|
||||
lea 32(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xorq ___tsan_darwin_setjmp_xor_key(%rip), %rsi
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||
lea 32(%rsp), %rdi
|
||||
mov %rdi, %rsi
|
||||
xor %fs:0x30, %rsi // magic mangling of rsp (see libc setjmp)
|
||||
@@ -386,7 +386,7 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp):
|
||||
@@ -389,7 +389,7 @@ ASM_SYMBOL_INTERCEPTOR(__sigsetjmp):
|
||||
ASM_SIZE(ASM_SYMBOL_INTERCEPTOR(__sigsetjmp))
|
||||
#endif // !defined(__APPLE__) && !defined(__NetBSD__)
|
||||
|
||||
@ -411,10 +387,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
|
||||
/* We do not need executable stack. */
|
||||
/* This note is not needed on NetBSD. */
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
@@ -54,6 +54,15 @@
|
||||
#define LIBFUZZER_FREEBSD 1
|
||||
#define LIBFUZZER_OPENBSD 0
|
||||
@ -431,7 +407,7 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
#elif __OpenBSD__
|
||||
#define LIBFUZZER_APPLE 0
|
||||
#define LIBFUZZER_FUCHSIA 0
|
||||
@@ -88,7 +97,7 @@
|
||||
@@ -95,7 +104,7 @@
|
||||
|
||||
#define LIBFUZZER_POSIX \
|
||||
(LIBFUZZER_APPLE || LIBFUZZER_LINUX || LIBFUZZER_NETBSD || \
|
||||
@ -440,10 +416,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
|
||||
#ifdef __x86_64
|
||||
# if __has_attribute(target)
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
@@ -119,7 +119,7 @@ size_t GetPeakRSSMb() {
|
||||
if (getrusage(RUSAGE_SELF, &usage))
|
||||
return 0;
|
||||
@ -453,10 +429,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
|
||||
// ru_maxrss is in KiB
|
||||
return usage.ru_maxrss >> 10;
|
||||
} else if (LIBFUZZER_APPLE) {
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "FuzzerDefs.h"
|
||||
|
||||
@ -466,10 +442,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
|
||||
__attribute__((weak)) extern uint8_t __start___libfuzzer_extra_counters;
|
||||
__attribute__((weak)) extern uint8_t __stop___libfuzzer_extra_counters;
|
||||
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include "FuzzerDefs.h"
|
||||
@ -479,10 +455,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
|
||||
|
||||
#include "FuzzerExtFunctions.h"
|
||||
#include "FuzzerIO.h"
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
@@ -10,7 +10,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include "FuzzerDefs.h"
|
||||
@ -492,10 +468,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
|
||||
#include "FuzzerCommand.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h
|
||||
@@ -21,7 +21,7 @@
|
||||
// 32-bit mode.
|
||||
#if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32)
|
||||
@ -505,10 +481,10 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_freebsd
|
||||
# include <link.h>
|
||||
# include <sys/param.h>
|
||||
# include <ucontext.h>
|
||||
Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
+++ llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_bsd.cc
|
||||
@@ -38,7 +38,7 @@
|
||||
// Fix 'kinfo_vmentry' definition on FreeBSD prior v9.2 in 32-bit mode.
|
||||
#if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32)
|
||||
@ -518,3 +494,30 @@ Index: llvm-toolchain-7-7.0.1/compiler-rt/lib/sanitizer_common/sanitizer_procmap
|
||||
#define kinfo_vmentry xkinfo_vmentry
|
||||
#endif
|
||||
#endif
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "sanitizer_internal_defs.h"
|
||||
#include "sanitizer_platform.h"
|
||||
|
||||
+#if !SANITIZER_KFREEBSD
|
||||
# define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle))
|
||||
+#endif
|
||||
|
||||
#ifndef __GLIBC_PREREQ
|
||||
#define __GLIBC_PREREQ(x, y) 0
|
||||
Index: llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
===================================================================
|
||||
--- llvm-toolchain-8-8~+rc1.orig/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
+++ llvm-toolchain-8-8~+rc1/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc
|
||||
@@ -20,7 +20,7 @@
|
||||
# define SYSCALL(name) __NR_ ## name
|
||||
#endif
|
||||
|
||||
-#if defined(__x86_64__) && (SANITIZER_FREEBSD || SANITIZER_MAC)
|
||||
+#if defined(__x86_64__) && ((SANITIZER_FREEBSD && !SANITIZER_KFREEBSD) || SANITIZER_MAC)
|
||||
# define internal_syscall __syscall
|
||||
# else
|
||||
# define internal_syscall syscall
|
||||
|
99
debian/patches/kfreebsd/kfreebsd-openmp.diff
vendored
99
debian/patches/kfreebsd/kfreebsd-openmp.diff
vendored
@ -1,9 +1,9 @@
|
||||
Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp.h
|
||||
Index: llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/openmp/runtime/src/kmp.h
|
||||
+++ llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp.h
|
||||
@@ -1052,6 +1052,10 @@ extern kmp_uint64 __kmp_now_nsec();
|
||||
/* TODO: tune for KMP_OS_HURD */
|
||||
--- llvm-toolchain-8-8~+rc1.orig/openmp/runtime/src/kmp.h
|
||||
+++ llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp.h
|
||||
@@ -1077,6 +1077,10 @@ extern kmp_uint64 __kmp_now_nsec();
|
||||
/* TODO: tune for KMP_OS_OPENBSD */
|
||||
#define KMP_INIT_WAIT 1024U /* initial number of spin-tests */
|
||||
#define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */
|
||||
+#elif KMP_OS_KFREEBSD
|
||||
@ -13,32 +13,32 @@ Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp.h
|
||||
#endif
|
||||
|
||||
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||
Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_ftn_entry.h
|
||||
Index: llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_ftn_entry.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/openmp/runtime/src/kmp_ftn_entry.h
|
||||
+++ llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_ftn_entry.h
|
||||
@@ -369,7 +369,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_
|
||||
#else
|
||||
--- llvm-toolchain-8-8~+rc1.orig/openmp/runtime/src/kmp_ftn_entry.h
|
||||
+++ llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_ftn_entry.h
|
||||
@@ -535,7 +535,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_
|
||||
int gtid;
|
||||
|
||||
-#if KMP_OS_DARWIN || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
|
||||
+#if KMP_OS_DARWIN || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#if KMP_OS_DARWIN || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_HURD
|
||||
+ KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
gtid = __kmp_entry_gtid();
|
||||
#elif KMP_OS_WINDOWS
|
||||
if (!__kmp_init_parallel ||
|
||||
Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_platform.h
|
||||
Index: llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_platform.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/openmp/runtime/src/kmp_platform.h
|
||||
+++ llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_platform.h
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
--- llvm-toolchain-8-8~+rc1.orig/openmp/runtime/src/kmp_platform.h
|
||||
+++ llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_platform.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#define KMP_OS_LINUX 0
|
||||
#define KMP_OS_DRAGONFLY 0
|
||||
#define KMP_OS_FREEBSD 0
|
||||
+#define KMP_OS_KFREEBSD 0
|
||||
#define KMP_OS_NETBSD 0
|
||||
#define KMP_OS_OPENBSD 0
|
||||
#define KMP_OS_DARWIN 0
|
||||
#define KMP_OS_WINDOWS 0
|
||||
@@ -50,6 +51,11 @@
|
||||
@@ -57,6 +58,11 @@
|
||||
#define KMP_OS_FREEBSD 1
|
||||
#endif
|
||||
|
||||
@ -50,34 +50,35 @@ Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_platform.h
|
||||
#if (defined __NetBSD__)
|
||||
#undef KMP_OS_NETBSD
|
||||
#define KMP_OS_NETBSD 1
|
||||
@@ -67,11 +73,11 @@
|
||||
@@ -79,12 +85,12 @@
|
||||
|
||||
#if (1 != \
|
||||
KMP_OS_LINUX + KMP_OS_FREEBSD + KMP_OS_NETBSD + KMP_OS_DARWIN + \
|
||||
- KMP_OS_WINDOWS + KMP_OS_HURD)
|
||||
+ KMP_OS_WINDOWS + KMP_OS_HURD + KMP_OS_KFREEBSD)
|
||||
KMP_OS_LINUX + KMP_OS_DRAGONFLY + KMP_OS_FREEBSD + KMP_OS_NETBSD + \
|
||||
- KMP_OS_OPENBSD + KMP_OS_DARWIN + KMP_OS_WINDOWS + KMP_OS_HURD)
|
||||
+ KMP_OS_OPENBSD + KMP_OS_DARWIN + KMP_OS_WINDOWS + KMP_OS_HURD + KMP_OS_KFREEBSD)
|
||||
#error Unknown OS
|
||||
#endif
|
||||
|
||||
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DARWIN || KMP_OS_HURD
|
||||
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_KFREEBSD || KMP_OS_NETBSD || KMP_OS_DARWIN || KMP_OS_HURD
|
||||
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_OPENBSD || KMP_OS_DARWIN || KMP_OS_HURD
|
||||
+ KMP_OS_OPENBSD || KMP_OS_DARWIN || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#undef KMP_OS_UNIX
|
||||
#define KMP_OS_UNIX 1
|
||||
#endif
|
||||
Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_runtime.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_runtime.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/openmp/runtime/src/kmp_runtime.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_runtime.cpp
|
||||
@@ -7643,7 +7643,7 @@ __kmp_determine_reduction_method(
|
||||
--- llvm-toolchain-8-8~+rc1.orig/openmp/runtime/src/kmp_runtime.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/openmp/runtime/src/kmp_runtime.cpp
|
||||
@@ -8076,7 +8076,7 @@ __kmp_determine_reduction_method(
|
||||
#if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64
|
||||
|
||||
#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS || \
|
||||
- KMP_OS_DARWIN || KMP_OS_HURD
|
||||
+ KMP_OS_DARWIN || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_OPENBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN || KMP_OS_HURD
|
||||
+ KMP_OS_OPENBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
|
||||
int teamsize_cutoff = 4;
|
||||
|
||||
@@ -7670,7 +7670,7 @@ __kmp_determine_reduction_method(
|
||||
@@ -8104,7 +8104,7 @@ __kmp_determine_reduction_method(
|
||||
|
||||
#elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
|
||||
|
||||
@ -86,38 +87,38 @@ Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/kmp_runtime.cpp
|
||||
|
||||
// basic tuning
|
||||
|
||||
Index: llvm-toolchain-7-7.0.1/openmp/runtime/src/z_Linux_util.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/openmp/runtime/src/z_Linux_util.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/openmp/runtime/src/z_Linux_util.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/openmp/runtime/src/z_Linux_util.cpp
|
||||
@@ -444,7 +444,7 @@ void __kmp_terminate_thread(int gtid) {
|
||||
determined exactly, FALSE if incremental refinement is necessary. */
|
||||
--- llvm-toolchain-8-8~+rc1.orig/openmp/runtime/src/z_Linux_util.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/openmp/runtime/src/z_Linux_util.cpp
|
||||
@@ -448,7 +448,7 @@ void __kmp_terminate_thread(int gtid) {
|
||||
static kmp_int32 __kmp_set_stack_info(int gtid, kmp_info_t *th) {
|
||||
int stack_data;
|
||||
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
|
||||
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_HURD
|
||||
+ KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
pthread_attr_t attr;
|
||||
int status;
|
||||
size_t size = 0;
|
||||
@@ -496,7 +496,7 @@ static void *__kmp_launch_worker(void *t
|
||||
sigset_t new_set, old_set;
|
||||
@@ -502,7 +502,7 @@ static void *__kmp_launch_worker(void *t
|
||||
#endif /* KMP_BLOCK_SIGNALS */
|
||||
void *exit_val;
|
||||
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
|
||||
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_OPENBSD || KMP_OS_HURD
|
||||
+ KMP_OS_OPENBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
void *volatile padding = 0;
|
||||
#endif
|
||||
int gtid;
|
||||
@@ -1764,7 +1764,7 @@ static int __kmp_get_xproc(void) {
|
||||
|
||||
@@ -1772,7 +1772,7 @@ static int __kmp_get_xproc(void) {
|
||||
int r = 0;
|
||||
|
||||
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
|
||||
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \
|
||||
- KMP_OS_OPENBSD || KMP_OS_HURD
|
||||
+ KMP_OS_OPENBSD || KMP_OS_HURD || KMP_OS_KFREEBSD
|
||||
|
||||
r = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
||||
@@ -1952,7 +1952,7 @@ int __kmp_is_address_mapped(void *addr)
|
||||
@@ -1967,7 +1967,7 @@ int __kmp_is_address_mapped(void *addr)
|
||||
int found = 0;
|
||||
int rc;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/CMakeLists.txt
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/clang/lib/Driver/CMakeLists.txt
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/CMakeLists.txt
|
||||
@@ -48,6 +48,7 @@ add_clang_library(clangDriver
|
||||
--- llvm-toolchain-8-8~+rc1.orig/clang/lib/Driver/CMakeLists.txt
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/CMakeLists.txt
|
||||
@@ -49,6 +49,7 @@ add_clang_library(clangDriver
|
||||
ToolChains/HIP.cpp
|
||||
ToolChains/Hexagon.cpp
|
||||
ToolChains/Hurd.cpp
|
||||
@ -10,10 +10,10 @@ Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/CMakeLists.txt
|
||||
ToolChains/Linux.cpp
|
||||
ToolChains/MipsLinux.cpp
|
||||
ToolChains/MinGW.cpp
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/Driver.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/Driver.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/clang/lib/Driver/Driver.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/Driver.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/clang/lib/Driver/Driver.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/Driver.cpp
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "ToolChains/Haiku.h"
|
||||
#include "ToolChains/Hexagon.h"
|
||||
@ -21,8 +21,8 @@ Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/Driver.cpp
|
||||
+#include "ToolChains/KFreeBSD.h"
|
||||
#include "ToolChains/Lanai.h"
|
||||
#include "ToolChains/Linux.h"
|
||||
#include "ToolChains/MSVC.h"
|
||||
@@ -4320,6 +4321,9 @@ const ToolChain &Driver::getToolChain(co
|
||||
#include "ToolChains/MSP430.h"
|
||||
@@ -4546,6 +4547,9 @@ const ToolChain &Driver::getToolChain(co
|
||||
case llvm::Triple::FreeBSD:
|
||||
TC = llvm::make_unique<toolchains::FreeBSD>(*this, Target, Args);
|
||||
break;
|
||||
@ -32,24 +32,24 @@ Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/Driver.cpp
|
||||
case llvm::Triple::Minix:
|
||||
TC = llvm::make_unique<toolchains::Minix>(*this, Target, Args);
|
||||
break;
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
@@ -528,7 +528,7 @@ static bool useFramePointerForTargetByDe
|
||||
return !areOptimizationsEnabled(Args);
|
||||
--- llvm-toolchain-8-8~+rc1.orig/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
@@ -535,7 +535,7 @@ static bool useFramePointerForTargetByDe
|
||||
}
|
||||
|
||||
- if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI || Triple.isOSHurd()) {
|
||||
+ if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI || Triple.isOSHurd() || Triple.isOSkFreeBSD()) {
|
||||
if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI ||
|
||||
- Triple.isOSHurd()) {
|
||||
+ Triple.isOSHurd() || Triple.isOSkFreeBSD()) {
|
||||
switch (Triple.getArch()) {
|
||||
// Don't use a frame pointer on linux if optimizing for certain targets.
|
||||
case llvm::Triple::mips64:
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -499,6 +499,18 @@ void tools::gnutools::Linker::ConstructJ
|
||||
--- llvm-toolchain-8-8~+rc1.orig/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -522,6 +522,18 @@ void tools::gnutools::Linker::ConstructJ
|
||||
CmdArgs.push_back("--wrap=pthread_create");
|
||||
|
||||
CmdArgs.push_back("-lc");
|
||||
@ -68,32 +68,29 @@ Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
|
||||
// Add IAMCU specific libs, if needed.
|
||||
if (IsIAMCU)
|
||||
@@ -1836,7 +1848,8 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
@@ -1898,7 +1910,8 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
||||
"x86_64-slackware-linux", "x86_64-unknown-linux",
|
||||
- "x86_64-amazon-linux"};
|
||||
+ "x86_64-amazon-linux", "x86_64-kfreebsd-gnu",
|
||||
+ "x86_64-pc-kfreebsd-gnu"};
|
||||
static const char *const X32LibDirs[] = {"/libx32", "/lib"};
|
||||
static const char *const X32Triples[] = {
|
||||
"x86_64-linux-gnux32", "x86_64-unknown-linux-gnux32",
|
||||
@@ -1847,8 +1860,9 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
|
||||
- "x86_64-amazon-linux", "x86_64-linux-android"};
|
||||
+ "x86_64-amazon-linux", "x86_64-linux-android",
|
||||
+ "x86_64-kfreebsd-gnu", "x86_64-pc-kfreebsd-gnu"};
|
||||
static const char *const X32LibDirs[] = {"/libx32"};
|
||||
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
|
||||
static const char *const X86Triples[] = {
|
||||
@@ -1907,6 +1920,8 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
||||
"i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
|
||||
- "i386-gnu", "i486-gnu", "i586-gnu",
|
||||
- "i686-gnu"};
|
||||
"i686-linux-android", "i386-gnu", "i486-gnu",
|
||||
+ "i686-kfreebsd-gnu", "i686-pc-kfreebsd-gnu", "i486-kfreebsd-gnu",
|
||||
+ "i386-kfreebsd-gnu", "i386-gnu", "i486-gnu",
|
||||
+ "i586-gnu", "i686-gnu"};
|
||||
+ "i386-kfreebsd-gnu",
|
||||
"i586-gnu", "i686-gnu"};
|
||||
|
||||
static const char *const MIPSLibDirs[] = {"/lib"};
|
||||
static const char *const MIPSTriples[] = {"mips-linux-gnu", "mips-mti-linux",
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/KFreeBSD.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/KFreeBSD.cpp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/KFreeBSD.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/KFreeBSD.cpp
|
||||
@@ -0,0 +1,459 @@
|
||||
+//===--- KFreeBSD.cpp - kFreeBSD ToolChain Implementations --------*- C++ -*-===//
|
||||
+//
|
||||
@ -554,10 +551,10 @@ Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/KFreeBSD.cpp
|
||||
+ return Res;
|
||||
+}
|
||||
+
|
||||
Index: llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/KFreeBSD.h
|
||||
Index: llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/KFreeBSD.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ llvm-toolchain-7-7.0.1/clang/lib/Driver/ToolChains/KFreeBSD.h
|
||||
+++ llvm-toolchain-8-8~+rc1/clang/lib/Driver/ToolChains/KFreeBSD.h
|
||||
@@ -0,0 +1,54 @@
|
||||
+//===--- KFreeBSD.h - kFreeBSD ToolChain Implementations ----------*- C++ -*-===//
|
||||
+//
|
||||
|
25
debian/patches/kfreebsd/lib_Support.diff
vendored
25
debian/patches/kfreebsd/lib_Support.diff
vendored
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/lib/Support/Triple.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/lib/Support/Triple.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lib/Support/Triple.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/lib/Support/Triple.cpp
|
||||
@@ -185,7 +185,7 @@ StringRef Triple::getOSTypeName(OSType K
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lib/Support/Triple.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/lib/Support/Triple.cpp
|
||||
@@ -182,7 +182,7 @@ StringRef Triple::getOSTypeName(OSType K
|
||||
case FreeBSD: return "freebsd";
|
||||
case Fuchsia: return "fuchsia";
|
||||
case IOS: return "ios";
|
||||
@ -11,7 +11,7 @@ Index: llvm-toolchain-7-7.0.1/lib/Support/Triple.cpp
|
||||
case Linux: return "linux";
|
||||
case Lv2: return "lv2";
|
||||
case MacOSX: return "macosx";
|
||||
@@ -478,7 +478,7 @@ static Triple::OSType parseOS(StringRef
|
||||
@@ -479,7 +479,7 @@ static Triple::OSType parseOS(StringRef
|
||||
.StartsWith("freebsd", Triple::FreeBSD)
|
||||
.StartsWith("fuchsia", Triple::Fuchsia)
|
||||
.StartsWith("ios", Triple::IOS)
|
||||
@ -20,18 +20,11 @@ Index: llvm-toolchain-7-7.0.1/lib/Support/Triple.cpp
|
||||
.StartsWith("linux", Triple::Linux)
|
||||
.StartsWith("lv2", Triple::Lv2)
|
||||
.StartsWith("macos", Triple::MacOSX)
|
||||
Index: llvm-toolchain-7-7.0.1/lib/Support/Unix/Path.inc
|
||||
Index: llvm-toolchain-8-8~+rc1/lib/Support/Unix/Path.inc
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lib/Support/Unix/Path.inc
|
||||
+++ llvm-toolchain-7-7.0.1/lib/Support/Unix/Path.inc
|
||||
@@ -54,13 +54,13 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
|
||||
- !defined(__linux__)
|
||||
+ !defined(__linux__) && !defined(__FreeBSD_kernel__)
|
||||
#include <sys/statvfs.h>
|
||||
#define STATVFS statvfs
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lib/Support/Unix/Path.inc
|
||||
+++ llvm-toolchain-8-8~+rc1/lib/Support/Unix/Path.inc
|
||||
@@ -62,7 +62,7 @@
|
||||
#define FSTATVFS fstatvfs
|
||||
#define STATVFS_F_FRSIZE(vfs) vfs.f_frsize
|
||||
#else
|
||||
|
16
debian/patches/kfreebsd/lib_Target_X86.diff
vendored
16
debian/patches/kfreebsd/lib_Target_X86.diff
vendored
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/lib/Target/X86/X86Subtarget.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/lib/Target/X86/X86Subtarget.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lib/Target/X86/X86Subtarget.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/lib/Target/X86/X86Subtarget.cpp
|
||||
@@ -270,7 +270,7 @@ void X86Subtarget::initSubtargetFeatures
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lib/Target/X86/X86Subtarget.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/lib/Target/X86/X86Subtarget.cpp
|
||||
@@ -284,7 +284,7 @@ void X86Subtarget::initSubtargetFeatures
|
||||
if (StackAlignOverride)
|
||||
stackAlignment = StackAlignOverride;
|
||||
else if (isTargetDarwin() || isTargetLinux() || isTargetSolaris() ||
|
||||
@ -11,11 +11,11 @@ Index: llvm-toolchain-7-7.0.1/lib/Target/X86/X86Subtarget.cpp
|
||||
stackAlignment = 16;
|
||||
|
||||
// Some CPUs have more overhead for gather. The specified overhead is relative
|
||||
Index: llvm-toolchain-7-7.0.1/lib/Target/X86/X86Subtarget.h
|
||||
Index: llvm-toolchain-8-8~+rc1/lib/Target/X86/X86Subtarget.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lib/Target/X86/X86Subtarget.h
|
||||
+++ llvm-toolchain-7-7.0.1/lib/Target/X86/X86Subtarget.h
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lib/Target/X86/X86Subtarget.h
|
||||
+++ llvm-toolchain-8-8~+rc1/lib/Target/X86/X86Subtarget.h
|
||||
@@ -731,7 +731,7 @@ public:
|
||||
bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
|
||||
|
||||
bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/lldb/source/Host/freebsd/Host.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/lldb/source/Host/freebsd/Host.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lldb/source/Host/freebsd/Host.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/lldb/source/Host/freebsd/Host.cpp
|
||||
@@ -12,6 +12,13 @@
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lldb/source/Host/freebsd/Host.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/lldb/source/Host/freebsd/Host.cpp
|
||||
@@ -11,6 +11,13 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sys/exec.h>
|
||||
|
@ -1,23 +1,23 @@
|
||||
Index: llvm-toolchain-7-7.0.1/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
Index: llvm-toolchain-8-8~+rc1/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
+#ifndef __FreeBSD_kernel__
|
||||
#include <pthread_np.h>
|
||||
+#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
Index: llvm-toolchain-8-8~+rc1/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-8-8~+rc1.orig/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
+++ llvm-toolchain-8-8~+rc1/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
@@ -10,7 +10,9 @@
|
||||
// C Includes
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
+#ifndef __FreeBSD_kernel__
|
||||
#include <pthread_np.h>
|
||||
+#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
Index: llvm-toolchain-7-7.0.1/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
+++ llvm-toolchain-7-7.0.1/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
|
||||
@@ -11,7 +11,9 @@
|
||||
// C Includes
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
+#ifndef __FreeBSD_kernel__
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: llvm-toolchain-7-7.0.1/tools/llvm-shlib/CMakeLists.txt
|
||||
Index: llvm-toolchain-8-8~+rc1/tools/llvm-shlib/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-7-7.0.1.orig/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ llvm-toolchain-7-7.0.1/tools/llvm-shlib/CMakeLists.txt
|
||||
@@ -40,6 +40,7 @@ set_property(TARGET LLVM PROPERTY VERSIO
|
||||
--- llvm-toolchain-8-8~+rc1.orig/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ llvm-toolchain-8-8~+rc1/tools/llvm-shlib/CMakeLists.txt
|
||||
@@ -46,6 +46,7 @@ if(LLVM_BUILD_LLVM_DYLIB)
|
||||
list(REMOVE_DUPLICATES LIB_NAMES)
|
||||
if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
|
||||
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
||||
|
Loading…
Reference in New Issue
Block a user