Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common re-port...



details:   https://anonhg.NetBSD.org/src/rev/4d235598b47b
branches:  trunk
changeset: 938313:4d235598b47b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Sep 06 10:55:16 2020 +0000

description:
re-port to netbsd/sparc*
fix build on non-constant pagesize platforms and for dkbad.

diffstat:

 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc                  |  6 ++++--
 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc |  8 ++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r 82193dca4a82 -r 4d235598b47b external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc   Sun Sep 06 10:54:26 2020 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc   Sun Sep 06 10:55:16 2020 +0000
@@ -1908,8 +1908,10 @@
   uptr pc = ucontext->uc_mcontext.gregs[REG_PC];
 # else
   // Historical BSDism here.
-  struct sigcontext *scontext = (struct sigcontext *)context;
-#  if defined(__arch64__)
+  struct sigcontext *scontext = (struct sigcontext *)ucontext;
+#  if SANITIZER_NETBSD
+  uptr pc = scontext->sc_pc;
+#  elif defined(__arch64__)
   uptr pc = scontext->sigc_regs.tpc;
 #  else
   uptr pc = scontext->si_regs.pc;
diff -r 82193dca4a82 -r 4d235598b47b external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc  Sun Sep 06 10:54:26 2020 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cc  Sun Sep 06 10:55:16 2020 +0000
@@ -83,6 +83,7 @@
 #include <stdio.h>
 #include <sys/disk.h>
 #include <sys/disklabel.h>
+#include <sys/dkbad.h>
 #include <sys/mount.h>
 #define RAY_DO_SIGLEV
 #include <dev/biovar.h>
@@ -103,7 +104,10 @@
 #include <dev/sun/fbio.h>
 #include <dev/sun/kbio.h>
 #include <dev/sun/vuid_event.h>
+/* XXX relies upon NBPG which is not always constant, or provided. */
+#ifdef NBPG
 #include <dev/tc/sticio.h>
+#endif
 #include <dev/usb/ukyopon.h>
 #include <dev/usb/usb.h>
 #include <dev/usb/utoppy.h>
@@ -620,7 +624,9 @@
 unsigned struct_spppstatus_sz = sizeof(spppstatus);
 unsigned struct_spppstatusncp_sz = sizeof(spppstatusncp);
 unsigned struct_srt_rt_sz = sizeof(srt_rt);
+#ifdef NBPG
 unsigned struct_stic_xinfo_sz = sizeof(stic_xinfo);
+#endif
 unsigned struct_sun_dkctlr_sz = sizeof(sun_dkctlr);
 unsigned struct_sun_dkgeom_sz = sizeof(sun_dkgeom);
 unsigned struct_sun_dkpart_sz = sizeof(sun_dkpart);
@@ -1183,10 +1189,12 @@
 unsigned IOCTL_KIOCLAYOUT = KIOCLAYOUT;
 unsigned IOCTL_VUIDSFORMAT = VUIDSFORMAT;
 unsigned IOCTL_VUIDGFORMAT = VUIDGFORMAT;
+#ifdef NBPG
 unsigned IOCTL_STICIO_GXINFO = STICIO_GXINFO;
 unsigned IOCTL_STICIO_RESET = STICIO_RESET;
 unsigned IOCTL_STICIO_STARTQ = STICIO_STARTQ;
 unsigned IOCTL_STICIO_STOPQ = STICIO_STOPQ;
+#endif
 unsigned IOCTL_UKYOPON_IDENTIFY = UKYOPON_IDENTIFY;
 unsigned IOCTL_USB_REQUEST = USB_REQUEST;
 unsigned IOCTL_USB_SETDEBUG = USB_SETDEBUG;



Home | Main Index | Thread Index | Old Index