Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc - update README.gcc8 to include current st...



details:   https://anonhg.NetBSD.org/src/rev/380aff9791be
branches:  trunk
changeset: 965858:380aff9791be
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Oct 04 08:51:32 2019 +0000

description:
- update README.gcc8 to include current status
- netbsd/arm64 uses 64 byte malloc alignment
- make lsan compile on sparc*, mips*, ppc and arm64 again
- add missing sparc, alpha and i386 abi compat for struct __sanitizer_addrinfo
- avoid linux includes on arm64
- avoid multiply defined __ubsan_handle_cfi_bad_type when UBSAN_CAN_USE_CXXABI
  isn't defined, and, undefine it
- bad_array_length.cc and bad_array_new.cc lose special build rules
- regen arm64 mknative

diffstat:

 external/gpl3/gcc/README.gcc8                                                                |  76 +++++-----
 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h                                   |   4 +
 external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.cc                                   |   2 +-
 external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h                                    |  11 +-
 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h      |   6 +
 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc |   2 +-
 external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_handlers_cxx.cc                              |   2 +
 external/gpl3/gcc/lib/libsupc++/Makefile.common                                              |   4 +-
 external/gpl3/gcc/lib/libubsan/Makefile                                                      |   4 +-
 external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h                                      |   2 +-
 10 files changed, 64 insertions(+), 49 deletions(-)

diffs (245 lines):

diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/README.gcc8
--- a/external/gpl3/gcc/README.gcc8     Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/README.gcc8     Fri Oct 04 08:51:32 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc8,v 1.1 2019/10/02 04:23:58 mrg Exp $
+$NetBSD: README.gcc8,v 1.2 2019/10/04 08:51:32 mrg Exp $
 
 new stuff:
        cc1objcplus
@@ -21,43 +21,43 @@
 
 architecture   tools   kernels libgcc  native-gcc      make release    runs    atf     switched
 ------------   -----   ------- ------  ----------      ------------    ----    ---     --------
-aarch64                ?       ?       ?       ?               ?               ?       ?       ?
-alpha          ?       ?       ?       ?               ?               ?       ?       ?
-arm            ?       ?       ?       ?               ?               ?       ?       ?
-armeb          ?       ?       ?       ?               ?               ?       ?       ?
-earmv4         ?       ?       ?       ?               ?               ?       ?       ?
-earmv4eb       ?       ?       ?       ?               ?               ?       ?       ?
-earm           ?       ?       ?       ?               ?               ?       ?       ?
-earmeb         ?       ?       ?       ?               ?               ?       ?       ?
-earmhf         ?       ?       ?       ?               ?               ?       ?       ?
-earmhfeb       ?       ?       ?       ?               ?               ?       ?       ?
-earmv6         ?       ?       ?       ?               ?               ?       ?       ?
-earmv6eb       ?       ?       ?       ?               ?               ?       ?       ?
-earmv6hf       ?       ?       ?       ?               ?               ?       ?       ?
-earmv6hfeb     ?       ?       ?       ?               ?               ?       ?       ?
-earmv7         ?       ?       ?       ?               ?               ?       ?       ?
-earmv7eb       ?       ?       ?       ?               ?               ?       ?       ?
-earmv7hf       ?       ?       ?       ?               ?               ?       ?       ?
-earmv7hfeb     ?       ?       ?       ?               ?               ?       ?       ?
-hppa           ?       ?       ?       ?               ?               ?       ?       ?
-i386           ?       ?       ?       ?               ?               ?       ?       ?
-ia64           ?       ?       ?       ?               ?               ?       ?       ?
-m68000         ?       ?       ?       ?               ?               ?       ?       ?
-m68k           ?       ?       ?       ?               ?               ?       ?       ?
-mipseb         ?       ?       ?       ?               ?               ?       ?       ?
-mipsel         ?       ?       ?       ?               ?               ?       ?       ?
-mips64eb       ?       ?       ?       ?               ?               ?       ?       ?
-mips64el       ?       ?       ?       ?               ?               ?       ?       ?
-powerpc                ?       ?       ?       ?               ?               ?       ?       ?
-powerpc64      ?       ?       ?       ?               ?               ?       ?       ?
-sh3eb          ?       ?       ?       ?               ?               ?       ?       ?
-sh3el          ?       ?       ?       ?               ?               ?       ?       ?
-sparc          ?       ?       ?       ?               ?               ?       ?       ?
-sparc64                ?       ?       ?       ?               ?               ?       ?       ?
-vax            ?       ?       ?       ?               ?               ?       ?       ?
-x86_64         ?       ?       ?       ?               ?               ?       ?       ?
-riscv32                ?       ?       ?       ?               ?               ?       ?       ?       
-riscv64                ?       ?       ?       ?               ?               ?       ?       ?
+aarch64                y       y       y       y               ?               ?       ?       ?
+alpha          y       ?       ?       y               ?               ?       ?       ?
+arm            y       ?       ?       y               ?               ?       ?       ?
+armeb          y       ?       ?       y               ?               ?       ?       ?
+earmv4         y       ?       ?       y               ?               ?       ?       ?
+earmv4eb       y       ?       ?       y               ?               ?       ?       ?
+earm           y       ?       ?       y               ?               ?       ?       ?
+earmeb         y       ?       ?       y               ?               ?       ?       ?
+earmhf         y       ?       ?       y               ?               ?       ?       ?
+earmhfeb       y       ?       ?       y               ?               ?       ?       ?
+earmv6         y       ?       ?       y               ?               ?       ?       ?
+earmv6eb       y       ?       ?       y               ?               ?       ?       ?
+earmv6hf       y       ?       ?       y               ?               ?       ?       ?
+earmv6hfeb     y       ?       ?       y               ?               ?       ?       ?
+earmv7         y       ?       ?       y               ?               ?       ?       ?
+earmv7eb       y       ?       ?       y               ?               ?       ?       ?
+earmv7hf       y       ?       ?       y               ?               ?       ?       ?
+earmv7hfeb     y       ?       ?       y               ?               ?       ?       ?
+hppa           y       ?       ?       y               ?               ?       ?       ?
+i386           y       ?       ?       y               ?               ?       ?       ?
+ia64           y       ?       ?       y               ?               ?       ?       ?
+m68000         y       ?       ?       y               ?               ?       ?       ?
+m68k           y       ?       ?       y               ?               ?       ?       ?
+mipseb         y       ?       ?       y               ?               ?       ?       ?
+mipsel         y       ?       ?       y               ?               ?       ?       ?
+mips64eb       y       ?       ?       y               ?               ?       ?       ?
+mips64el       y       ?       ?       y               ?               ?       ?       ?
+powerpc                y       ?       ?       y               ?               ?       ?       ?
+powerpc64      y       ?       ?       y               ?               ?       ?       ?
+sh3eb          y       ?       ?       y               ?               ?       ?       ?
+sh3el          y       ?       ?       y               ?               ?       ?       ?
+sparc          y       y       y       y               y               y       ?       ?
+sparc64                y       ?       ?       y               ?               ?       ?       ?
+vax            y       ?       ?       y               ?               ?       ?       ?
+x86_64         y       y       y       y               y               y       ?       ?
+riscv32                y       ?       ?       y               ?               ?       ?       ?       
+riscv64                y       ?       ?       y               ?               ?       ?       ?
 --
 coldfire       ?       N/A     ?       ?               ?               N/A     N/A
 ------------   -----   ------- ------  ----------      ------------    ----    ---
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h        Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h        Fri Oct 04 08:51:32 2019 +0000
@@ -20,6 +20,10 @@
 #ifndef GCC_AARCH64_NETBSD_H
 #define GCC_AARCH64_NETBSD_H
 
