Remove patches which were workarounds for GCC 5 bugs
This commit is contained in:
parent
4570c40835
commit
e9dcd51d77
@ -1,140 +0,0 @@
|
|||||||
Index: glibc-2.22-193-g315267a/posix/bug-regex11.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-193-g315267a.orig/posix/bug-regex11.c
|
|
||||||
+++ glibc-2.22-193-g315267a/posix/bug-regex11.c
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#include <regex.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
/* Tests supposed to match. */
|
|
||||||
struct
|
|
||||||
@@ -119,6 +120,14 @@ main (void)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since n is limited to
|
|
||||||
+ static nmatch which is limited to at most 5 (see tests above).
|
|
||||||
+ This is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (n = 0; n < tests[i].nmatch; ++n)
|
|
||||||
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
|
||||||
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
|
||||||
@@ -130,6 +139,7 @@ main (void)
|
|
||||||
ret = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
regfree (&re);
|
|
||||||
}
|
|
||||||
Index: glibc-2.22-193-g315267a/posix/bug-regex17.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-193-g315267a.orig/posix/bug-regex17.c
|
|
||||||
+++ glibc-2.22-193-g315267a/posix/bug-regex17.c
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <locale.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
/* Tests supposed to match. */
|
|
||||||
struct
|
|
||||||
@@ -87,6 +88,14 @@ do_test (void)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since n is limited to
|
|
||||||
+ static nmatch which is limited to at most 5 (see tests above).
|
|
||||||
+ This is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (n = 0; n < tests[i].nmatch; ++n)
|
|
||||||
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
|
||||||
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
|
||||||
@@ -98,6 +107,7 @@ do_test (void)
|
|
||||||
ret = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
regfree (&re);
|
|
||||||
}
|
|
||||||
Index: glibc-2.22-193-g315267a/posix/bug-regex18.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-193-g315267a.orig/posix/bug-regex18.c
|
|
||||||
+++ glibc-2.22-193-g315267a/posix/bug-regex18.c
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <locale.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
/* Tests supposed to match. */
|
|
||||||
struct
|
|
||||||
@@ -80,6 +81,14 @@ main (void)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since n is limited to
|
|
||||||
+ static nmatch which is limited to at most 5 (see tests above).
|
|
||||||
+ This is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (n = 0; n < tests[i].nmatch; ++n)
|
|
||||||
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
|
||||||
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
|
||||||
@@ -91,6 +100,7 @@ main (void)
|
|
||||||
ret = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
regfree (&re);
|
|
||||||
}
|
|
||||||
Index: glibc-2.22-193-g315267a/posix/bug-regex30.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-193-g315267a.orig/posix/bug-regex30.c
|
|
||||||
+++ glibc-2.22-193-g315267a/posix/bug-regex30.c
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <locale.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
/* Tests supposed to match. */
|
|
||||||
struct
|
|
||||||
@@ -80,6 +81,14 @@ do_test (void)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since n is limited to
|
|
||||||
+ static nmatch which is limited to at most 5 (see tests above).
|
|
||||||
+ This is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (n = 0; n < tests[i].nmatch; ++n)
|
|
||||||
if (rm[n].rm_so != tests[i].rm[n].rm_so
|
|
||||||
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
|
|
||||||
@@ -91,6 +100,7 @@ do_test (void)
|
|
||||||
ret = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
regfree (&re);
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
Index: glibc-2.23-276-gb65b205/resolv/nss_dns/dns-host.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.23-276-gb65b205.orig/resolv/nss_dns/dns-host.c
|
|
||||||
+++ glibc-2.23-276-gb65b205/resolv/nss_dns/dns-host.c
|
|
||||||
@@ -78,6 +78,7 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
#include "nsswitch.h"
|
|
||||||
|
|
||||||
@@ -566,10 +567,19 @@ addrsort (char **ap, int num)
|
|
||||||
num = MAX_NR_ADDRS;
|
|
||||||
for (i = 0; i < num; i++, p++)
|
|
||||||
{
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since i is limited to
|
|
||||||
+ _res.nsort which is limited to MAXRESOLVSORT. This
|
|
||||||
+ is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (j = 0 ; (unsigned)j < _res.nsort; j++)
|
|
||||||
if (_res.sort_list[j].addr.s_addr ==
|
|
||||||
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
|
|
||||||
break;
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
aval[i] = j;
|
|
||||||
if (needsort == 0 && i > 0 && j < aval[i-1])
|
|
||||||
needsort = i;
|
|
@ -1,32 +0,0 @@
|
|||||||
Index: glibc-2.23-276-gb65b205/resolv/gethnamaddr.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.23-276-gb65b205.orig/resolv/gethnamaddr.c
|
|
||||||
+++ glibc-2.23-276-gb65b205/resolv/gethnamaddr.c
|
|
||||||
@@ -68,6 +68,7 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
#define MAXALIASES 35
|
|
||||||
#define MAXADDRS 35
|
|
||||||
@@ -864,10 +865,19 @@ addrsort (char **ap, int num)
|
|
||||||
|
|
||||||
p = ap;
|
|
||||||
for (i = 0; i < num; i++, p++) {
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since i is limited to
|
|
||||||
+ _res.nsort which is limited to MAXRESOLVSORT. This
|
|
||||||
+ is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (j = 0 ; (unsigned)j < _res.nsort; j++)
|
|
||||||
if (_res.sort_list[j].addr.s_addr ==
|
|
||||||
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
|
|
||||||
break;
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
aval[i] = j;
|
|
||||||
if (needsort == 0 && i > 0 && j < aval[i-1])
|
|
||||||
needsort = i;
|
|
@ -1,72 +0,0 @@
|
|||||||
Index: glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-193-g315267a.orig/locale/programs/ld-ctype.c
|
|
||||||
+++ glibc-2.22-193-g315267a/locale/programs/ld-ctype.c
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
#include <wctype.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sys/uio.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
#include "localedef.h"
|
|
||||||
#include "charmap.h"
|
|
||||||
@@ -2534,9 +2535,19 @@ with character code range values one mus
|
|
||||||
{
|
|
||||||
size_t cnt;
|
|
||||||
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not possible since ctype_map_new prevents
|
|
||||||
+ map_collection_nr from being greater than MAX_NR_CHARMP which
|
|
||||||
+ is the size of mapnames. This is likely PR/59124 which is still
|
|
||||||
+ not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (cnt = 2; cnt < ctype->map_collection_nr; ++cnt)
|
|
||||||
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
|
|
||||||
break;
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
if (cnt < ctype->map_collection_nr)
|
|
||||||
free (now->val.str.startmb);
|
|
||||||
@@ -2807,9 +2818,19 @@ previous definition was here")));
|
|
||||||
|
|
||||||
/* This could mean one of several things. First test whether
|
|
||||||
it's a character class name. */
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not possible since ctype_class_new prevents
|
|
||||||
+ nr_charclass from being greater than MAX_NR_CHARCLASS which
|
|
||||||
+ is the size of classnames. This is likely PR/59124 which is still
|
|
||||||
+ not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (cnt = 0; cnt < ctype->nr_charclass; ++cnt)
|
|
||||||
if (strcmp (now->val.str.startmb, ctype->classnames[cnt]) == 0)
|
|
||||||
break;
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
if (cnt < ctype->nr_charclass)
|
|
||||||
{
|
|
||||||
class_bit = _ISwbit (cnt);
|
|
||||||
@@ -2817,9 +2838,19 @@ previous definition was here")));
|
|
||||||
free (now->val.str.startmb);
|
|
||||||
goto read_charclass;
|
|
||||||
}
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not possible since ctype_map_new prevents
|
|
||||||
+ map_collection_nr from being greater than MAX_NR_CHARMP which
|
|
||||||
+ is the size of mapnames. This is likely PR/59124 which is still
|
|
||||||
+ not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
for (cnt = 0; cnt < ctype->map_collection_nr; ++cnt)
|
|
||||||
if (strcmp (now->val.str.startmb, ctype->mapnames[cnt]) == 0)
|
|
||||||
break;
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
if (cnt < ctype->map_collection_nr)
|
|
||||||
{
|
|
||||||
mapidx = cnt;
|
|
@ -1,29 +0,0 @@
|
|||||||
Index: glibc-2.22-386-g95e8397/resolv/res_hconf.c
|
|
||||||
===================================================================
|
|
||||||
--- glibc-2.22-386-g95e8397.orig/resolv/res_hconf.c
|
|
||||||
+++ glibc-2.22-386-g95e8397/resolv/res_hconf.c
|
|
||||||
@@ -46,6 +46,7 @@
|
|
||||||
#include "res_hconf.h"
|
|
||||||
#include <wchar.h>
|
|
||||||
#include <atomic.h>
|
|
||||||
+#include <libc-internal.h>
|
|
||||||
|
|
||||||
#if IS_IN (libc)
|
|
||||||
# define fgets_unlocked __fgets_unlocked
|
|
||||||
@@ -577,7 +578,16 @@ _res_hconf_trim_domain (char *hostname)
|
|
||||||
|
|
||||||
for (i = 0; i < _res_hconf.num_trimdomains; ++i)
|
|
||||||
{
|
|
||||||
+ DIAG_PUSH_NEEDS_COMMENT
|
|
||||||
+#if __GNUC_PREREQ (5, 0)
|
|
||||||
+ /* GCC 5.0 warns about array subscript being above array bounds,
|
|
||||||
+ but that's not entirely possible since i is limited to
|
|
||||||
+ num_trimdomains which is limited to <= TRIMDOMAINS_MAX. This
|
|
||||||
+ is likely PR/59124 which is still not fixed. */
|
|
||||||
+ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Warray-bounds")
|
|
||||||
+#endif
|
|
||||||
const char *trim = _res_hconf.trimdomain[i];
|
|
||||||
+ DIAG_POP_NEEDS_COMMENT
|
|
||||||
|
|
||||||
trim_len = strlen (trim);
|
|
||||||
if (hostname_len > trim_len
|
|
13
glibc.spec
13
glibc.spec
@ -248,14 +248,6 @@ Patch0052: glibc-disable-rwlock-elision.patch
|
|||||||
# symlink to it.
|
# symlink to it.
|
||||||
Patch0053: glibc-cs-path.patch
|
Patch0053: glibc-cs-path.patch
|
||||||
|
|
||||||
# Fix -Warray-bounds warning for GCC5, likely PR/59124 or PR/66422.
|
|
||||||
# See Fedora bug #1263817.
|
|
||||||
Patch0054: glibc-res-hconf-gcc5.patch
|
|
||||||
Patch0055: glibc-ld-ctype-gcc5.patch
|
|
||||||
Patch0056: glibc-gethnamaddr-gcc5.patch
|
|
||||||
Patch0057: glibc-dns-host-gcc5.patch
|
|
||||||
Patch0058: glibc-bug-regex-gcc5.patch
|
|
||||||
|
|
||||||
# Add C.UTF-8 locale into /usr/lib/locale/
|
# Add C.UTF-8 locale into /usr/lib/locale/
|
||||||
Patch0059: glibc-c-utf8-locale.patch
|
Patch0059: glibc-c-utf8-locale.patch
|
||||||
|
|
||||||
@ -877,11 +869,6 @@ microbenchmark tests on the system.
|
|||||||
%patch2034 -p1
|
%patch2034 -p1
|
||||||
%patch0052 -p1
|
%patch0052 -p1
|
||||||
%patch0053 -p1
|
%patch0053 -p1
|
||||||
%patch0054 -p1
|
|
||||||
%patch0055 -p1
|
|
||||||
%patch0056 -p1
|
|
||||||
%patch0057 -p1
|
|
||||||
%patch0058 -p1
|
|
||||||
%patch0059 -p1
|
%patch0059 -p1
|
||||||
%patch0060 -p1
|
%patch0060 -p1
|
||||||
%patch2036 -p1
|
%patch2036 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user