From e6c9836c47c9b8f472c2669c159d3eef5b648511 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 25 Sep 2021 16:00:47 +0200 Subject: [PATCH] cherry pick 68d5235cb58f988c71b403334cd9482d663841ab to build with newer version of the kernel --- debian/changelog | 4 +- debian/patches/remove-cyclades.diff | 74 +++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 debian/patches/remove-cyclades.diff diff --git a/debian/changelog b/debian/changelog index 5f05bd59..fec05f76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,10 @@ llvm-toolchain-9 (1:9.0.1-17) unstable; urgency=medium for the bug report * bump autopkgtest cmake version (Closes: #994501) Thanks to Timo Röhling for the patch + * cherry pick 68d5235cb58f988c71b403334cd9482d663841ab to build + with newer version of the kernel - -- Sylvestre Ledru Mon, 08 Mar 2021 12:05:07 +0100 + -- Sylvestre Ledru Sat, 25 Sep 2021 16:00:36 +0200 llvm-toolchain-9 (1:9.0.1-16) unstable; urgency=medium diff --git a/debian/patches/remove-cyclades.diff b/debian/patches/remove-cyclades.diff new file mode 100644 index 00000000..3d642f6b --- /dev/null +++ b/debian/patches/remove-cyclades.diff @@ -0,0 +1,74 @@ +commit 68d5235cb58f988c71b403334cd9482d663841ab +Author: Tamar Christina +Date: Thu May 20 18:55:11 2021 +0100 + + libsanitizer: Remove cyclades inclusion in sanitizer + + The Linux kernel has removed the interface to cyclades from + the latest kernel headers[1] due to them being orphaned for the + past 13 years. + + libsanitizer uses this header when compiling against glibc, but + glibcs itself doesn't seem to have any references to cyclades. + + Further more it seems that the driver is broken in the kernel and + the firmware doesn't seem to be available anymore. + + As such since this is breaking the build of libsanitizer (and so the + GCC bootstrap[2]) I propose to remove this. + + [1] https://lkml.org/lkml/2021/3/2/153 + [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 + + Reviewed By: eugenis + + Differential Revision: https://reviews.llvm.org/D102059 + +Index: llvm-toolchain-9-9.0.1/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +=================================================================== +--- llvm-toolchain-9-9.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ llvm-toolchain-9-9.0.1/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -366,15 +366,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + // _(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); +Index: llvm-toolchain-9-9.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +=================================================================== +--- llvm-toolchain-9-9.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ llvm-toolchain-9-9.0.1/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -969,7 +969,6 @@ struct __sanitizer_cookie_io_functions_t + + #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; +@@ -1314,15 +1313,6 @@ struct __sanitizer_cookie_io_functions_t + #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/debian/patches/series b/debian/patches/series index c688aa14..6384406e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -157,3 +157,4 @@ f8e146f3430de3a6cd904f3f3f7aa1bfaefee14c.patch # bug 974779 llvm9-D71443-PPC-MC-redef-symbol.patch llvm-9.0-D78196.patch +remove-cyclades.diff