+/* NetBSD malloc(3) does 64, not 128 bytes. */
+#undef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT  64
+
 #define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
 #define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
 
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.cc
--- a/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.cc        Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.cc        Fri Oct 04 08:51:32 2019 +0000
@@ -24,7 +24,7 @@
 extern "C" void *memset(void *ptr, int value, uptr num);
 
 namespace __lsan {
-#if defined(__i386__) || defined(__arm__)
+#if defined(__i386__) || defined(__arm__) || ((defined(__sparc__) || defined(__powerpc__)) && !defined(_LP64))
 static const uptr kMaxAllowedMallocSize = 1UL << 30;
 #elif defined(__mips64) || defined(__aarch64__)
 static const uptr kMaxAllowedMallocSize = 4UL << 30;
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
--- a/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h Fri Oct 04 08:51:32 2019 +0000
@@ -48,8 +48,10 @@
   u32 stack_trace_id;
 };
 
-#if defined(__mips64) || defined(__aarch64__) || defined(__i386__) || \
-    defined(__arm__)
+#if defined(__aarch64__) || defined(__i386__) || defined(__arm__) || \
+    ((defined(__sparc__) || \
+      defined(__powerpc__) || \
+      defined(__mips__)) && !defined(_LP64))
 static const uptr kRegionSizeLog = 20;
 static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog;
 typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;
@@ -65,7 +67,8 @@
   static const uptr kFlags = 0;
 };
 typedef SizeClassAllocator32<AP32> PrimaryAllocator;
-#elif defined(__x86_64__) || defined(__powerpc64__)
+#elif defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || \
+      (defined(__mips64) && defined(_LP64))
 struct AP64 {  // Allocator64 parameters. Deliberately using a short name.
   static const uptr kSpaceBeg = 0x600000000000ULL;
   static const uptr kSpaceSize =  0x40000000000ULL; // 4T.
@@ -76,6 +79,8 @@
 };
 
 typedef SizeClassAllocator64<AP64> PrimaryAllocator;
+#else
+#error "unsupported lsan platform"
 #endif
 typedef SizeClassAllocatorLocalCache<PrimaryAllocator> AllocatorCache;
 
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h   Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h   Fri Oct 04 08:51:32 2019 +0000
@@ -262,7 +262,13 @@
   int ai_family;
   int ai_socktype;
   int ai_protocol;
+#if defined(__sparc__) && defined(_LP64)
+  int __ai_pad0;      /* ABI compatibility */
+#endif  
   unsigned ai_addrlen;
