summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-05-17 19:47:19 +0000
committerrillig <rillig@pkgsrc.org>2020-05-17 19:47:19 +0000
commit2e351bf0983d655421c938d36aeb87bbef2f7a92 (patch)
tree34c1d1252fd5c5f67ca563c73fee79cad8f6a913 /lang
parent05d5cd5326fdabe50a97cbe620eb8a5bd378ab36 (diff)
downloadpkgsrc-2e351bf0983d655421c938d36aeb87bbef2f7a92.tar.gz
lang/gcc10: fix build with -Werror=char-subscripts
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc10/Makefile3
-rw-r--r--lang/gcc10/distinfo8
-rw-r--r--lang/gcc10/patches/patch-libgfortran_io_format.c17
-rw-r--r--lang/gcc10/patches/patch-libgfortran_io_list__read.c17
-rw-r--r--lang/gcc10/patches/patch-libgfortran_io_read.c44
-rw-r--r--lang/gcc10/patches/patch-libgfortran_runtime_environ.c26
-rw-r--r--lang/gcc10/patches/patch-libquadmath_printf_quadmath-printf.c26
-rw-r--r--lang/gcc10/patches/patch-libquadmath_strtod_strtod__l.c23
8 files changed, 162 insertions, 2 deletions
diff --git a/lang/gcc10/Makefile b/lang/gcc10/Makefile
index 3bc2b2cf6f9..774972fcbb0 100644
--- a/lang/gcc10/Makefile
+++ b/lang/gcc10/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.1 2020/05/10 15:02:44 maya Exp $
+# $NetBSD: Makefile,v 1.2 2020/05/17 19:47:19 rillig Exp $
GCC_PKGNAME= gcc10
.include "version.mk"
DISTNAME= gcc-${GCC10_DIST_VERSION}
PKGNAME= ${GCC_PKGNAME}-${GCC10_DIST_VERSION}
+PKGREVISION= 1
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc10-libs needs to be bump to be at least 1 more than the
## PKGREVISION of this package!
diff --git a/lang/gcc10/distinfo b/lang/gcc10/distinfo
index 222b61d8c8c..f4b4c311dc9 100644
--- a/lang/gcc10/distinfo
+++ b/lang/gcc10/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2020/05/10 15:02:44 maya Exp $
+$NetBSD: distinfo,v 1.2 2020/05/17 19:47:19 rillig Exp $
SHA1 (gcc-10.1.0.tar.xz) = 1af8d963e4a74d05a8f2d0f795ea52d2b91f6c50
RMD160 (gcc-10.1.0.tar.xz) = eb9c7a9c10fbe5b4ff84818b280248ab97d17769
@@ -20,5 +20,11 @@ SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e
SHA1 (patch-libffi_configure) = 22006b20d7f655e2455a7ad613d676703b6c1ccc
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 27b84a11378fb648dfaad0c70abedd77a0a1c1a8
SHA1 (patch-libgcc_crtstuff.c) = a16d465039de00c195cf0694560140a9c38f3a25
+SHA1 (patch-libgfortran_io_format.c) = cff0b1a3ad4357c15a5b28977887a80aa7e006f1
SHA1 (patch-libgfortran_io_io.h) = d44676239a7f45e42054d24bd5224f43c20055c0
+SHA1 (patch-libgfortran_io_list__read.c) = f141d8ad57ea4ca30727c2d31f745d95633efcd9
+SHA1 (patch-libgfortran_io_read.c) = a3f194f70bbba82283843f7ce2998a925ee207c4
+SHA1 (patch-libgfortran_runtime_environ.c) = 80d1cda03d2da1fac06242982fc6922bd75d622b
+SHA1 (patch-libquadmath_printf_quadmath-printf.c) = 7c68f155cfb99c3bca625a1966a04c2c46b4d6fc
+SHA1 (patch-libquadmath_strtod_strtod__l.c) = 1d448aa1a149ff24742f87443d0da76278206025
SHA1 (patch-libstdc++-v3_libsupc++_new__opa.cc) = 4183b00a5ee6e61524da4755c825a0c08fd01ed6
diff --git a/lang/gcc10/patches/patch-libgfortran_io_format.c b/lang/gcc10/patches/patch-libgfortran_io_format.c
new file mode 100644
index 00000000000..19ba74633fe
--- /dev/null
+++ b/lang/gcc10/patches/patch-libgfortran_io_format.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-libgfortran_io_format.c,v 1.1 2020/05/17 19:47:19 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
+
+--- libgfortran/io/format.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libgfortran/io/format.c
+@@ -193,7 +193,7 @@ next_char (format_data *fmt, int literal
+ return -1;
+
+ fmt->format_string_len--;
+- c = toupper (*fmt->format_string++);
++ c = toupper ((unsigned char) *fmt->format_string++);
+ fmt->error_element = c;
+ }
+ while ((c == ' ' || c == '\t') && !literal);
diff --git a/lang/gcc10/patches/patch-libgfortran_io_list__read.c b/lang/gcc10/patches/patch-libgfortran_io_list__read.c
new file mode 100644
index 00000000000..2f8c73c7704
--- /dev/null
+++ b/lang/gcc10/patches/patch-libgfortran_io_list__read.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-libgfortran_io_list__read.c,v 1.1 2020/05/17 19:47:19 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
+
+--- libgfortran/io/list_read.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libgfortran/io/list_read.c
+@@ -2757,7 +2757,7 @@ nml_match_name (st_parameter_dt *dtp, co
+ for (i = 0; i < len; i++)
+ {
+ c = next_char (dtp);
+- if (c == EOF || (tolower (c) != tolower (name[i])))
++ if (c == EOF || (tolower (c) != tolower ((unsigned char) name[i])))
+ {
+ dtp->u.p.nml_read_error = 1;
+ break;
diff --git a/lang/gcc10/patches/patch-libgfortran_io_read.c b/lang/gcc10/patches/patch-libgfortran_io_read.c
new file mode 100644
index 00000000000..00204accb3d
--- /dev/null
+++ b/lang/gcc10/patches/patch-libgfortran_io_read.c
@@ -0,0 +1,44 @@
+$NetBSD: patch-libgfortran_io_read.c,v 1.1 2020/05/17 19:47:20 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
+
+--- libgfortran/io/read.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libgfortran/io/read.c
+@@ -959,7 +959,7 @@ read_f (st_parameter_dt *dtp, const fnod
+ between "NaN" and the optional perenthesis is not permitted. */
+ while (w > 0)
+ {
+- *out = tolower (*p);
++ *out = tolower ((unsigned char) *p);
+ switch (*p)
+ {
+ case ' ':
+@@ -981,7 +981,7 @@ read_f (st_parameter_dt *dtp, const fnod
+ goto bad_float;
+ break;
+ default:
+- if (!isalnum (*out))
++ if (!isalnum ((unsigned char) *out))
+ goto bad_float;
+ }
+ --w;
+@@ -1109,7 +1109,7 @@ exponent:
+
+ if (dtp->u.p.blank_status == BLANK_UNSPECIFIED)
+ {
+- while (w > 0 && isdigit (*p))
++ while (w > 0 && isdigit ((unsigned char) *p))
+ {
+ exponent *= 10;
+ exponent += *p - '0';
+@@ -1137,7 +1137,7 @@ exponent:
+ else
+ assert (dtp->u.p.blank_status == BLANK_NULL);
+ }
+- else if (!isdigit (*p))
++ else if (!isdigit ((unsigned char) *p))
+ goto bad_float;
+ else
+ {
diff --git a/lang/gcc10/patches/patch-libgfortran_runtime_environ.c b/lang/gcc10/patches/patch-libgfortran_runtime_environ.c
new file mode 100644
index 00000000000..3133da45305
--- /dev/null
+++ b/lang/gcc10/patches/patch-libgfortran_runtime_environ.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-libgfortran_runtime_environ.c,v 1.1 2020/05/17 19:47:20 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
+
+--- libgfortran/runtime/environ.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libgfortran/runtime/environ.c
+@@ -91,7 +91,7 @@ init_integer (variable * v)
+ return;
+
+ for (q = p; *q; q++)
+- if (!isdigit (*q) && (p != q || *q != '-'))
++ if (!isdigit ((unsigned char) *q) && (p != q || *q != '-'))
+ return;
+
+ *v->var = atoi (p);
+@@ -344,7 +344,7 @@ static int
+ match_integer (void)
+ {
+ unit_num = 0;
+- while (isdigit (*p))
++ while (isdigit ((unsigned char) *p))
+ unit_num = unit_num * 10 + (*p++ - '0');
+ return INTEGER;
+ }
diff --git a/lang/gcc10/patches/patch-libquadmath_printf_quadmath-printf.c b/lang/gcc10/patches/patch-libquadmath_printf_quadmath-printf.c
new file mode 100644
index 00000000000..f29a224185c
--- /dev/null
+++ b/lang/gcc10/patches/patch-libquadmath_printf_quadmath-printf.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-libquadmath_printf_quadmath-printf.c,v 1.1 2020/05/17 19:47:20 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95178
+
+--- libquadmath/printf/quadmath-printf.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libquadmath/printf/quadmath-printf.c
+@@ -189,7 +189,7 @@ quadmath_snprintf (char *str, size_t siz
+ ++format;
+ info.width = va_arg (ap, int);
+ }
+- else if (isdigit (*format))
++ else if (isdigit ((unsigned char) *format))
+ /* Constant width specification. */
+ info.width = read_int (&format);
+
+@@ -206,7 +206,7 @@ quadmath_snprintf (char *str, size_t siz
+
+ info.prec = va_arg (ap, int);
+ }
+- else if (isdigit (*format))
++ else if (isdigit ((unsigned char) *format))
+ info.prec = read_int (&format);
+ else
+ /* "%.?" is treated like "%.0?". */
diff --git a/lang/gcc10/patches/patch-libquadmath_strtod_strtod__l.c b/lang/gcc10/patches/patch-libquadmath_strtod_strtod__l.c
new file mode 100644
index 00000000000..d7ce1be4f75
--- /dev/null
+++ b/lang/gcc10/patches/patch-libquadmath_strtod_strtod__l.c
@@ -0,0 +1,23 @@
+$NetBSD: patch-libquadmath_strtod_strtod__l.c,v 1.1 2020/05/17 19:47:20 rillig Exp $
+
+Fix -Werror=char-subscripts.
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95178
+
+--- libquadmath/strtod/strtod_l.c.orig 2020-05-07 10:50:02.000000000 +0000
++++ libquadmath/strtod/strtod_l.c
+@@ -57,10 +57,10 @@
+ # define STRING_TYPE char
+ # define CHAR_TYPE char
+ # define L_(Ch) Ch
+-# define ISSPACE(Ch) isspace (Ch)
+-# define ISDIGIT(Ch) isdigit (Ch)
+-# define ISXDIGIT(Ch) isxdigit (Ch)
+-# define TOLOWER(Ch) tolower (Ch)
++# define ISSPACE(Ch) isspace ((unsigned char) Ch)
++# define ISDIGIT(Ch) isdigit ((unsigned char) Ch)
++# define ISXDIGIT(Ch) isxdigit ((unsigned char) Ch)
++# define TOLOWER(Ch) tolower ((unsigned char) Ch)
+ # define TOLOWER_C(Ch) \
+ ({__typeof(Ch) __tlc = (Ch); \
+ (__tlc >= 'A' && __tlc <= 'Z') ? __tlc - 'A' + 'a' : __tlc; })