port reachover framework to GCC 9.

This commit is contained in:
mrg 2020-09-05 09:50:15 +00:00
parent ef2e34874f
commit 8ecbf5f02b
10 changed files with 74 additions and 21 deletions

View File

@ -1,11 +1,11 @@
# $NetBSD: Makefile.hooks,v 1.2 2018/03/13 03:17:01 mrg Exp $
# $NetBSD: Makefile.hooks,v 1.3 2020/09/05 09:50:15 mrg Exp $
#
# Makefile fragment to build genhooks and *target-hooks*.h
#
.for f in hooks
gen${f}.lo: ${HH} gen${f}.c
gen${f}.lo: ${HH} gen${f}.c ${G_D_TARGET_DEF}
gen${f}: gen${f}.lo ${GENPROG_ERROR_DEPENDS}
${_MKTARGET_LINK}
${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.sanitizer,v 1.10 2019/10/13 21:18:20 mrg Exp $
# $NetBSD: Makefile.sanitizer,v 1.11 2020/09/05 09:50:15 mrg Exp $
SANITIZER=${GCCDIST}/libsanitizer
.PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@ -14,6 +14,7 @@ SANITIZER_SRCS+= \
sancov_flags.cc \
sanitizer_allocator.cc \
sanitizer_allocator_checks.cc \
sanitizer_allocator_report.cc \
sanitizer_common.cc \
sanitizer_common_libcdep.cc \
sanitizer_coverage_libcdep_new.cc \
@ -21,40 +22,50 @@ SANITIZER_SRCS+= \
sanitizer_deadlock_detector2.cc \
sanitizer_errno.cc \
sanitizer_file.cc \
sanitizer_flags.cc \
sanitizer_flag_parser.cc \
sanitizer_flags.cc \
sanitizer_libc.cc \
sanitizer_libignore.cc \
sanitizer_linux.cc \
sanitizer_linux_libcdep.cc \
sanitizer_linux_s390.cc \
sanitizer_mac.cc \
sanitizer_netbsd.cc \
sanitizer_openbsd.cc \
sanitizer_persistent_allocator.cc \
sanitizer_platform_limits_linux.cc \
sanitizer_platform_limits_netbsd.cc \
sanitizer_platform_limits_openbsd.cc \
sanitizer_platform_limits_solaris.cc \
sanitizer_posix.cc \
sanitizer_posix_libcdep.cc \
sanitizer_printf.cc \
sanitizer_procmaps_bsd.cc \
sanitizer_procmaps_common.cc \
sanitizer_procmaps_freebsd.cc \
sanitizer_procmaps_linux.cc \
sanitizer_procmaps_mac.cc \
sanitizer_procmaps_solaris.cc \
sanitizer_rtems.cc \
sanitizer_solaris.cc \
sanitizer_stackdepot.cc \
sanitizer_stacktrace.cc \
sanitizer_stacktrace_libcdep.cc \
sanitizer_symbolizer_mac.cc \
sanitizer_stacktrace_printer.cc \
sanitizer_stacktrace_sparc.cc \
sanitizer_stoptheworld_linux_libcdep.cc \
sanitizer_suppressions.cc \
sanitizer_symbolizer.cc \
sanitizer_symbolizer_libbacktrace.cc \
sanitizer_symbolizer_libcdep.cc \
sanitizer_symbolizer_mac.cc \
sanitizer_symbolizer_posix_libcdep.cc \
sanitizer_symbolizer_report.cc \
sanitizer_symbolizer_win.cc \
sanitizer_termination.cc \
sanitizer_thread_registry.cc \
sanitizer_tls_get_addr.cc \
sanitizer_unwind_linux_libcdep.cc \
sanitizer_unwind_win.cc \
sanitizer_win.cc
# The linux build does this to avoid preinit sections on shared libraries

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.44 2020/01/22 15:10:31 mgorny Exp $
# $NetBSD: Makefile.inc,v 1.45 2020/09/05 09:50:15 mrg Exp $
LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
@ -103,7 +103,11 @@ LIB2_DIVMOD_FUNCS:=${LIB2_DIVMOD_FUNCS:N${f}}
.endfor
LIB2FUNCS= ${LIB2FUNCS_SHORT:=.c}
LIB2FUNCS_ST= ${G_LIB2FUNCS_ST:=.c}
_LIB2FUNCS= ${G_LIB2FUNCS_ST}
.for _f in ${LIB2FUNCS_EXCLUDE}
_LIB2FUNCS= ${_LIB2FUNCS:N${_f}}
.endif
LIB2FUNCS_ST= ${_LIB2FUNCS:=.c}
LIB2DIVMOD= ${LIB2_DIVMOD_FUNCS:=.c}
.if ${HAVE_LIBGCC_EH} == "no"
LIB2_EH= ${G_LIB2ADDEH:M*.c:T:Nunwind-dw2.c:Nunwind-dw2-fde-dip.c:Nunwind-sjlj.c:Nunwind-c.c:Nunwind-arm.c:Npr-support.c}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.48 2019/07/30 20:19:18 christos Exp $
# $NetBSD: Makefile,v 1.49 2020/09/05 09:50:15 mrg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@ -163,6 +163,11 @@ SRCS+= c98-codecvt.cc c11-codecvt.cc
CXX11_ALWAYS= localename.cc \
locale_init.cc
FCHAR8_SRCS+= localename.cc \
locale_init.cc \
c11-codecvt.cc \
limits.cc
.for _s in ${G_cxx11_sources} ${CXX11_ALWAYS}
COPTS.${_s}+= -std=gnu++11
.endfor
@ -171,6 +176,10 @@ COPTS.${_s}+= -std=gnu++11
COPTS.${_s}+= -std=gnu++98
.endfor
.for _s in ${FCHAR8_SRCS}
COPTS.${_s}+= -fchar8_t
.endfor
COPTS.cp-demangle.c += -Wno-unused-function
COPTS.ext-inst.cc+= -Wno-error
@ -190,6 +199,7 @@ COPTS.${f}.cc+= -fimplicit-templates ${G_GLIBCXX_ABI_FLAGS}
.PATH: ${DIST}/libstdc++-v3/src \
${DIST}/libstdc++-v3/src/c++98 \
${DIST}/libstdc++-v3/src/c++11 \
${DIST}/libstdc++-v3/src/c++17 \
${DIST}/libstdc++-v3/src/filesystem \
${DIST}/libstdc++-v3/libsupc++ \
${DIST}/libstdc++-v3/config/os/bsd/netbsd \

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.9 2014/06/01 19:51:01 mrg Exp $
# $NetBSD: Makefile,v 1.10 2020/09/05 09:50:15 mrg Exp $
SUBDIR= backward ext bits debug decimal parallel pb profile
SUBDIR= backward ext bits debug decimal parallel pb profile pstl
SUBDIR+= tr1 tr2
.include <bsd.init.mk>

View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile,v 1.1 2020/09/05 09:50:15 mrg Exp $
.include <bsd.init.mk>
.include "${.CURDIR}/../../arch/${GCC_MACHINE_ARCH}/defs.mk"
.cc: # disable .cc->NULL transform
DIST= ${GCCDIST}
GNUHOSTDIST= ${DIST}
INCS= ${G_pstl_headers}
INCSDIR= /usr/include/g++/pstl
.PATH: ${DIST}/libstdc++-v3/include/profile
# Get default targets including <bsd.inc.mk>.
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.16 2019/10/28 16:25:05 christos Exp $
# $NetBSD: Makefile,v 1.17 2020/09/05 09:50:15 mrg Exp $
UNSUPPORTED_COMPILER.clang= # defined
LIBISCXX = yes
@ -16,6 +16,7 @@ UBSAN_SRCS= \
ubsan_flags.cc \
ubsan_handlers.cc \
ubsan_init.cc \
ubsan_monitor.cc \
ubsan_type_hash.cc \
ubsan_type_hash_itanium.cc \
ubsan_type_hash_win.cc \

View File

@ -1,8 +1,10 @@
# $NetBSD: Makefile.target-defines,v 1.1 2016/03/15 19:12:06 mrg Exp $
# $NetBSD: Makefile.target-defines,v 1.2 2020/09/05 09:50:16 mrg Exp $
CPPFLAGS+= -I${BACKENDOBJ}
CPPFLAGS+= -DCONFIGURE_SPECS="\"\"" \
-DDEFAULT_TARGET_VERSION=\"${G_version}\" \
-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
-DDEFAULT_REAL_TARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" \
-DACCEL_DIR_SUFFIX=\"\"
-DACCEL_DIR_SUFFIX=\"\" \
-DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.59 2020/09/03 18:30:05 jakllsch Exp $
# $NetBSD: Makefile,v 1.60 2020/09/05 09:50:16 mrg Exp $
LIBISPRIVATE= yes
@ -71,7 +71,8 @@ COPTS.varasm.c= -Wno-error
# 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 insn-modes-inline.h
HH= ${HH_NORTL} genrtl.h insn-modes.h insn-modes-inline.h \
gensupport.h read-md.h optabs.def
#
# Generate the various header files we need.
@ -177,8 +178,8 @@ gimple-match.c: genmatch cfn-operators.pd
generic-match.c: genmatch cfn-operators.pd
./genmatch --generic ${GNUHOSTDIST}/gcc/match.pd > generic-match.c.tmp
mv generic-match.c.tmp generic-match.c
genmatch.lo: ${HH_NORTL} ${G_GGC_H}
genmatch: genmatch.lo build-errors.lo build-vec.lo build-hash-table.lo
genmatch.lo: ${HH_NORTL} ${G_GGC_H} case-cfn-macros.h
genmatch: genmatch.lo build-errors.lo build-vec.lo build-hash-table.lo build-sort.lo
${_MKTARGET_LINK}
${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBCPP} ${HOSTLIBIBERTY}
@ -333,10 +334,12 @@ GENPROG_RTL_DEPENDS= ${G_BUILD_RTL:.o=.lo} ${GENPROG_READER_DEPENDS} ${GENPROG_E
#
# First we generate the rules for the generators.
#
GENDEPS.cfn-macros= build-sort.lo
.for f in attr attr-common attrtab automata codes conditions config emit \
extract flags opinit output peep preds recog mddump condmd \
target-def cfn-macros
gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H}
gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} ${GENDEPS.${f}}
gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS}
${_MKTARGET_LINK}
${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
@ -486,11 +489,13 @@ gcov-io.h: gcov-iov.h
df-scan.d df-scan.o: target-hooks-def.h
read-md.d read-md.o read-md.lo: auto-build.h
hash-table.d hash-table.o hash-table.lo: auto-build.h gtype-desc.h
gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h
gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h case-cfn-macros.h
pass_manager.h passes.c: pass-instances.def
context.d coverage.d lto-cgraph.d passes.d statistics.d toplev.d cgraphunit.d: pass_manager.h
context.o coverage.o lto-cgraph.o passes.o statistics.o toplev.o cgraphunit.o: pass_manager.h
insn-opinit.o insn-opinit.d: insn-flags.h
gensupport.o: ${G_HASH_TABLE_H}
vec.o: ${G_HASH_TABLE_H}
.for _f in insn-attrtab insn-automata insn-dfatab insn-latencytab insn-output
${_f}.o ${_f}.d: insn-attr-common.h insn-attr.h
.endfor

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2019/02/06 16:57:30 christos Exp $
# $NetBSD: Makefile,v 1.10 2020/09/05 09:50:16 mrg Exp $
.include <bsd.init.mk>
@ -6,6 +6,8 @@ PROG= gcov
SRCS= ${G_GCOV_OBJS:.o=.c}
CPPFLAGS+= -I${GCCARCH} -I${BACKENDOBJ} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
DPADD+= ${LIBZ}
LDADD+= -lz
BINDIR= /usr/bin