pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/gcc7
Module Name: pkgsrc
Committed By: maya
Date: Wed May 3 00:21:03 UTC 2017
Added Files:
pkgsrc/lang/gcc7: DESCR Makefile buildlink3.mk distinfo options.mk
version.mk
pkgsrc/lang/gcc7/patches: patch-contrib_download__prerequisites
patch-gcc_Makefile.in patch-gcc_config.gcc
patch-gcc_config_arm_arm.h patch-gcc_config_netbsd-protos.h
patch-gcc_config_netbsd.c patch-gcc_config_netbsd.h
patch-gcc_config_t-netbsd patch-gcc_config_x-netbsd
patch-gcc_configure patch-gcc_ggc-common.c patch-gcc_lto_lto.c
patch-gcc_system.h patch-isl_configure patch-libcilkrts_configure
patch-libcilkrts_runtime_os-unix.c patch-libdecnumber_decNumber.c
patch-libffi_configure patch-libffi_testsuite_libffi.call_float2.c
patch-libgcc_crtstuff.c patch-libgfortran_configure
patch-libgo_Makefile.in patch-libsanitizer_configure.tgt
patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h
patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc
patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
patch-libstdc++-v3_libsupc++_unwind-cxx.h
Log Message:
Add GCC 7.1.0
GCC Java removed, package now uses ISL 0.16.1
Release notes:
We are proud to announce the next, major release of the
GNU Compiler Collection, 7.1. This year we celebrated the 30th
anniversary of the first GCC beta release and this month
we will celebrate 30 years since the GCC 1.0 release.
GCC 7.1 is a major release containing substantial new
functionality not available in GCC 6.x or previous GCC releases.
The C++ frontend now has experimental support for all of the current C++17
draft, with the -std=c++1z and -std=gnu++1z options, and the libstdc++
library has most of the C++17 draft library features implemented too.
This releases features various improvements in the emitted diagnostics,
including improved locations, location ranges, suggestions for misspelled
identifiers, option names, fix-it hints and various new warnings
have been added.
The optimizers have been improved, with improvements appearing in all of
intra- and inter-procedural optimizations, link time optimizations and
various target backends, including, but not limited to, additions of store
merging pass, code hoisting optimization, loop splitting, and
shrink wrapping improvements.
The Address Sanitizer can now report uses of variables after leaving their
scope. GCC now can be configured for OpenMP 4.5 offloading to NVidia PTX
GPGPUs.
Some code that compiled successfully with older GCC versions might require
some code adjustments, see http://gcc.gnu.org/gcc-7/porting_to.html for
details.
See
https://gcc.gnu.org/gcc-7/changes.html
for more information about changes in GCC 7.1.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc7/DESCR pkgsrc/lang/gcc7/Makefile \
pkgsrc/lang/gcc7/buildlink3.mk pkgsrc/lang/gcc7/distinfo \
pkgsrc/lang/gcc7/options.mk pkgsrc/lang/gcc7/version.mk
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/gcc7/patches/patch-contrib_download__prerequisites \
pkgsrc/lang/gcc7/patches/patch-gcc_Makefile.in \
pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc \
pkgsrc/lang/gcc7/patches/patch-gcc_config_arm_arm.h \
pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd-protos.h \
pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.c \
pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.h \
pkgsrc/lang/gcc7/patches/patch-gcc_config_t-netbsd \
pkgsrc/lang/gcc7/patches/patch-gcc_config_x-netbsd \
pkgsrc/lang/gcc7/patches/patch-gcc_configure \
pkgsrc/lang/gcc7/patches/patch-gcc_ggc-common.c \
pkgsrc/lang/gcc7/patches/patch-gcc_lto_lto.c \
pkgsrc/lang/gcc7/patches/patch-gcc_system.h \
pkgsrc/lang/gcc7/patches/patch-isl_configure \
pkgsrc/lang/gcc7/patches/patch-libcilkrts_configure \
pkgsrc/lang/gcc7/patches/patch-libcilkrts_runtime_os-unix.c \
pkgsrc/lang/gcc7/patches/patch-libdecnumber_decNumber.c \
pkgsrc/lang/gcc7/patches/patch-libffi_configure \
pkgsrc/lang/gcc7/patches/patch-libffi_testsuite_libffi.call_float2.c \
pkgsrc/lang/gcc7/patches/patch-libgcc_crtstuff.c \
pkgsrc/lang/gcc7/patches/patch-libgfortran_configure \
pkgsrc/lang/gcc7/patches/patch-libgo_Makefile.in \
pkgsrc/lang/gcc7/patches/patch-libsanitizer_configure.tgt \
pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h \
pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc \
pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h \
pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_unwind-cxx.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/lang/gcc7/DESCR
diff -u /dev/null pkgsrc/lang/gcc7/DESCR:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/DESCR Wed May 3 00:21:03 2017
@@ -0,0 +1,2 @@
+The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C,
+Fortran, and Go, as well as libraries for these languages.
Index: pkgsrc/lang/gcc7/Makefile
diff -u /dev/null pkgsrc/lang/gcc7/Makefile:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/Makefile Wed May 3 00:21:03 2017
@@ -0,0 +1,181 @@
+# $NetBSD: Makefile,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+GCC_PKGNAME= gcc7
+.include "version.mk"
+
+DISTNAME= gcc-${GCC7S_DIST_VERSION}
+PKGNAME= ${GCC_PKGNAME}-${GCC7S_DIST_VERSION}
+## When bumping the PKGREVISION of this package the PKGREVISION of
+## lang/gcc7-libs needs to be bump to be at least 1 more than the
+## PKGREVISION of this package!
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC7S_DIST_VERSION}/}
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://gcc.gnu.org/
+COMMENT= The GNU Compiler Collection (GCC) - 7.0 Release Series
+LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+
+DISTFILES= ${DEFAULT_DISTFILES}
+EXTRACT_ONLY= ${DEFAULT_DISTFILES}
+
+NOT_FOR_PLATFORM= Interix-*-*
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake makeinfo sed:run tar:build
+
+GNU_CONFIGURE= yes
+## Build outside ${WRKSRC}
+OBJDIR= ../build
+CONFIGURE_DIRS= ${OBJDIR}
+CONFIGURE_SCRIPT= ../${DISTNAME}/configure
+GCC_SUBPREFIX= ${GCC_PKGNAME}
+GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
+GNU_CONFIGURE_PREFIX= ${GCC_PREFIX}
+INFO_FILES= yes
+CONFIGURE_ARGS+= --disable-libstdcxx-pch
+
+UNLIMIT_RESOURCES+= datasize
+UNLIMIT_RESOURCES+= stacksize
+
+SUBST_CLASSES+= vars
+SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars}
+SUBST_STAGE.vars= pre-configure
+SUBST_FILES.vars= gcc/Makefile.in
+SUBST_VARS.vars= GCC_TARGET_MACHINE
+
+.include "../../mk/bsd.prefs.mk"
+
+LANGS= c
+
+# In some cases LINKER_RPATH_FLAG needs a trailing space.
+LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /}
+
+## The Library rpath to use in end programs.
+LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*}
+
+# The "-static-libstdc++ -static-libgcc" flags are normally added to the
+# boot-ldflags by configure but because we are supply the boot-ldflags
+# we mash supply them.
+BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET}
+# Needed on Darwin when LDFLAGS point to a SDK
+BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*}
+# GCC does not understand this option; remove it, or stage build will fail
+BUILDLINK_TRANSFORM+= rm:-stdlib=libc++
+
+.include "options.mk"
+
+## For graphite support.
+.if !empty(PKG_OPTIONS:Mgcc-graphite)
+
+post-extract:
+ ${TAR} -jxf ${DISTDIR}/${ISL16}.tar.bz2 -C ${WRKSRC}
+ ${MV} ${WRKSRC}/${ISL16} ${WRKSRC}/isl
+.endif
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-*)
+# on NetBSD, use the native SSP code in libc
+CONFIGURE_ARGS+= --disable-libssp
+.else
+CONFIGURE_ARGS+= --enable-libssp
+.endif
+
+## For target librarys and libjava programs.
+CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q}
+
+CONFIGURE_ARGS+= --enable-languages=${LANGS:Q}
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ARGS+= --enable-long-long
+CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
+CONFIGURE_ARGS+= --enable-threads=posix
+CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
+CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld
+CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as
+MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes
+MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no
+MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no
+MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no
+MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no
+
+CONFIGURE_ARGS.DragonFly+= --disable-bootstrap
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386)
+CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486
+.endif
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
+CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse
+.endif
+
+.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
+CONFIGURE_ARGS+= --with-dwarf2
+.endif
+
+
+# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
+# a binary so we need to make sure we give it the installed sed and not
+# the tool wrapped one.
+MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED}
+MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED}
+
+# Determine whether to use binutils
+.if ${OPSYS} == "SunOS"
+. if exists(/usr/sfw/bin/gobjdump)
+CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
+. endif
+. if exists(/usr/bin/ld)
+CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld
+. else
+CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
+. endif
+. if exists(/usr/sfw/bin/gas)
+CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas
+. elif exists(/usr/ccs/bin/as)
+CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as
+. else
+BUILDLINK_DEPMETHOD.binutils= full
+. include "../../devel/binutils/buildlink3.mk"
+CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas
+. endif
+.endif
+
+.if ${OS_VARIANT} == "SmartOS"
+SUBST_CLASSES+= ccs
+SUBST_STAGE.ccs= pre-configure
+SUBST_FILES.ccs= contrib/make_sunver.pl
+SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g'
+.endif
+
+pre-configure:
+ ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
+
+TEST_TARGET= -k check || ${TRUE}
+pre-test:
+ ${RUN} \
+ if runtest --version >/dev/null 2>/dev/null ; then \
+ : ; \
+ else \
+ ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \
+ exit 1 ; \
+ fi
+post-test:
+ ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \
+ ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log
+ ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log"
+
+post-install:
+ ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \
+ ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc )
+.if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11"
+ ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE}
+ ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE}
+.endif
+
+GENERATE_PLIST+= \
+ cd ${DESTDIR}${PREFIX} && \
+ ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ;
+
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/lang/gcc7/buildlink3.mk
diff -u /dev/null pkgsrc/lang/gcc7/buildlink3.mk:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/buildlink3.mk Wed May 3 00:21:03 2017
@@ -0,0 +1,31 @@
+# $NetBSD: buildlink3.mk,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+BUILDLINK_TREE+= gcc7snapshot
+
+.if !defined(GCC7_BUILDLINK3_MK)
+GCC6SNAPSHOT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.gcc7snapshot+= gcc6>=${_GCC_REQD}
+BUILDLINK_ABI_DEPENDS.gcc7snapshot+= gcc6>=7.0
+BUILDLINK_PKGSRCDIR.gcc7snapshot= ../../wip/gcc7snapshot
+BUILDLINK_DEPMETHOD.gcc7snapshot?= build
+
+BUILDLINK_FILES.gcc7snapshot= #empty
+BUILDLINK_AUTO_VARS.gcc7snapshot= no
+
+# Packages that link against shared libraries need a full dependency.
+#.if defined(_USE_GCC_SHLIB)
+#DEPENDS+= {gcc7, gcc7-libs}>=${_GCC_REQD}:../../lang/gcc7-libs
+#ABI_DEPENDS+= {gcc7,gcc7-libs}>=7.0:../../lang/gcc7-libs
+#.endif
+
+pkgbase := gcc7snapshot
+.include "../../mk/pkg-build-options.mk"
+.if !empty(PKG_BUILD_OPTIONS.gcc7snapshot:Mgcc-java)
+.include "../../devel/zlib/buildlink3.mk"
+.endif
+
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.endif # GCC7SNAPSHOT_BUILDLINK3_MK
+BUILDLINK_TREE+= -gcc7snapshot
Index: pkgsrc/lang/gcc7/distinfo
diff -u /dev/null pkgsrc/lang/gcc7/distinfo:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/distinfo Wed May 3 00:21:03 2017
@@ -0,0 +1,37 @@
+$NetBSD: distinfo,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+SHA1 (gcc-7.1.0.tar.bz2) = 9f1e907f27eadefe7d5f7567c09e17805d9c8837
+RMD160 (gcc-7.1.0.tar.bz2) = a228dc45a09eda91b1a201d234f9013b3009b461
+SHA512 (gcc-7.1.0.tar.bz2) = b5d952be9a10f0e0926bb2868877d10544039d6d2f35ba0a08f51231dd622a007650764a03e173194701467547789ad7d2d9cbc10adcdf118d619cdedbd14aec
+Size (gcc-7.1.0.tar.bz2) = 84303533 bytes
+SHA1 (isl-0.16.1.tar.bz2) = c5a2b201bf05229647e73203c0bf2d9679d4d21f
+RMD160 (isl-0.16.1.tar.bz2) = 5a99db3fe0d0a1f6bbac1ed4448f2403495c55b2
+SHA512 (isl-0.16.1.tar.bz2) = c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
+Size (isl-0.16.1.tar.bz2) = 1626446 bytes
+SHA1 (patch-contrib_download__prerequisites) = 86c6c16e0e3e3a0bcb38579a8b4004f603fac1ca
+SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651
+SHA1 (patch-gcc_config.gcc) = fea8288c22bb2c4dd44a5e77c8f92dee8f8f6b18
+SHA1 (patch-gcc_config_arm_arm.h) = 92c8bff1063e153fec4454e6dea5334a42b0dad6
+SHA1 (patch-gcc_config_netbsd-protos.h) = 6d28864b4ccc8c1a63fe28e43601b84b63a00633
+SHA1 (patch-gcc_config_netbsd.c) = 85f786bce881ef2fc348f98ef81fdbc001076183
+SHA1 (patch-gcc_config_netbsd.h) = 81891a83bb17b99fdb2c9381b8e8a1767391c695
+SHA1 (patch-gcc_config_t-netbsd) = 802ad5706aa7ca9629f8e237f08fbb1569d28846
+SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
+SHA1 (patch-gcc_configure) = 15fb7af267b79965f83bc64ce8aad1279b0ea52d
+SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
+SHA1 (patch-gcc_lto_lto.c) = 825b632e2a7ff5777d4fbfdcf6f0ea3f64c4742b
+SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
+SHA1 (patch-isl_configure) = 36b37778ee13c0b364fb24d5864d6a9e65b29b7d
+SHA1 (patch-libcilkrts_configure) = 0d88069173cba34158f5b6b91d2d12ca81b0300c
+SHA1 (patch-libcilkrts_runtime_os-unix.c) = b25632587d9fbe8ff38377fe34cb16225355b521
+SHA1 (patch-libdecnumber_decNumber.c) = cec90e49c829bfc6ba1ec605d2fac7daaad62762
+SHA1 (patch-libffi_configure) = bcfbfe8abddc378e2de4a39ad0669583b37e0292
+SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 6321dde308579448c27c2b6e1e30633699dd145f
+SHA1 (patch-libgcc_crtstuff.c) = e3a3b02a26229992851f195b5701cb1b86c29efe
+SHA1 (patch-libgfortran_configure) = 869a60fd08edecf18a42732dcbf226bad1309394
+SHA1 (patch-libgo_Makefile.in) = 612987541f745c7be6835ce7fb7119884db294c3
+SHA1 (patch-libsanitizer_configure.tgt) = 0aff54104734b2cb21090e33f9304738946ea5a0
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h) = 014d442c885b9c51d1a4af05205279c274a9559d
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc) = 06bba6da02344f76c26eed765a7cb022c035994e
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h) = 626fc1f9c035ac5cef30a92d525af4e778835ebf
+SHA1 (patch-libstdc++-v3_libsupc++_unwind-cxx.h) = 9784bfa4323f8498b36565d0fea28fce69ffdbb1
Index: pkgsrc/lang/gcc7/options.mk
diff -u /dev/null pkgsrc/lang/gcc7/options.mk:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/options.mk Wed May 3 00:21:03 2017
@@ -0,0 +1,132 @@
+# $NetBSD: options.mk,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.${GCC_PKGNAME}
+PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran \
+ gcc-go gcc-objc gcc-objc++ gcc-graphite
+PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc gcc-objc++ \
+ gcc-graphite gcc-inplace-math
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+= nls
+.elif ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+= nls
+.elif ${OPSYS} == "DragonFly"
+PKG_SUGGESTED_OPTIONS+= nls
+.elif ${OPSYS} == "SunOS"
+PKG_SUGGESTED_OPTIONS+= gcc-inplace-math
+.else
+.endif
+
+###
+### Determine if multilib is avalible.
+###
+MULTILIB_SUPPORTED?= unknown
+.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
+. if exists(/usr/include/gnu/stubs-64.h) && \
+ !exists(/usr/include/gnu/stubs-32.h)
+MULTILIB_SUPPORTED=No
+. else
+MULTILIB_SUPPORTED=Yes
+. endif
+.endif
+.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
+PKG_SUPPORTED_OPTIONS+= gcc-multilib
+PKG_SUGGESTED_OPTIONS+= gcc-multilib
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Native Language Support
+###
+.if !empty(PKG_OPTIONS:Mnls)
+USE_TOOLS+= msgfmt
+CONFIGURE_ARGS+= --enable-nls
+CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}
+MAKE_ENV+= ICONVPREFIX=${BUILDLINK_PREFIX.iconv}
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-nls
+.endif
+
+###
+### Multilib Support
+###
+.if (!empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) && \
+ empty(PKG_OPTIONS:Mgcc-multilib) ) || \
+ !empty(MULTILIB_SUPPORTED:M[Nn][Oo])
+CONFIGURE_ARGS+= --disable-multilib
+.endif
+
+###
+### Build math libraries in place
+###
+.if !empty(PKG_OPTIONS:Mgcc-inplace-math)
+. include "../../devel/gmp/inplace.mk"
+. include "../../math/mpcomplex/inplace.mk"
+. include "../../math/mpfr/inplace.mk"
+.else
+CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
+CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
+CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
+LIBS.SunOS+= -lgmp
+. include "../../devel/gmp/buildlink3.mk"
+. include "../../math/mpcomplex/buildlink3.mk"
+. include "../../math/mpfr/buildlink3.mk"
+.endif
+
+
+###
+### Graphite Support
+###
+.if !empty(PKG_OPTIONS:Mgcc-graphite)
+ISL16 = isl-0.16.1
+SITES.${ISL16}.tar.bz2 = ftp://ftp.fu-berlin.de/unix/languages/gcc/infrastructure/
+#SITES.${ISL16}.tar.bz2 = ${MASTER_SITE_GNU:=gcc/infrastructure/}
+DISTFILES += ${ISL16}.tar.bz2
+.endif
+
+###
+### Optional languages
+### Ada could be added although there is a bootstrapping issue. See
+### ../gcc34-ada for guidance
+###
+
+.if !empty(PKG_OPTIONS:Mgcc-objc++)
+. if empty(PKG_OPTIONS:Mgcc-c++)
+PKG_OPTIONS+= gcc-c++
+. endif
+. if empty(PKG_OPTIONS:Mgcc-objc)
+PKG_OPTIONS+= gcc-objc
+. endif
+LANGS+= obj-c++
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-objc)
+LANGS+= objc
+.endif
+
+USE_TOOLS+= unzip zip:run gmake:run
+CONFIGURE_ARGS+= --with-system-zlib
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+
+.if !empty(PKG_OPTIONS:Mgcc-go)
+LANGS+= go
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-fortran)
+LANGS+= fortran
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-c++)
+LANGS+= c++
+USE_TOOLS+= perl
+CONFIGURE_ARGS+= --enable-__cxa_atexit
+CONFIGURE_ARGS+= --with-gxx-include-dir=${GCC_PREFIX}/include/c++/
+.else
+CONFIGURE_ARGS+= --disable-build-with-cxx
+CONFIGURE_ARGS+= --disable-build-poststage1-with-cxx
+.endif
Index: pkgsrc/lang/gcc7/version.mk
diff -u /dev/null pkgsrc/lang/gcc7/version.mk:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/version.mk Wed May 3 00:21:03 2017
@@ -0,0 +1,2 @@
+# $NetBSD: version.mk,v 1.1 2017/05/03 00:21:03 maya Exp $
+GCC7S_DIST_VERSION:=7.1.0
Index: pkgsrc/lang/gcc7/patches/patch-contrib_download__prerequisites
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-contrib_download__prerequisites:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-contrib_download__prerequisites Wed May 3 00:21:03 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-contrib_download__prerequisites,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+Non-portable test
+
+--- contrib/download_prerequisites.orig 2017-04-11 16:34:07.000000000 +0000
++++ contrib/download_prerequisites
+@@ -122,7 +122,7 @@ md5_check() {
+ md5_checksum_output=$(md5 -r "${file_to_check}")
+ # Grab the text before the first space
+ md5_checksum_detected="${md5_checksum_output%% *}"
+- [ "${md5_checksum_expected}" == "${md5_checksum_detected}" ] \
++ [ "${md5_checksum_expected}" = "${md5_checksum_detected}" ] \
+ || die "Cannot verify integrity of possibly corrupted file ${file_to_check}"
+ echo "${file_to_check}: OK"
+ }
Index: pkgsrc/lang/gcc7/patches/patch-gcc_Makefile.in
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_Makefile.in:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_Makefile.in Wed May 3 00:21:03 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-gcc_Makefile.in,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+Add gcc libdir to a programs rpath so that _this gcc's_ support libraries
+are found.
+
+--- gcc/Makefile.in.orig 2017-04-18 18:10:27.000000000 +0000
++++ gcc/Makefile.in
+@@ -2112,6 +2112,7 @@ prefix.o: $(BASEVER)
+ # Language-independent files.
+
+ DRIVER_DEFINES = \
++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG) $(prefix)//lib/%M $(LINKER_RPATH_FLAG) $(libdir)/%M \"" \
+ -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
+ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
+ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc Wed May 3 00:21:03 2017
@@ -0,0 +1,34 @@
+$NetBSD: patch-gcc_config.gcc,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/config.gcc.orig 2016-12-10 21:07:10.000000000 +0000
++++ gcc/config.gcc
+@@ -765,10 +765,15 @@ case ${target} in
+ target_has_targetcm=yes
+ ;;
+ *-*-netbsd*)
+- tmake_file="t-slibgcc"
++ tmake_file="t-slibgcc t-netbsd"
+ gas=yes
+ gnu_ld=yes
+ use_gcc_stdint=wrap
++ # cabs/cabsf are renamed to __c99_cabs/cabsf
++ tm_p_file="${tm_p_file} netbsd-protos.h"
++ target_gtfiles="${target_gtfiles} \$(srcdir)/config/netbsd.c"
++ extra_objs="${extra_objs} netbsd.o"
++
+
+ # NetBSD 2.0 and later get POSIX threads enabled by default.
+ # Allow them to be explicitly enabled on any other version.
+@@ -1460,10 +1465,12 @@ x86_64-*-freebsd*)
+ i[34567]86-*-netbsdelf*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-stdint.h netbsd-elf.h i386/netbsd-elf.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ x86_64-*-netbsd*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-stdint.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++ tmake_file="${tmake_file} i386/t-crtstuff"
+ ;;
+ i[34567]86-*-openbsd*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_arm_arm.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_arm_arm.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_arm_arm.h Wed May 3 00:21:03 2017
@@ -0,0 +1,20 @@
+$NetBSD: patch-gcc_config_arm_arm.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+driver-arm.o is only included for freebsd/arm and linux/arm, and
+it is responsible for the definition of host_detect_local_cpu.
+
+Without it, we get an undefined reference.
+
+GCC bugzilla #77800
+
+--- gcc/config/arm/arm.h.orig 2016-12-15 17:51:46.000000000 +0000
++++ gcc/config/arm/arm.h
+@@ -2231,7 +2231,7 @@ extern const char *arm_target_thumb_only
+
+ /* -mcpu=native handling only makes sense with compiler running on
+ an ARM chip. */
+-#if defined(__arm__)
++#if defined(__arm__) && (defined(__linux__) || defined(__FreeBSD__))
+ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ # define EXTRA_SPEC_FUNCTIONS \
+ { "local_cpu_detect", host_detect_local_cpu }, \
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd-protos.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd-protos.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd-protos.h Wed May 3 00:21:03 2017
@@ -0,0 +1,34 @@
+$NetBSD: patch-gcc_config_netbsd-protos.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- /dev/null 2014-12-15 07:13:57.000000000 +0000
++++ gcc/config/netbsd-protos.h
+@@ -0,0 +1,29 @@
++/* Prototypes.
++ Copyright (C) 2001-2014 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 3, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>. */
++
++#ifndef _NETBSD_PROTOS_H_
++#define _NETBSD_PROTOS_H_
++
++double __c99_cabs (double complex);
++float __c99_cabsf (float complex);
++long double __c99_cabsl (long double complex);
++
++void netbsd_patch_builtins (void);
++
++#endif /* _NETBSD_PROTOS_H_ */
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.c Wed May 3 00:21:03 2017
@@ -0,0 +1,104 @@
+$NetBSD: patch-gcc_config_netbsd.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/config/netbsd.c.orig 2016-11-04 16:18:21.025368203 +0000
++++ gcc/config/netbsd.c
+@@ -0,0 +1,99 @@
++/* Functions for generic NetBSD as target machine for GNU C compiler.
++ Copyright (C) 1989-2014 Free Software Foundation, Inc.
++ Contributed by Apple Computer Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 3, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>. */
++
++
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "backend.h"
++#include "target.h"
++#include "cfghooks.h"
++#include "tree.h"
++#include "gimple.h"
++#include "rtl.h"
++#include "df.h"
++#include "memmodel.h"
++#include "regs.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "insn-flags.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "alias.h"
++#include "fold-const.h"
++#include "stringpool.h"
++#include "varasm.h"
++#include "stor-layout.h"
++#include "expmed.h"
++#include "dojump.h"
++#include "explow.h"
++#include "calls.h"
++#include "emit-rtl.h"
++#include "stmt.h"
++#include "expr.h"
++#include "reload.h"
++#include "langhooks.h"
++#include "target.h"
++#include "tm_p.h"
++#include "diagnostic-core.h"
++#include "toplev.h"
++#include "cfgrtl.h"
++#include "cfganal.h"
++#include "lcm.h"
++#include "cfgbuild.h"
++#include "cfgcleanup.h"
++#include "debug.h"
++#include "internal-fn.h"
++#include "gimple-fold.h"
++#include "tree-eh.h"
++#include "gimplify.h"
++#include "cgraph.h"
++#include "alloc-pool.h"
++#include "lto-streamer.h"
++#include "lto-section-names.h"
++
++static void
++netbsd_patch_builtin (enum built_in_function fncode)
++{
++ tree fn = builtin_decl_explicit (fncode);
++ tree sym;
++ char *newname;
++
++ if (!fn)
++ return;
++
++ sym = DECL_ASSEMBLER_NAME (fn);
++ newname = ACONCAT (("__c99_", IDENTIFIER_POINTER (sym), NULL));
++
++ set_user_assembler_name (fn, newname);
++
++ fn = builtin_decl_implicit (fncode);
++ if (fn)
++ set_user_assembler_name (fn, newname);
++}
++
++void
++netbsd_patch_builtins (void)
++{
++ netbsd_patch_builtin (BUILT_IN_CABSF);
++ netbsd_patch_builtin (BUILT_IN_CABS);
++ netbsd_patch_builtin (BUILT_IN_CABSL);
++}
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_netbsd.h Wed May 3 00:21:03 2017
@@ -0,0 +1,43 @@
+$NetBSD: patch-gcc_config_netbsd.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+when using shared, link against libc
+another unexplained change`
+
+--- gcc/config/netbsd.h.orig 2014-01-02 22:23:26.000000000 +0000
++++ gcc/config/netbsd.h
+@@ -17,6 +17,9 @@ You should have received a copy of the G
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++
++#include "netbsd-protos.h"
++
+ /* TARGET_OS_CPP_BUILTINS() common to all NetBSD targets. */
+ #define NETBSD_OS_CPP_BUILTINS_COMMON() \
+ do \
+@@ -96,6 +99,7 @@ along with GCC; see the file COPYING3.
+ %{!pg:-lposix}} \
+ %{p:-lposix_p} \
+ %{pg:-lposix_p}} \
++ %{shared:-lc} \
+ %{!shared: \
+ %{!symbolic: \
+ %{!p: \
+@@ -109,6 +113,7 @@ along with GCC; see the file COPYING3.
+ %{!pg:-lposix}} \
+ %{p:-lposix_p} \
+ %{pg:-lposix_p}} \
++ %{shared:-lc} \
+ %{!shared: \
+ %{!symbolic: \
+ %{!p: \
+@@ -175,3 +180,9 @@ along with GCC; see the file COPYING3.
+
+ #undef WINT_TYPE
+ #define WINT_TYPE "int"
++
++#undef SUBTARGET_INIT_BUILTINS
++#define SUBTARGET_INIT_BUILTINS \
++do { \
++ netbsd_patch_builtins (); \
++} while(0)
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_t-netbsd
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_t-netbsd:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_t-netbsd Wed May 3 00:21:03 2017
@@ -0,0 +1,28 @@
+$NetBSD: patch-gcc_config_t-netbsd,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- /dev/null 2014-12-16 20:23:05.000000000 +0000
++++ gcc/config/t-netbsd
+@@ -0,0 +1,23 @@
++# Copyright (C) 2002-2014 Free Software Foundation, Inc.
++#
++# This file is part of GCC.
++#
++# GCC is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++#
++# GCC is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GCC; see the file COPYING3. If not see
++# <http://www.gnu.org/licenses/>.
++
++
++netbsd.o: $(srcdir)/config/netbsd.c
++ $(COMPILE) $<
++ $(POSTCOMPILE)
++
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_x-netbsd
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_x-netbsd:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_x-netbsd Wed May 3 00:21:03 2017
@@ -0,0 +1,12 @@
+$NetBSD: patch-gcc_config_x-netbsd,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+Add host hooks for NetBSD - needed for working precompiled headers.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58397
+
+--- /dev/null 2013-09-11 09:12:57.000000000 +0200
++++ gcc/config/x-netbsd 2013-09-10 18:57:27.000000000 +0200
+@@ -0,0 +1,4 @@
++host-netbsd.o : $(srcdir)/config/host-netbsd.c $(CONFIG_H) $(SYSTEM_H) \
++ coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H)
++ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
++ $(srcdir)/config/host-netbsd.c
Index: pkgsrc/lang/gcc7/patches/patch-gcc_configure
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_configure:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_configure Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-gcc_configure,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/configure.orig 2015-09-30 23:06:11.000000000 +0000
++++ gcc/configure
+@@ -28321,7 +28321,7 @@ case "$target" in
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
+- *-*-dragonfly* | *-*-freebsd*)
++ *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* )
+ if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
+ gcc_cv_target_dl_iterate_phdr=yes
+ else
Index: pkgsrc/lang/gcc7/patches/patch-gcc_ggc-common.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_ggc-common.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_ggc-common.c Wed May 3 00:21:03 2017
@@ -0,0 +1,71 @@
+$NetBSD: patch-gcc_ggc-common.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/ggc-common.c.orig 2014-12-10 03:45:40.000000000 +0000
++++ gcc/ggc-common.c
+@@ -603,6 +603,8 @@ gt_pch_restore (FILE *f)
+ size_t i;
+ struct mmap_info mmi;
+ int result;
++ struct line_maps * old_line_table = line_table;
++ location_t old_input_loc = input_location;
+
+ /* Delete any deletable objects. This makes ggc_pch_read much
+ faster, as it can be sure that no GCable objects remain other
+@@ -616,32 +618,50 @@ gt_pch_restore (FILE *f)
+ /* Read in all the scalar variables. */
+ for (rt = gt_pch_scalar_rtab; *rt; rt++)
+ for (rti = *rt; rti->base != NULL; rti++)
+- if (fread (rti->base, rti->stride, 1, f) != 1)
++ if (fread (rti->base, rti->stride, 1, f) != 1) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
+ fatal_error (input_location, "can%'t read PCH file: %m");
++ }
+
+ /* Read in all the global pointers, in 6 easy loops. */
+ for (rt = gt_ggc_rtab; *rt; rt++)
+ for (rti = *rt; rti->base != NULL; rti++)
+ for (i = 0; i < rti->nelt; i++)
+ if (fread ((char *)rti->base + rti->stride * i,
+- sizeof (void *), 1, f) != 1)
++ sizeof (void *), 1, f) != 1) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
+ fatal_error (input_location, "can%'t read PCH file: %m");
++ }
+
+- if (fread (&mmi, sizeof (mmi), 1, f) != 1)
++ if (fread (&mmi, sizeof (mmi), 1, f) != 1) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
+ fatal_error (input_location, "can%'t read PCH file: %m");
++ }
+
+ result = host_hooks.gt_pch_use_address (mmi.preferred_base, mmi.size,
+ fileno (f), mmi.offset);
+- if (result < 0)
++ if (result < 0) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
+ fatal_error (input_location, "had to relocate PCH");
++ }
+ if (result == 0)
+ {
+ if (fseek (f, mmi.offset, SEEK_SET) != 0
+- || fread (mmi.preferred_base, mmi.size, 1, f) != 1)
++ || fread (mmi.preferred_base, mmi.size, 1, f) != 1) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
+ fatal_error (input_location, "can%'t read PCH file: %m");
++ }
+ }
+- else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0)
+- fatal_error (input_location, "can%'t read PCH file: %m");
++ else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0) {
++ line_table = old_line_table;
++ input_location = old_input_loc;
++ fatal_error (input_location, "can%'t read PCH file: %m");
++ }
+
+ ggc_pch_read (f, mmi.preferred_base);
+
Index: pkgsrc/lang/gcc7/patches/patch-gcc_lto_lto.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_lto_lto.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_lto_lto.c Wed May 3 00:21:03 2017
@@ -0,0 +1,19 @@
+$NetBSD: patch-gcc_lto_lto.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/lto/lto.c.orig 2015-01-30 16:15:00.000000000 +0000
++++ gcc/lto/lto.c
+@@ -2495,7 +2495,13 @@ wait_for_child ()
+ #ifndef WCONTINUED
+ #define WCONTINUED 0
+ #endif
+- int w = waitpid (0, &status, WUNTRACED | WCONTINUED);
++
++#if defined(__NetBSD__)
++ int w = waitpid(0, &status, WUNTRACED | WALLSIG);
++#else
++ int w = waitpid(0, &status, WUNTRACED | WCONTINUED);
++#endif
++
+ if (w == -1)
+ fatal_error (input_location, "waitpid failed");
+
Index: pkgsrc/lang/gcc7/patches/patch-gcc_system.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_system.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-gcc_system.h Wed May 3 00:21:03 2017
@@ -0,0 +1,27 @@
+$NetBSD: patch-gcc_system.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- gcc/system.h.orig 2013-04-29 18:37:29.000000000 +0000
++++ gcc/system.h
+@@ -72,18 +72,22 @@ along with GCC; see the file COPYING3.
+
+ #if defined HAVE_DECL_PUTC_UNLOCKED && HAVE_DECL_PUTC_UNLOCKED
+
++# if !defined(__NetBSD__)
+ # ifdef HAVE_PUTC_UNLOCKED
+ # undef putc
+ # define putc(C, Stream) putc_unlocked (C, Stream)
+ # endif
++# endif
+ # ifdef HAVE_PUTCHAR_UNLOCKED
+ # undef putchar
+ # define putchar(C) putchar_unlocked (C)
+ # endif
++# if !defined(__NetBSD__)
+ # ifdef HAVE_GETC_UNLOCKED
+ # undef getc
+ # define getc(Stream) getc_unlocked (Stream)
+ # endif
++# endif
+ # ifdef HAVE_GETCHAR_UNLOCKED
+ # undef getchar
+ # define getchar() getchar_unlocked ()
Index: pkgsrc/lang/gcc7/patches/patch-isl_configure
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-isl_configure:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-isl_configure Wed May 3 00:21:03 2017
@@ -0,0 +1,24 @@
+$NetBSD: patch-isl_configure,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+Make test portable
+
+--- isl/configure.orig 2016-01-14 17:26:10.000000000 +0000
++++ isl/configure
+@@ -17561,7 +17561,7 @@ else
+ fi
+
+
+- if test "x$with_int" == "ximath-32"; then
++ if test "x$with_int" = "ximath-32"; then
+ SMALL_INT_OPT_TRUE=
+ SMALL_INT_OPT_FALSE='#'
+ else
+@@ -17569,7 +17569,7 @@ else
+ SMALL_INT_OPT_FALSE=
+ fi
+
+-if test "x$with_int" == "ximath-32"; then :
++if test "x$with_int" = "ximath-32"; then :
+
+
+ $as_echo "#define USE_SMALL_INT_OPT /**/" >>confdefs.h
Index: pkgsrc/lang/gcc7/patches/patch-libcilkrts_configure
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libcilkrts_configure:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libcilkrts_configure Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libcilkrts_configure,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libcilkrts/configure.orig 2014-08-12 11:06:44.000000000 +0000
++++ libcilkrts/configure
+@@ -14519,7 +14519,7 @@ esac
+ CFLAGS="$save_CFLAGS"
+
+ if test $enable_shared = yes; then
+- link_cilkrts="-lcilkrts %{static: $LIBS}"
++ link_cilkrts="-rpath ${PREFIX}/gcc6snapshot/lib --as-needed -lgcc_s -lcilkrts %{static $LIBS}"
+ else
+ link_cilkrts="-lcilkrts $LIBS"
+ fi
Index: pkgsrc/lang/gcc7/patches/patch-libcilkrts_runtime_os-unix.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libcilkrts_runtime_os-unix.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libcilkrts_runtime_os-unix.c Wed May 3 00:21:03 2017
@@ -0,0 +1,40 @@
+$NetBSD: patch-libcilkrts_runtime_os-unix.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+NetBSD doesn't need additional include files too
+NetBSD can also obtain number of online cpus from sysconf
+NetBSD can use sched_yield for sleeping
+
+--- libcilkrts/runtime/os-unix.c.orig 2016-12-01 14:48:49.000000000 +0000
++++ libcilkrts/runtime/os-unix.c
+@@ -73,6 +73,7 @@
+ #elif defined __CYGWIN__ || \
+ defined __DragonFly__ || \
+ defined __FreeBSD__ || \
++ defined __NetBSD__ || \
+ defined __GNU__
+ // No additional include files
+
+@@ -397,6 +398,7 @@ COMMON_SYSDEP int __cilkrts_hardware_cpu
+ defined __CYGWIN__ || \
+ defined __DragonFly__ || \
+ defined __FreeBSD__ || \
++ defined __NetBSD__ || \
+ (defined(__sun__) && defined(__svr4__))
+ return (int)sysconf(_SC_NPROCESSORS_ONLN);
+ #elif defined __MIC__
+@@ -426,6 +428,7 @@ COMMON_SYSDEP void __cilkrts_idle(void)
+ // silencing workers that are not stealing work.
+ #if defined(__ANDROID__) || \
+ defined(__FreeBSD__) || \
++ defined(__NetBSD__) || \
+ defined(__VXWORKS__) || \
+ (defined(__sun__) && defined(__svr4__))
+ sched_yield();
+@@ -456,6 +459,7 @@ COMMON_SYSDEP void __cilkrts_yield(void)
+ defined(__APPLE__) || \
+ defined(__CYGWIN__) || \
+ defined(__FreeBSD__) || \
++ defined(__NetBSD__) || \
+ defined(__VXWORKS__) || \
+ (defined(__sun__) && defined(__svr4__))
+ // Call sched_yield to yield quantum. I'm not sure why we
Index: pkgsrc/lang/gcc7/patches/patch-libdecnumber_decNumber.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libdecnumber_decNumber.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libdecnumber_decNumber.c Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libdecnumber_decNumber.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libdecnumber/decNumber.c.orig 2013-08-14 08:42:04.000000000 +0000
++++ libdecnumber/decNumber.c
+@@ -770,7 +770,7 @@ decNumber * decNumberAbs(decNumber *res,
+ decNumber * decNumberAdd(decNumber *res, const decNumber *lhs,
+ const decNumber *rhs, decContext *set) {
+ uInt status=0; /* accumulator */
+- decAddOp(res, lhs, rhs, set, 0, &status);
++ decAddOp(res, lhs, rhs, set, (uByte)0, &status);
+ if (status!=0) decStatus(res, status, set);
+ #if DECCHECK
+ decCheckInexact(res, set);
Index: pkgsrc/lang/gcc7/patches/patch-libffi_configure
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libffi_configure:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libffi_configure Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libffi_configure,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libffi/configure.orig 2013-06-01 17:03:49.000000000 +0000
++++ libffi/configure
+@@ -12689,7 +12689,7 @@ case "$target" in
+ $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
+
+ ;;
+- *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
++ *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-netbsd* | *-*-openbsd* | *-pc-solaris*)
+
+ $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
+
Index: pkgsrc/lang/gcc7/patches/patch-libffi_testsuite_libffi.call_float2.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libffi_testsuite_libffi.call_float2.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libffi_testsuite_libffi.call_float2.c Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libffi_testsuite_libffi.call_float2.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libffi/testsuite/libffi.call/float2.c.orig 2013-06-01 17:08:18.000000000 +0000
++++ libffi/testsuite/libffi.call/float2.c
+@@ -45,7 +45,7 @@ int main (void)
+ /* This is ifdef'd out for now. long double support under SunOS/gcc
+ is pretty much non-existent. You'll get the odd bus error in library
+ routines like printf(). */
+- printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON);
++ printf ("%Lf, %Lf, %Lf, %Lf\n", (long double)ld, (long double)ldblit(f), (long double)(ld - ldblit(f)), (long double)LDBL_EPSILON);
+ #endif
+
+ /* These are not always the same!! Check for a reasonable delta */
Index: pkgsrc/lang/gcc7/patches/patch-libgcc_crtstuff.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libgcc_crtstuff.c:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libgcc_crtstuff.c Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libgcc_crtstuff.c,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libgcc/crtstuff.c.orig 2017-01-01 12:07:43.000000000 +0000
++++ libgcc/crtstuff.c
+@@ -81,7 +81,7 @@ call_ ## FUNC (void) \
+ #endif
+
+ #if defined(TARGET_DL_ITERATE_PHDR) && \
+- (defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__))
++ (defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
+ #define BSD_DL_ITERATE_PHDR_AVAILABLE
+ #endif
+
Index: pkgsrc/lang/gcc7/patches/patch-libgfortran_configure
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libgfortran_configure:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libgfortran_configure Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libgfortran_configure,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libgfortran/configure.orig 2015-10-04 22:33:03.000000000 +0000
++++ libgfortran/configure
+@@ -25992,7 +25992,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con
+
+ fi
+ case "$host" in
+- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* | *-*-netbsd* )
+
+ $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
+
Index: pkgsrc/lang/gcc7/patches/patch-libgo_Makefile.in
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libgo_Makefile.in:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libgo_Makefile.in Wed May 3 00:21:03 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-libgo_Makefile.in,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+proc.c will not compile with inline-functions (implied by -O3)
+so add -fno-inline-functions to it's cflags.
+
+
+--- libgo/Makefile.in.orig 2012-08-06 14:34:27.000000000 +0000
++++ libgo/Makefile.in
+@@ -3051,7 +3051,7 @@ print.lo: runtime/print.c
+ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o
print.lo `test -f 'runtime/print.c' || echo '$(srcdir)/'`runtime/print.c
+
+ proc.lo: runtime/proc.c
+-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT
proc.lo -MD -MP -MF $(DEPDIR)/proc.Tpo -c -o proc.lo `test -f 'runtime/proc.c' || echo '$(srcdir)/'`runtime/proc.c
++@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) -fno-inline-functions $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CFLAGS) $(CFLAGS) -MT proc.lo -MD -MP -MF $(DEPDIR)/proc.Tpo -c -o proc.lo `test -f 'runtime/proc.c' || echo '$(srcdir)/'`runtime/proc.c
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/proc.Tpo $(DEPDIR)/proc.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/proc.c' object='proc.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
Index: pkgsrc/lang/gcc7/patches/patch-libsanitizer_configure.tgt
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libsanitizer_configure.tgt:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libsanitizer_configure.tgt Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libsanitizer_configure.tgt,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libsanitizer/configure.tgt.orig 2015-11-23 09:07:18.000000000 +0000
++++ libsanitizer/configure.tgt
+@@ -41,7 +41,7 @@ case "${target}" in
+ TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_aarch64.lo
+ fi
+ ;;
+- x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
++ x86_64-*-darwin[1][1-9]* | i?86-*-darwin[1][1-9]*)
+ TSAN_SUPPORTED=no
+ ;;
+ *)
Index: pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h Wed May 3 00:21:03 2017
@@ -0,0 +1,37 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2013-02-03 17:54:05.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
+@@ -43,9 +43,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+- typedef unsigned char mask;
+
+-#ifndef _CTYPE_U
++#if defined(_CTYPE_BL)
++ typedef unsigned short mask;
++ static const mask upper = _CTYPE_U;
++ static const mask lower = _CTYPE_L;
++ static const mask alpha = _CTYPE_A;
++ static const mask digit = _CTYPE_D;
++ static const mask xdigit = _CTYPE_X;
++ static const mask space = _CTYPE_S;
++ static const mask print = _CTYPE_R;
++ static const mask graph = _CTYPE_G;
++ static const mask cntrl = _CTYPE_C;
++ static const mask punct = _CTYPE_P;
++ static const mask alnum = _CTYPE_A | _CTYPE_D;
++#elif !defined(_CTYPE_U)
++ typedef unsigned char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+ static const mask alpha = _U | _L;
+@@ -58,6 +71,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
+ #else
++ typedef unsigned char mask;
+ static const mask upper = _CTYPE_U;
+ static const mask lower = _CTYPE_L;
+ static const mask alpha = _CTYPE_U | _CTYPE_L;
Index: pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc Wed May 3 00:21:03 2017
@@ -0,0 +1,58 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__configure__char.cc,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64271
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc.orig 2013-02-03 17:54:05.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
+@@ -38,11 +38,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ // Information as gleaned from /usr/include/ctype.h
+
++#ifndef _CTYPE_BL
+ extern "C" const u_int8_t _C_ctype_[];
++#endif
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
++#ifdef _CTYPE_BL
++ { return _C_ctype_tab_ + 1; }
++#else
+ { return _C_ctype_ + 1; }
++#endif
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+@@ -69,14 +75,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ char
+ ctype<char>::do_toupper(char __c) const
+- { return ::toupper((int) __c); }
++ { return ::toupper((int)(unsigned char) __c); }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+- *__low = ::toupper((int) *__low);
++ *__low = ::toupper((int)(unsigned char) *__low);
+ ++__low;
+ }
+ return __high;
+@@ -84,14 +90,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ char
+ ctype<char>::do_tolower(char __c) const
+- { return ::tolower((int) __c); }
++ { return ::tolower((int)(unsigned char) __c); }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+- *__low = ::tolower((int) *__low);
++ *__low = ::tolower((int)(unsigned char) *__low);
+ ++__low;
+ }
+ return __high;
Index: pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h Wed May 3 00:21:03 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig 2013-02-03 17:54:05.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
+@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+- *__vec++ = _M_table[*__low++];
++ *__vec++ = _M_table[(unsigned char)*__low++];
+ return __high;
+ }
+
Index: pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_unwind-cxx.h
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_unwind-cxx.h:1.1
--- /dev/null Wed May 3 00:21:03 2017
+++ pkgsrc/lang/gcc7/patches/patch-libstdc++-v3_libsupc++_unwind-cxx.h Wed May 3 00:21:03 2017
@@ -0,0 +1,12 @@
+$NetBSD: patch-libstdc++-v3_libsupc++_unwind-cxx.h,v 1.1 2017/05/03 00:21:03 maya Exp $
+
+--- libstdc++-v3/libsupc++/unwind-cxx.h.orig 2013-03-19 17:04:44.000000000 +0000
++++ libstdc++-v3/libsupc++/unwind-cxx.h
+@@ -38,6 +38,7 @@
+ #include <cxxabi.h>
+
+ #ifdef _GLIBCXX_HAVE_SYS_SDT_H
++#include <cstdlib>
+ #include <sys/sdt.h>
+ /* We only want to use stap probes starting with v3. Earlier versions
+ added too much startup cost. */
Home |
Main Index |
Thread Index |
Old Index