+#if defined(__alpha__) || (defined(__i386__) && defined(_LP64))
+  int __ai_pad0;      /* ABI compatibility */
+#endif  
   char *ai_canonname;
   void *ai_addr;
   struct __sanitizer_addrinfo *ai_next;
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc      Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc      Fri Oct 04 08:51:32 2019 +0000
@@ -33,7 +33,7 @@
 #include <sys/types.h> // for pid_t
 #include <sys/uio.h> // for iovec
 #include <elf.h> // for NT_PRSTATUS
-#if defined(__aarch64__) && !SANITIZER_ANDROID
+#if defined(__aarch64__) && !(SANITIZER_ANDROID || SANITIZER_NETBSD)
 // GLIBC 2.20+ sys/user does not include asm/ptrace.h
 # include <asm/ptrace.h>
 #endif
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_handlers_cxx.cc
--- a/external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_handlers_cxx.cc   Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/ubsan/ubsan_handlers_cxx.cc   Fri Oct 04 08:51:32 2019 +0000
@@ -92,6 +92,7 @@
     Die();
 }
 
+#ifdef UBSAN_CAN_USE_CXXABI
 namespace __ubsan {
 void __ubsan_handle_cfi_bad_type(CFICheckFailData *Data, ValueHandle Vtable,
                                  bool ValidVtable, ReportOptions Opts) {
@@ -142,5 +143,6 @@
   }
 }
 }  // namespace __ubsan
+#endif
 
 #endif // CAN_SANITIZE_UB
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/lib/libsupc++/Makefile.common
--- a/external/gpl3/gcc/lib/libsupc++/Makefile.common   Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/lib/libsupc++/Makefile.common   Fri Oct 04 08:51:32 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.common,v 1.14 2019/10/02 06:51:59 mrg Exp $
+#      $NetBSD: Makefile.common,v 1.15 2019/10/04 08:51:33 mrg Exp $
 
 DIST=          ${GCCDIST}
 GNUHOSTDIST=   ${DIST}
@@ -35,8 +35,6 @@
 .endfor
 
 STD_GNU11=     \
-               bad_array_length.cc \
-               bad_array_new.cc \
                eh_aux_runtime.cc \
                eh_ptr.cc \
                eh_terminate.cc \
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/lib/libubsan/Makefile
--- a/external/gpl3/gcc/lib/libubsan/Makefile   Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/lib/libubsan/Makefile   Fri Oct 04 08:51:32 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.13 2019/10/02 06:51:59 mrg Exp $
+#      $NetBSD: Makefile,v 1.14 2019/10/04 08:51:33 mrg Exp $
 
 UNSUPPORTED_COMPILER.clang=    # defined
 LIBISCXX = yes
@@ -31,6 +31,6 @@
 LIB=   ubsan
 SRCS+= ${UBSAN_SRCS}
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
-CPPFLAGS+=-DCAN_SANITIZE_UB=1 -DUBSAN_CAN_USE_CXXABI=1
+CPPFLAGS+=-DCAN_SANITIZE_UB=1
 
 .include <bsd.lib.mk>
diff -r a03262bd3bd5 -r 380aff9791be external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h
--- a/external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h   Fri Oct 04 06:49:40 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.h   Fri Oct 04 08:51:32 2019 +0000
@@ -3,7 +3,7 @@
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* Generated automatically. */
-static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=aarch64--netbsd --enable-long-long --enable-threads 
--with-bugurl=http://www.NetBSD.org/support/send-pr.html --with-pkgversion='NetBSD nb1 20190930' --with-system-zlib --without-isl --enable-__cxa_atexit --enable-libstdcxx-time=rt 
--enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419 --with-default-libstdcxx-abi=new 
--with-mpc-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/mpfr/lib/libmpfr 
--with-gmp-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src 
--with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/aarch64 --enable-tls --disable-multilib --disable-libstdcxx-pch --build=aarch64--netbsd --host=aarch64--netbsd 
--with-sysroot=/var/obj/mknative/evbarm-aarch64/usr/src/destdir.evbarm : (reconfigured) ";
+static const char configuration_arguments[] = "/usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=aarch64--netbsd --enable-long-long --enable-threads 
--with-bugurl=http://www.NetBSD.org/support/send-pr.html --with-pkgversion='NetBSD nb1 20190930' --with-system-zlib --without-isl --enable-__cxa_atexit --enable-libstdcxx-time=rt 
--enable-libstdcxx-threads --with-diagnostics-color=auto-if-env --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419 --with-default-libstdcxx-abi=new 
--with-mpc-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/mpfr/lib/libmpfr 
--with-gmp-lib=/var/obj/mknative/evbarm-aarch64/usr/src/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src 
--with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/aarch64 --enable-tls --disable-multilib --disable-libstdcxx-pch --build=aarch64--netbsd --host=aarch64--netbsd 
--with-sysroot=/var/obj/mknative/evbarm-aarch64/usr/src/destdir.evbarm";
 static const char thread_model[] = "posix";
 
 static const struct {



Home | Main Index | Thread Index | Old Index