Submitted By: Douglas R. Reno Date: 2021-07-07 Initial Package Version: 12.0.0 Origin: Upstream Upstream Status: Applied Description: Fixes building LLVM-12 with linux-5.13. The underlying issue is the same as libsanitizer in GCC - the removal of a kernel driver. diff -Naurp llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc --- llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 2021-04-06 11:38:18.000000000 -0500 +++ llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 2021-07-07 11:31:12.184333816 -0500 @@ -370,15 +370,6 @@ static void ioctl_table_fill() { #if SANITIZER_GLIBC // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE - _(CYGETDEFTHRESH, WRITE, sizeof(int)); - _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); - _(CYGETMON, WRITE, struct_cyclades_monitor_sz); - _(CYGETTHRESH, WRITE, sizeof(int)); - _(CYGETTIMEOUT, WRITE, sizeof(int)); - _(CYSETDEFTHRESH, NONE, 0); - _(CYSETDEFTIMEOUT, NONE, 0); - _(CYSETTHRESH, NONE, 0); - _(CYSETTIMEOUT, NONE, 0); _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); diff -Naurp llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp --- llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp 2021-04-06 11:38:18.000000000 -0500 +++ llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp 2021-07-07 11:31:12.181333758 -0500 @@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_ # include #endif #include -#include #include #include #include @@ -459,7 +458,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El #if SANITIZER_GLIBC unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); - unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); #if EV_VERSION > (0x010000) unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); #else @@ -823,15 +821,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El #endif // SANITIZER_LINUX #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; - unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; - unsigned IOCTL_CYGETMON = CYGETMON; - unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; - unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; - unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; - unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; - unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; - unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; diff -Naurp llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h --- llvm-12.0.0.src.orig/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2021-04-06 11:38:18.000000000 -0500 +++ llvm-12.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2021-07-07 11:31:12.184333816 -0500 @@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz; #if SANITIZER_LINUX && !SANITIZER_ANDROID extern unsigned struct_ax25_parms_struct_sz; -extern unsigned struct_cyclades_monitor_sz; extern unsigned struct_input_keymap_entry_sz; extern unsigned struct_ipx_config_data_sz; extern unsigned struct_kbdiacrs_sz; @@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE; #endif // SANITIZER_LINUX #if SANITIZER_LINUX && !SANITIZER_ANDROID -extern unsigned IOCTL_CYGETDEFTHRESH; -extern unsigned IOCTL_CYGETDEFTIMEOUT; -extern unsigned IOCTL_CYGETMON; -extern unsigned IOCTL_CYGETTHRESH; -extern unsigned IOCTL_CYGETTIMEOUT; -extern unsigned IOCTL_CYSETDEFTHRESH; -extern unsigned IOCTL_CYSETDEFTIMEOUT; -extern unsigned IOCTL_CYSETTHRESH; -extern unsigned IOCTL_CYSETTIMEOUT; extern unsigned IOCTL_EQL_EMANCIPATE; extern unsigned IOCTL_EQL_ENSLAVE; extern unsigned IOCTL_EQL_GETMASTRCFG;