1 |
commit: 55fcb515620a8f7d3bb77eba938aa0fcf0d67c96 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 1 07:02:02 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 1 07:02:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=55fcb515 |
7 |
|
8 |
4.9.4: backport ustat.h removal fir gcc-4.9.4 |
9 |
|
10 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
11 |
|
12 |
4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch | 71 ++++++++++++++++++++++ |
13 |
.../101_all_libsanitizer-libbacktrace-Werror.patch | 17 ++++++ |
14 |
4.9.4/gentoo/README.history | 2 + |
15 |
3 files changed, 90 insertions(+) |
16 |
|
17 |
diff --git a/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch b/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch |
18 |
new file mode 100644 |
19 |
index 0000000..e9797e4 |
20 |
--- /dev/null |
21 |
+++ b/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch |
22 |
@@ -0,0 +1,71 @@ |
23 |
+https://github.com/buildroot/buildroot/commit/6b33b7ba517bee4d88af9b1827201df923b4a600.patch |
24 |
+ |
25 |
+From 61f38c64c01a15560026115a157b7021ec67bd3b Mon Sep 17 00:00:00 2001 |
26 |
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> |
27 |
+Date: Thu, 24 May 2018 20:21:54 +0000 |
28 |
+Subject: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux |
29 |
+ |
30 |
+Cherry-pick compiler-rt revision 333213: |
31 |
+ |
32 |
+<sys/ustat.h> has been removed from glibc 2.28 by: |
33 |
+ |
34 |
+commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 |
35 |
+Author: Adhemerval Zanella <adhemerval.zanella@××××××.org> |
36 |
+Date: Sun Mar 18 11:28:59 2018 +0800 |
37 |
+ |
38 |
+ Deprecate ustat syscall interface |
39 |
+ |
40 |
+This patch uses pre-computed size of struct ustat for Linux. |
41 |
+ |
42 |
+ PR sanitizer/85835 |
43 |
+ * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't |
44 |
+ include <sys/ustat.h> for Linux. |
45 |
+ (SIZEOF_STRUCT_USTAT): New. |
46 |
+ (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux. |
47 |
+ |
48 |
+ |
49 |
+ |
50 |
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@260688 138bc75d-0d04-0410-961f-82ee72b054a4 |
51 |
+ |
52 |
+Backported from upstream commit |
53 |
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=61f38c64c01a15560026115a157b7021ec67bd3b |
54 |
+ |
55 |
+Signed-off-by: Bernd Kuhls <bernd.kuhls@××××××××.de> |
56 |
+--- |
57 |
+ libsanitizer/ChangeLog | 8 ++++++++ |
58 |
+ .../sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- |
59 |
+ 2 files changed, 21 insertions(+), 2 deletions(-) |
60 |
+ |
61 |
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
62 |
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
63 |
+@@ -81,7 +89,6 @@ typedef struct user_fpregs elf_fpregset_t; |
64 |
+ # include <sys/procfs.h> |
65 |
+ #endif |
66 |
+ #include <sys/user.h> |
67 |
+-#include <sys/ustat.h> |
68 |
+ #include <linux/cyclades.h> |
69 |
+ #include <linux/if_eql.h> |
70 |
+ #include <linux/if_plip.h> |
71 |
+@@ -163,7 +170,19 @@ |
72 |
+ unsigned struct_old_utsname_sz = sizeof(struct old_utsname); |
73 |
+ unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); |
74 |
+ unsigned struct_itimerspec_sz = sizeof(struct itimerspec); |
75 |
+- unsigned struct_ustat_sz = sizeof(struct ustat); |
76 |
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which |
77 |
++ // has been removed from glibc 2.28. |
78 |
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ |
79 |
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ |
80 |
++ || defined(__x86_64__) |
81 |
++#define SIZEOF_STRUCT_USTAT 32 |
82 |
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ |
83 |
++ || defined(__powerpc__) || defined(__s390__) |
84 |
++#define SIZEOF_STRUCT_USTAT 20 |
85 |
++#else |
86 |
++#error Unknown size of struct ustat |
87 |
++#endif |
88 |
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; |
89 |
+ #endif // SANITIZER_LINUX |
90 |
+ |
91 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
92 |
+-- |
93 |
+2.9.3 |
94 |
|
95 |
diff --git a/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch b/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch |
96 |
new file mode 100644 |
97 |
index 0000000..46a219a |
98 |
--- /dev/null |
99 |
+++ b/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch |
100 |
@@ -0,0 +1,17 @@ |
101 |
+libsanitizer/libbacktrace does not respect --disable-werror |
102 |
+ |
103 |
+https://bugs.gentoo.org/667104 |
104 |
+--- a/libsanitizer/libbacktrace/Makefile.am |
105 |
++++ b/libsanitizer/libbacktrace/Makefile.am |
106 |
+@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
107 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
108 |
+- -Wcast-qual -Werror |
109 |
++ -Wcast-qual |
110 |
+ C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition |
111 |
+--- a/libsanitizer/libbacktrace/Makefile.in |
112 |
++++ b/libsanitizer/libbacktrace/Makefile.in |
113 |
+@@ -293,3 +293,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ |
114 |
+ WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ |
115 |
+- -Wcast-qual -Werror |
116 |
++ -Wcast-qual |
117 |
+ |
118 |
|
119 |
diff --git a/4.9.4/gentoo/README.history b/4.9.4/gentoo/README.history |
120 |
index 67c7a25..3ddedc0 100644 |
121 |
--- a/4.9.4/gentoo/README.history |
122 |
+++ b/4.9.4/gentoo/README.history |
123 |
@@ -1,5 +1,7 @@ |
124 |
1.4 TODO |
125 |
+ 99_all_remove-lieee.patch |
126 |
+ + 100_all_avoid-ustat-glibc-2.28.patch |
127 |
+ + 101_all_libsanitizer-libbacktrace-Werror.patch |
128 |
|
129 |
1.3 12 Jan 2018 |
130 |
+ 98_all_libjava-ucontext.patch |