Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc make most of this compile:
details: https://anonhg.NetBSD.org/src/rev/46f0a0ecbae7
branches: trunk
changeset: 845434:46f0a0ecbae7
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Oct 02 06:51:59 2019 +0000
description:
make most of this compile:
- sanitizer_procmaps_netbsd.cc is obsolete.
- fix merge botches where upstrem has as slightly different version
is upstream than prior local
- libstdc++ default is now gnu++17
- ubsan needs UBSAN_CAN_USE_CXXABI set
- properly use $G_RTL_BASE_H not (empty) $RTL_BASE_H
- libbackend HH gains new generated insn-modes-inline.h, and read-md.c
gains the HH dep.
diffstat:
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc | 6 -
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | 8 +-
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc | 77 ----------
external/gpl3/gcc/lib/Makefile.sanitizer | 3 +-
external/gpl3/gcc/lib/libsupc++/Makefile.common | 4 +-
external/gpl3/gcc/lib/libubsan/Makefile | 4 +-
external/gpl3/gcc/usr.bin/backend/Makefile | 13 +-
7 files changed, 14 insertions(+), 101 deletions(-)
diffs (225 lines):
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc Wed Oct 02 06:51:59 2019 +0000
@@ -369,12 +369,6 @@
uptr ThreadSelf() { return (uptr)pthread_self(); }
#endif // SANITIZER_NETBSD
-#if SANITIZER_NETBSD
-uptr ThreadSelf() {
- return (uptr)pthread_self();
-}
-#endif // SANITIZER_NETBSD
-
#if !SANITIZER_GO
static void GetTls(uptr *addr, uptr *size) {
#if SANITIZER_LINUX && !SANITIZER_ANDROID
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Oct 02 06:51:59 2019 +0000
@@ -76,18 +76,12 @@
#include <net/if_arp.h>
#endif
-#if SANITIZER_FREEBSD
-# include <sys/consio.h>
-# include <sys/kbio.h>
-# include <sys/link_elf.h>
-# include <net/ethernet.h>
-#endif
-
#if SANITIZER_NETBSD
# include <link_elf.h>
# include <net/if_ether.h>
# define statfs statvfs
# define d_ino d_fileno
+# include "sanitizer_platform_limits_netbsd.h"
#endif
#if SANITIZER_FREEBSD || SANITIZER_NETBSD
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc Wed Oct 02 05:58:03 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-//===-- sanitizer_procmaps_freebsd.cc -------------------------------------===//
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// Information about the process mappings (FreeBSD-specific parts).
-//===----------------------------------------------------------------------===//
-
-#include "sanitizer_platform.h"
-#if SANITIZER_NETBSD
-#include "sanitizer_common.h"
-#include "sanitizer_procmaps.h"
-
-#include <unistd.h>
-#include <sys/sysctl.h>
-
-namespace __sanitizer {
-
-void ReadProcMaps(ProcSelfMapsBuff *proc_maps) {
- struct kinfo_vmentry *kiv;
- const int Mib[] = { CTL_VM, VM_PROC, VM_PROC_MAP, getpid(), sizeof(*kiv) };
- size_t Size = 0;
- int Err = sysctl(Mib, __arraycount(Mib), NULL, &Size, NULL, 0);
- CHECK_EQ(Err, 0);
- CHECK_GT(Size, 0);
-
- size_t MmapedSize = Size * 4 / 3;
- void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
- Size = MmapedSize;
- Err = sysctl(Mib, __arraycount(Mib), VmMap, &Size, NULL, 0);
- CHECK_EQ(Err, 0);
-
- proc_maps->data = (char*)VmMap;
- proc_maps->mmaped_size = MmapedSize;
- proc_maps->len = Size;
-}
-
-bool MemoryMappingLayout::Next(uptr *start, uptr *end, uptr *offset,
- char filename[], uptr filename_size,
- uptr *protection) {
- char *last = proc_self_maps_.data + proc_self_maps_.len;
- if (current_ >= last) return false;
- uptr dummy;
- if (!start) start = &dummy;
- if (!end) end = &dummy;
- if (!offset) offset = &dummy;
- if (!protection) protection = &dummy;
- struct kinfo_vmentry *VmEntry = (struct kinfo_vmentry*)current_;
-
- *start = (uptr)VmEntry->kve_start;
- *end = (uptr)VmEntry->kve_end;
- *offset = (uptr)VmEntry->kve_offset;
-
- *protection = 0;
- if ((VmEntry->kve_protection & KVME_PROT_READ) != 0)
- *protection |= kProtectionRead;
- if ((VmEntry->kve_protection & KVME_PROT_WRITE) != 0)
- *protection |= kProtectionWrite;
- if ((VmEntry->kve_protection & KVME_PROT_EXEC) != 0)
- *protection |= kProtectionExecute;
-
- if (filename != NULL && filename_size > 0) {
- internal_snprintf(filename,
- Min(filename_size, (uptr)PATH_MAX),
- "%s", VmEntry->kve_path);
- }
-
- current_ += sizeof(*VmEntry);
-
- return true;
-}
-
-} // namespace __sanitizer
-
-#endif // SANITIZER_NETBSD
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/lib/Makefile.sanitizer
--- a/external/gpl3/gcc/lib/Makefile.sanitizer Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/lib/Makefile.sanitizer Wed Oct 02 06:51:59 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.sanitizer,v 1.8 2019/10/02 02:54:34 mrg Exp $
+# $NetBSD: Makefile.sanitizer,v 1.9 2019/10/02 06:51:59 mrg Exp $
SANITIZER=${GCCDIST}/libsanitizer
.PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -37,7 +37,6 @@
sanitizer_printf.cc \
sanitizer_procmaps_common.cc \
sanitizer_procmaps_freebsd.cc \
- sanitizer_procmaps_netbsd.cc \
sanitizer_procmaps_linux.cc \
sanitizer_procmaps_mac.cc \
sanitizer_stackdepot.cc \
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/lib/libsupc++/Makefile.common
--- a/external/gpl3/gcc/lib/libsupc++/Makefile.common Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/lib/libsupc++/Makefile.common Wed Oct 02 06:51:59 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.13 2019/02/28 01:11:04 mrg Exp $
+# $NetBSD: Makefile.common,v 1.14 2019/10/02 06:51:59 mrg Exp $
DIST= ${GCCDIST}
GNUHOSTDIST= ${DIST}
@@ -57,7 +57,7 @@
del_opvs.cc
.for _f in ${STD_GNU14} ${G_FILESYSTEM_SOURCES:M*.cc}
-COPTS.${_f}+= -std=gnu++14 -Wno-sized-deallocation
+COPTS.${_f}+= -std=gnu++17 -Wno-sized-deallocation
.endfor
STD_GNU1Z= \
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/lib/libubsan/Makefile
--- a/external/gpl3/gcc/lib/libubsan/Makefile Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/lib/libubsan/Makefile Wed Oct 02 06:51:59 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2019/10/02 02:54:35 mrg Exp $
+# $NetBSD: Makefile,v 1.13 2019/10/02 06:51:59 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
+CPPFLAGS+=-DCAN_SANITIZE_UB=1 -DUBSAN_CAN_USE_CXXABI=1
.include <bsd.lib.mk>
diff -r afa47f2af486 -r 46f0a0ecbae7 external/gpl3/gcc/usr.bin/backend/Makefile
--- a/external/gpl3/gcc/usr.bin/backend/Makefile Wed Oct 02 05:58:03 2019 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile Wed Oct 02 06:51:59 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.55 2019/02/09 21:03:24 maya Exp $
+# $NetBSD: Makefile,v 1.56 2019/10/02 06:52:00 mrg Exp $
LIBISPRIVATE= yes
@@ -71,7 +71,7 @@
# Headers that host objects depend on (except gen*rtl*)
HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list}
-HH= ${HH_NORTL} genrtl.h insn-modes.h
+HH= ${HH_NORTL} genrtl.h insn-modes.h insn-modes-inline.h
#
# Generate the various header files we need.
@@ -161,12 +161,15 @@
min-insn-modes.c: genmodes
${_MKTARGET_CREATE}
./genmodes -m >${.TARGET}
+insn-modes-inline.h: genmodes
+ ${_MKTARGET_CREATE}
+ ./genmodes -i >${.TARGET}
genmodes.lo: ${HH_NORTL}
genmodes: genmodes.lo build-errors.lo
${_MKTARGET_LINK}
${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
-CLEANFILES+= genmodes insn-modes.c insn-modes.h-test min-insn-modes.c
+CLEANFILES+= genmodes insn-modes.c insn-modes.h-test min-insn-modes.c insn-modes-inline.h
gimple-match.c: genmatch cfn-operators.pd
./genmatch --gimple ${GNUHOSTDIST}/gcc/match.pd > gimple-match.c.tmp
@@ -257,7 +260,7 @@
${GNUHOSTDIST}/gcc/print-rtl.c >${.TARGET}
build-print-rtl.lo: ${HH}
build-print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
- $(GTM_H) $(RTL_BASE_H)
+ ${GTM_H} ${G_RTL_BASE_H}
CLEANFILES+= build-print-rtl.c
build-bitmap.c: bitmap.c \
@@ -313,7 +316,7 @@
#
# The normal insn-foo generators
#
-.for f in gensupport.c read-rtl.c dummy-conditions.c
+.for f in gensupport.c read-rtl.c dummy-conditions.c read-md.c
${f:R}.lo: ${HH}
.endfor
Home |
Main Index |
Thread Index |
Old Index