Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Mar 2015 21:32:04 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r381294 - in head/lang: . gcc5-aux gcc5-aux/files
Message-ID:  <201503142132.t2ELW4FE002115@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Mar 14 21:32:03 2015
New Revision: 381294
URL: https://svnweb.freebsd.org/changeset/ports/381294
QAT: https://qat.redports.org/buildarchive/r381294/

Log:
  Add new port lang/gcc5-aux (next Ada compiler)
  
  This is the initial version of gcc5-aux, which will eventually become the
  default Ada compiler.  It's not hooked into Mk/Uses/ada.mk yet, but it
  does pass all Ada tests on both DragonFly64 and FreeBSD64.
  
  For FreeBSD 10 amd64, the compiler built fine outside of poudriere but the
  bootstrap compiler failed inside of it (seemingly as a result of using
  base linker).  Eventually a new bootstrap compiler needs to be made, but
  for now gcc5-aux is built with a full bootstrap on FreeBSD.  On DragonFly,
  only a single stage is built as the bootstrap compiler still works fine.

Added:
  head/lang/gcc5-aux/
  head/lang/gcc5-aux/Makefile   (contents, props changed)
  head/lang/gcc5-aux/Makefile.common   (contents, props changed)
  head/lang/gcc5-aux/Makefile.version   (contents, props changed)
  head/lang/gcc5-aux/distinfo   (contents, props changed)
  head/lang/gcc5-aux/files/
  head/lang/gcc5-aux/files/android.exp   (contents, props changed)
  head/lang/gcc5-aux/files/diff-ada   (contents, props changed)
  head/lang/gcc5-aux/files/diff-ada-testsuite   (contents, props changed)
  head/lang/gcc5-aux/files/diff-core   (contents, props changed)
  head/lang/gcc5-aux/files/diff-cxx   (contents, props changed)
  head/lang/gcc5-aux/files/diff-cxx-testsuite   (contents, props changed)
  head/lang/gcc5-aux/files/diff-gcc-testsuite   (contents, props changed)
  head/lang/gcc5-aux/files/gnatdroid.exp   (contents, props changed)
  head/lang/gcc5-aux/pkg-descr   (contents, props changed)
Modified:
  head/lang/Makefile

Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile	Sat Mar 14 20:21:54 2015	(r381293)
+++ head/lang/Makefile	Sat Mar 14 21:32:03 2015	(r381294)
@@ -87,6 +87,7 @@
     SUBDIR += gcc48
     SUBDIR += gcc49
     SUBDIR += gcc5
+    SUBDIR += gcc5-aux
     SUBDIR += gcl
     SUBDIR += gforth
     SUBDIR += ghc

