Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc various changes to get GCC 10 to build here.



details:   https://anonhg.NetBSD.org/src/rev/e28f52233468
branches:  trunk
changeset: 961550:e28f52233468
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 12 00:05:54 2021 +0000

description:
various changes to get GCC 10 to build here.

- fix path to compiler-specific includes
- missing (void) for (older) C
- fix __is_signed/__is_signed_val change
- avoid compiler warning-as-errors
- add to existing COPTS.file values, instead of setting
- bump libgomp minor; functions were added
- add new 'compare' c++ header
- handle new analyzer subdirectory.  set TARGET_MACHINE for lto-streamer-in.c.
  remove params.list etc handling.
- coroutines.cc is another .cc not .c.  adjust .PATH to suit.
- add new lto1 sources
- couple of files not in /arch/ subdirs missed in mknative update.

rs6000.c is still not merged.

diffstat:

 external/gpl3/gcc/README.gcc10                                   |  116 ++++++++++
 external/gpl3/gcc/README.gcc9                                    |  113 ---------
 external/gpl3/gcc/dist/gcc/config/netbsd.h                       |    2 +-
 external/gpl3/gcc/dist/libgomp/acc_prof.h                        |    2 +-
 external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h |    8 +-
 external/gpl3/gcc/lib/libgcc/Makefile.inc                        |    6 +-
 external/gpl3/gcc/lib/libgcc/libgcc/Makefile                     |    4 +-
 external/gpl3/gcc/lib/libgcc/libgcc_eh/Makefile                  |    6 +-
 external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile                   |    4 +-
 external/gpl3/gcc/lib/libgomp/Makefile                           |    4 +-
 external/gpl3/gcc/lib/libgomp/defs.mk                            |    4 +-
 external/gpl3/gcc/lib/libiberty/defs.mk                          |    4 +-
 external/gpl3/gcc/lib/libstdc++-v3/include/Makefile              |    5 +-
 external/gpl3/gcc/lib/libubsan/Makefile                          |    5 +-
 external/gpl3/gcc/usr.bin/Makefile.inc                           |    5 +-
 external/gpl3/gcc/usr.bin/backend/Makefile                       |   15 +-
 external/gpl3/gcc/usr.bin/cc1plus/Makefile                       |    6 +-
 external/gpl3/gcc/usr.bin/common/defs.mk                         |    2 +-
 external/gpl3/gcc/usr.bin/lto1/Makefile                          |   11 +-
 19 files changed, 165 insertions(+), 157 deletions(-)

diffs (truncated from 555 to 300 lines):

diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/README.gcc10
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/README.gcc10    Mon Apr 12 00:05:54 2021 +0000
@@ -0,0 +1,116 @@
+$NetBSD: README.gcc10,v 1.1 2021/04/12 00:05:54 mrg Exp $
+
+
+new stuff:
+       cc1objcplus
+       libmpx
+       liboffloadmic
+       libvtv
+       libcet
+       libphobos
+       d
+       gfortran
+       lto-dump
+       libbacktrace: +dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
+
+
+todo:
+       - audit all uses of new warning-disable variables and
+         convert some from -Wno- to -Wno-error=
+
+arch/feature list.
+
+tools:         does build.sh tools work?
+kernels:       does a kernel run?
+libgcc:                does libgcc build?
+native-gcc:    does a full mknative-gcc complete?
+make release:  does build.sh release complete?
+runs:          does the system boot with a full world?
+atf:           does atf run / compare well
+switched:      has port switched?  y (yes), n (no/ready), ? (not ready)
+
+
+architecture   tools   kernels libgcc  native-gcc      make release    runs    atf     switched
+------------   -----   ------- ------  ----------      ------------    ----    ---     --------
+aarch64                y       n       n       y               n               ?       ?       ?
+aarch64be      y       n       n       y               n               ?       ?       ?
+alpha          y       n       n       y               n               ?       ?       ?
+earmv4         y       n       n       y               n               ?       ?       ?
+earmv4eb       y       n       n       y               n               ?       ?       ?
+earmv5         y       n       n       y               n               ?       ?       ?
+earmv5eb       y       n       n       y               n               ?       ?       ?
+earmv5hf       y       n       n       y               n               ?       ?       ?
+earmv5hfeb     y       n       n       y               n               ?       ?       ?
+earmv6         y       n       n       y               n               ?       ?       ?
+earmv6eb       y       n       n       y               n               ?       ?       ?
+earmv6hf       y       n       n       y               n               ?       ?       ?
+earmv6hfeb     y       n       n       y               n               ?       ?       ?
+earmv7         y       n       n       y               n               ?       ?       ?
+earmv7eb       y       n       n       y               n               ?       ?       ?
+earmv7hf       y       n       n       y               n               ?       ?       ?
+earmv7hfeb     y       n       n       y               n               ?       ?       ?
+hppa           y       n       n       y               n               ?       ?       ?
+i386           y       n       n       y               n               ?       ?       ?
+ia64           y       n       n       y               n               ?       N/A     ?
+m68000         y       n       n       y               n               ?       ?       ?
+m68k           y       n       n       y               n               ?       ?       ?
+mipseb         y       n       n       y               n               ?       ?       ?
+mipsel         y       n       n       y               n               ?       ?       ?
+mips64eb       y       n       n       y               n               ?       ?       ?
+mips64el       y       n       n       y               n               ?       ?       ?
+powerpc                n[1]    n       n       n               n               ?       ?       ?
+powerpc64      n[1]    n       n       n               n               N/A     N/A     ?
+sh3eb          y       n       n       y               n               ?       ?       ?
+sh3el          y       n       n       y               n               ?       ?       ?
+sparc          y       y       y       y               y               y       ?       ?
+sparc64                y       y       y       y               y               y       ?       ?
+vax            y       n       n       y               n               ?       ?       ?
+x86_64         y       y       y       y               y               y       ?       ?
+riscv32                y       N/A     y       y               y               N/A     N/A     n
+riscv64                y       N/A     y       y               y               N/A     N/A     n
+--
+coldfire       ?       N/A     ?       ?               ?               N/A     N/A
+------------   -----   ------- ------  ----------      ------------    ----    ---
+architecture   tools   kernels libgcc  native-gcc      make release    runs    atf
+
+[1] - rs6000.c is not yet merged, build issues.
+
+
+
+
+CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
+values:                y (yes), k (kernels only), n (failed), r (running), ? (not attempted), nx (yes, no x11)
+
+CPU            platform list
+---            -------- ----
+               acorn32         cats    epoc32  evbarm-eb       evbarm-el       hpcarm          iyonix          netwinder       shark           zaurus
+earmv4:                n               n       n       n               n               n                               n               n                
+earm:                                          n               n                               n                                               n
+earmhf:                                                n               n                                                                                
+earmv6:                                                n               n
+earmv6hf:                                      n               n
+earmv7:                                                n               n
+earmv7hf:                                      n               n
+
+               amiga           atari   cesfic  hp300           luna68k         mac68k          mvme68k         news68k         next68k         sun3    x68k
+m68k:          n               n       n       n               n               n               n               n               n               n       n
+
+               evbmips         emips           ews4800mips     mipsco          newsmips        sgimips
+mipseb:                n               n               n               n               n               n
+
+               evbmips         algor           arc             cobalt          hpcmips         pmax
+mipsel:                n               n               n               n               n               n
+
+               algor           evbmips         pmax
+mips64eb:                      n                
+mips64el:      n               n               n
+
+               amigappc        bebox   evbppc  ibmnws          macppc          mvmeppc         ofppc           prep            rs6000          sandpoint
+powerpc:       n               n       n       n               n               n               n               n               n               n
+
+               evbppc          macppc          ofppc
+powerpc64:     n               n[1]            n[1]
+
+               dreamcast       evbsh3          hpcsh           landisk         mmeye
+sh3eb:                         n                                               n
+sh3el:         n               n               n               n
diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/README.gcc9
--- a/external/gpl3/gcc/README.gcc9     Sun Apr 11 23:55:47 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-$NetBSD: README.gcc9,v 1.16 2020/09/15 09:27:25 mrg Exp $
-
-new stuff:
-       cc1objcplus
-       libmpx
-       liboffloadmic
-       libvtv
-       libcet
-       libphobos
-       d
-       gfortran
-
-
-todo:
-       - audit all uses of new warning-disable variables and
-         convert some from -Wno- to -Wno-error=
-
-arch/feature list.
-
-tools:         does build.sh tools work?
-kernels:       does a kernel run?
-libgcc:                does libgcc build?
-native-gcc:    does a full mknative-gcc complete?
-make release:  does build.sh release complete?
-runs:          does the system boot with a full world?
-atf:           does atf run / compare well
-switched:      has port switched?  y (yes), n (no/ready), ? (not ready)
-
-
-architecture   tools   kernels libgcc  native-gcc      make release    runs    atf     switched
-------------   -----   ------- ------  ----------      ------------    ----    ---     --------
-aarch64                y       y       y       y               y               y       y       y
-aarch64be      y       y       y       y               y               y       y       y
-alpha          y       y       y       y               y               y       y[10]   n
-earmv4         y       y       y       y               y               ?       ?       y
-earmv4eb       y       n       n       y               n               ?       ?       y
-earm           y       n       n       y               n               ?       ?       y
-earmeb         y       n       n       y               n               ?       ?       y
-earmhf         y       n       n       y               n               ?       ?       y
-earmhfeb       y       n       n       y               n               ?       ?       y
-earmv6         y       n       n       y               n               ?       ?       y
-earmv6eb       y       n       n       y               n               ?       ?       y
-earmv6hf       y       n       n       y               n               ?       ?       y
-earmv6hfeb     y       n       n       y               n               ?       ?       y
-earmv7         y       n       n       y               n               ?       ?       y
-earmv7eb       y       n       n       y               n               ?       ?       y
-earmv7hf       y       y       y       y               y               y       y       y
-earmv7hfeb     y       n       n       y               n               ?       ?       y
-hppa           y       y       y       y               y               y       y       y
-i386           y       y       y       y               y               y       y       y
-ia64           y       y       y       y               y               y       N/A     y
-m68000         y       y       y       y               y               y       ?       n
-m68k           y       y       y       y               y               y       y[11]   n
-mipseb         y       y       y       y               y               n       n       y
-mipsel         y       y       y       y               y               y       n       y
-mips64eb       y       y       y       y               y               y       y       y
-mips64el       y       y       y       y               y               n       n       y
-powerpc                y       y       y       y               y               y       y       n
-powerpc64      y       y       y       y               y               N/A     N/A     n
-sh3eb          y       y       y       y               y               ?       ?       ?
-sh3el          y       y       y       y               y               y       y       n
-sparc          y       y       y       y               y               y       y       y
-sparc64                y       y       y       y               y               y       y       y
-vax            y       y       y       y               y               y       y       n
-x86_64         y       y       y       y               y               y       y       y
-riscv32                y       N/A     y       y               y               N/A     N/A     y       
-riscv64                y       N/A     y       y               y               N/A     N/A     y
---
-coldfire       ?       N/A     ?       ?               ?               N/A     N/A
-------------   -----   ------- ------  ----------      ------------    ----    ---
-architecture   tools   kernels libgcc  native-gcc      make release    runs    atf
-
-[1]: kernels and boot programs, etc., don't build
-[10]: tests in lib/libc/sys are skipped; see port-alpha/55652
-[11]: at least there's no regression in kernel and lib/libc/{gen,sys}
-
-
-CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
-values:                y (yes), k (kernels only), n (failed), r (running), ? (not attempted), nx (yes, no x11)
-
-CPU            platform list
----            -------- ----
-               acorn32         cats    epoc32  evbarm-eb       evbarm-el       hpcarm          iyonix          netwinder       shark           zaurus
-earmv4:                y               y       y       y               y               y                               y               y                
-earm:                                          y               y                               y                                               y
-earmhf:                                                y               y                                                                                
-earmv6:                                                y               y
-earmv6hf:                                      y               y
-earmv7:                                                y               y
-earmv7hf:                                      y               y
-
-               amiga           atari   cesfic  hp300           luna68k         mac68k          mvme68k         news68k         next68k         sun3    x68k
-m68k:          y               y       y       y               y               y               y               y               y               y       y
-
-               evbmips         emips           ews4800mips     mipsco          newsmips        sgimips
-mipseb:                y               y               y               y               y               y
-
-               evbmips         algor           arc             cobalt          hpcmips         pmax
-mipsel:                y               y               y               y               y               y
-
-               algor           evbmips         pmax
-mips64eb:                      y                
-mips64el:      y               y               y
-
-               amigappc        bebox   evbppc  ibmnws          macppc          mvmeppc         ofppc           prep            rs6000          sandpoint
-powerpc:       y               y       y       y               y               y               y               y               y               y
-
-               evbppc          macppc          ofppc
-powerpc64:     y               n[1]            n[1]
-
-               dreamcast       evbsh3          hpcsh           landisk         mmeye
-sh3eb:                         y                                               y
-sh3el:         y               y               y               y
diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/dist/gcc/config/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/netbsd.h        Sun Apr 11 23:55:47 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/netbsd.h        Mon Apr 12 00:05:54 2021 +0000
@@ -63,7 +63,7 @@
  * XXX figure out a better way to do this
  */
 #undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include/gcc-9"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-10"
 
 /* Under NetBSD, the normal location of the various *crt*.o files is the
    /usr/lib directory.  */
diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/dist/libgomp/acc_prof.h
--- a/external/gpl3/gcc/dist/libgomp/acc_prof.h Sun Apr 11 23:55:47 2021 +0000
+++ b/external/gpl3/gcc/dist/libgomp/acc_prof.h Mon Apr 12 00:05:54 2021 +0000
@@ -235,7 +235,7 @@
                               acc_register_t) __GOACC_NOTHROW;
 extern void acc_prof_unregister (acc_event_t, acc_prof_callback,
                                 acc_register_t) __GOACC_NOTHROW;
-typedef void (*acc_query_fn) ();
+typedef void (*acc_query_fn) (void);
 typedef acc_query_fn (*acc_prof_lookup_func) (const char *);
 extern acc_query_fn acc_prof_lookup (const char *) __GOACC_NOTHROW;
 /* Don't tag 'acc_register_library' as '__GOACC_NOTHROW': this function can be
diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h
--- a/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h  Sun Apr 11 23:55:47 2021 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/include/ext/numeric_traits.h  Mon Apr 12 00:05:54 2021 +0000
@@ -67,15 +67,15 @@
 
       // NB: these two are also available in std::numeric_limits as compile
       // time constants, but <limits> is big and we can avoid including it.
-      static const bool __is_signed = (_Value)(-1) < 0;
+      static const bool __is_signed_val = (_Value)(-1) < 0;
       static const int __digits
-       = __is_integer_nonstrict<_Value>::__width - __is_signed;
+       = __is_integer_nonstrict<_Value>::__width - __is_signed_val;
 
       // The initializers must be constants so that __max and __min are too.
-      static const _Value __max = __is_signed
+      static const _Value __max = __is_signed_val
        ? (((((_Value)1 << (__digits - 1)) - 1) << 1) + 1)
        : ~(_Value)0;
-      static const _Value __min = __is_signed ? -__max - 1 : (_Value)0;
+      static const _Value __min = __is_signed_val ? -__max - 1 : (_Value)0;
     };
 
   template<typename _Value>
diff -r 42751c027856 -r e28f52233468 external/gpl3/gcc/lib/libgcc/Makefile.inc
--- a/external/gpl3/gcc/lib/libgcc/Makefile.inc Sun Apr 11 23:55:47 2021 +0000
+++ b/external/gpl3/gcc/lib/libgcc/Makefile.inc Mon Apr 12 00:05:54 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.46 2020/09/05 11:40:56 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.47 2021/04/12 00:05:55 mrg Exp $
 
 LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@@ -209,3 +209,7 @@
 # XXX insn-modes.h
 BINBACKENDOBJ!=        cd ${.CURDIR}/../../../usr.bin/backend && ${PRINTOBJDIR}
 CPPFLAGS+=     -I${BINBACKENDOBJ}
+
+#.if !empty(LIBGCC_MACHINE_ARCH:Mearm*)
+COPTS.unwind-dw2.c+=   -Wno-discarded-qualifiers



Home | Main Index | Thread Index | Old Index