From 2ea1037369afc22aa18e62775ae6b5f23c1f0b04 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 15 Nov 2021 04:27:00 -0600 Subject: [PATCH] llvm: remove cyclades code from llvm-10:11 (#27385) --- .../builtin/packages/llvm/no_cyclades.patch | 81 +++++++++++++++++++ .../repos/builtin/packages/llvm/package.py | 4 + 2 files changed, 85 insertions(+) create mode 100644 var/spack/repos/builtin/packages/llvm/no_cyclades.patch diff --git a/var/spack/repos/builtin/packages/llvm/no_cyclades.patch b/var/spack/repos/builtin/packages/llvm/no_cyclades.patch new file mode 100644 index 0000000000..10f9d0796b --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/no_cyclades.patch @@ -0,0 +1,81 @@ +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -370,15 +370,6 @@ + + #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 --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -983,7 +983,6 @@ + + #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 @@ + #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; +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -143,7 +143,6 @@ + # include + #endif + #include +-#include + #include + #include + #include +@@ -460,7 +459,6 @@ + + #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 +@@ -824,15 +822,6 @@ + #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 --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index c5a88cd9fb..2d43280530 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -276,6 +276,10 @@ class Llvm(CMakePackage, CudaPackage): # Workaround for issue https://github.com/spack/spack/issues/18197 patch('llvm7_intel.patch', when='@7 %intel@18.0.2,19.0.4') + # Remove cyclades support to build against newer kernel headers + # https://reviews.llvm.org/D102059 + patch('no_cyclades.patch', when='@10:11') + # The functions and attributes below implement external package # detection for LLVM. See: #