Added: head/lang/gcc5-aux/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/Makefile	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,291 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	gcc5-aux
+PORTVERSION=	${SNAPSHOT}
+PORTREVISION=	${MAIN_PR}
+CATEGORIES=	lang
+MASTER_SITES=	http://downloads.dragonlace.net/src/:boot \
+		LOCAL/marino:boot ${MASTER_SITE_GCC}
+MASTER_SITE_SUBDIR=	${MS_SUBDIR}
+DISTFILES=	${IDENTIFICATION}.tar.bz2
+
+MAINTAINER=	marino@FreeBSD.org
+COMMENT=	Version of GCC ${GCC_BRANCH} with full Ada support
+
+LICENSE=	GPLv3 GPLv3RLE
+LICENSE_COMB=	multi
+
+.include "${.CURDIR}/Makefile.common"
+
+LANGS=			c c++ ada
+APPLY_DIFFS=		core cxx ada
+INTENDED_COMPILER=	NATIVE
+GARCH=			${ARCH:S/amd64/x86_64/}
+BOOTSTRAP_COMPILER=	gnat-bootstrap.${GARCH}.${OPSYS:tl}.tar.bz2
+BLD_TARGET=		${GARCH}-aux-${OPSYS:tl}${OSREL}
+FULL_GNATGCC=		NOT_SET
+OS_LABEL4VERS=		[${OPSYS}${GARCH:M*64:S/amd_//:S/x86_//}]
+NO_MTREE=		yes
+
+OPTIONS_GROUP=		Standard Bootstrap
+OPTIONS_GROUP_Standard=	FORT OBJC NLS TESTSUITE STATIC
+OPTIONS_GROUP_Bootstrap=BOOTSTRAP
+OPTIONS_DEFAULT=	FORT OBJC
+NO_OPTIONS_SORT=	yes
+
+FORT_DESC=		Fortran language support
+OBJC_DESC=		Objective-C language support
+TESTSUITE_DESC=		Activate test support
+STATIC_DESC=		Link compilers and drivers statically
+BOOTSTRAP_DESC=		Create bootstrap compiler (overrides other options)
+
+# The BOOTSTRAP option overrides all the others.  "make stage" will build a
+# static compiler that supports C, C++, and Ada languages and then create
+# a new distfile in $WRKDIR/newbsd with the name following the pattern:
+# ada-bootstrap.$ARCH.$OPSYS.XY.tar.bz2.  There is no need to "make install"
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD
+MODERN_BINUTILS=	yes
+.  if ${OSVERSION} < 900000
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.freebsd.84.tar.bz2
+.  else
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2
+.  endif
+.endif
+.if ${OPSYS} == DragonFly
+BOOTSTRAP_COMPILER=	ada-bootstrap.${GARCH}.dragonfly.36A.tar.bz2
+.endif
+
+.if defined(MODERN_BINUTILS)
+# Apparently gcc 4.9 needs binutils 2.23 or greater to link Ada correctly
+USE_BINUTILS=	yes
+RUN_DEPENDS+=	${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
+EXTRA_CONFIG+=	--with-ld=${LOCALBASE}/bin/ld
+EXTRA_CONFIG+=	--with-as=${LOCALBASE}/bin/as
+.else
+EXTRA_CONFIG+=	--with-ld=/usr/bin/ld
+EXTRA_CONFIG+=	--with-as=/usr/bin/as
+.endif
+
+WRKSRC=			${WRKDIR}/${IDENTIFICATION}
+BUILDDIR=		${WRKDIR}/build
+NEWBSDIR=		${WRKDIR}/newbs/bootstrap
+CFG_SCRIPT=		${WRKSRC}/configure
+REVFILE=		${WRKSRC}/gcc/REVISION
+BOOTSTRAP_PREFIX=	${WRKDIR}/bootstrap
+PKG_PREFIX=		${PREFIX}/${PORTNAME}
+MANPREFIX=		${PREFIX}/${PORTNAME}/share
+BSFILENAME=		ada-bootstrap.${GARCH}.${OPSYS:tl}.${OSREL:S/.//}.tar.bz2
+
+# If we find gnatmake and friends in a standard location, then we'll use this
+# compiler instead of downloading the bootstrap.
+.if exists (${LOCALBASE}/${PORTNAME}/bin/ada)
+.if exists (${LOCALBASE}/${PORTNAME}/bin/gnatbind)
+.if exists (${LOCALBASE}/${PORTNAME}/bin/gnatlink)
+.if exists (${LOCALBASE}/${PORTNAME}/bin/gnatmake)
+FULL_GNATGCC=${LOCALBASE}/${PORTNAME}/bin/ada
+FULL_GNATGXX=${LOCALBASE}/${PORTNAME}/bin/g++
+FULL_PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/${PORTNAME}/bin:${PREFIX}/bin
+.endif
+.endif
+.endif
+.endif
+
+# If FULL_GNATGCC is not set, we'll request the bootstrap compiler
+.if ${FULL_GNATGCC} == NOT_SET
+INTENDED_COMPILER=BOOTSTRAP
+FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gcc
+FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++
+FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin
+DISTFILES+=	${BOOTSTRAP_COMPILER}:boot
+.endif
+
+# for port maintenance, invoke "make makesum PLUS_BOOTSTRAPS=1"
+.if defined(PLUS_BOOTSTRAPS)
+DISTFILES=	\
+   ${IDENTIFICATION}.tar.bz2 \
+   ada-bootstrap.i386.dragonfly.36A.tar.bz2:boot \
+   ada-bootstrap.i386.freebsd.84.tar.bz2:boot \
+   ada-bootstrap.i386.freebsd.100B.tar.bz2:boot \
+   ada-bootstrap.x86_64.dragonfly.36A.tar.bz2:boot \
+   ada-bootstrap.x86_64.freebsd.84.tar.bz2:boot \
+   ada-bootstrap.x86_64.freebsd.100B.tar.bz2:boot
+.endif
+
+.if ${PORT_OPTIONS:MFORT} && !${PORT_OPTIONS:MBOOTSTRAP}
+LANGS+=		fortran
+#APPLY_DIFFS+=	fortran
+EXTRA_CONFIG+=	--enable-libquadmath
+.else
+EXTRA_CONFIG+=	--disable-libquadmath
+.endif
+
+.if ${PORT_OPTIONS:MOBJC} && !${PORT_OPTIONS:MBOOTSTRAP}
+LANGS+=		objc
+.endif
+
+.if ${PORT_OPTIONS:MTESTSUITE} && !${PORT_OPTIONS:MBOOTSTRAP}
+BUILD_DEPENDS+=	dejagnu>=1.4:${PORTSDIR}/misc/dejagnu
+APPLY_DIFFS+=	ada-testsuite
+APPLY_DIFFS+=	cxx-testsuite
+APPLY_DIFFS+=	gcc-testsuite
+.endif
+
+.if ${PORT_OPTIONS:MNLS} && !${PORT_OPTIONS:MBOOTSTRAP}
+USES+=		gettext-tools
+EXTRA_CONFIG+=	--enable-nls
+.else
+EXTRA_CONFIG+=	--disable-nls
+.endif
+
+.if ${PORT_OPTIONS:MSTATIC} && !${PORT_OPTIONS:MBOOTSTRAP}
+EXTRA_CONFIG+=		--with-stage1-ldflags=-static
+.endif
+
+.if ${PORT_OPTIONS:MBOOTSTRAP}
+EXTRA_CONFIG+=		--disable-shared --disable-lto
+EXTRA_CONFIG+=		--with-boot-ldflags=-static
+.else
+.  if ${OPSYS} == DragonFly
+EXTRA_CONFIG+=		--disable-bootstrap
+.  endif
+.endif
+
+# Establish Ada-aware compiler for use
+ADA_CONFIGURE_ENV+=	CC=${FULL_GNATGCC}
+ADA_CONFIGURE_ENV+=	CXX=${FULL_GNATGXX}
+ADA_CONFIGURE_ENV+=	PATH=${FULL_PATH}
+ADA_MAKE_ENV+=		PATH=${FULL_PATH}
+ADA_MAKE_ENV+=		LD_LIBRARY_PATH=${BUILDDIR}/gcc
+
+# The standard configuration options
+ADA_CONFIG_ARGS=	--enable-languages=${LANGS:Q}
+ADA_CONFIG_ARGS+=	--build=${BLD_TARGET}
+ADA_CONFIG_ARGS+=	--prefix=${PKG_PREFIX:Q}
+ADA_CONFIG_ARGS+=	--with-system-zlib
+ADA_CONFIG_ARGS+=	--with-gmp=${PREFIX}
+ADA_CONFIG_ARGS+=	--with-mpfr=${PREFIX}
+ADA_CONFIG_ARGS+=	--with-mpc=${PREFIX}
+ADA_CONFIG_ARGS+=	${ICONV_CONFIGURE_ARG}
+ADA_CONFIG_ARGS+=	--enable-shared
+ADA_CONFIG_ARGS+=	--enable-threads=posix
+ADA_CONFIG_ARGS+=	--disable-libmudflap
+ADA_CONFIG_ARGS+=	--disable-libgomp
+ADA_CONFIG_ARGS+=	--disable-libssp
+ADA_CONFIG_ARGS+=	${EXTRA_CONFIG}
+
+post-extract:
+	# Personalize GNAT for each different machine
+	@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE}
+
+	# Apply required composite diff files
+.for suffix in ${APPLY_DIFFS}
+	@${ECHO} "Applying composite patch diff-${suffix}"
+	@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
+.endfor
+	# Try to test more locale stuff than stock GCC
+	@(cd ${WRKSRC}/libstdc++-v3/testsuite/22_locale && ${REINPLACE_CMD} \
+		-e 's|ISO-8859|ISO8859|g' \
+		-e 's|ja_JP.eucjp|ja_JP.eucJP|g' \
+		-e 's|en_HK|zh_HK|g' \
+		-e 's|en_PH|en_NZ|g' \
+		-e 's|se_NO|no_NO|g' \
+		-e 's|es_MX|es_ES|g' \
+		-e 's|ru_RU.UTF8|ru_RU.UTF-8|g' ${LOCALE22FIX})
+.if ${PORT_OPTIONS:MSTATIC} || ${PORT_OPTIONS:MBOOTSTRAP}
+	# Ensure GNAT tools are built statically
+	${REINPLACE_CMD} -e 's/^GCC_LINK_FLAGS=.*/GCC_LINK_FLAGS=-static/' \
+		${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
+.endif
+.if ${PORT_OPTIONS:MBOOTSTRAP} && ${OPSYS} == FreeBSD
+	# FreeBSD 8 linker doesn't understand --hash-style, so do not
+	# allow the bootstrap to use it.
+	${REINPLACE_CMD} -e 's|" ELF_HASH_STYLE "||' \
+		${WRKSRC}/gcc/config/i386/freebsd64.h \
+		${WRKSRC}/gcc/config/i386/freebsd.h
+.endif
+	# Update LINK_SPEC to add gcc-aux lib runpath in every binary
+	@${ECHO} "Configuring LINK_SPEC runpath"
+	@${REINPLACE_CMD} -e 's;\@PREFIX\@;${PREFIX};' \
+		-e 's;\@GCCAUX\@;${PORTNAME};' \
+		${WRKSRC}/gcc/config/dragonfly.h \
+		${WRKSRC}/gcc/config/i386/freebsd64.h \
+		${WRKSRC}/gcc/config/i386/freebsd.h
+.if defined(MODERN_BINUTILS)
+	# Use dwarf4-compatible addr2line (affects FreeBSD only)
+	${REINPLACE_CMD} -e 's|/usr/bin/addr2line|${PREFIX}/bin/addr2line|g' \
+	  ${WRKSRC}/gcc/ada/traceback_symbolic.c
+.endif
+
+do-configure:
+	${MKDIR} ${BUILDDIR}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \
+		${CFG_SCRIPT} ${ADA_CONFIG_ARGS}
+
+do-build:
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -j${MAKE_JOBS_NUMBER} ${MAKE_ARGS} all
+
+.if ${PORT_OPTIONS:MTESTSUITE} && !${PORT_OPTIONS:MBOOTSTRAP}
+test: build test-ada test-fortran test-objc test-cxx test-c
+
+test-ada:
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-ada
+
+test-cxx:
+	# libstdc++ testsuite will break every time, for TRUE to continue
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-c++ || true
+
+test-c:
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-c
+
+test-fortran:
+.  if ${PORT_OPTIONS:MFORT}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-fortran
+.  endif
+
+test-objc:
+.  if ${PORT_OPTIONS:MOBJC}
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} -sk check-objc
+.  endif
+.endif
+
+do-install:
+	cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} \
+		${MAKE_CMD} install-strip ${MAKE_ARGS}
+	${MV} ${STAGEDIR}${PKG_PREFIX}/share ${WRKDIR}/moved_share
+#	Don't activate until this port builds gnatdroid
+#	Otherwise it will conflict with lang/gcc-aux
+#	${MKDIR} ${STAGEDIR}${PREFIX}/share/dejagnu/baseboards \
+#		${STAGEDIR}${PREFIX}/share/dejagnu/config
+#	${INSTALL_DATA} ${FILESDIR}/android.exp \
+#		${STAGEDIR}${PREFIX}/share/dejagnu/config
+#	${INSTALL_DATA} ${FILESDIR}/gnatdroid.exp \
+#		${STAGEDIR}${PREFIX}/share/dejagnu/baseboards
+
+post-stage:
+	(cd ${STAGEDIR}${PKG_PREFIX}; ${FIND} * -type d -empty | \
+		${SORT} -dr | ${XARGS} ${RMDIR})
+	(cd ${STAGEDIR}${PREFIX}; ${FIND} ${PORTNAME} share \
+		\( -type f -or -type l \) | ${SORT} | ${SED} \
+		-e 's/\/man\/man[1578]\/.*[1578]$$/&.gz/' >> ${TMPPLIST})
+.if ${PORT_OPTIONS:MBOOTSTRAP}
+	${MKDIR} ${NEWBSDIR}
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/bin ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/lib ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/include ${NEWBSDIR}/
+	${CP} -a ${STAGEDIR}${PKG_PREFIX}/libexec ${NEWBSDIR}/
+	${RM} ${NEWBSDIR}/bin/${GARCH}*
+	${RM} -rf ${NEWBSDIR}/lib/gcc/${BLD_TARGET}/${GCC_VERSION}/include-fixed
+	(cd ${NEWBSDIR}/.. ; ${TAR} -cyf ${BSFILENAME} bootstrap)
+.endif
+
+.include <bsd.port.mk>

Added: head/lang/gcc5-aux/Makefile.common
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/Makefile.common	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,143 @@
+# $FreeBSD$
+
+.include "Makefile.version"
+
+LIB_DEPENDS=		libgmp.so:${PORTSDIR}/math/gmp
+LIB_DEPENDS+=		libmpfr.so:${PORTSDIR}/math/mpfr
+LIB_DEPENDS+=		libmpc.so:${PORTSDIR}/math/mpc
+
+ONLY_FOR_ARCHS= 	i386 amd64
+
+GNU_CONFIGURE=		yes
+USES=			gmake iconv libtool perl5 tar:bzip2
+USE_PERL5=		build
+ALL_TARGET=		default
+
+LOCALE22FIX= \
+	codecvt/always_noconv/char/wrapped_locale.cc \
+	codecvt/always_noconv/wchar_t/2.cc \
+	codecvt/always_noconv/wchar_t/3.cc \
+	codecvt/always_noconv/wchar_t/wrapped_locale.cc \
+	codecvt/encoding/char/wrapped_locale.cc \
+	codecvt/encoding/wchar_t/2.cc \
+	codecvt/encoding/wchar_t/3.cc \
+	codecvt/encoding/wchar_t/wrapped_locale.cc \
+	codecvt/in/char/wrapped_locale.cc \
+	codecvt/in/wchar_t/2.cc \
+	codecvt/in/wchar_t/3.cc \
+	codecvt/in/wchar_t/wrapped_locale.cc \
+	codecvt/length/char/wrapped_locale.cc \
+	codecvt/length/wchar_t/2.cc \
+	codecvt/length/wchar_t/3.cc \
+	codecvt/length/wchar_t/wrapped_locale.cc \
+	codecvt/max_length/char/wrapped_locale.cc \
+	codecvt/max_length/wchar_t/2.cc \
+	codecvt/max_length/wchar_t/3.cc \
+	codecvt/max_length/wchar_t/wrapped_locale.cc \
+	codecvt/out/char/wrapped_locale.cc \
+	codecvt/out/wchar_t/2.cc \
+	codecvt/out/wchar_t/3.cc \
+	codecvt/out/wchar_t/7.cc \
+	codecvt/out/wchar_t/wrapped_locale.cc \
+	codecvt/unshift/char/wrapped_locale.cc \
+	codecvt/unshift/wchar_t/2.cc \
+	codecvt/unshift/wchar_t/3.cc \
+	codecvt/unshift/wchar_t/wrapped_locale.cc \
+	collate/compare/char/wrapped_locale.cc \
+	collate/compare/wchar_t/wrapped_locale.cc \
+	collate/hash/char/wrapped_locale.cc \
+	collate/hash/wchar_t/wrapped_locale.cc \
+	collate/transform/char/wrapped_locale.cc \
+	collate/transform/wchar_t/wrapped_locale.cc \
+	ctype/cons/char/wrapped_locale.cc \
+	ctype/is/char/wrapped_locale.cc \
+	ctype/is/wchar_t/wrapped_locale.cc \
+	ctype/narrow/char/wrapped_locale.cc \
+	ctype/narrow/wchar_t/3.cc \
+	ctype/narrow/wchar_t/wrapped_locale.cc \
+	ctype/scan/char/wrapped_locale.cc \
+	ctype/scan/wchar_t/wrapped_locale.cc \
+	ctype/to/char/wrapped_locale.cc \
+	ctype/to/wchar_t/wrapped_locale.cc \
+	ctype/widen/char/wrapped_locale.cc \
+	ctype/widen/wchar_t/2.cc \
+	ctype/widen/wchar_t/3.cc \
+	ctype/widen/wchar_t/wrapped_locale.cc \
+	facet/2.cc \
+	locale/cons/40184.cc \
+	locale/cons/5.cc \
+	locale/cons/unicode.cc \
+	locale/global_locale_objects/2.cc \
+	messages/members/char/wrapped_locale.cc \
+	money_get/get/char/16.cc \
+	money_get/get/char/18.cc \
+	money_get/get/char/2.cc \
+	money_get/get/char/4.cc \
+	money_get/get/char/wrapped_env.cc \
+	money_get/get/char/wrapped_locale.cc \
+	money_get/get/wchar_t/16.cc \
+	money_get/get/wchar_t/18.cc \
+	money_get/get/wchar_t/2.cc \
+	money_get/get/wchar_t/4.cc \
+	money_get/get/wchar_t/wrapped_env.cc \
+	money_get/get/wchar_t/wrapped_locale.cc \
+	money_put/put/char/2.cc \
+	money_put/put/char/wrapped_env.cc \
+	money_put/put/char/wrapped_locale.cc \
+	money_put/put/wchar_t/2.cc \
+	money_put/put/wchar_t/wrapped_env.cc \
+	money_put/put/wchar_t/wrapped_locale.cc \
+	moneypunct/members/char/wrapped_locale.cc \
+	moneypunct/members/wchar_t/wrapped_locale.cc \
+	num_get/get/char/3.cc \
+	num_get/get/char/wrapped_env.cc \
+	num_get/get/char/wrapped_locale.cc \
+	num_get/get/wchar_t/3.cc \
+	num_get/get/wchar_t/wrapped_env.cc \
+	num_get/get/wchar_t/wrapped_locale.cc \
+	num_put/put/char/3.cc \
+	num_put/put/char/wrapped_env.cc \
+	num_put/put/char/wrapped_locale.cc \
+	num_put/put/wchar_t/3.cc \
+	num_put/put/wchar_t/wrapped_env.cc \
+	num_put/put/wchar_t/wrapped_locale.cc \
+	numpunct/members/char/wrapped_locale.cc \
+	numpunct/members/wchar_t/wrapped_locale.cc \
+	time_get/date_order/char/wrapped_locale.cc \
+	time_get/date_order/wchar_t/wrapped_locale.cc \
+	time_get/get_date/char/2.cc \
+	time_get/get_date/char/wrapped_env.cc \
+	time_get/get_date/char/wrapped_locale.cc \
+	time_get/get_date/wchar_t/2.cc \
+	time_get/get_date/wchar_t/wrapped_env.cc \
+	time_get/get_date/wchar_t/wrapped_locale.cc \
+	time_get/get_monthname/char/2.cc \
+	time_get/get_monthname/char/wrapped_env.cc \
+	time_get/get_monthname/char/wrapped_locale.cc \
+	time_get/get_monthname/wchar_t/2.cc \
+	time_get/get_monthname/wchar_t/wrapped_env.cc \
+	time_get/get_monthname/wchar_t/wrapped_locale.cc \
+	time_get/get_time/char/2.cc \
+	time_get/get_time/char/wrapped_env.cc \
+	time_get/get_time/char/wrapped_locale.cc \
+	time_get/get_time/wchar_t/2.cc \
+	time_get/get_time/wchar_t/wrapped_env.cc \
+	time_get/get_time/wchar_t/wrapped_locale.cc \
+	time_get/get_weekday/char/2.cc \
+	time_get/get_weekday/char/38081-1.cc \
+	time_get/get_weekday/char/38081-2.cc \
+	time_get/get_weekday/char/wrapped_env.cc \
+	time_get/get_weekday/char/wrapped_locale.cc \
+	time_get/get_weekday/wchar_t/2.cc \
+	time_get/get_weekday/wchar_t/wrapped_env.cc \
+	time_get/get_weekday/wchar_t/wrapped_locale.cc \
+	time_get/get_year/char/wrapped_locale.cc \
+	time_get/get_year/wchar_t/wrapped_locale.cc \
+	time_put/put/char/3.cc \
+	time_put/put/char/7.cc \
+	time_put/put/char/wrapped_env.cc \
+	time_put/put/char/wrapped_locale.cc \
+	time_put/put/wchar_t/3.cc \
+	time_put/put/wchar_t/7.cc \
+	time_put/put/wchar_t/wrapped_env.cc \
+	time_put/put/wchar_t/wrapped_locale.cc

Added: head/lang/gcc5-aux/Makefile.version
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/Makefile.version	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+GCC_BRANCH=		5
+GCC_POINT=		0.0
+GCC_VERSION=		${GCC_BRANCH}.${GCC_POINT}
+SNAPSHOT=		20150308
+BUILD_RELEASE=		no
+MAIN_PR=		0
+UTIL_PR=		0
+ARMV7_PR=		0
+
+.if ${BUILD_RELEASE:Mno}
+# Snapshot naming pattern
+IDENTIFICATION=	gcc-${GCC_BRANCH}-${SNAPSHOT}
+MS_SUBDIR=		snapshots/${GCC_BRANCH}-${SNAPSHOT}
+.else
+# Release naming pattern
+IDENTIFICATION=		gcc-${GCC_VERSION}
+MS_SUBDIR=		releases/gcc-${GCC_VERSION}
+.endif

Added: head/lang/gcc5-aux/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/distinfo	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,14 @@
+SHA256 (gcc-5-20150308.tar.bz2) = c0137e2768971bf03c08fa47161e5b295f61d94fd7c40e4798c80633b678191f
+SIZE (gcc-5-20150308.tar.bz2) = 90652639
+SHA256 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 6b1a6ff0fe0e3bf13c667db2fef177b811329cd998400a1303969a86911cb1c8
+SIZE (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 39357314
+SHA256 (ada-bootstrap.i386.freebsd.84.tar.bz2) = b410336cb0e71c8a29dd5f831a17b4b7282e7d590f452475a94c6a625cfc8846
+SIZE (ada-bootstrap.i386.freebsd.84.tar.bz2) = 39727003
+SHA256 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 7231209f2600275f554f788ad1d036cf633c4339ebd25bd479a5bb1ddcddedf3
+SIZE (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 41229192
+SHA256 (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = ba9b193f1f5c780c0e94086a9af6f1c8e843b6782c133b9948789b95b2e605c4
+SIZE (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = 40747242
+SHA256 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = ba1a407d936e7b3f2bfe825d1fb5a1f0e85e8edbdd9e8440bb49ef643fec05fc
+SIZE (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 40227668
+SHA256 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 1066d7c5e71d78b4416de3b73348227678ca07db52488409e270db7b00467f55
+SIZE (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 42163803

Added: head/lang/gcc5-aux/files/android.exp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/files/android.exp	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,106 @@
+# This file is part of DejaGnu.
+
+if {![info exists board]} {
+    error "must set $board before loading android.exp"
+}
+
+# For rcp_download, rsh_exec.
+load_lib remote.exp
+
+#
+# unix_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+
+proc unix_load { dest prog args } {
+    global ld_library_path
+    set output ""
+    set orig_ld_library_path ""
+
+    if { [llength $args] > 0 } {
+	set parg [lindex $args 0]
+    } else {
+	set parg ""
+    }
+
+    if { [llength $args] > 1 } {
+	set inp [lindex $args 1]
+    } else {
+	set inp ""
+    }
+
+    if {![file exists $prog]} then {
+	# We call both here because this should never happen.
+	perror "$prog does not exist in unix_load."
+	verbose -log "$prog does not exist." 3
+	return "untested"
+    }
+    verbose "loading to $dest" 2
+    if {![is_remote $dest]} {
+	if { "$inp" != "" } {
+	    set command "$prog $parg < $inp"
+	} else {
+	    set command "$prog $parg"
+	}
+
+        if {![info exists ld_library_path]} {
+	    set ld_library_path ""
+        }
+
+	set orig_ld_library_path "[getenv LD_LIBRARY_PATH]"
+	setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path"
+	setenv SHLIB_PATH "$ld_library_path:$orig_ld_library_path"
+	verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2
+
+	set id [remote_spawn $dest "$command" "readonly"]
+	if { $id < 0 } {
+	    set output "remote_spawn failed"
+	    set status -1
+	} else {
+	    set status [remote_wait $dest 300]
+	    set output [lindex $status 1]
+	    set status [lindex $status 0]
+	}
+	# Unset them so we don't potentially get hosed when we try to run a
+	# non-testcase executable. (Setting LD_LIBRARY_PATH is the wrong
+	# fix in the first place; this just tries to minimize the resulting
+	# crap.)
+	if {[info exists ld_library_path]} {
+	    setenv LD_LIBRARY_PATH $orig_ld_library_path
+	    setenv SHLIB_PATH $orig_ld_library_path
+	}
+    } else {
+	set remotefile "/data/local/testsuite/[file tail $prog].[pid]"
+	set remotefile [remote_download $dest $prog $remotefile]
+	if { $remotefile == "" } {
+	    verbose -log "Download of $prog to [board_info $dest name] failed." 3
+	    return [list "unresolved" ""]
+	}
+	set status [remote_exec $dest "$remotefile" $parg $inp]
+	remote_file $dest delete $remotefile.o $remotefile
+	if { [lindex $status 0] < 0 } {
+	    verbose -log "Couldn't execute $prog, [lindex $status 1]" 3
+	    return [list "unresolved" ""]
+	}
+	set output [lindex $status 1]
+	set status [lindex $status 0]
+    }
+
+    setenv LD_LIBRARY_PATH $orig_ld_library_path
+    setenv SHLIB_PATH $orig_ld_library_path
+
+    verbose "Executed $prog, status $status" 2
+    if {![string match "" $output]} {
+	verbose -- "$output" 2
+    }
+    if { $status == 0 } {
+	set result "pass"
+    } else {
+	set result "fail"
+    }
+    return [list $result $output]
+}
+
+set_board_info protocol  "unix"

Added: head/lang/gcc5-aux/files/diff-ada
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5-aux/files/diff-ada	Sat Mar 14 21:32:03 2015	(r381294)
@@ -0,0 +1,3277 @@
+--- gcc/ada/a-exetim-posix.adb.orig
++++ gcc/ada/a-exetim-posix.adb
+@@ -105,11 +105,11 @@
+       --  Time is equal to Duration (although it is a private type) and
+       --  CPU_Time is equal to Time.
+ 
+-      function clock_gettime
++      function clock_gettime_int
+         (clock_id : Interfaces.C.int;
+          tp       : access timespec)
+          return int;
+-      pragma Import (C, clock_gettime, "clock_gettime");
++      pragma Import (C, clock_gettime_int, "clock_gettime");
+       --  Function from the POSIX.1b Realtime Extensions library
+ 
+    begin
+@@ -117,7 +117,7 @@
+          raise Program_Error;
+       end if;
+ 
+-      Result := clock_gettime
++      Result := clock_gettime_int
+         (clock_id => CLOCK_THREAD_CPUTIME_ID, tp => TS'Unchecked_Access);
+       pragma Assert (Result = 0);
+ 
+--- /dev/null
++++ gcc/ada/a-intnam-dragonfly.ads
+@@ -0,0 +1,136 @@
++------------------------------------------------------------------------------
++--                                                                          --
++--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
++--                                                                          --
++--                   A D A . I N T E R R U P T S . N A M E S                --
++--                                                                          --
++--                                  S p e c                                 --
++--                                                                          --
++--          Copyright (C) 1991-2011, Free Software Foundation, Inc.         --
++--                                                                          --
++-- GNARL is free software; you can  redistribute it  and/or modify it under --
++-- terms of the  GNU General Public License as published  by the Free Soft- --
++-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
++-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
++--                                                                          --
++-- As a special exception under Section 7 of GPL version 3, you are granted --
++-- additional permissions described in the GCC Runtime Library Exception,   --
++-- version 3.1, as published by the Free Software Foundation.               --
++--                                                                          --
++-- You should have received a copy of the GNU General Public License and    --
++-- a copy of the GCC Runtime Library Exception along with this program;     --
++-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
++-- <http://www.gnu.org/licenses/>.                                          --
++--                                                                          --
++-- GNARL was developed by the GNARL team at Florida State University.       --
++-- Extensive contributions were provided by Ada Core Technologies, Inc.     --
++--                                                                          --
++------------------------------------------------------------------------------
++
++--  This is the DragonFly BSD THREADS version of this package
++
++with System.OS_Interface;
++
++package Ada.Interrupts.Names is
++
++   --  All identifiers in this unit are implementation defined
++
++   pragma Implementation_Defined;
++
++   --  Beware that the mapping of names to signals may be many-to-one. There
++   --  may be aliases. Also, for all signal names that are not supported on
++   --  the current system the value of the corresponding constant will be zero.
++
++   SIGHUP : constant Interrupt_ID :=
++     System.OS_Interface.SIGHUP;      --  hangup
++
++   SIGINT : constant Interrupt_ID :=
++     System.OS_Interface.SIGINT;      --  interrupt (rubout)
++
++   SIGQUIT : constant Interrupt_ID :=
++     System.OS_Interface.SIGQUIT;     --  quit (ASCD FS)
++
++   SIGILL : constant Interrupt_ID :=
++     System.OS_Interface.SIGILL;      --  illegal instruction (not reset)
++
++   SIGTRAP : constant Interrupt_ID :=
++     System.OS_Interface.SIGTRAP;     --  trace trap (not reset)
++
++   SIGIOT : constant Interrupt_ID :=
++     System.OS_Interface.SIGIOT;      --  IOT instruction
++
++   SIGABRT : constant Interrupt_ID := --  used by abort,
++     System.OS_Interface.SIGABRT;     --  replace SIGIOT in the  future
++
++   SIGFPE : constant Interrupt_ID :=
++     System.OS_Interface.SIGFPE;      --  floating point exception
++
++   SIGKILL : constant Interrupt_ID :=
++     System.OS_Interface.SIGKILL;     --  kill (cannot be caught or ignored)
++
++   SIGBUS : constant Interrupt_ID :=
++     System.OS_Interface.SIGBUS;      --  bus error
++
++   SIGSEGV : constant Interrupt_ID :=
++     System.OS_Interface.SIGSEGV;     --  segmentation violation
++
++   SIGPIPE : constant Interrupt_ID := --  write on a pipe with
++     System.OS_Interface.SIGPIPE;     --  no one to read it
++
++   SIGALRM : constant Interrupt_ID :=
++     System.OS_Interface.SIGALRM;     --  alarm clock
++
++   SIGTERM : constant Interrupt_ID :=
++     System.OS_Interface.SIGTERM;     --  software termination signal from kill
++
++   SIGURG : constant Interrupt_ID :=
++     System.OS_Interface.SIGURG;      --  urgent condition on IO channel
++
++   SIGSTOP : constant Interrupt_ID :=
++     System.OS_Interface.SIGSTOP;     --  stop (cannot be caught or ignored)
++
++   SIGTSTP : constant Interrupt_ID :=
++     System.OS_Interface.SIGTSTP;     --  user stop requested from tty
++
++   SIGCONT : constant Interrupt_ID :=
++     System.OS_Interface.SIGCONT;     --  stopped process has been continued
++
++   SIGCHLD : constant Interrupt_ID :=
++     System.OS_Interface.SIGCHLD;     --  4.3BSD's/POSIX name for SIGCLD
++
++   SIGCLD : constant Interrupt_ID :=
++     System.OS_Interface.SIGCLD;      --  child status change
++
++   SIGTTIN : constant Interrupt_ID :=
++     System.OS_Interface.SIGTTIN;     --  background tty read attempted
++
++   SIGTTOU : constant Interrupt_ID :=
++     System.OS_Interface.SIGTTOU;     --  background tty write attempted
++
++   SIGIO : constant Interrupt_ID :=   --  input/output possible,
++     System.OS_Interface.SIGIO;       --  SIGPOLL alias (Solaris)
++
++   SIGXCPU : constant Interrupt_ID :=
++     System.OS_Interface.SIGXCPU;     --  CPU time limit exceeded
++
++   SIGXFSZ : constant Interrupt_ID :=
++     System.OS_Interface.SIGXFSZ;     --  filesize limit exceeded
++
++   SIGVTALRM : constant Interrupt_ID :=
++     System.OS_Interface.SIGVTALRM;   --  virtual timer expired
++
++   SIGPROF : constant Interrupt_ID :=
++     System.OS_Interface.SIGPROF;     --  profiling timer expired
++
++   SIGWINCH : constant Interrupt_ID :=
++     System.OS_Interface.SIGWINCH;    --  window size change
++
++   SIGUSR1 : constant Interrupt_ID :=
++     System.OS_Interface.SIGUSR1;     --  user defined signal 1
++
++   SIGUSR2 : constant Interrupt_ID :=
++     System.OS_Interface.SIGUSR2;     --  user defined signal 2
++
++end Ada.Interrupts.Names;
+--- gcc/ada/adaint.c.orig
++++ gcc/ada/adaint.c
+@@ -497,8 +497,8 @@
+   GNAT_STRUCT_STAT stat_result;
+   int fd;
+ 
+-  sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file);
+-  sprintf (temp_file, "%s%cTMP-%ld-%ld",
++  snprintf (full_path, 256, "%s%c%s", dir, DIR_SEPARATOR, file);
++  snprintf (temp_file, 256, "%s%cTMP-%ld-%ld",
+            dir, DIR_SEPARATOR, (long)getpid(), (long)getppid ());
+ 
+   /* Create the temporary file and write the process number.  */
+@@ -659,7 +659,8 @@
+   strcpy (encoding, "encoding=utf8");
+   *e_length = strlen (encoding);
+ #else
+-  strcpy (os_name, filename);
++  /* o_length is initialized with max os_name size (2x filename size) */
++  strncpy (os_name, filename, *o_length);
+   *o_length = strlen (filename);
+   *e_length = 0;
+ #endif
+@@ -738,7 +739,7 @@
+ }
+ 
+ #if defined (_WIN32) || defined (linux) || defined (sun) \
+-  || defined (__FreeBSD__)
++  || defined (__FreeBSD__) || defined(__DragonFly__)
+ #define HAS_TARGET_WCHAR_T
+ #endif
+ 
+@@ -973,9 +974,10 @@
+   int fd;
+   int o_fmode = O_BINARY;
+ 
+-  strcpy (path, "GNAT-XXXXXX");
++  strncpy (path, "GNAT-XXXXXX", 12);
+ 
+ #if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
++  || defined (__DragonFly__) \
+   || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks)
+   return mkstemp (path);
+ #elif defined (__Lynx__)
+@@ -1147,21 +1149,58 @@
+     free (pname);
+   }
+ 
++#elif defined (__ANDROID__)
++
++  /*
++   * ext2 /ext3/ext4/fat16/fat32 have no path limits
++   * /data/local/tmp normally requires rooted devices, if it even exists
++   * /sdcard is the standard location for external storage.  Nativeactivity
++   * manifest needs to authorize its use, otherwise it might not have the
++   * proper permissions.
++   */
++
++  int testfd;
++  char *datadir = getenv ("ANDROID_DATA");
++
++  if (datadir == NULL)
++    strncpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX", L_tmpnam);
++  else
++    snprintf (tmp_filename, L_tmpnam, "%s/local/tmp/gnat-XXXXXX", datadir);
++
++  testfd = mkstemp (tmp_filename);
++  if (testfd != -1)
++    {
++      close (testfd);
++      return;
++    }
++
++  char *sdcard = getenv ("EXTERNAL_STORAGE");
++
++  if (sdcard == NULL)
++    strncpy (tmp_filename, "/sdcard/gnat-XXXXXX", L_tmpnam);
++  else
++    snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", sdcard);
++
++  testfd = mkstemp (tmp_filename);
++  if (testfd != -1)
++    {
++      close (testfd);
++      return;
++    }
++
++  tmpnam (tmp_filename);
++
+ #elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
+-  || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__ANDROID__)
++  || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__DragonFly__)
+ #define MAX_SAFE_PATH 1000
+   char *tmpdir = getenv ("TMPDIR");
+ 
+   /* If tmpdir is longer than MAX_SAFE_PATH, revert to default value to avoid
+      a buffer overflow.  */
+   if (tmpdir == NULL || strlen (tmpdir) > MAX_SAFE_PATH)
+-#ifdef __ANDROID__
+-    strcpy (tmp_filename, "/cache/gnat-XXXXXX");
+-#else
+-    strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
+-#endif
++    strncpy (tmp_filename, "/tmp/gnat-XXXXXX", L_tmpnam);
+   else
+-    sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir);
++    snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", tmpdir);
+ 
+   close (mkstemp(tmp_filename));
+ #elif defined (__vxworks) && !(defined (__RTP__) || defined (VTHREADS))
+@@ -2247,7 +2286,9 @@
+ {
+   int cores = 1;
+ 
+-#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__)
++#if defined (linux) || defined (sun) || defined (AIX) \
++ || defined (__APPLE__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
++ || defined (__DragonFly__) || defined (__NetBSD__)
+   cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
+ 
+ #elif defined (__hpux__)
+--- gcc/ada/cio.c.orig
++++ gcc/ada/cio.c
+@@ -49,7 +49,8 @@
+ 
+ /* Don't use macros on GNU/Linux since they cause incompatible changes between
+    glibc 2.0 and 2.1 */
+-#ifdef linux
++/* Android is The exception because it uses the BIONIC library */
++#if defined(linux) && !defined(__ANDROID__)
+ #undef putchar
+ #undef getchar
+ #undef fputc
+--- gcc/ada/cstreams.c.orig
++++ gcc/ada/cstreams.c
+@@ -69,9 +69,10 @@
+ #include <unixlib.h>
+ #endif
+ 
+-#ifdef linux
++#if defined(linux) && !defined(__ANDROID__)
+ /* Don't use macros on GNU/Linux since they cause incompatible changes between
+    glibc 2.0 and 2.1 */
++/* Android is The exception because it uses the BIONIC library */
+ 
+ #ifdef stderr
+ #  undef stderr
+@@ -192,7 +193,9 @@
+ 	  *p = '\\';
+     }
+ 
+-#elif defined (__FreeBSD__)
++#elif defined (__FreeBSD__) \
++   || defined (__DragonFly__) \
++   || defined (__OpenBSD__)
+ 
+   /* Use realpath function which resolves links and references to . and ..
+      on those Unix systems that support it. Note that GNU/Linux provides it but
+--- gcc/ada/env.c.orig
++++ gcc/ada/env.c
+@@ -181,7 +181,9 @@
+       LIB$SIGNAL (status);
+   }
+ 
+-#elif (defined (__vxworks) && defined (__RTP__)) || defined (__APPLE__)
++#elif (defined (__vxworks) && defined (__RTP__)) \
++  || defined (__APPLE__) \
++  || defined (__OpenBSD__)
+   setenv (name, value, 1);
+ 
+ #else
+@@ -304,6 +306,7 @@
+   }
+ #elif defined (__MINGW32__) || defined (__FreeBSD__) || defined (__APPLE__) \
+    || (defined (__vxworks) && defined (__RTP__)) || defined (__CYGWIN__) \
++   || defined (__DragonFly__) \
+    || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__rtems__)
+   /* On Windows, FreeBSD and MacOS there is no function to clean all the
+      environment but there is a "clean" way to unset a variable. So go
+--- gcc/ada/g-comlin.adb.orig
++++ gcc/ada/g-comlin.adb
+@@ -520,6 +520,7 @@
+    begin
+       Index_In_Switches := 0;
+       Switch_Length     := 0;
++      Param             := Parameter_None;
+ 
+       --  Remove all leading spaces first to make sure that Index points
+       --  at the start of the first switch.
+--- gcc/ada/g-expect.adb.orig
++++ gcc/ada/g-expect.adb
+@@ -1350,15 +1350,20 @@
+ 
+       --  The following commands are not executed on Unix systems, and are only
+       --  required for Windows systems. We are now in the parent process.
++      --  Although the if-statement is redundant, it's here so the compiler
++      --  doesn't complain about uninitialized variables.
+ 
+-      --  Restore the old descriptors
++      if No_Fork_On_Target then
+ 
+-      Dup2 (Input,  GNAT.OS_Lib.Standin);
+-      Dup2 (Output, GNAT.OS_Lib.Standout);
+-      Dup2 (Error,  GNAT.OS_Lib.Standerr);
+-      Close (Input);
+-      Close (Output);
+-      Close (Error);
++         --  Restore the old descriptors
++
++         Dup2 (Input,  GNAT.OS_Lib.Standin);
++         Dup2 (Output, GNAT.OS_Lib.Standout);
++         Dup2 (Error,  GNAT.OS_Lib.Standerr);
++         Close (Input);
++         Close (Output);
++         Close (Error);
++      end if;
+    end Set_Up_Child_Communications;
+ 
+    ---------------------------
+--- /dev/null
++++ gcc/ada/g-socthi-bsd.adb
+@@ -0,0 +1,356 @@
++------------------------------------------------------------------------------
++--                                                                          --
++--                         GNAT COMPILER COMPONENTS                         --
++--                                                                          --
++--                    G N A T . S O C K E T S . T H I N                     --
++--                                                                          --
++--                                 B o d y                                  --
++--                                                                          --
++--                     Copyright (C) 2001-2013, AdaCore                     --
++--                                                                          --
++-- GNAT is free software;  you can  redistribute it  and/or modify it under --
++-- terms of the  GNU General Public License as published  by the Free Soft- --

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503142132.t2ELW4FE002115>