Commit | Line | Data |
---|---|---|
4f6c1ba9 KS |
1 | # https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2b40941d23b1570cdd90083b58fa0f66aa58c86e |
2 | # Modified to apply on gcc 5.5.0 | |
3 | # | |
4 | From 2b40941d23b1570cdd90083b58fa0f66aa58c86e Mon Sep 17 00:00:00 2001 | |
5 | From: Tamar Christina <tamar.christina@arm.com> | |
6 | Date: Fri, 21 May 2021 12:16:56 +0100 | |
7 | Subject: [PATCH] libsanitizer: Remove cyclades from libsanitizer | |
8 | ||
9 | The Linux kernel has removed the interface to cyclades from | |
10 | the latest kernel headers[1] due to them being orphaned for the | |
11 | past 13 years. | |
12 | ||
13 | libsanitizer uses this header when compiling against glibc, but | |
14 | glibcs itself doesn't seem to have any references to cyclades. | |
15 | ||
16 | Further more it seems that the driver is broken in the kernel and | |
17 | the firmware doesn't seem to be available anymore. | |
18 | ||
19 | As such since this is breaking the build of libsanitizer (and so the | |
20 | GCC bootstrap[2]) I propose to remove this. | |
21 | ||
22 | [1] https://lkml.org/lkml/2021/3/2/153 | |
23 | [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 | |
24 | ||
25 | libsanitizer/ChangeLog: | |
26 | ||
27 | PR sanitizer/100379 | |
28 | * sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry-pick | |
29 | llvm-project revision f7c5351552387bd43f6ca3631016d7f0dfe0f135. | |
30 | * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. | |
31 | * sanitizer_common/sanitizer_platform_limits_posix.h: Likewise. | |
32 | --- | |
33 | .../sanitizer_common_interceptors_ioctl.inc | 9 --------- | |
34 | .../sanitizer_platform_limits_posix.cc | 11 ----------- | |
35 | .../sanitizer_platform_limits_posix.h | 10 ---------- | |
36 | 3 files changed, 30 deletions(-) | |
37 | ||
38 | diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc | |
39 | index 5408ea17c59..7a9cd3f5968 100644 | |
40 | --- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc | |
41 | +++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc | |
42 | @@ -365,15 +365,6 @@ static void ioctl_table_fill() { | |
43 | ||
44 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | |
45 | // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE | |
46 | - _(CYGETDEFTHRESH, WRITE, sizeof(int)); | |
47 | - _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); | |
48 | - _(CYGETMON, WRITE, struct_cyclades_monitor_sz); | |
49 | - _(CYGETTHRESH, WRITE, sizeof(int)); | |
50 | - _(CYGETTIMEOUT, WRITE, sizeof(int)); | |
51 | - _(CYSETDEFTHRESH, NONE, 0); | |
52 | - _(CYSETDEFTIMEOUT, NONE, 0); | |
53 | - _(CYSETTHRESH, NONE, 0); | |
54 | - _(CYSETTIMEOUT, NONE, 0); | |
55 | _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); | |
56 | _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); | |
57 | _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); | |
58 | diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
59 | index d823a12190c..e8fce8a0287 100644 | |
60 | --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
61 | +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | |
62 | @@ -157,6 +157,5 @@ typedef struct user_fpregs elf_fpregset_t; | |
63 | #include <sys/timex.h> | |
64 | #include <sys/user.h> | |
65 | -#include <linux/cyclades.h> | |
66 | #include <linux/if_eql.h> | |
67 | #include <linux/if_plip.h> | |
68 | #include <linux/lp.h> | |
69 | @@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); | |
70 | ||
71 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | |
72 | unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); | |
73 | - unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); | |
74 | #if EV_VERSION > (0x010000) | |
75 | unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); | |
76 | #else | |
77 | @@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); | |
78 | #endif // SANITIZER_LINUX || SANITIZER_FREEBSD | |
79 | ||
80 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | |
81 | - unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; | |
82 | - unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; | |
83 | - unsigned IOCTL_CYGETMON = CYGETMON; | |
84 | - unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; | |
85 | - unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; | |
86 | - unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; | |
87 | - unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; | |
88 | - unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; | |
89 | - unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; | |
90 | unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; | |
91 | unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; | |
92 | unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; | |
93 | diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
94 | index 6a673a7c995..f921bf2b5b5 100644 | |
95 | --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
96 | +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | |
97 | @@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t { | |
98 | ||
99 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | |
100 | extern unsigned struct_ax25_parms_struct_sz; | |
101 | - extern unsigned struct_cyclades_monitor_sz; | |
102 | extern unsigned struct_input_keymap_entry_sz; | |
103 | extern unsigned struct_ipx_config_data_sz; | |
104 | extern unsigned struct_kbdiacrs_sz; | |
105 | @@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t { | |
106 | #endif // SANITIZER_LINUX || SANITIZER_FREEBSD | |
107 | ||
108 | #if SANITIZER_LINUX && !SANITIZER_ANDROID | |
109 | - extern unsigned IOCTL_CYGETDEFTHRESH; | |
110 | - extern unsigned IOCTL_CYGETDEFTIMEOUT; | |
111 | - extern unsigned IOCTL_CYGETMON; | |
112 | - extern unsigned IOCTL_CYGETTHRESH; | |
113 | - extern unsigned IOCTL_CYGETTIMEOUT; | |
114 | - extern unsigned IOCTL_CYSETDEFTHRESH; | |
115 | - extern unsigned IOCTL_CYSETDEFTIMEOUT; | |
116 | - extern unsigned IOCTL_CYSETTHRESH; | |
117 | - extern unsigned IOCTL_CYSETTIMEOUT; | |
118 | extern unsigned IOCTL_EQL_EMANCIPATE; | |
119 | extern unsigned IOCTL_EQL_ENSLAVE; | |
120 | extern unsigned IOCTL_EQL_GETMASTRCFG; | |
121 | -- | |
122 | 2.39.3 | |
123 |