summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2016-05-16 10:26:03 +0000
committerrene <rene@FreeBSD.org>2016-05-16 10:26:03 +0000
commitb1b6b5f04dbc96834d156b5751e702f688463e9a (patch)
treeab20f334c9969f81f3b57c992c4b89539d9ad1d0
parentd8c8be262240eae31e271452f7c4030f81dd71da (diff)
downloadFreeBSD-ports-b1b6b5f04dbc96834d156b5751e702f688463e9a.zip
FreeBSD-ports-b1b6b5f04dbc96834d156b5751e702f688463e9a.tar.gz
Remove expired ports:
2016-05-15 lang/gcc-aux: Use newer lang/gcc5-aux or lang/gcc6-aux compilers instead 2016-05-16 audio/deadbeef-mpris-plugin: Abandonware; use `audio/deadbeef-mpris2-plugin' instead
-rw-r--r--MOVED2
-rw-r--r--audio/Makefile1
-rw-r--r--audio/deadbeef-mpris-plugin/Makefile33
-rw-r--r--audio/deadbeef-mpris-plugin/distinfo2
-rw-r--r--audio/deadbeef-mpris-plugin/pkg-descr10
-rw-r--r--audio/deadbeef-mpris-plugin/pkg-plist4
-rw-r--r--lang/Makefile1
-rw-r--r--lang/gcc-aux/Makefile286
-rw-r--r--lang/gcc-aux/Makefile.common318
-rw-r--r--lang/gcc-aux/Makefile.version18
-rw-r--r--lang/gcc-aux/distinfo10
-rw-r--r--lang/gcc-aux/files/android.exp106
-rw-r--r--lang/gcc-aux/files/diff-ada2727
-rw-r--r--lang/gcc-aux/files/diff-ada-testsuite584
-rw-r--r--lang/gcc-aux/files/diff-core1291
-rw-r--r--lang/gcc-aux/files/diff-cxx999
-rw-r--r--lang/gcc-aux/files/diff-cxx-testsuite50
-rw-r--r--lang/gcc-aux/files/diff-fortran-testsuite11
-rw-r--r--lang/gcc-aux/files/diff-gcc-testsuite46
-rw-r--r--lang/gcc-aux/files/gnatdroid.exp14
-rw-r--r--lang/gcc-aux/pkg-descr14
21 files changed, 2 insertions, 6525 deletions
diff --git a/MOVED b/MOVED
index fe41707..1d66443 100644
--- a/MOVED
+++ b/MOVED
@@ -8316,3 +8316,5 @@ java/linux-sun-jre17||2016-05-09|Has expired: Unsupported and known for multiple
deskutils/gnustep-notebook||2016-05-09|Has expired: Does not fetch
lang/moscow_ml|lang/mosml|2016-05-11|Project renamed
devel/rubygem-redmine_acts_as_taggable_on|www/rubygem-redmine_acts_as_taggable_on|2016-05-14|Duplicate port
+lang/gcc-aux||2016-05-16|Has expired: Use newer lang/gcc5-aux or lang/gcc6-aux compilers instead
+audio/deadbeef-mpris-plugin|audio/deadbeef-mpris2-plugin|2016-05-16|Has expired: Abandonware; use `audio/deadbeef-mpris2-plugin' instead
diff --git a/audio/Makefile b/audio/Makefile
index 578c0c4..cca4d20 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -91,7 +91,6 @@
SUBDIR += dcd
SUBDIR += deadbeef
SUBDIR += deadbeef-jack-plugin
- SUBDIR += deadbeef-mpris-plugin
SUBDIR += deadbeef-mpris2-plugin
SUBDIR += deadbeef-musical-spectrum-plugin
SUBDIR += deadbeef-playback-status-plugin
diff --git a/audio/deadbeef-mpris-plugin/Makefile b/audio/deadbeef-mpris-plugin/Makefile
deleted file mode 100644
index 991a408..0000000
--- a/audio/deadbeef-mpris-plugin/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= deadbeef-mpris-plugin
-PORTVERSION= 2.1.3
-PORTREVISION= 2
-CATEGORIES= audio
-MASTER_SITES= GOOGLE_CODE
-
-MAINTAINER= danfe@FreeBSD.org
-COMMENT= MPRIS plugin for DeaDBeeF music player
-
-LICENSE= GPLv3
-
-BROKEN= does not work with recent versions of glib and/or DeaDBeeF
-DEPRECATED= Abandonware; use `audio/deadbeef-mpris2-plugin' instead
-EXPIRATION_DATE= 2016-05-16
-
-BUILD_DEPENDS= ${LOCALBASE}/include/deadbeef/deadbeef.h:audio/deadbeef
-RUN_DEPENDS:= ${BUILD_DEPENDS}
-
-GNU_CONFIGURE= yes
-USE_GNOME= glib20
-USES= pkgconfig libtool
-INSTALL_TARGET= install-strip
-
-WRKSRC= ${WRKDIR}/deadbeef-${PORTVERSION}
-
-post-patch:
- @${REINPLACE_CMD} -e 's|-Werror||g' ${WRKSRC}/Makefile.in \
- ${WRKSRC}/test/Makefile.in
-
-.include <bsd.port.mk>
diff --git a/audio/deadbeef-mpris-plugin/distinfo b/audio/deadbeef-mpris-plugin/distinfo
deleted file mode 100644
index 003a8af..0000000
--- a/audio/deadbeef-mpris-plugin/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (deadbeef-mpris-plugin-2.1.3.tar.gz) = 22683ca508072e44e8e489c894e2cb22b3aa0475fdd312d2ef88f4dad4317e4f
-SIZE (deadbeef-mpris-plugin-2.1.3.tar.gz) = 354177
diff --git a/audio/deadbeef-mpris-plugin/pkg-descr b/audio/deadbeef-mpris-plugin/pkg-descr
deleted file mode 100644
index b657589..0000000
--- a/audio/deadbeef-mpris-plugin/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-This is MPRIS (Media Player Remote Interfacing Specification) plugin for
-DeaDBeeF music player.
-
-The Media Player Remote Interfacing Specification is a standard D-Bus
-interface which aims to provide a common programmatic API for controlling
-media players. It provides a mechanism for compliant media players
-discovery, basic playback, and media player state control as well as a
-tracklist interface which is used to add context to the current item.
-
-WWW: http://code.google.com/p/deadbeef-mpris-plugin/
diff --git a/audio/deadbeef-mpris-plugin/pkg-plist b/audio/deadbeef-mpris-plugin/pkg-plist
deleted file mode 100644
index 66114ab..0000000
--- a/audio/deadbeef-mpris-plugin/pkg-plist
+++ /dev/null
@@ -1,4 +0,0 @@
-lib/deadbeef/mpris.a
-lib/deadbeef/mpris.so
-lib/deadbeef/mpris.so.0
-lib/deadbeef/mpris.so.0.0.0
diff --git a/lang/Makefile b/lang/Makefile
index 39e8be3..2ac2643 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -91,7 +91,6 @@
SUBDIR += gauche
SUBDIR += gawk
SUBDIR += gcc
- SUBDIR += gcc-aux
SUBDIR += gcc-ecj45
SUBDIR += gcc46
SUBDIR += gcc47
diff --git a/lang/gcc-aux/Makefile b/lang/gcc-aux/Makefile
deleted file mode 100644
index c831b71..0000000
--- a/lang/gcc-aux/Makefile
+++ /dev/null
@@ -1,286 +0,0 @@
-# Created by: John Marino <marino@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= gcc-aux
-PORTVERSION= ${SNAPSHOT}
-PORTREVISION= ${MAIN_PR}
-CATEGORIES= lang
-MASTER_SITES= http://downloads.dragonlace.net/src/:boot \
- LOCAL/marino:boot GCC/${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
-
-DEPRECATED= Use newer lang/gcc5-aux or lang/gcc6-aux compilers instead
-EXPIRATION_DATE= 2016-05-15
-
-.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
-BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2
-.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: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.100B.tar.bz2:boot \
- ada-bootstrap.x86_64.dragonfly.36A.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:misc/dejagnu
-APPLY_DIFFS+= ada-testsuite
-APPLY_DIFFS+= fortran-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
-EXTRA_CONFIG+= --disable-bootstrap
-.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}
- # Create new directories in preparation of applying diff files
- ${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly
- ${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly
- # 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
- @(cd ${WRKSRC}/libstdc++-v3/testsuite && ${REINPLACE_CMD} \
- -e 's|\*-\*-freebsd\*|*-*-dragonfly* *-*-freebsd*|' ${CXXTS4DF})
- @(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};' \
- ${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
- ${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>
diff --git a/lang/gcc-aux/Makefile.common b/lang/gcc-aux/Makefile.common
deleted file mode 100644
index 4856ce3..0000000
--- a/lang/gcc-aux/Makefile.common
+++ /dev/null
@@ -1,318 +0,0 @@
-# $FreeBSD$
-
-.include "Makefile.version"
-
-LIB_DEPENDS= libgmp.so:math/gmp
-LIB_DEPENDS+= libmpfr.so:math/mpfr
-LIB_DEPENDS+= libmpc.so:math/mpc
-
-ONLY_FOR_ARCHS= i386 amd64
-
-GNU_CONFIGURE= yes
-USES= cpe gmake iconv libtool perl5 tar:bzip2
-USE_PERL5= build
-ALL_TARGET= default
-CPE_PRODUCT= gcc
-CPE_VENDOR= gnu
-CPE_VERSION= ${GCC_VERSION}
-
-CXXTS4DF= \
- 17_intro/headers/c++1998/stdc++.cc \
- 17_intro/headers/c++1998/stdc++_multiple_inclusion.cc \
- 17_intro/headers/c++200x/stdc++.cc \
- 17_intro/headers/c++200x/stdc++_multiple_inclusion.cc \
- 18_support/pthread_guard.cc \
- 20_util/shared_ptr/thread/default_weaktoshared.cc \
- 21_strings/basic_string/pthread18185.cc \
- 21_strings/basic_string/pthread4.cc \
- 22_locale/locale/cons/12658_thread-1.cc \
- 22_locale/locale/cons/12658_thread-2.cc \
- 23_containers/list/pthread1.cc \
- 23_containers/list/pthread5.cc \
- 23_containers/map/pthread6.cc \
- 23_containers/vector/debug/multithreaded_swap.cc \
- 26_numerics/headers/cmath/c_math_dynamic.cc \
- 27_io/basic_ofstream/pthread2.cc \
- 27_io/basic_ostringstream/pthread3.cc \
- 30_threads/async/42819.cc \
- 30_threads/async/49668.cc \
- 30_threads/async/any.cc \
- 30_threads/async/async.cc \
- 30_threads/async/launch.cc \
- 30_threads/async/sync.cc \
- 30_threads/call_once/39909.cc \
- 30_threads/call_once/49668.cc \
- 30_threads/call_once/call_once1.cc \
- 30_threads/condition_variable/cons/1.cc \
- 30_threads/condition_variable/members/1.cc \
- 30_threads/condition_variable/members/2.cc \
- 30_threads/condition_variable/members/53841.cc \
- 30_threads/condition_variable/native_handle/typesizes.cc \
- 30_threads/condition_variable_any/50862.cc \
- 30_threads/condition_variable_any/cons/1.cc \
- 30_threads/condition_variable_any/members/1.cc \
- 30_threads/condition_variable_any/members/2.cc \
- 30_threads/future/cons/move.cc \
- 30_threads/future/members/45133.cc \
- 30_threads/future/members/get.cc \
- 30_threads/future/members/get2.cc \
- 30_threads/future/members/share.cc \
- 30_threads/future/members/valid.cc \
- 30_threads/future/members/wait.cc \
- 30_threads/future/members/wait_for.cc \
- 30_threads/future/members/wait_until.cc \
- 30_threads/lock/1.cc \
- 30_threads/lock/2.cc \
- 30_threads/lock/3.cc \
- 30_threads/lock/4.cc \
- 30_threads/mutex/cons/1.cc \
- 30_threads/mutex/dest/destructor_locked.cc \
- 30_threads/mutex/lock/1.cc \
- 30_threads/mutex/native_handle/1.cc \
- 30_threads/mutex/native_handle/typesizes.cc \
- 30_threads/mutex/try_lock/1.cc \
- 30_threads/mutex/try_lock/2.cc \
- 30_threads/mutex/unlock/1.cc \
- 30_threads/packaged_task/49668.cc \
- 30_threads/packaged_task/cons/1.cc \
- 30_threads/packaged_task/cons/2.cc \
- 30_threads/packaged_task/cons/3.cc \
- 30_threads/packaged_task/cons/alloc.cc \
- 30_threads/packaged_task/cons/move.cc \
- 30_threads/packaged_task/cons/move_assign.cc \
- 30_threads/packaged_task/members/get_future.cc \
- 30_threads/packaged_task/members/get_future2.cc \
- 30_threads/packaged_task/members/invoke.cc \
- 30_threads/packaged_task/members/invoke2.cc \
- 30_threads/packaged_task/members/invoke3.cc \
- 30_threads/packaged_task/members/invoke4.cc \
- 30_threads/packaged_task/members/invoke5.cc \
- 30_threads/packaged_task/members/reset.cc \
- 30_threads/packaged_task/members/reset2.cc \
- 30_threads/packaged_task/members/swap.cc \
- 30_threads/packaged_task/members/valid.cc \
- 30_threads/promise/cons/1.cc \
- 30_threads/promise/cons/alloc.cc \
- 30_threads/promise/cons/move.cc \
- 30_threads/promise/cons/move_assign.cc \
- 30_threads/promise/members/get_future.cc \
- 30_threads/promise/members/get_future2.cc \
- 30_threads/promise/members/set_exception.cc \
- 30_threads/promise/members/set_exception2.cc \
- 30_threads/promise/members/set_value.cc \
- 30_threads/promise/members/set_value2.cc \
- 30_threads/promise/members/set_value3.cc \
- 30_threads/promise/members/swap.cc \
- 30_threads/recursive_mutex/cons/1.cc \
- 30_threads/recursive_mutex/dest/destructor_locked.cc \
- 30_threads/recursive_mutex/lock/1.cc \
- 30_threads/recursive_mutex/native_handle/1.cc \
- 30_threads/recursive_mutex/native_handle/typesizes.cc \
- 30_threads/recursive_mutex/try_lock/1.cc \
- 30_threads/recursive_mutex/try_lock/2.cc \
- 30_threads/recursive_mutex/unlock/1.cc \
- 30_threads/recursive_timed_mutex/cons/1.cc \
- 30_threads/recursive_timed_mutex/dest/destructor_locked.cc \
- 30_threads/recursive_timed_mutex/lock/1.cc \
- 30_threads/recursive_timed_mutex/lock/2.cc \
- 30_threads/recursive_timed_mutex/native_handle/1.cc \
- 30_threads/recursive_timed_mutex/native_handle/typesizes.cc \
- 30_threads/recursive_timed_mutex/try_lock/1.cc \
- 30_threads/recursive_timed_mutex/try_lock/2.cc \
- 30_threads/recursive_timed_mutex/try_lock_for/1.cc \
- 30_threads/recursive_timed_mutex/try_lock_for/2.cc \
- 30_threads/recursive_timed_mutex/try_lock_for/3.cc \
- 30_threads/recursive_timed_mutex/try_lock_until/1.cc \
- 30_threads/recursive_timed_mutex/try_lock_until/2.cc \
- 30_threads/recursive_timed_mutex/unlock/1.cc \
- 30_threads/shared_future/cons/move.cc \
- 30_threads/shared_future/members/45133.cc \
- 30_threads/shared_future/members/get.cc \
- 30_threads/shared_future/members/get2.cc \
- 30_threads/shared_future/members/valid.cc \
- 30_threads/shared_future/members/wait.cc \
- 30_threads/shared_future/members/wait_for.cc \
- 30_threads/shared_future/members/wait_until.cc \
- 30_threads/this_thread/1.cc \
- 30_threads/this_thread/2.cc \
- 30_threads/this_thread/3.cc \
- 30_threads/this_thread/4.cc \
- 30_threads/thread/cons/1.cc \
- 30_threads/thread/cons/2.cc \
- 30_threads/thread/cons/3.cc \
- 30_threads/thread/cons/4.cc \
- 30_threads/thread/cons/49668.cc \
- 30_threads/thread/cons/5.cc \
- 30_threads/thread/cons/6.cc \
- 30_threads/thread/cons/7.cc \
- 30_threads/thread/cons/8.cc \
- 30_threads/thread/cons/9.cc \
- 30_threads/thread/cons/moveable.cc \
- 30_threads/thread/members/1.cc \
- 30_threads/thread/members/2.cc \
- 30_threads/thread/members/3.cc \
- 30_threads/thread/members/4.cc \
- 30_threads/thread/members/5.cc \
- 30_threads/thread/members/hardware_concurrency.cc \
- 30_threads/thread/swap/1.cc \
- 30_threads/timed_mutex/cons/1.cc \
- 30_threads/timed_mutex/dest/destructor_locked.cc \
- 30_threads/timed_mutex/lock/1.cc \
- 30_threads/timed_mutex/native_handle/1.cc \
- 30_threads/timed_mutex/native_handle/typesizes.cc \
- 30_threads/timed_mutex/try_lock/1.cc \
- 30_threads/timed_mutex/try_lock/2.cc \
- 30_threads/timed_mutex/try_lock_for/1.cc \
- 30_threads/timed_mutex/try_lock_for/2.cc \
- 30_threads/timed_mutex/try_lock_for/3.cc \
- 30_threads/timed_mutex/try_lock_until/1.cc \
- 30_threads/timed_mutex/try_lock_until/2.cc \
- 30_threads/timed_mutex/unlock/1.cc \
- 30_threads/try_lock/1.cc \
- 30_threads/try_lock/2.cc \
- 30_threads/try_lock/3.cc \
- 30_threads/try_lock/4.cc \
- 30_threads/unique_lock/cons/1.cc \
- 30_threads/unique_lock/cons/2.cc \
- 30_threads/unique_lock/cons/3.cc \
- 30_threads/unique_lock/cons/4.cc \
- 30_threads/unique_lock/cons/5.cc \
- 30_threads/unique_lock/cons/6.cc \
- 30_threads/unique_lock/locking/1.cc \
- 30_threads/unique_lock/locking/2.cc \
- 30_threads/unique_lock/locking/3.cc \
- 30_threads/unique_lock/locking/4.cc \
- 30_threads/unique_lock/modifiers/1.cc \
- 30_threads/unique_lock/modifiers/2.cc \
- ext/rope/pthread7-rope.cc \
- tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc \
- tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
-
-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
diff --git a/lang/gcc-aux/Makefile.version b/lang/gcc-aux/Makefile.version
deleted file mode 100644
index 3ff1600..0000000
--- a/lang/gcc-aux/Makefile.version
+++ /dev/null
@@ -1,18 +0,0 @@
-# $FreeBSD$
-
-GCC_BRANCH= 4.9
-GCC_POINT= 3
-GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT}
-SNAPSHOT= 20150626
-MAIN_PR= 0
-UTIL_PR= 0
-ARMV7_PR= 1
-X86_PR= 0
-
-# Snapshot naming pattern
-#IDENTIFICATION= gcc-${GCC_BRANCH}-${SNAPSHOT}
-#MS_SUBDIR= snapshots/${GCC_BRANCH}-${SNAPSHOT}
-
-# Release naming pattern
-IDENTIFICATION= gcc-${GCC_VERSION}
-MS_SUBDIR= releases/gcc-${GCC_VERSION}
diff --git a/lang/gcc-aux/distinfo b/lang/gcc-aux/distinfo
deleted file mode 100644
index 25ce91d..0000000
--- a/lang/gcc-aux/distinfo
+++ /dev/null
@@ -1,10 +0,0 @@
-SHA256 (gcc-4.9.3.tar.bz2) = 2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e
-SIZE (gcc-4.9.3.tar.bz2) = 90006707
-SHA256 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 6b1a6ff0fe0e3bf13c667db2fef177b811329cd998400a1303969a86911cb1c8
-SIZE (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 39357314
-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.100B.tar.bz2) = 1066d7c5e71d78b4416de3b73348227678ca07db52488409e270db7b00467f55
-SIZE (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 42163803
diff --git a/lang/gcc-aux/files/android.exp b/lang/gcc-aux/files/android.exp
deleted file mode 100644
index b3eb175..0000000
--- a/lang/gcc-aux/files/android.exp
+++ /dev/null
@@ -1,106 +0,0 @@
-# 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"
diff --git a/lang/gcc-aux/files/diff-ada b/lang/gcc-aux/files/diff-ada
deleted file mode 100644
index b2483b4..0000000
--- a/lang/gcc-aux/files/diff-ada
+++ /dev/null
@@ -1,2727 +0,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
-@@ -577,8 +577,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. */
-@@ -745,7 +745,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
-@@ -1141,9 +1142,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__)
-@@ -1310,7 +1312,49 @@
- 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 (__DragonFly__) \
- || defined (__OpenBSD__) || defined(__GLIBC__)
- #define MAX_SAFE_PATH 1000
- char *tmpdir = getenv ("TMPDIR");
-@@ -1318,9 +1362,9 @@
- /* 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)
-- strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
-+ 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))
-@@ -2562,7 +2606,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__)
-@@ -3608,35 +3654,6 @@
- }
- #endif
-
--#if defined (IS_CROSS) \
-- || (! ((defined (sparc) || defined (i386)) && defined (sun) \
-- && defined (__SVR4)) \
-- && ! (defined (linux) && (defined (i386) || defined (__x86_64__))) \
-- && ! (defined (linux) && defined (__ia64__)) \
-- && ! (defined (linux) && defined (powerpc)) \
-- && ! defined (__FreeBSD__) \
-- && ! defined (__Lynx__) \
-- && ! defined (__hpux__) \
-- && ! defined (__APPLE__) \
-- && ! defined (_AIX) \
-- && ! defined (VMS) \
-- && ! defined (__MINGW32__))
--
--/* Dummy function to satisfy g-trasym.o. See the preprocessor conditional
-- just above for a list of native platforms that provide a non-dummy
-- version of this procedure in libaddr2line.a. */
--
--void
--convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
-- void *addrs ATTRIBUTE_UNUSED,
-- int n_addr ATTRIBUTE_UNUSED,
-- void *buf ATTRIBUTE_UNUSED,
-- int *len ATTRIBUTE_UNUSED)
--{
-- *len = 0;
--}
--#endif
--
- #if defined (_WIN32)
- int __gnat_argument_needs_quote = 1;
- #else
---- 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
-@@ -54,9 +54,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
-@@ -187,7 +188,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
-@@ -180,7 +180,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
-@@ -301,6 +303,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
-@@ -525,6 +525,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
-@@ -1335,15 +1335,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- --
-+-- 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/>. --
-+-- --
-+-- GNAT was originally developed by the GNAT team at New York University. --
-+-- Extensive contributions were provided by Ada Core Technologies Inc. --
-+-- --
-+------------------------------------------------------------------------------
-+
-+-- This package provides a target dependent thin interface to the sockets
-+-- layer for use by the GNAT.Sockets package (g-socket.ads). This package
-+-- should not be directly with'ed by an applications program.
-+
-+-- This is the *BSD version which uses fcntl rather than ioctl
-+-- The constant SCON.Thread_Blocking_IO is always true (for all platforms, not
-+-- just *BSD), so this binding is significantly simpler than the standard
-+-- one it replaces.
-+
-+with GNAT.OS_Lib; use GNAT.OS_Lib;
-+
-+with Interfaces.C; use Interfaces.C;
-+
-+package body GNAT.Sockets.Thin is
-+
-+ function Syscall_Accept
-+ (S : C.int;
-+ Addr : System.Address;
-+ Addrlen : not null access C.int) return C.int;
-+ pragma Import (C, Syscall_Accept, "accept");
-+ -- The accept() function accepts a connection on a socket. An incoming
-+ -- connection is acknowledged and associated with an immediately created
-+ -- socket. The original socket is returned to the listening state.
-+
-+ function Syscall_Connect
-+ (S : C.int;
-+ Name : System.Address;
-+ Namelen : C.int) return C.int;
-+ pragma Import (C, Syscall_Connect, "connect");
-+ -- The connect() system call initiates a connection on a socket. If the
-+ -- parameter S is of type SOCK_DGRAM then connect() permanently specifies
-+ -- the peer to which datagrams are to be sent. If S is type SOCK_STREAM
-+ -- then connect() attempts to make a connection with another socket, which
-+ -- is identified by the parameter Name.
-+
-+ function Syscall_Recv
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int) return C.int;
-+ pragma Import (C, Syscall_Recv, "recv");
-+ -- The recv() function receives a message from a socket. The call can be
-+ -- used on a connection mode socket or a bound, connectionless socket. If
-+ -- no messages are available at the socket, the recv() call waits for a
-+ -- message to arrive unless the socket is non-blocking. If a socket is
-+ -- non-blocking, the call returns a -1 and ERRNO is set to EWOULDBLOCK.
-+
-+ function Syscall_Recvfrom
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int;
-+ From : System.Address;
-+ Fromlen : not null access C.int) return C.int;
-+ pragma Import (C, Syscall_Recvfrom, "recvfrom");
-+ -- The recvfrom() system call receives a message from a socket and captures
-+ -- the address from which the data was sent. It can be used to receive
-+ -- data on an unconnected socket as well. If no messages are available,
-+ -- the call waits for a message to arrive on blocking sockets. For
-+ -- non-blocking sockets without messages, -1 is returned and ERRNO is set
-+ -- to EAGAIN or EWOULDBLOCK.
-+
-+ function Syscall_Recvmsg
-+ (S : C.int;
-+ Msg : System.Address;
-+ Flags : C.int) return System.CRTL.ssize_t;
-+ pragma Import (C, Syscall_Recvmsg, "recvmsg");
-+ -- The recvmsg call receives a message from a socket, and can be used to
-+ -- receive data on an unconnected socket as well. If no messages are
-+ -- available, the call waits for a message to arrive on blocking sockets.
-+ -- For non-blocking sockets without messages, -1 is returned and ERRNO is
-+ -- set to EAGAIN or EWOULDBLOCK.
-+
-+ function Syscall_Sendmsg
-+ (S : C.int;
-+ Msg : System.Address;
-+ Flags : C.int) return System.CRTL.ssize_t;
-+ pragma Import (C, Syscall_Sendmsg, "sendmsg");
-+ -- The sendmsg() function sends a message to a socket, and can be used with
-+ -- unconnected sockets as well (the msg is ignored in this case). The
-+ -- function returns the number of bytes sent when successful, otherwise it
-+ -- returns -1 and ERRNO is set (many possible values).
-+
-+ function Syscall_Sendto
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int;
-+ To : System.Address;
-+ Tolen : C.int) return C.int;
-+ pragma Import (C, Syscall_Sendto, "sendto");
-+ -- The sendto() function only works for connected sockets and it initiates
-+ -- the transmission of a message. A successful call returns the numbers of
-+ -- bytes sent, and a failure returns a -1 and ERRNO is set.
-+
-+ function Syscall_Socket
-+ (Domain : C.int;
-+ Typ : C.int;
-+ Protocol : C.int) return C.int;
-+ pragma Import (C, Syscall_Socket, "socket");
-+ -- The socket() function is used to create an unbound socket and returns a
-+ -- file descriptor that can be used with other socket functions. Upon
-+ -- failure, a -1 is returned and ERRNO is set.
-+
-+ procedure Disable_SIGPIPE (S : C.int);
-+ pragma Import (C, Disable_SIGPIPE, "__gnat_disable_sigpipe");
-+
-+ procedure Disable_All_SIGPIPEs;
-+ pragma Import (C, Disable_All_SIGPIPEs, "__gnat_disable_all_sigpipes");
-+ -- Sets the process to ignore all SIGPIPE signals on platforms that
-+ -- don't support Disable_SIGPIPE for particular streams.
-+
-+ function C_Fcntl
-+ (Fd : C.int;
-+ Cmd : C.int;
-+ Val : C.int) return C.int;
-+ pragma Import (C, C_Fcntl, "fcntl");
-+ -- The ioctl of 64-bit DragonFlyBSD, OpenBSD, and NetBSD does not support
-+ -- setting a socket in non-blocking mode. fcntl must be used instead.
-+
-+ --------------
-+ -- C_Accept --
-+ --------------
-+
-+ function C_Accept
-+ (S : C.int;
-+ Addr : System.Address;
-+ Addrlen : not null access C.int) return C.int
-+ is
-+ R : constant C.int := Syscall_Accept (S, Addr, Addrlen);
-+ begin
-+
-+ Disable_SIGPIPE (R);
-+ return R;
-+ end C_Accept;
-+
-+ ---------------
-+ -- C_Connect --
-+ ---------------
-+
-+ function C_Connect
-+ (S : C.int;
-+ Name : System.Address;
-+ Namelen : C.int) return C.int
-+ is
-+ begin
-+ return Syscall_Connect (S, Name, Namelen);
-+ end C_Connect;
-+
-+ ------------------
-+ -- Socket_Ioctl --
-+ ------------------
-+
-+ function Socket_Ioctl
-+ (S : C.int;
-+ Req : SOSC.IOCTL_Req_T;
-+ Arg : access C.int) return C.int
-+ is
-+ begin
-+ if Req = SOSC.FIONBIO then
-+ declare
-+ use Interfaces;
-+ flags : constant Unsigned_32 :=
-+ Unsigned_32 (C_Fcntl (S, SOSC.F_GETFL, 0));
-+ nonblock : constant Unsigned_32 := Unsigned_32 (SOSC.O_NDELAY);
-+ enabled : constant Boolean := Arg.all = 1;
-+ newval : C.int := C.int (flags);
-+ begin
-+ if enabled then
-+ newval := C.int (flags or nonblock);
-+ elsif (flags and nonblock) > 0 then
-+ newval := C.int (flags - nonblock);
-+ end if;
-+ return C_Fcntl (Fd => S, Cmd => SOSC.F_SETFL, Val => newval);
-+ end;
-+ end if;
-+
-+ return C_Ioctl (S, Req, Arg);
-+ end Socket_Ioctl;
-+
-+ ------------
-+ -- C_Recv --
-+ ------------
-+
-+ function C_Recv
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int) return C.int
-+ is
-+ begin
-+ return Syscall_Recv (S, Msg, Len, Flags);
-+ end C_Recv;
-+
-+ ----------------
-+ -- C_Recvfrom --
-+ ----------------
-+
-+ function C_Recvfrom
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int;
-+ From : System.Address;
-+ Fromlen : not null access C.int) return C.int
-+ is
-+ begin
-+ return Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen);
-+ end C_Recvfrom;
-+
-+ ---------------
-+ -- C_Recvmsg --
-+ ---------------
-+
-+ function C_Recvmsg
-+ (S : C.int;
-+ Msg : System.Address;
-+ Flags : C.int) return System.CRTL.ssize_t
-+ is
-+ begin
-+ return Syscall_Recvmsg (S, Msg, Flags);
-+ end C_Recvmsg;
-+
-+ ---------------
-+ -- C_Sendmsg --
-+ ---------------
-+
-+ function C_Sendmsg
-+ (S : C.int;
-+ Msg : System.Address;
-+ Flags : C.int) return System.CRTL.ssize_t
-+ is
-+ begin
-+ return Syscall_Sendmsg (S, Msg, Flags);
-+ end C_Sendmsg;
-+
-+ --------------
-+ -- C_Sendto --
-+ --------------
-+
-+ function C_Sendto
-+ (S : C.int;
-+ Msg : System.Address;
-+ Len : C.int;
-+ Flags : C.int;
-+ To : System.Address;
-+ Tolen : C.int) return C.int
-+ is
-+ begin
-+ return Syscall_Sendto (S, Msg, Len, Flags, To, Tolen);
-+ end C_Sendto;
-+
-+ --------------
-+ -- C_Socket --
-+ --------------
-+
-+ function C_Socket
-+ (Domain : C.int;
-+ Typ : C.int;
-+ Protocol : C.int) return C.int
-+ is
-+ R : constant C.int := Syscall_Socket (Domain, Typ, Protocol);
-+ begin
-+ Disable_SIGPIPE (R);
-+ return R;
-+ end C_Socket;
-+
-+ --------------
-+ -- Finalize --
-+ --------------
-+
-+ procedure Finalize is
-+ begin
-+ null;
-+ end Finalize;
-+
-+ -------------------------
-+ -- Host_Error_Messages --
-+ -------------------------
-+
-+ package body Host_Error_Messages is separate;
-+
-+ ----------------
-+ -- Initialize --
-+ ----------------
-+
-+ procedure Initialize is
-+ begin
-+ Disable_All_SIGPIPEs;
-+ end Initialize;
-+
-+ --------------------
-+ -- Signalling_Fds --
-+ --------------------
-+
-+ package body Signalling_Fds is
-+
-+ -- In this default implementation, we use a C version of these
-+ -- subprograms provided by socket.c.
-+
-+ function C_Create (Fds : not null access Fd_Pair) return C.int;
-+ function C_Read (Rsig : C.int) return C.int;
-+ function C_Write (Wsig : C.int) return C.int;
-+ procedure C_Close (Sig : C.int);
-+
-+ pragma Import (C, C_Create, "__gnat_create_signalling_fds");
-+ pragma Import (C, C_Read, "__gnat_read_signalling_fd");
-+ pragma Import (C, C_Write, "__gnat_write_signalling_fd");
-+ pragma Import (C, C_Close, "__gnat_close_signalling_fd");
-+
-+ function Create
-+ (Fds : not null access Fd_Pair) return C.int renames C_Create;
-+ function Read (Rsig : C.int) return C.int renames C_Read;
-+ function Write (Wsig : C.int) return C.int renames C_Write;
-+ procedure Close (Sig : C.int) renames C_Close;
-+
-+ end Signalling_Fds;
-+
-+ --------------------------
-+ -- Socket_Error_Message --
-+ --------------------------
-+
-+ function Socket_Error_Message (Errno : Integer) return String is separate;
-+
-+end GNAT.Sockets.Thin;
---- /dev/null
-+++ gcc/ada/g-trasym-bsd.adb
-@@ -0,0 +1,150 @@
-+------------------------------------------------------------------------------
-+-- --
-+-- GNAT RUN-TIME COMPONENTS --
-+-- --
-+-- G N A T . T R A C E B A C K . S Y M B O L I C --
-+-- --
-+-- B o d y --
-+-- --
-+-- Copyright (C) 1999-2009, 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- --
-+-- ware Foundation; either version 2, 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. See the GNU General Public License --
-+-- for more details. You should have received a copy of the GNU General --
-+-- Public License distributed with GNAT; see file COPYING. If not, write --
-+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-+-- Boston, MA 02110-1301, USA. --
-+-- --
-+-- As a special exception, if other files instantiate generics from this --
-+-- unit, or you link this unit with other files to produce an executable, --
-+-- this unit does not by itself cause the resulting executable to be --
-+-- covered by the GNU General Public License. This exception does not --
-+-- however invalidate any other reasons why the executable file might be --
-+-- covered by the GNU Public License. --
-+-- --
-+-- GNAT was originally developed by the GNAT team at New York University. --
-+-- Extensive contributions were provided by Ada Core Technologies Inc. --
-+-- --
-+------------------------------------------------------------------------------
-+
-+-- Run-time symbolic traceback support
-+-- This file is based on the work by Juergen Pfiefer which is still used
-+-- today to provide symbolic traceback support for gnu/kFreeBSD.
-+-- Incorporated in GNAT-AUX by John Marino <http://www.dragonlace.net>
-+
-+with System.Soft_Links;
-+with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
-+
-+package body GNAT.Traceback.Symbolic is
-+
-+ package TSL renames System.Soft_Links;
-+
-+ -- To perform the raw addresses to symbolic form translation we rely on a
-+ -- libaddr2line symbolizer which examines debug info from a provided
-+ -- executable file name, and an absolute path is needed to ensure the file
-+ -- is always found. This is "__gnat_locate_exec_on_path (gnat_argv [0])"
-+ -- for our executable file, a fairly heavy operation so we cache the
-+ -- result.
-+
-+ Exename : System.Address;
-+ -- Pointer to the name of the executable file to be used on all
-+ -- invocations of the libaddr2line symbolization service.
-+
-+ Exename_Resolved : Boolean := False;
-+ -- Flag to indicate whether we have performed the executable file name
-+ -- resolution already. Relying on a not null Exename for this purpose
-+ -- would be potentially inefficient as this is what we will get if the
-+ -- resolution attempt fails.
-+
-+ ------------------------
-+ -- Symbolic_Traceback --
-+ ------------------------
-+
-+ function Symbolic_Traceback (Traceback : Tracebacks_Array) return String is
-+
-+ procedure convert_addresses
-+ (filename : System.Address;
-+ addrs : System.Address;
-+ n_addrs : Integer;
-+ buf : System.Address;
-+ len : System.Address);
-+ pragma Import (C, convert_addresses, "convert_addresses");
-+ -- This is the procedure version of the Ada-aware addr2line. It places
-+ -- in BUF a string representing the symbolic translation of the N_ADDRS
-+ -- raw addresses provided in ADDRS, looked up in debug information from
-+ -- FILENAME. LEN points to an integer which contains the size of the
-+ -- BUF buffer at input and the result length at output.
-+ --
-+ -- Note that this procedure is *not* thread-safe.
-+
-+ type Argv_Array is array (0 .. 0) of System.Address;
-+ gnat_argv : access Argv_Array;
-+ pragma Import (C, gnat_argv, "gnat_argv");
-+
-+ function locate_exec_on_path
-+ (c_exename : System.Address) return System.Address;
-+ pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
-+
-+ B_Size : constant Integer := 256 * Traceback'Length;
-+ Len : Integer := B_Size;
-+ Res : String (1 .. B_Size);
-+
-+ use type System.Address;
-+
-+ begin
-+ -- The symbolic translation of an empty set of addresses is an empty
-+ -- string.
-+
-+ if Traceback'Length = 0 then
-+ return "";
-+ end if;
-+
-+ -- If our input set of raw addresses is not empty, resort to the
-+ -- libaddr2line service to symbolize it all.
-+
-+ -- Compute, cache and provide the absolute path to our executable file
-+ -- name as the binary file where the relevant debug information is to be
-+ -- found. If the executable file name resolution fails, we have no
-+ -- sensible basis to invoke the symbolizer at all.
-+
-+ -- Protect all this against concurrent accesses explicitly, as the
-+ -- underlying services are potentially thread unsafe.
-+
-+ TSL.Lock_Task.all;
-+
-+ if not Exename_Resolved then
-+ Exename := locate_exec_on_path (gnat_argv (0));
-+ Exename_Resolved := True;
-+ end if;
-+
-+ if Exename /= System.Null_Address then
-+ Len := Res'Length;
-+ convert_addresses
-+ (Exename, Traceback'Address, Traceback'Length,
-+ Res (1)'Address, Len'Address);
-+ end if;
-+
-+ TSL.Unlock_Task.all;
-+
-+ -- Return what the addr2line symbolizer has produced if we have called
-+ -- it (the executable name resolution succeeded), or an empty string
-+ -- otherwise.
-+
-+ if Exename /= System.Null_Address then
-+ return Res (1 .. Len);
-+ else
-+ return "";
-+ end if;
-+
-+ end Symbolic_Traceback;
-+
-+ function Symbolic_Traceback (E : Exception_Occurrence) return String is
-+ begin
-+ return Symbolic_Traceback (Tracebacks (E));
-+ end Symbolic_Traceback;
-+
-+end GNAT.Traceback.Symbolic;
---- gcc/ada/gnatchop.adb.orig
-+++ gcc/ada/gnatchop.adb
-@@ -45,7 +45,7 @@
- Config_File_Name : constant String_Access := new String'("gnat.adc");
- -- The name of the file holding the GNAT configuration pragmas
-
-- Gcc : String_Access := new String'("gcc");
-+ Gcc : String_Access := new String'("ada");
- -- May be modified by switch --GCC=
-
- Gcc_Set : Boolean := False;
---- gcc/ada/gnatlink.adb.orig
-+++ gcc/ada/gnatlink.adb
-@@ -137,7 +137,7 @@
- -- This table collects the arguments to be passed to compile the binder
- -- generated file.
-
-- Gcc : String_Access := Program_Name ("gcc", "gnatlink");
-+ Gcc : String_Access := Program_Name ("ada", "gnatlink");
-
- Read_Mode : constant String := "r" & ASCII.NUL;
-
---- gcc/ada/gsocket.h.orig
-+++ gcc/ada/gsocket.h
-@@ -29,7 +29,7 @@
- * *
- ****************************************************************************/
-
--#if defined(__nucleus__) || defined(VTHREADS) || defined(__ANDROID__)
-+#if defined(__nucleus__) || defined(VTHREADS)
-
- #warning Sockets not supported on these platforms
- #undef HAVE_SOCKETS
-@@ -203,8 +203,19 @@
- #include <netdb.h>
- #endif
-
--#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \
-- defined (_WIN32) || defined (__APPLE__)
-+#if defined(__ANDROID__)
-+#include <sys/select.h>
-+#endif
-+
-+#if defined (_AIX) \
-+ || defined (__FreeBSD__) \
-+ || defined (__DragonFly__) \
-+ || defined (__NetBSD__) \
-+ || defined (__OpenBSD__) \
-+ || defined (__ANDROID__) \
-+ || defined (__hpux__) \
-+ || defined (_WIN32) \
-+ || defined (__APPLE__)
- # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
-
- #elif defined (linux) || defined (__GLIBC__) || \
-@@ -236,7 +247,13 @@
- # endif
- #endif
-
--#if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__)
-+#if defined (__FreeBSD__) \
-+ || defined (__DragonFly__) \
-+ || defined (__OpenBSD__) \
-+ || defined (__NetBSD__) \
-+ || defined (__ANDROID__) \
-+ || defined (__vxworks) \
-+ || defined(__rtems__)
- # define Has_Sockaddr_Len 1
- #else
- # define Has_Sockaddr_Len 0
---- gcc/ada/init.c.orig
-+++ gcc/ada/init.c
-@@ -1628,7 +1628,7 @@
- /* FreeBSD Section */
- /*******************/
-
--#elif defined (__FreeBSD__)
-+#elif defined (__FreeBSD__) || defined (__DragonFly__)
-
- #include <signal.h>
- #include <sys/ucontext.h>
-@@ -1673,7 +1673,7 @@
- }
-
- void
--__gnat_install_handler ()
-+__gnat_install_handler (void)
- {
- struct sigaction act;
-
-@@ -2466,9 +2466,13 @@
- initialization of the FP processor. This version is used under INTERIX
- and WIN32. */
-
--#if defined (_WIN32) || defined (__INTERIX) \
-- || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \
-- || defined (__OpenBSD__)
-+#if defined (_WIN32) \
-+ || defined (__INTERIX) \
-+ || defined (__Lynx__) \
-+ || defined (__NetBSD__) \
-+ || defined (__FreeBSD__) \
-+ || defined (__DragonFly__) \
-+ || defined (__OpenBSD__)
-
- #define HAVE_GNAT_INIT_FLOAT
-
---- gcc/ada/initialize.c.orig
-+++ gcc/ada/initialize.c
-@@ -258,8 +258,11 @@
- /* __gnat_initialize (init_float version) */
- /******************************************/
-
--#elif defined (__Lynx__) || defined (__FreeBSD__) || defined(__NetBSD__) \
-- || defined (__OpenBSD__)
-+#elif defined (__Lynx__) \
-+ || defined (__FreeBSD__) \
-+ || defined (__DragonFly__) \
-+ || defined (__NetBSD__) \
-+ || defined (__OpenBSD__)
-
- extern void __gnat_init_float (void);
-
---- gcc/ada/link.c.orig
-+++ gcc/ada/link.c
-@@ -103,7 +103,10 @@
- unsigned char __gnat_separate_run_path_options = 0;
- const char *__gnat_default_libgcc_subdir = "lib";
-
--#elif defined (__FreeBSD__)
-+#elif defined (__FreeBSD__) \
-+ || defined (__DragonFly__) \
-+ || defined (__OpenBSD__) \
-+ || defined (__NetBSD__)
- const char *__gnat_object_file_option = "-Wl,@";
- const char *__gnat_run_path_option = "-Wl,-rpath,";
- char __gnat_shared_libgnat_default = STATIC;
---- gcc/ada/make.adb.orig
-+++ gcc/ada/make.adb
-@@ -670,7 +670,7 @@
- -- Compiler, Binder & Linker Data and Subprograms --
- ----------------------------------------------------
-
-- Gcc : String_Access := Program_Name ("gcc", "gnatmake");
-+ Gcc : String_Access := Program_Name ("ada", "gnatmake");
- Original_Gcc : constant String_Access := Gcc;
- -- Original_Gcc is used to check if Gcc has been modified by a switch
- -- --GCC=, so that for VM platforms, it is not modified again, as it can
---- gcc/ada/mlib-prj.adb.orig
-+++ gcc/ada/mlib-prj.adb
-@@ -339,6 +339,11 @@
-
- Foreign_Sources : Boolean;
-
-+ Rpath_Disabled : Boolean := False;
-+ -- If -R is passed through the library options for the linker, it will
-+ -- prevent the implemented libraries portion of the rpath switch from
-+ -- being built, even if the linker is capable of supporting rpath.
-+
- Rpath : String_Access := null;
- -- Allocated only if Path Option is supported
-
-@@ -782,7 +787,7 @@
- Opts.Table (Opts.Last) :=
- new String'("-L" & Name_Buffer (1 .. Name_Len));
-
-- if Path_Option /= null then
-+ if not Rpath_Disabled and then Path_Option /= null then
- Add_Rpath (Name_Buffer (1 .. Name_Len));
- end if;
-
-@@ -1323,9 +1328,13 @@
- Get_Name_String (Element.Value);
-
- if Name_Len /= 0 then
-- Opts.Increment_Last;
-- Opts.Table (Opts.Last) :=
-- new String'(Name_Buffer (1 .. Name_Len));
-+ if Name_Buffer (1 .. Name_Len) = "-R" then
-+ Rpath_Disabled := True;
-+ else
-+ Opts.Increment_Last;
-+ Opts.Table (Opts.Last) :=
-+ new String'(Name_Buffer (1 .. Name_Len));
-+ end if;
- end if;
-
- Current := Element.Next;
---- gcc/ada/mlib-utl.adb.orig
-+++ gcc/ada/mlib-utl.adb
-@@ -282,10 +282,6 @@
- if not Opt.Quiet_Output then
- Write_Str (Ranlib_Name.all);
- Write_Char (' ');
-- for J in Ranlib_Options'Range loop
-- Write_Str (Ranlib_Options (J).all);
-- Write_Char (' ');
-- end loop;
- Write_Line (Arguments (Ar_Options'Length + 1).all);
- end if;
-
-@@ -444,7 +440,7 @@
- if Driver_Name = No_Name then
- if Gcc_Exec = null then
- if Gcc_Name = null then
-- Gcc_Name := Osint.Program_Name ("gcc", "gnatmake");
-+ Gcc_Name := Osint.Program_Name ("ada", "gnatmake");
- end if;
-
- Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all);
---- gcc/ada/prj-makr.adb.orig
-+++ gcc/ada/prj-makr.adb
-@@ -116,7 +116,7 @@
-
- procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
-
-- Gcc : constant String := "gcc";
-+ Gcc : constant String := "ada";
- Gcc_Path : String_Access := null;
-
- Non_Empty_Node : constant Project_Node_Id := 1;
---- /dev/null
-+++ gcc/ada/s-osinte-dragonfly.adb
-@@ -0,0 +1,116 @@
-+------------------------------------------------------------------------------
-+-- --
-+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-+-- --
-+-- S Y S T E M . O S _ I N T E R F A C E --
-+-- --
-+-- B o d y --
-+-- --
-+-- Copyright (C) 1991-2009, 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. It is --
-+-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-+-- State University (http://www.gnat.com). --
-+-- --
-+------------------------------------------------------------------------------
-+
-+-- This is the DragonFly THREADS version of this package
-+
-+with Interfaces.C; use Interfaces.C;
-+
-+package body System.OS_Interface is
-+
-+ -----------
-+ -- Errno --
-+ -----------
-+
-+ function Errno return int is
-+ type int_ptr is access all int;
-+
-+ function internal_errno return int_ptr;
-+ pragma Import (C, internal_errno, "__get_errno");
-+
-+ begin
-+ return (internal_errno.all);
-+ end Errno;
-+
-+ --------------------
-+ -- Get_Stack_Base --
-+ --------------------
-+
-+ function Get_Stack_Base (thread : pthread_t) return Address is
-+ pragma Unreferenced (thread);
-+ begin
-+ return Null_Address;
-+ end Get_Stack_Base;
-+
-+ ------------------
-+ -- pthread_init --
-+ ------------------
-+
-+ procedure pthread_init is
-+ begin
-+ null;
-+ end pthread_init;
-+
-+ -----------------
-+ -- To_Duration --
-+ -----------------
-+
-+ function To_Duration (TS : timespec) return Duration is
-+ begin
-+ return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9;
-+ end To_Duration;
-+
-+ ------------------------
-+ -- To_Target_Priority --
-+ ------------------------
-+
-+ function To_Target_Priority
-+ (Prio : System.Any_Priority) return Interfaces.C.int
-+ is
-+ begin
-+ return Interfaces.C.int (Prio);
-+ end To_Target_Priority;
-+
-+ -----------------
-+ -- To_Timespec --
-+ -----------------
-+
-+ function To_Timespec (D : Duration) return timespec is
-+ S : time_t;
-+ F : Duration;
-+
-+ begin
-+ S := time_t (Long_Long_Integer (D));
-+ F := D - Duration (S);
-+
-+ -- If F has negative value due to a round-up, adjust for positive F
-+ -- value.
-+
-+ if F < 0.0 then
-+ S := S - 1;
-+ F := F + 1.0;
-+ end if;
-+
-+ return timespec'(ts_sec => S,
-+ ts_nsec => long (Long_Long_Integer (F * 10#1#E9)));
-+ end To_Timespec;
-+
-+end System.OS_Interface;
---- /dev/null
-+++ gcc/ada/s-osinte-dragonfly.ads
-@@ -0,0 +1,648 @@
-+------------------------------------------------------------------------------
-+-- --
-+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-+-- --
-+-- S Y S T E M . O S _ I N T E R F A C E --
-+-- --
-+-- S p e c --
-+-- --
-+-- Copyright (C) 1991-1994, Florida State University --
-+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-+-- --
-+-- 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- --
-+-- 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. It is --
-+-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-+-- State University (http://www.gnat.com). --
-+-- --
-+------------------------------------------------------------------------------
-+
-+-- This is the DragonFly BSD PTHREADS version of this package
-+
-+-- This package encapsulates all direct interfaces to OS services
-+-- that are needed by the tasking run-time (libgnarl).
-+
-+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-+-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
-+
-+with Ada.Unchecked_Conversion;
-+
-+with Interfaces.C;
-+
-+package System.OS_Interface is
-+ pragma Preelaborate;
-+
-+ pragma Linker_Options ("-pthread");
-+
-+ subtype int is Interfaces.C.int;
-+ subtype short is Interfaces.C.short;
-+ subtype long is Interfaces.C.long;
-+ subtype unsigned is Interfaces.C.unsigned;
-+ subtype unsigned_short is Interfaces.C.unsigned_short;
-+ subtype unsigned_long is Interfaces.C.unsigned_long;
-+ subtype unsigned_char is Interfaces.C.unsigned_char;
-+ subtype plain_char is Interfaces.C.plain_char;
-+ subtype size_t is Interfaces.C.size_t;
-+
-+ -----------
-+ -- Errno --
-+ -----------
-+
-+ function Errno return int;
-+ pragma Inline (Errno);
-+
-+ EAGAIN : constant := 35;
-+ EINTR : constant := 4;
-+ EINVAL : constant := 22;
-+ ENOMEM : constant := 12;
-+ ETIMEDOUT : constant := 60;
-+
-+ -------------
-+ -- Signals --
-+ -------------
-+
-+ Max_Interrupt : constant := 31;
-+ type Signal is new int range 0 .. Max_Interrupt;
-+ for Signal'Size use int'Size;
-+
-+ SIGHUP : constant := 1; -- hangup
-+ SIGINT : constant := 2; -- interrupt (rubout)
-+ SIGQUIT : constant := 3; -- quit (ASCD FS)
-+ SIGILL : constant := 4; -- illegal instruction (not reset)
-+ SIGTRAP : constant := 5; -- trace trap (not reset)
-+ SIGIOT : constant := 6; -- IOT instruction
-+ SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
-+ SIGEMT : constant := 7; -- EMT instruction
-+ SIGFPE : constant := 8; -- floating point exception
-+ SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
-+ SIGBUS : constant := 10; -- bus error
-+ SIGSEGV : constant := 11; -- segmentation violation
-+ SIGSYS : constant := 12; -- bad argument to system call
-+ SIGPIPE : constant := 13; -- write on a pipe with no one to read it
-+ SIGALRM : constant := 14; -- alarm clock
-+ SIGTERM : constant := 15; -- software termination signal from kill
-+ SIGURG : constant := 16; -- urgent condition on IO channel
-+ SIGSTOP : constant := 17; -- stop (cannot be caught or ignored)
-+ SIGTSTP : constant := 18; -- user stop requested from tty
-+ SIGCONT : constant := 19; -- stopped process has been continued
-+ SIGCLD : constant := 20; -- alias for SIGCHLD
-+ SIGCHLD : constant := 20; -- child status change
-+ SIGTTIN : constant := 21; -- background tty read attempted
-+ SIGTTOU : constant := 22; -- background tty write attempted
-+ SIGIO : constant := 23; -- I/O possible (Solaris SIGPOLL alias)
-+ SIGXCPU : constant := 24; -- CPU time limit exceeded
-+ SIGXFSZ : constant := 25; -- filesize limit exceeded
-+ SIGVTALRM : constant := 26; -- virtual timer expired
-+ SIGPROF : constant := 27; -- profiling timer expired
-+ SIGWINCH : constant := 28; -- window size change
-+ SIGINFO : constant := 29; -- information request (BSD)
-+ SIGUSR1 : constant := 30; -- user defined signal 1
-+ SIGUSR2 : constant := 31; -- user defined signal 2
-+
-+ SIGADAABORT : constant := SIGABRT;
-+ -- Change this if you want to use another signal for task abort.
-+ -- SIGTERM might be a good one.
-+
-+ type Signal_Set is array (Natural range <>) of Signal;
-+
-+ -- Interrupts that must be unmasked at all times. DragonFlyBSD
-+ -- pthreads will not allow an application to mask out any
-+ -- interrupt needed by the threads library.
-+ Unmasked : constant Signal_Set :=
-+ (SIGTRAP, SIGBUS, SIGTTIN, SIGTTOU, SIGTSTP);
-+
-+ -- DragonFlyBSD will uses SIGPROF for timing. Do not allow a
-+ -- handler to attach to this signal.
-+ Reserved : constant Signal_Set := (0 .. 0 => SIGPROF);
-+
-+ type sigset_t is private;
-+
-+ function sigaddset
-+ (set : access sigset_t;
-+ sig : Signal) return int;
-+ pragma Import (C, sigaddset, "sigaddset");
-+
-+ function sigdelset
-+ (set : access sigset_t;
-+ sig : Signal) return int;
-+ pragma Import (C, sigdelset, "sigdelset");
-+
-+ function sigfillset (set : access sigset_t) return int;
-+ pragma Import (C, sigfillset, "sigfillset");
-+
-+ function sigismember
-+ (set : access sigset_t;
-+ sig : Signal) return int;
-+ pragma Import (C, sigismember, "sigismember");
-+
-+ function sigemptyset (set : access sigset_t) return int;
-+ pragma Import (C, sigemptyset, "sigemptyset");
-+
-+ -- sigcontext is architecture dependent, so define it private
-+ type struct_sigcontext is private;
-+
-+ type old_struct_sigaction is record
-+ sa_handler : System.Address;
-+ sa_mask : sigset_t;
-+ sa_flags : int;
-+ end record;
-+ pragma Convention (C, old_struct_sigaction);
-+
-+ type new_struct_sigaction is record
-+ sa_handler : System.Address;
-+ sa_flags : int;
-+ sa_mask : sigset_t;
-+ end record;
-+ pragma Convention (C, new_struct_sigaction);
-+
-+ subtype struct_sigaction is new_struct_sigaction;
-+ type struct_sigaction_ptr is access all struct_sigaction;
-+
-+ SIG_BLOCK : constant := 1;
-+ SIG_UNBLOCK : constant := 2;
-+ SIG_SETMASK : constant := 3;
-+
-+ SIG_DFL : constant := 0;
-+ SIG_IGN : constant := 1;
-+
-+ SA_SIGINFO : constant := 16#0040#;
-+ SA_ONSTACK : constant := 16#0001#;
-+
-+ function sigaction
-+ (sig : Signal;
-+ act : struct_sigaction_ptr;
-+ oact : struct_sigaction_ptr) return int;
-+ pragma Import (C, sigaction, "sigaction");
-+
-+ ----------
-+ -- Time --
-+ ----------
-+
-+ Time_Slice_Supported : constant Boolean := True;
-+ -- Indicates whether time slicing is supported (i.e SCHED_RR is supported)
-+
-+ type timespec is private;
-+
-+ function nanosleep (rqtp, rmtp : access timespec) return int;
-+ pragma Import (C, nanosleep, "nanosleep");
-+
-+ type clockid_t is new unsigned_long;
-+
-+ function clock_gettime
-+ (clock_id : clockid_t;
-+ tp : access timespec)
-+ return int;
-+ pragma Import (C, clock_gettime, "clock_gettime");
-+
-+ function To_Duration (TS : timespec) return Duration;
-+ pragma Inline (To_Duration);
-+
-+ function To_Timespec (D : Duration) return timespec;
-+ pragma Inline (To_Timespec);
-+
-+ type struct_timezone is record
-+ tz_minuteswest : int;
-+ tz_dsttime : int;
-+ end record;
-+ pragma Convention (C, struct_timezone);
-+
-+ procedure usleep (useconds : unsigned_long);
-+ pragma Import (C, usleep, "usleep");
-+
-+ -------------------------
-+ -- Priority Scheduling --
-+ -------------------------
-+
-+ SCHED_FIFO : constant := 1;
-+ SCHED_OTHER : constant := 2;
-+ SCHED_RR : constant := 3;
-+
-+ function To_Target_Priority
-+ (Prio : System.Any_Priority) return Interfaces.C.int;
-+ -- Maps System.Any_Priority to a POSIX priority
-+
-+ -------------
-+ -- Process --
-+ -------------
-+
-+ type pid_t is private;
-+
-+ function kill (pid : pid_t; sig : Signal) return int;
-+ pragma Import (C, kill, "kill");
-+
-+ function getpid return pid_t;
-+ pragma Import (C, getpid, "getpid");
-+
-+ ---------
-+ -- LWP --
-+ ---------
-+
-+ function lwp_self return System.Address;
-+ -- lwp_self does not exist on this thread library, revert to pthread_self
-+ -- which is the closest approximation (with getpid). This function is
-+ -- needed to share 7staprop.adb across POSIX-like targets.
-+ pragma Import (C, lwp_self, "pthread_self");
-+
-+ -------------
-+ -- Threads --
-+ -------------
-+
-+ type Thread_Body is access
-+ function (arg : System.Address) return System.Address;
-+ pragma Convention (C, Thread_Body);
-+
-+ function Thread_Body_Access is new
-+ Ada.Unchecked_Conversion (System.Address, Thread_Body);
-+
-+ type pthread_t is private;
-+ subtype Thread_Id is pthread_t;
-+
-+ type pthread_mutex_t is limited private;
-+ type pthread_cond_t is limited private;
-+ type pthread_attr_t is limited private;
-+ type pthread_mutexattr_t is limited private;
-+ type pthread_condattr_t is limited private;
-+ type pthread_key_t is private;
-+
-+ PTHREAD_CREATE_DETACHED : constant := 1;
-+ PTHREAD_CREATE_JOINABLE : constant := 0;
-+
-+ PTHREAD_SCOPE_PROCESS : constant := 0;
-+ PTHREAD_SCOPE_SYSTEM : constant := 2;
-+
-+ -- Read/Write lock not supported on DragonFly. To add support both types
-+ -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
-+ -- with the associated routines pthread_rwlock_[init/destroy] and
-+ -- pthread_rwlock_[rdlock/wrlock/unlock].
-+
-+ subtype pthread_rwlock_t is pthread_mutex_t;
-+ subtype pthread_rwlockattr_t is pthread_mutexattr_t;
-+
-+ -----------
-+ -- Stack --
-+ -----------
-+
-+ type stack_t is record
-+ ss_sp : System.Address;
-+ ss_size : size_t;
-+ ss_flags : int;
-+ end record;
-+ pragma Convention (C, stack_t);
-+
-+ function sigaltstack
-+ (ss : not null access stack_t;
-+ oss : access stack_t) return int;
-+ pragma Import (C, sigaltstack, "sigaltstack");
-+
-+ Alternate_Stack : aliased System.Address;
-+ -- This is a dummy definition, never used (Alternate_Stack_Size is null)
-+
-+ Alternate_Stack_Size : constant := 0;
-+ -- No alternate signal stack is used on this platform
-+
-+ Stack_Base_Available : constant Boolean := False;
-+ -- Indicates whether the stack base is available on this target. This
-+ -- allows us to share s-osinte.adb between all the FSU run time. Note that
-+ -- this value can only be true if pthread_t has a complete definition that
-+ -- corresponds exactly to the C header files.
-+
-+ function Get_Stack_Base (thread : pthread_t) return Address;
-+ pragma Inline (Get_Stack_Base);
-+ -- returns the stack base of the specified thread. Only call this function
-+ -- when Stack_Base_Available is True.
-+
-+ function Get_Page_Size return size_t;
-+ function Get_Page_Size return Address;
-+ pragma Import (C, Get_Page_Size, "getpagesize");
-+ -- Returns the size of a page
-+
-+ PROT_NONE : constant := 0;
-+ PROT_READ : constant := 1;
-+ PROT_WRITE : constant := 2;
-+ PROT_EXEC : constant := 4;
-+ PROT_ALL : constant := PROT_READ + PROT_WRITE + PROT_EXEC;
-+ PROT_ON : constant := PROT_NONE;
-+ PROT_OFF : constant := PROT_ALL;
-+
-+ function mprotect (addr : Address; len : size_t; prot : int) return int;
-+ pragma Import (C, mprotect);
-+
-+ ---------------------------------------
-+ -- Nonstandard Thread Initialization --
-+ ---------------------------------------
-+
-+ -- FSU_THREADS requires pthread_init, which is nonstandard and this should
-+ -- be invoked during the elaboration of s-taprop.adb.
-+
-+ -- DragonFlyBSD does not require this so we provide an empty Ada body
-+
-+ procedure pthread_init;
-+
-+ -------------------------
-+ -- POSIX.1c Section 3 --
-+ -------------------------
-+
-+ function sigwait
-+ (set : access sigset_t;
-+ sig : access Signal) return int;
-+ pragma Import (C, sigwait, "sigwait");
-+
-+ function pthread_kill
-+ (thread : pthread_t;
-+ sig : Signal) return int;
-+ pragma Import (C, pthread_kill, "pthread_kill");
-+
-+ function pthread_sigmask
-+ (how : int;
-+ set : access sigset_t;
-+ oset : access sigset_t) return int;
-+ pragma Import (C, pthread_sigmask, "pthread_sigmask");
-+
-+ --------------------------
-+ -- POSIX.1c Section 11 --
-+ --------------------------
-+
-+ function pthread_mutexattr_init
-+ (attr : access pthread_mutexattr_t) return int;
-+ pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init");
-+
-+ function pthread_mutexattr_destroy
-+ (attr : access pthread_mutexattr_t) return int;
-+ pragma Import (C, pthread_mutexattr_destroy, "pthread_mutexattr_destroy");
-+
-+ function pthread_mutex_init
-+ (mutex : access pthread_mutex_t;
-+ attr : access pthread_mutexattr_t) return int;
-+ pragma Import (C, pthread_mutex_init, "pthread_mutex_init");
-+
-+ function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
-+ pragma Import (C, pthread_mutex_destroy, "pthread_mutex_destroy");
-+
-+ function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
-+ pragma Import (C, pthread_mutex_lock, "pthread_mutex_lock");
-+
-+ function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
-+ pragma Import (C, pthread_mutex_unlock, "pthread_mutex_unlock");
-+
-+ function pthread_condattr_init
-+ (attr : access pthread_condattr_t) return int;
-+ pragma Import (C, pthread_condattr_init, "pthread_condattr_init");
-+
-+ function pthread_condattr_destroy
-+ (attr : access pthread_condattr_t) return int;
-+ pragma Import (C, pthread_condattr_destroy, "pthread_condattr_destroy");
-+
-+ function pthread_cond_init
-+ (cond : access pthread_cond_t;
-+ attr : access pthread_condattr_t) return int;
-+ pragma Import (C, pthread_cond_init, "pthread_cond_init");
-+
-+ function pthread_cond_destroy (cond : access pthread_cond_t) return int;
-+ pragma Import (C, pthread_cond_destroy, "pthread_cond_destroy");
-+
-+ function pthread_cond_signal (cond : access pthread_cond_t) return int;
-+ pragma Import (C, pthread_cond_signal, "pthread_cond_signal");
-+
-+ function pthread_cond_wait
-+ (cond : access pthread_cond_t;
-+ mutex : access pthread_mutex_t) return int;
-+ pragma Import (C, pthread_cond_wait, "pthread_cond_wait");
-+
-+ function pthread_cond_timedwait
-+ (cond : access pthread_cond_t;
-+ mutex : access pthread_mutex_t;
-+ abstime : access timespec) return int;
-+ pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait");
-+
-+ Relative_Timed_Wait : constant Boolean := False;
-+ -- pthread_cond_timedwait requires an absolute delay time
-+
-+ --------------------------
-+ -- POSIX.1c Section 13 --
-+ --------------------------
-+
-+ PTHREAD_PRIO_NONE : constant := 0;
-+ PTHREAD_PRIO_PROTECT : constant := 2;
-+ PTHREAD_PRIO_INHERIT : constant := 1;
-+
-+ function pthread_mutexattr_setprotocol
-+ (attr : access pthread_mutexattr_t;
-+ protocol : int) return int;
-+ pragma Import
-+ (C, pthread_mutexattr_setprotocol, "pthread_mutexattr_setprotocol");
-+
-+ function pthread_mutexattr_getprotocol
-+ (attr : access pthread_mutexattr_t;
-+ protocol : access int) return int;
-+ pragma Import
-+ (C, pthread_mutexattr_getprotocol, "pthread_mutexattr_getprotocol");
-+
-+ function pthread_mutexattr_setprioceiling
-+ (attr : access pthread_mutexattr_t;
-+ prioceiling : int) return int;
-+ pragma Import
-+ (C, pthread_mutexattr_setprioceiling,
-+ "pthread_mutexattr_setprioceiling");
-+
-+ function pthread_mutexattr_getprioceiling
-+ (attr : access pthread_mutexattr_t;
-+ prioceiling : access int) return int;
-+ pragma Import
-+ (C, pthread_mutexattr_getprioceiling,
-+ "pthread_mutexattr_getprioceiling");
-+
-+ type struct_sched_param is record
-+ sched_priority : int;
-+ end record;
-+ pragma Convention (C, struct_sched_param);
-+
-+ function pthread_getschedparam
-+ (thread : pthread_t;
-+ policy : access int;
-+ param : access struct_sched_param) return int;
-+ pragma Import (C, pthread_getschedparam, "pthread_getschedparam");
-+
-+ function pthread_setschedparam
-+ (thread : pthread_t;
-+ policy : int;
-+ param : access struct_sched_param) return int;
-+ pragma Import (C, pthread_setschedparam, "pthread_setschedparam");
-+
-+ function pthread_attr_setscope
-+ (attr : access pthread_attr_t;
-+ contentionscope : int) return int;
-+ pragma Import (C, pthread_attr_setscope, "pthread_attr_setscope");
-+
-+ function pthread_attr_getscope
-+ (attr : access pthread_attr_t;
-+ contentionscope : access int) return int;
-+ pragma Import (C, pthread_attr_getscope, "pthread_attr_getscope");
-+
-+ function pthread_attr_setinheritsched
-+ (attr : access pthread_attr_t;
-+ inheritsched : int) return int;
-+ pragma Import
-+ (C, pthread_attr_setinheritsched, "pthread_attr_setinheritsched");
-+
-+ function pthread_attr_getinheritsched
-+ (attr : access pthread_attr_t;
-+ inheritsched : access int) return int;
-+ pragma Import
-+ (C, pthread_attr_getinheritsched, "pthread_attr_getinheritsched");
-+
-+ function pthread_attr_setschedpolicy
-+ (attr : access pthread_attr_t;
-+ policy : int) return int;
-+ pragma Import (C, pthread_attr_setschedpolicy,
-+ "pthread_attr_setschedpolicy");
-+
-+ function pthread_attr_getschedpolicy
-+ (attr : access pthread_attr_t;
-+ policy : access int) return int;
-+ pragma Import (C, pthread_attr_getschedpolicy,
-+ "pthread_attr_getschedpolicy");
-+
-+ function pthread_attr_setschedparam
-+ (attr : access pthread_attr_t;
-+ sched_param : int) return int;
-+ pragma Import (C, pthread_attr_setschedparam, "pthread_attr_setschedparam");
-+
-+ function pthread_attr_getschedparam
-+ (attr : access pthread_attr_t;
-+ sched_param : access int) return int;
-+ pragma Import (C, pthread_attr_getschedparam, "pthread_attr_getschedparam");
-+
-+ function sched_yield return int;
-+ pragma Import (C, sched_yield, "pthread_yield");
-+
-+ --------------------------
-+ -- P1003.1c Section 16 --
-+ --------------------------
-+
-+ function pthread_attr_init (attributes : access pthread_attr_t) return int;
-+ pragma Import (C, pthread_attr_init, "pthread_attr_init");
-+
-+ function pthread_attr_destroy
-+ (attributes : access pthread_attr_t) return int;
-+ pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy");
-+
-+ function pthread_attr_setdetachstate
-+ (attr : access pthread_attr_t;
-+ detachstate : int) return int;
-+ pragma Import
-+ (C, pthread_attr_setdetachstate, "pthread_attr_setdetachstate");
-+
-+ function pthread_attr_getdetachstate
-+ (attr : access pthread_attr_t;
-+ detachstate : access int) return int;
-+ pragma Import
-+ (C, pthread_attr_getdetachstate, "pthread_attr_getdetachstate");
-+
-+ function pthread_attr_getstacksize
-+ (attr : access pthread_attr_t;
-+ stacksize : access size_t) return int;
-+ pragma Import
-+ (C, pthread_attr_getstacksize, "pthread_attr_getstacksize");
-+
-+ function pthread_attr_setstacksize
-+ (attr : access pthread_attr_t;
-+ stacksize : size_t) return int;
-+ pragma Import
-+ (C, pthread_attr_setstacksize, "pthread_attr_setstacksize");
-+
-+ function pthread_create
-+ (thread : access pthread_t;
-+ attributes : access pthread_attr_t;
-+ start_routine : Thread_Body;
-+ arg : System.Address) return int;
-+ pragma Import (C, pthread_create, "pthread_create");
-+
-+ function pthread_detach (thread : pthread_t) return int;
-+ pragma Import (C, pthread_detach, "pthread_detach");
-+
-+ procedure pthread_exit (status : System.Address);
-+ pragma Import (C, pthread_exit, "pthread_exit");
-+
-+ function pthread_self return pthread_t;
-+ pragma Import (C, pthread_self, "pthread_self");
-+
-+ --------------------------
-+ -- POSIX.1c Section 17 --
-+ --------------------------
-+
-+ function pthread_setspecific
-+ (key : pthread_key_t;
-+ value : System.Address) return int;
-+ pragma Import (C, pthread_setspecific, "pthread_setspecific");
-+
-+ function pthread_getspecific (key : pthread_key_t) return System.Address;
-+ pragma Import (C, pthread_getspecific, "pthread_getspecific");
-+
-+ type destructor_pointer is access procedure (arg : System.Address);
-+ pragma Convention (C, destructor_pointer);
-+
-+ function pthread_key_create
-+ (key : access pthread_key_t;
-+ destructor : destructor_pointer) return int;
-+ pragma Import (C, pthread_key_create, "pthread_key_create");
-+
-+ ------------------------------------
-+ -- Non-portable Pthread Functions --
-+ ------------------------------------
-+
-+ function pthread_set_name_np
-+ (thread : pthread_t;
-+ name : System.Address) return int;
-+ pragma Import (C, pthread_set_name_np, "pthread_set_name_np");
-+
-+private
-+
-+ type sigset_t is array (1 .. 4) of unsigned;
-+
-+ -- In DragonFlyBSD the component sa_handler turns out to
-+ -- be one a union type, and the selector is a macro:
-+ -- #define sa_handler __sigaction_u._handler
-+ -- #define sa_sigaction __sigaction_u._sigaction
-+
-+ -- Should we add a signal_context type here ???
-+ -- How could it be done independent of the CPU architecture ???
-+ -- sigcontext type is opaque, so it is architecturally neutral.
-+ -- It is always passed as an access type, so define it as an empty record
-+ -- since the contents are not used anywhere.
-+
-+ type struct_sigcontext is null record;
-+ pragma Convention (C, struct_sigcontext);
-+
-+ type pid_t is new int;
-+
-+ type time_t is new long;
-+
-+ type timespec is record
-+ ts_sec : time_t;
-+ ts_nsec : long;
-+ end record;
-+ pragma Convention (C, timespec);
-+
-+ type pthread_t is new System.Address;
-+ type pthread_attr_t is new System.Address;
-+ type pthread_mutex_t is new System.Address;
-+ type pthread_mutexattr_t is new System.Address;
-+ type pthread_cond_t is new System.Address;
-+ type pthread_condattr_t is new System.Address;
-+ type pthread_key_t is new int;
-+
-+end System.OS_Interface;
---- gcc/ada/s-osinte-freebsd.adb.orig
-+++ gcc/ada/s-osinte-freebsd.adb
-@@ -44,7 +44,7 @@
- type int_ptr is access all int;
-
- function internal_errno return int_ptr;
-- pragma Import (C, internal_errno, "__error");
-+ pragma Import (C, internal_errno, "__get_errno");
-
- begin
- return (internal_errno.all);
-@@ -57,7 +57,7 @@
- function Get_Stack_Base (thread : pthread_t) return Address is
- pragma Unreferenced (thread);
- begin
-- return (0);
-+ return Null_Address;
- end Get_Stack_Base;
-
- ------------------
---- gcc/ada/socket.c.orig
-+++ gcc/ada/socket.c
-@@ -65,7 +65,10 @@
- int s_port;
- __netdb_char_ptr s_proto;
- };
--#elif defined(__FreeBSD__)
-+#elif defined(__FreeBSD__) \
-+ || defined(__DragonFly__) \
-+ || defined(__OpenBSD__) \
-+ || defined(__NetBSD__)
- typedef unsigned int IOCTL_Req_T;
- #else
- typedef int IOCTL_Req_T;
---- gcc/ada/sysdep.c.orig
-+++ gcc/ada/sysdep.c
-@@ -263,6 +263,7 @@
- || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
- || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
- || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
-+ || defined (__DragonFly__) \
- || defined (__GLIBC__) || defined (__APPLE__)
-
- # ifdef __MINGW32__
-@@ -320,6 +321,7 @@
- || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
- || defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
-+ || defined (__DragonFly__) \
- || defined (__GLIBC__) || defined (__APPLE__)
- char c;
- int nread;
-@@ -340,6 +342,7 @@
- || defined (__MACHTEN__) || defined (__hpux__) \
- || defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
-+ || defined (__DragonFly__) \
- || defined (__GLIBC__) || defined (__APPLE__)
- eof_ch = termios_rec.c_cc[VEOF];
-
-@@ -853,8 +856,12 @@
- /* Darwin, Free BSD, Linux, where component tm_gmtoff is present in
- struct tm */
-
--#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
-- defined (__GLIBC__)
-+#elif defined (__APPLE__) \
-+ || defined (__DragonFly__) \
-+ || defined (__FreeBSD__) \
-+ || defined (__OpenBSD__) \
-+ || defined (linux) \
-+ || defined (__GLIBC__)
- {
- localtime_r (timer, &tp);
- *off = tp.tm_gmtoff;
---- /dev/null
-+++ gcc/ada/system-dragonfly-x86_64.ads
-@@ -0,0 +1,144 @@
-+------------------------------------------------------------------------------
-+-- --
-+-- GNAT RUN-TIME COMPONENTS --
-+-- --
-+-- S Y S T E M --
-+-- --
-+-- S p e c --
-+-- (DragonFly BSD/x86_64 Version) --
-+-- --
-+-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-+-- --
-+-- This specification is derived from the Ada Reference Manual for use with --
-+-- GNAT. The copyright notice above, and the license provisions that follow --
-+-- apply solely to the contents of the part following the private keyword. --
-+-- --
-+-- 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- --
-+-- 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/>. --
-+-- --
-+-- GNAT was originally developed by the GNAT team at New York University. --
-+-- Extensive contributions were provided by Ada Core Technologies Inc. --
-+-- --
-+------------------------------------------------------------------------------
-+
-+package System is
-+ pragma Pure;
-+ -- Note that we take advantage of the implementation permission to make
-+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
-+ -- 2005, this is Pure in any case (AI-362).
-+
-+ type Name is (SYSTEM_NAME_GNAT);
-+ System_Name : constant Name := SYSTEM_NAME_GNAT;
-+
-+ -- System-Dependent Named Numbers
-+
-+ Min_Int : constant := Long_Long_Integer'First;
-+ Max_Int : constant := Long_Long_Integer'Last;
-+
-+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
-+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
-+
-+ Max_Base_Digits : constant := Long_Long_Float'Digits;
-+ Max_Digits : constant := Long_Long_Float'Digits;
-+
-+ Max_Mantissa : constant := 63;
-+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
-+
-+ Tick : constant := 0.000_001;
-+
-+ -- Storage-related Declarations
-+
-+ type Address is private;
-+ pragma Preelaborable_Initialization (Address);
-+ Null_Address : constant Address;
-+
-+ Storage_Unit : constant := 8;
-+ Word_Size : constant := 64;
-+ Memory_Size : constant := 2 ** 64;
-+
-+ -- Address comparison
-+
-+ function "<" (Left, Right : Address) return Boolean;
-+ function "<=" (Left, Right : Address) return Boolean;
-+ function ">" (Left, Right : Address) return Boolean;
-+ function ">=" (Left, Right : Address) return Boolean;
-+ function "=" (Left, Right : Address) return Boolean;
-+
-+ pragma Import (Intrinsic, "<");
-+ pragma Import (Intrinsic, "<=");
-+ pragma Import (Intrinsic, ">");
-+ pragma Import (Intrinsic, ">=");
-+ pragma Import (Intrinsic, "=");
-+
-+ -- Other System-Dependent Declarations
-+
-+ type Bit_Order is (High_Order_First, Low_Order_First);
-+ Default_Bit_Order : constant Bit_Order := Low_Order_First;
-+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
-+
-+ -- Priority-related Declarations (RM D.1)
-+
-+ Max_Priority : constant Positive := 30;
-+ Max_Interrupt_Priority : constant Positive := 31;
-+
-+ subtype Any_Priority is Integer range 0 .. 31;
-+ subtype Priority is Any_Priority range 0 .. 30;
-+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
-+
-+ Default_Priority : constant Priority := 15;
-+
-+private
-+
-+ type Address is mod Memory_Size;
-+ Null_Address : constant Address := 0;
-+
-+ --------------------------------------
-+ -- System Implementation Parameters --
-+ --------------------------------------
-+
-+ -- These parameters provide information about the target that is used
-+ -- by the compiler. They are in the private part of System, where they
-+ -- can be accessed using the special circuitry in the Targparm unit
-+ -- whose source should be consulted for more detailed descriptions
-+ -- of the individual switch values.
-+
-+ Backend_Divide_Checks : constant Boolean := False;
-+ Backend_Overflow_Checks : constant Boolean := True;
-+ Command_Line_Args : constant Boolean := True;
-+ Configurable_Run_Time : constant Boolean := False;
-+ Denorm : constant Boolean := True;
-+ Duration_32_Bits : constant Boolean := False;
-+ Exit_Status_Supported : constant Boolean := True;
-+ Fractional_Fixed_Ops : constant Boolean := False;
-+ Frontend_Layout : constant Boolean := False;
-+ Machine_Overflows : constant Boolean := False;
-+ Machine_Rounds : constant Boolean := True;
-+ Preallocated_Stacks : constant Boolean := False;
-+ Signed_Zeros : constant Boolean := True;
-+ Stack_Check_Default : constant Boolean := False;
-+ Stack_Check_Probes : constant Boolean := True;
-+ Stack_Check_Limits : constant Boolean := False;
-+ Support_Aggregates : constant Boolean := True;
-+ Support_Atomic_Primitives : constant Boolean := True;
-+ Support_Composite_Assign : constant Boolean := True;
-+ Support_Composite_Compare : constant Boolean := True;
-+ Support_Long_Shifts : constant Boolean := True;
-+ Always_Compatible_Rep : constant Boolean := False;
-+ Suppress_Standard_Library : constant Boolean := False;
-+ Use_Ada_Main_Program_Name : constant Boolean := False;
-+ ZCX_By_Default : constant Boolean := True;
-+
-+end System;
---- gcc/ada/terminals.c.orig
-+++ gcc/ada/terminals.c
-@@ -31,8 +31,7 @@
-
- /* First all usupported platforms. Add stubs for exported routines. */
-
--#if defined (VMS) || defined (__vxworks) || defined (__Lynx__) || \
-- defined (__ANDROID__)
-+#if defined (VMS) || defined (__vxworks) || defined (__Lynx__)
-
- void * __gnat_new_tty (void) { return (void*)0; }
- char * __gnat_tty_name (void* t) { return (char*)0; }
-@@ -1010,7 +1009,11 @@
- # include <sys/stropts.h>
- #endif
-
-+#ifdef __ANDROID__
-+#define CDISABLE _PC_VDISABLE
-+#else
- #define CDISABLE _POSIX_VDISABLE
-+#endif
-
- /* On HP-UX and Sun system, there is a bzero function but with a different
- signature. Use memset instead */
---- /dev/null
-+++ gcc/ada/traceback_symbolic.c
-@@ -0,0 +1,201 @@
-+/*
-+ Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
-+ Ada for Linux Team (ALT)
-+ Heavily modified by John Marino <http://www.dragonlace.net>
-+
-+ Permission is hereby granted, free of charge, to any person obtaining a
-+ copy of this software and associated documentation files (the
-+ "Software"), to deal in the Software without restriction, including
-+ without limitation the rights to use, copy, modify, merge, publish,
-+ distribute, distribute with modifications, sublicense, and/or sell
-+ copies of the Software, and to permit persons to whom the Software is
-+ furnished to do so, subject to the following conditions:
-+
-+ The above copyright notice and this permission notice shall be included
-+ in all copies or substantial portions of the Software.
-+
-+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
-+ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+
-+ Except as contained in this notice, the name(s) of the above copyright
-+ holders shall not be used in advertising or otherwise to promote the
-+ sale, use or other dealings in this Software without prior written
-+ authorization.
-+*/
-+
-+#ifdef IS_CROSS
-+
-+
-+/*
-+ * Running addr2line doesn't make sense for cross-compiled objects.
-+ * Create a dummy function to satisfy g-trasym.o
-+ */
-+
-+void
-+convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
-+ void *addrs ATTRIBUTE_UNUSED,
-+ int n_addr ATTRIBUTE_UNUSED,
-+ void *buf ATTRIBUTE_UNUSED,
-+ int *len ATTRIBUTE_UNUSED)
-+{
-+ *len = 0;
-+}
-+
-+#else
-+
-+
-+/*
-+ * use the external program /usr/bin/addr2line to convert addresses
-+ * into file names and line numbers
-+ */
-+
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <string.h>
-+#include <signal.h>
-+
-+#define CLOSE_SENDPIPE close(sendpipe[0]); close(sendpipe[1])
-+#define CLOSE_READPIPE close(readpipe[0]); close(readpipe[1])
-+#define DUP2CLOSE(oldfd, newfd) dup2(oldfd, newfd); close(oldfd);
-+#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
-+
-+#define MAX_LINE 1024
-+#define PARENT_READ readpipe[0]
-+#define CHILD_WRITE readpipe[1]
-+#define CHILD_READ sendpipe[0]
-+#define PARENT_WRITE sendpipe[1]
-+
-+#if defined (__sun__)
-+#define ADDR2LINE_PROG "/usr/gnu/bin/addr2line"
-+#else
-+#define ADDR2LINE_PROG "/usr/bin/addr2line"
-+#endif
-+
-+void
-+convert_addresses (const char *file_name,
-+ void *addrs,
-+ int n_addr,
-+ void *buf,
-+ int *len)
-+{
-+ int max_len = *len;
-+ pid_t childpid;
-+
-+ struct sigaction act, oact;
-+
-+ int sendpipe[2] = {-1,-1}, /* parent -> child */
-+ readpipe[2] = {-1,-1}; /* parent <- child */
-+
-+ *len = 0;
-+ act.sa_handler = SIG_IGN;
-+ sigemptyset(&act.sa_mask);
-+ act.sa_flags = 0;
-+ if (sigaction(SIGPIPE,&act,&oact) < 0)
-+ return;
-+
-+ if (pipe(sendpipe) < 0) { RESTSIG; return; }
-+ if (pipe(readpipe) < 0) { CLOSE_SENDPIPE; RESTSIG; return; }
-+ if ((childpid = fork()) < 0) {
-+ CLOSE_READPIPE;
-+ CLOSE_SENDPIPE;
-+ RESTSIG;
-+ return;
-+ }
-+
-+ if (childpid == 0) { /* child process */
-+ close(PARENT_WRITE);
-+ close(PARENT_READ);
-+ if ((CHILD_READ != STDIN_FILENO) && (CHILD_WRITE != STDOUT_FILENO)) {
-+ if ((CHILD_READ == STDOUT_FILENO) && (CHILD_WRITE == STDIN_FILENO)) {
-+ const int temp_fd = dup(CHILD_WRITE);
-+ close (CHILD_WRITE);
-+ DUP2CLOSE (CHILD_READ, STDIN_FILENO);
-+ DUP2CLOSE (temp_fd, STDOUT_FILENO);
-+ }
-+ else if ((CHILD_READ == STDIN_FILENO) && (CHILD_WRITE > 1)) {
-+ DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
-+ }
-+ else if ((CHILD_READ > 1) && (CHILD_WRITE == STDOUT_FILENO)) {
-+ DUP2CLOSE (CHILD_READ, STDIN_FILENO);
-+ }
-+ else if ((CHILD_READ > 1) && (CHILD_WRITE == STDIN_FILENO)) {
-+ DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
-+ DUP2CLOSE (CHILD_READ, STDIN_FILENO);
-+ }
-+ else {
-+ /* CHILD_READ >= 1 and CHILD_WRITE > 1 */
-+ DUP2CLOSE (CHILD_READ, STDIN_FILENO);
-+ DUP2CLOSE (CHILD_WRITE, STDOUT_FILENO);
-+ }
-+ }
-+ /* As pointed out by Florian Weimer to JP, it is a security threat to call
-+ the script with a user defined environment and using the path. That
-+ would be Trojans pleasure. Therefore the absolute path to addr2line
-+ and an empty environment is used. That should be safe.
-+ */
-+ char *const argv[] = { "addr2line",
-+ "-e", file_name,
-+ "--demangle=gnat",
-+ "--functions",
-+ "--basenames",
-+ NULL };
-+ char *const envp[] = { NULL };
-+ if (execve(ADDR2LINE_PROG, argv, envp) < 0) {
-+ close (CHILD_WRITE);
-+ close (CHILD_READ);
-+ RESTSIG;
-+ exit (1);
-+ }
-+ }
-+
-+ /* Below this line is parent process */
-+ int i, n;
-+ char hex[16];
-+ char line[MAX_LINE + 1];
-+ char *p;
-+ char *s = buf;
-+ long *trace_address = addrs;
-+
-+ close(CHILD_WRITE);
-+ close(CHILD_READ);
-+
-+ for(i=0; i < n_addr; i++) {
-+ snprintf(hex,sizeof(hex),"%#lx\n",*trace_address);
-+ write(PARENT_WRITE,hex,strlen(hex));
-+ n = read(PARENT_READ,line,MAX_LINE);
-+ if (n<=0)
-+ break;
-+
-+ line[n]=0;
-+ /* We have approx. 16 additional chars for "%#lx in " clause.
-+ We use this info to prevent a buffer overrun. */
-+ if (n + 16 + (*len) > max_len)
-+ break;
-+
-+ p = strchr(line,'\n');
-+ if (p) {
-+ if (*(p+1)) {
-+ *p = 0;
-+ *len += snprintf(s, (max_len - (*len)), "%#lx in %s at %s",
-+ *trace_address, line, p+1);
-+ }
-+ else {
-+ *len += snprintf(s, (max_len - (*len)), "%#lx at %s",
-+ *trace_address, line);
-+ }
-+ s = buf + (*len);
-+ }
-+ trace_address += 1;
-+ }
-+ close (PARENT_WRITE);
-+ close (PARENT_READ);
-+ RESTSIG;
-+}
-+
-+#endif
---- gcc/ada/tracebak.c.orig
-+++ gcc/ada/tracebak.c
-@@ -288,6 +288,23 @@
- #error Unhandled darwin architecture.
- #endif
-
-+/*---------------------------- x86 *BSD --------------------------------*/
-+
-+#elif defined (__i386__) && \
-+ ( defined (__NetBSD__) \
-+ || defined (__FreeBSD__) \
-+ || defined (__OpenBSD__) \
-+ || defined (__DragonFly__) )
-+
-+#define USE_GCC_UNWINDER
-+/* The generic unwinder is not used for this target because the default
-+ implementation doesn't unwind on the BSD platforms. AMD64 targets use the
-+ gcc unwinder for all platforms, so let's keep i386 consistent with that.
-+*/
-+
-+#define PC_ADJUST -2
-+/* The minimum size of call instructions on this architecture is 2 bytes */
-+
- /*---------------------- PPC AIX/PPC Lynx 178/Older Darwin ------------------*/
- #elif ((defined (_POWER) && defined (_AIX)) || \
- (defined (__powerpc__) && defined (__Lynx__) && !defined(__ELF__)) || \
---- gcc/ada/gcc-interface/Makefile.in.orig
-+++ gcc/ada/gcc-interface/Makefile.in
-@@ -1044,6 +1044,7 @@
- ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-linux.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
- s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-android.adb \
- s-linux.ads<s-linux-android.ads \
-@@ -1056,13 +1057,11 @@
- system.ads<system-linux-armel.ads \
- a-exexpr.adb<a-exexpr-gcc.adb \
- s-excmac.ads<s-excmac-arm.ads \
-- $(DUMMY_SOCKETS_TARGET_PAIRS)
-
- TOOLS_TARGET_PAIRS = \
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
- indepsw.adb<indepsw-gnu.adb
-
-- GNATRTL_SOCKETS_OBJS =
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
- EXTRA_LIBGNAT_OBJS+=raise-gcc.o sigtramp-armdroid.o
- EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
-@@ -1076,6 +1075,7 @@
- ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
- LIBGNAT_TARGET_PAIRS_COMMON = \
- a-intnam.ads<a-intnam-solaris.ads \
-+ g-trasym.adb<g-trasym-bsd.adb \
- s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-solaris.adb \
- s-mudido.adb<s-mudido-affinity.adb \
-@@ -1118,6 +1118,8 @@
- TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
-
- EH_MECHANISM=-gcc
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
- THREADSLIB = -lposix4 -lthread
- MISCLIB = -lposix4 -lnsl -lsocket
- SO_OPTS = -Wl,-h,
-@@ -1266,6 +1268,39 @@
- LIBRARY_VERSION := $(LIB_VERSION)
- endif
-
-+# x86 android
-+ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-intnam.ads<a-intnam-linux.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-linux.ads<s-linux-android.ads \
-+ s-osinte.adb<s-osinte-android.adb \
-+ s-osinte.ads<s-osinte-android.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_TARGET_PAIRS) \
-+ system.ads<system-linux-x86.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb
-+
-+ EXTRA_LIBGNAT_OBJS=
-+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=
-+ EH_MECHANISM=-gcc
-+ THREADSLIB=
-+ MISCLIB=
-+ GMEM_LIB=
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+endif
-+
- # x86 kfreebsd
- ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
-@@ -1330,8 +1365,11 @@
- ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-freebsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
- s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
- s-osinte.adb<s-osinte-freebsd.adb \
- s-osinte.ads<s-osinte-freebsd.ads \
- s-osprim.adb<s-osprim-posix.adb \
-@@ -1346,6 +1384,8 @@
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
- GNATLIB_SHARED = gnatlib-shared-dual
-
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
- EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-
- EH_MECHANISM=-gcc
-@@ -1359,8 +1399,11 @@
- ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<a-intnam-freebsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
- s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
- s-osinte.adb<s-osinte-freebsd.adb \
- s-osinte.ads<s-osinte-freebsd.ads \
- s-osprim.adb<s-osprim-posix.adb \
-@@ -1375,6 +1418,181 @@
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
- GNATLIB_SHARED = gnatlib-shared-dual
-
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-+
-+ EH_MECHANISM=-gcc
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
-+# x86_64 DragonFly
-+ifeq ($(strip $(filter-out x86_64 dragonfly%,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-intnam.ads<a-intnam-dragonfly.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
-+ s-osinte.adb<s-osinte-dragonfly.adb \
-+ s-osinte.ads<s-osinte-dragonfly.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_64_TARGET_PAIRS) \
-+ system.ads<system-dragonfly-x86_64.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-+
-+ EH_MECHANISM=-gcc
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
-+# x86 OpenBSD
-+ifeq ($(strip $(filter-out %86 openbsd%,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-intnam.ads<a-intnam-openbsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
-+ s-osinte.adb<s-osinte-openbsd.adb \
-+ s-osinte.ads<s-osinte-openbsd.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_TARGET_PAIRS) \
-+ system.ads<system-openbsd-x86.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-+
-+ EH_MECHANISM=
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
-+# x86_64 OpenBSD
-+ifeq ($(strip $(filter-out x86_64 openbsd%,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-exetim.adb<a-exetim-posix.adb \
-+ a-exetim.ads<a-exetim-default.ads \
-+ a-intnam.ads<a-intnam-openbsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
-+ s-osinte.adb<s-osinte-openbsd.adb \
-+ s-osinte.ads<s-osinte-openbsd.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_64_TARGET_PAIRS) \
-+ system.ads<system-openbsd-x86_64.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-+ EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
-+
-+ EH_MECHANISM=
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
-+# x86 NetBSD
-+ifeq ($(strip $(filter-out %86 netbsd%,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-intnam.ads<a-intnam-netbsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
-+ s-osinte.adb<s-osinte-netbsd.adb \
-+ s-osinte.ads<s-osinte-netbsd.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_TARGET_PAIRS) \
-+ system.ads<system-netbsd-x86.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
-+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-+
-+ EH_MECHANISM=-gcc
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
-+# x86_64 NetBSD
-+ifeq ($(strip $(filter-out x86_64 netbsd%,$(target_cpu) $(target_os))),)
-+ LIBGNAT_TARGET_PAIRS = \
-+ a-intnam.ads<a-intnam-netbsd.ads \
-+ g-socthi.adb<g-socthi-bsd.adb \
-+ g-trasym.adb<g-trasym-bsd.adb \
-+ s-inmaop.adb<s-inmaop-posix.adb \
-+ s-intman.adb<s-intman-posix.adb \
-+ s-mudido.adb<s-mudido-affinity.adb \
-+ s-osinte.adb<s-osinte-netbsd.adb \
-+ s-osinte.ads<s-osinte-netbsd.ads \
-+ s-osprim.adb<s-osprim-posix.adb \
-+ s-taprop.adb<s-taprop-posix.adb \
-+ s-taspri.ads<s-taspri-posix.ads \
-+ s-tpopsp.adb<s-tpopsp-posix.adb \
-+ $(ATOMICS_TARGET_PAIRS) \
-+ $(X86_64_TARGET_PAIRS) \
-+ system.ads<system-netbsd-x86_64.ads
-+
-+ TOOLS_TARGET_PAIRS = \
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
-+ GNATLIB_SHARED = gnatlib-shared-dual
-+
-+ EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c
-+ EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o
- EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
-
- EH_MECHANISM=-gcc
---- gcc/ada/gcc-interface/Make-lang.in.orig
-+++ gcc/ada/gcc-interface/Make-lang.in
-@@ -584,7 +584,7 @@
- ada/widechar.o
-
- # Language-independent object files.
--ADA_BACKEND = $(BACKEND) attribs.o
-+ADA_BACKEND = $(BACKEND2) attribs.o
-
- # List of target dependent sources, overridden below as necessary
- TARGET_ADA_SRCS =
---- gnattools/configure.ac.orig
-+++ gnattools/configure.ac
-@@ -79,11 +79,27 @@
- mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
- indepsw.adb<indepsw-darwin.adb"
- ;;
-+ *-*-dragonfly*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
- *-*-freebsd*)
- TOOLS_TARGET_PAIRS="\
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
- indepsw.adb<indepsw-gnu.adb"
- ;;
-+ *-*-netbsd*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
-+ *-*-openbsd*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
-+ # Next line covers arm*-*-linux-androideabi
- *-*-linux*)
- TOOLS_TARGET_PAIRS="\
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
---- gnattools/configure.orig
-+++ gnattools/configure
-@@ -2039,11 +2039,27 @@
- mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
- indepsw.adb<indepsw-darwin.adb"
- ;;
-+ *-*-dragonfly*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
- *-*-freebsd*)
- TOOLS_TARGET_PAIRS="\
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
- indepsw.adb<indepsw-gnu.adb"
- ;;
-+ *-*-netbsd*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
-+ *-*-openbsd*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
-+ # Next line covers arm*-*-linux-androideabi
- *-*-linux*)
- TOOLS_TARGET_PAIRS="\
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
diff --git a/lang/gcc-aux/files/diff-ada-testsuite b/lang/gcc-aux/files/diff-ada-testsuite
deleted file mode 100644
index 722ddc4..0000000
--- a/lang/gcc-aux/files/diff-ada-testsuite
+++ /dev/null
@@ -1,584 +0,0 @@
---- gcc/testsuite/ada/acats/run_acats.orig
-+++ gcc/testsuite/ada/acats/run_acats
-@@ -5,20 +5,6 @@
- exit 1
- fi
-
--# Provide which replacement.
--#
--# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
--# ksh93 and bash have it.
--# type output format differs between ksh88 and ksh93, so avoid it if
--# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
--# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
--
--which () {
-- path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
-- path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
-- path=`whence $* 2>/dev/null` && { echo $path; return 0; }
-- return 1
--}
-
- # Set up environment to use the Ada compiler from the object tree
-
---- gcc/testsuite/ada/acats/run_all.sh.orig
-+++ gcc/testsuite/ada/acats/run_all.sh
-@@ -35,6 +35,14 @@
- echo "$@" >> $dir/acats.log
- }
-
-+inform () {
-+ printf "%04d %7s" $1 $2
-+}
-+
-+disinform () {
-+ printf "\r"
-+}
-+
- dir=`${PWDCMD-pwd}`
-
- if [ "$testdir" = "" ]; then
-@@ -197,6 +205,18 @@
- glob_countn=0
- glob_countok=0
- glob_countu=0
-+countdown=0
-+
-+for chapter in $chapters; do
-+ if [ -d $dir/tests/$chapter ]; then
-+ cd $dir/tests/$chapter
-+ ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
-+ cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
-+ > $dir/tests/$chapter/${chapter}.lst
-+ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
-+ countdown=`expr $countdown + $countn`
-+ fi
-+done
-
- for chapter in $chapters; do
- display Running chapter $chapter ...
-@@ -207,10 +227,6 @@
- continue
- fi
-
-- cd $dir/tests/$chapter
-- ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
-- cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
-- > $dir/tests/$chapter/${chapter}.lst
- countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
- glob_countn=`expr $glob_countn + $countn`
- counti=0
-@@ -233,10 +249,13 @@
- if [ $? -eq 0 ]; then
- extraflags="$extraflags -fstack-check"
- fi
-+ inform $countdown $i
-+ countdown=`expr $countdown - 1`
- test=$dir/tests/$chapter/$i
- mkdir $test && cd $test >> $dir/acats.log 2>&1
-
- if [ $? -ne 0 ]; then
-+ disinform
- display "FAIL: $i"
- failed="${failed}${i} "
- clean_dir
-@@ -257,8 +276,10 @@
- cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
- ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
- ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
-+ cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
- esac
- if [ "$main" = "" ]; then
-+ disinform
- display "FAIL: $i"
- failed="${failed}${i} "
- clean_dir
-@@ -267,6 +288,7 @@
-
- target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
- if [ $? -ne 0 ]; then
-+ disinform
- display "FAIL: $i"
- failed="${failed}${i} "
- clean_dir
-@@ -281,6 +303,7 @@
- target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
- cd $dir/tests/$chapter/$i
- cat ${i}.log >> $dir/acats.log
-+ disinform
- egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
---- /dev/null
-+++ gcc/testsuite/ada/acats/run_remote.sh
-@@ -0,0 +1,412 @@
-+#!/bin/sh
-+# Run ACATS with the GNU Ada compiler
-+
-+# The following functions are to be customized if you run in cross
-+# environment or want to change compilation flags. Note that for
-+# tests requiring checks not turned on by default, this script
-+# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
-+
-+# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
-+# gnatflags="-gnatN"
-+
-+gccflags="-O2"
-+gnatflags="-gnatws"
-+tabtarget="/data/local/testsuite"
-+STRIP="@REMOTE_TARGET@-strip"
-+
-+target_run () {
-+ # Run on rooted tablet (port 22 vs port 2222)
-+ BN=`basename $*`
-+ $STRIP_FOR_TARGET $*
-+ /usr/bin/scp -qp $* root@tablet:$tabtarget/
-+ /usr/bin/ssh -q tablet $tabtarget/$BN
-+}
-+
-+target_cmd () {
-+ /usr/bin/ssh -q tablet "$1"
-+}
-+
-+# End of customization section.
-+
-+display_noeol () {
-+ printf "$@"
-+ printf "$@" >> $dir/acats.sum
-+ printf "$@" >> $dir/acats.log
-+}
-+
-+display () {
-+ echo "$@"
-+ echo "$@" >> $dir/acats.sum
-+ echo "$@" >> $dir/acats.log
-+}
-+
-+log () {
-+ echo "$@" >> $dir/acats.sum
-+ echo "$@" >> $dir/acats.log
-+}
-+
-+inform () {
-+ printf "%04d %7s" $1 $2
-+}
-+
-+disinform () {
-+ printf "\r"
-+}
-+
-+dir=`${PWDCMD-pwd}`
-+
-+if [ "$testdir" = "" ]; then
-+ echo You must use make check or make check-ada
-+ exit 1
-+fi
-+
-+if [ "$dir" = "$testdir" ]; then
-+ echo "error: srcdir must be different than objdir, exiting."
-+ exit 1
-+fi
-+
-+target_gnatmake () {
-+ echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
-+ gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
-+}
-+
-+target_gcc () {
-+ $GCC $gccflags $*
-+}
-+
-+clean_dir () {
-+ rm -f "$binmain" *.o *.ali > /dev/null 2>&1
-+}
-+
-+find_main () {
-+ ls ${i}?.adb > ${i}.lst 2> /dev/null
-+ ls ${i}*m.adb >> ${i}.lst 2> /dev/null
-+ ls ${i}.adb >> ${i}.lst 2> /dev/null
-+ main=`tail -1 ${i}.lst`
-+}
-+
-+split_testid () {
-+ local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'`
-+ eval ${mysplit}
-+}
-+
-+EXTERNAL_OBJECTS=""
-+# Global variable to communicate external objects to link with.
-+
-+rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst
-+
-+display "Test Run By $USER on `date`"
-+
-+display " === acats configuration ==="
-+
-+target=`$GCC -dumpmachine`
-+
-+display target gcc is $GCC
-+display `$GCC -v 2>&1`
-+display host=`gcc -dumpmachine`
-+display target=$target
-+display `type gnatmake-cross`
-+gnatls-cross -v >> $dir/acats.log
-+display ""
-+
-+# Let's be tidy and clear off the remote device first
-+target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *"
-+
-+display " === acats support ==="
-+display_noeol "Generating support files..."
-+
-+rm -rf $dir/support
-+mkdir -p $dir/support
-+cd $dir/support
-+
-+cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
-+
-+# Find out the size in bit of an address on the target
-+target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
-+target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
-+target_bit=`cat $dir/support/impbit.out`
-+echo target_bit="$target_bit" >> $dir/acats.log
-+
-+# Find out a suitable asm statement
-+# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
-+case "$target" in
-+ ia64*-*-* | s390*-*-*)
-+ target_insn="nop 0"
-+ ;;
-+ mmix-*-*)
-+ target_insn="swym 0"
-+ ;;
-+ *)
-+ target_insn="nop"
-+ ;;
-+esac
-+echo target_insn="$target_insn" >> $dir/acats.log
-+
-+sed -e "s,ACATS4GNATDIR,$dir,g" \
-+ < $testdir/support/impdef.a > $dir/support/impdef.a
-+sed -e "s,ACATS4GNATDIR,$dir,g" \
-+ -e "s,ACATS4GNATBIT,$target_bit,g" \
-+ -e "s,ACATS4GNATINSN,$target_insn,g" \
-+ < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
-+sed -e "s,ACATS4GNATDIR,$dir,g" \
-+ < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
-+
-+cp $testdir/tests/cd/*.c $dir/support
-+cp $testdir/tests/cxb/*.c $dir/support
-+grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst
-+
-+rm -rf $dir/run
-+mv $dir/tests $dir/tests.$$ 2> /dev/null
-+rm -rf $dir/tests.$$ &
-+mkdir -p $dir/run
-+
-+cp -pr $testdir/tests $dir/
-+
-+for i in $dir/support/*.ada $dir/support/*.a; do
-+ host_gnatchop $i >> $dir/acats.log 2>&1
-+done
-+
-+# These tools are used to preprocess some ACATS sources
-+# they need to be compiled native on the host.
-+
-+host_gnatmake -q -gnatws macrosub.adb
-+if [ $? -ne 0 ]; then
-+ display "**** Failed to compile macrosub"
-+ exit 1
-+fi
-+./macrosub > macrosub.out 2>&1
-+
-+gcc -c cd300051.c
-+host_gnatmake -q -gnatws widechr.adb
-+if [ $? -ne 0 ]; then
-+ display "**** Failed to compile widechr"
-+ exit 1
-+fi
-+./widechr > widechr.out 2>&1
-+
-+rm -f $dir/support/macrosub
-+rm -f $dir/support/widechr
-+rm -f $dir/support/*.ali
-+rm -f $dir/support/*.o
-+
-+display " done."
-+
-+# From here, all compilations will be made by the target compiler
-+
-+display_noeol "Compiling support files..."
-+
-+target_gcc -c *.c
-+if [ $? -ne 0 ]; then
-+ display "**** Failed to compile C code"
-+ exit 1
-+fi
-+
-+host_gnatchop *.adt >> $dir/acats.log 2>&1
-+
-+target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
-+target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
-+
-+display " done."
-+display ""
-+display " === acats tests ==="
-+
-+if [ $# -eq 0 ]; then
-+ chapters=`cd $dir/tests; echo [a-z]*`
-+else
-+ chapters=$*
-+fi
-+
-+glob_countn=0
-+glob_countok=0
-+glob_countu=0
-+countdown=0
-+
-+for chapter in $chapters; do
-+ if [ -d $dir/tests/$chapter ]; then
-+ cd $dir/tests/$chapter
-+ ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
-+ cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
-+ > $dir/tests/$chapter/${chapter}.lst
-+ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
-+ countdown=`expr $countdown + $countn`
-+ fi
-+done
-+
-+cat > $dir/execute.sh << EOF
-+inform () {
-+ printf "left: %04d" \$1
-+}
-+disinform () {
-+ printf "\r"
-+}
-+cycle () {
-+ local countx=0
-+ local total=\$(echo \$testlist | awk '{print NF}')
-+ mkdir -p logs
-+ echo "Executing \$total tests on remote device"
-+ inform \$total
-+ for x in \$testlist; do
-+ timeout -t 30 ./\${x} > logs/\${x}.log 2>&1
-+ countx=\$(expr \$countx + 1)
-+ if [ \$countx -eq 25 ]; then
-+ total=\$(expr \$total - 25)
-+ countx=0
-+ disinform
-+ inform \$total
-+ fi
-+ done
-+ disinform
-+ tar -czf remote.logs.tar.gz logs
-+}
-+testlist=" \\
-+EOF
-+
-+display "All tests are being cross-compiled without execution first."
-+
-+for chapter in $chapters; do
-+ if [ ! -d $dir/tests/$chapter ]; then
-+ continue
-+ fi
-+
-+ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
-+ glob_countn=`expr $glob_countn + $countn`
-+ counti=0
-+ for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
-+ counti=`expr $counti + 1`
-+ extraflags="-gnat95"
-+ grep $i $testdir/overflow.lst > /dev/null 2>&1
-+ if [ $? -eq 0 ]; then
-+ extraflags="$extraflags -gnato"
-+ fi
-+ grep $i $testdir/elabd.lst > /dev/null 2>&1
-+ if [ $? -eq 0 ]; then
-+ extraflags="$extraflags -gnatE"
-+ fi
-+ grep $i $testdir/floatstore.lst > /dev/null 2>&1
-+ if [ $? -eq 0 ]; then
-+ extraflags="$extraflags -ffloat-store"
-+ fi
-+ grep $i $testdir/stackcheck.lst > /dev/null 2>&1
-+ if [ $? -eq 0 ]; then
-+ extraflags="$extraflags -fstack-check"
-+ fi
-+ inform $countdown $i
-+ countdown=`expr $countdown - 1`
-+ test=$dir/tests/$chapter/$i
-+ mkdir $test && cd $test >> $dir/acats.log 2>&1
-+
-+ if [ $? -ne 0 ]; then
-+ disinform
-+ display "FAIL: $i"
-+ failed="${failed}${i} "
-+ clean_dir
-+ continue
-+ fi
-+
-+ host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
-+ find_main
-+ if [ -z "$main" ]; then
-+ sync
-+ find_main
-+ fi
-+ binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
-+ echo "BUILD $main" >> $dir/acats.log
-+ EXTERNAL_OBJECTS=""
-+ case $i in
-+ cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
-+ ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
-+ ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
-+ cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
-+ esac
-+ if [ "$main" = "" ]; then
-+ disinform
-+ display "FAIL: $i"
-+ failed="${failed}${i} "
-+ clean_dir
-+ continue
-+ fi
-+
-+ target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
-+ if [ $? -ne 0 ]; then
-+ disinform
-+ display "FAIL: $i"
-+ failed="${failed}${i} "
-+ clean_dir
-+ continue
-+ fi
-+ echo $chapter/$i/$binmain >> $dir/transfer.lst
-+ echo "$binmain \\" >> $dir/execute.sh
-+ $STRIP $binmain
-+ disinform
-+ done
-+done
-+echo '"' >> $dir/execute.sh
-+echo "cycle" >> $dir/execute.sh
-+
-+sync
-+display "Transfer files to remote device: root@tablet:$tabtarget/"
-+cd $dir/tests
-+cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \
-+ target_cmd "tar -C $tabtarget -xzf -"
-+cd $dir
-+tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -"
-+target_cmd "cd $tabtarget; sh execute.sh"
-+rm -rf $dir/logs $dir/remote.logs.tar.gz
-+/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/
-+tar -xzf $dir/remote.logs.tar.gz
-+
-+countdown=`wc -l < $dir/transfer.lst`
-+glob_countn=${countdown}
-+for i in `cat $dir/transfer.lst`; do
-+ split_testid $i
-+ if [ "$section" != "$savedsect" ]; then
-+ display Running chapter $section ...
-+ fi
-+ savedsect=$section
-+
-+ #inform $countdown $TN
-+ countdown=`expr $countdown - 1`
-+ proglog="$dir/logs/${prog}.log"
-+ echo "RUN $prog" >> $dir/acats.log
-+ if [ ! -f $proglog ]; then
-+ echo "LOG NOT FOUND!" >> $proglog
-+ fi
-+
-+ cat $proglog >> $dir/acats.log
-+
-+ egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1
-+ if [ $? -ne 0 ]; then
-+ grep 'tasking not implemented' $proglog > /dev/null 2>&1
-+
-+ if [ $? -ne 0 ]; then
-+ display "FAIL: ${TN}"
-+ failed="${failed}${TN} "
-+ else
-+ log "UNSUPPORTED: ${TN}"
-+ glob_countn=`expr $glob_countn - 1`
-+ glob_countu=`expr $glob_countu + 1`
-+ fi
-+ else
-+ log "PASS: ${TN}"
-+ glob_countok=`expr $glob_countok + 1`
-+ fi
-+ cd $dir/tests/$section/$TN
-+ clean_dir
-+ #disinform
-+done
-+
-+display " === acats Summary ==="
-+display "# of expected passes $glob_countok"
-+display "# of unexpected failures `expr $glob_countn - $glob_countok`"
-+
-+if [ $glob_countu -ne 0 ]; then
-+ display "# of unsupported tests $glob_countu"
-+fi
-+
-+if [ $glob_countok -ne $glob_countn ]; then
-+ display "*** FAILURES: $failed"
-+fi
-+
-+display "$0 completed at `date`"
-+
-+exit 0
---- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
-+++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
-@@ -1,4 +1,4 @@
---- { dg-do run }
-+-- { dg-do run { xfail *-*-openbsd* } }
- -- { dg-options "-O2" }
-
- -- This is an optimization test and its failure is only a missed optimization.
---- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
-+++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
-@@ -1,22 +0,0 @@
---- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
--
--with Unchecked_Conversion;
--
--procedure Unchecked_Convert5 is
--
-- subtype c_1 is string(1..1);
--
-- function int2c1 is -- { dg-warning "different sizes" }
-- new unchecked_conversion (source => integer, target => c_1);
--
-- c1 : c_1;
--
--begin
--
-- c1 := int2c1(16#12#);
--
-- if c1 (1) /= ASCII.Nul then
-- raise Program_Error;
-- end if;
--
--end;
---- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
-+++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
-@@ -1,22 +0,0 @@
---- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
--
--with Unchecked_Conversion;
--
--procedure Unchecked_Convert6 is
--
-- subtype c_5 is string(1..5);
--
-- function int2c5 is -- { dg-warning "different sizes" }
-- new unchecked_conversion (source => integer, target => c_5);
--
-- c5 : c_5;
--
--begin
--
-- c5 := int2c5(16#12#);
--
-- if c5 (4) /= ASCII.DC2 then
-- raise Program_Error;
-- end if;
--
--end;
diff --git a/lang/gcc-aux/files/diff-core b/lang/gcc-aux/files/diff-core
deleted file mode 100644
index 726abb8..0000000
--- a/lang/gcc-aux/files/diff-core
+++ /dev/null
@@ -1,1291 +0,0 @@
---- gcc/DEV-PHASE.orig
-+++ gcc/DEV-PHASE
-@@ -0,0 +1 @@
-+release
---- /dev/null
-+++ gcc/config/dragonfly-stdint.h
-@@ -0,0 +1,56 @@
-+/* Definitions for <stdint.h> types for DragonFly systems.
-+ Copyright (C) 2009 Free Software Foundation, Inc.
-+ Contributed by Gerald Pfeifer <gerald@pfeifer.com>.
-+
-+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.
-+
-+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/>. */
-+
-+#define SIG_ATOMIC_TYPE "int"
-+
-+#define INT8_TYPE "signed char"
-+#define INT16_TYPE "short int"
-+#define INT32_TYPE "int"
-+#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
-+#define UINT8_TYPE "unsigned char"
-+#define UINT16_TYPE "short unsigned int"
-+#define UINT32_TYPE "unsigned int"
-+#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-+
-+#define INT_LEAST8_TYPE INT8_TYPE
-+#define INT_LEAST16_TYPE INT16_TYPE
-+#define INT_LEAST32_TYPE INT32_TYPE
-+#define INT_LEAST64_TYPE INT64_TYPE
-+#define UINT_LEAST8_TYPE UINT8_TYPE
-+#define UINT_LEAST16_TYPE UINT16_TYPE
-+#define UINT_LEAST32_TYPE UINT32_TYPE
-+#define UINT_LEAST64_TYPE UINT64_TYPE
-+
-+#define INT_FAST8_TYPE INT32_TYPE
-+#define INT_FAST16_TYPE INT32_TYPE
-+#define INT_FAST32_TYPE INT32_TYPE
-+#define INT_FAST64_TYPE INT64_TYPE
-+#define UINT_FAST8_TYPE UINT32_TYPE
-+#define UINT_FAST16_TYPE UINT32_TYPE
-+#define UINT_FAST32_TYPE UINT32_TYPE
-+#define UINT_FAST64_TYPE UINT64_TYPE
-+
-+#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? INT64_TYPE : INT32_TYPE)
-+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
---- /dev/null
-+++ gcc/config/dragonfly.h
-@@ -0,0 +1,136 @@
-+/* Base configuration file for all DragonFly targets.
-+ Copyright (C) 1999, 2000, 2001, 2007, 2008 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/>. */
-+
-+/* Common DragonFly configuration.
-+ All DragonFly architectures should include this file, which will specify
-+ their commonalities.
-+ Adapted from gcc/config/i386/freebsd-elf.h by
-+ David O'Brien <obrien@FreeBSD.org>.
-+ Further work by David O'Brien <obrien@FreeBSD.org> and
-+ Loren J. Rittle <ljrittle@acm.org>. */
-+
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ builtin_define_std ("unix"); \
-+ builtin_define ("__DragonFly__"); \
-+ builtin_assert ("system=unix"); \
-+ builtin_assert ("system=bsd"); \
-+ builtin_assert ("system=DragonFly"); \
-+ } \
-+ while (0)
-+
-+#undef CPP_SPEC
-+#define CPP_SPEC \
-+ "%(cpp_cpu) %(cpp_arch) %{posix:-D_POSIX_SOURCE}"
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ "%{!shared: \
-+ %{pg:gcrt1.o%s} \
-+ %{!pg: \
-+ %{p:gcrt1.o%s} \
-+ %{!p: \
-+ %{profile: gcrt1.o%s} \
-+ %{!profile: \
-+ %{pie: Scrt1.o%s;:crt1.o%s}}}}} \
-+ crti.o%s \
-+ %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
-+
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ "%{pthread:-lpthread} -lc"
-+
-+#if defined(HAVE_LD_EH_FRAME_HDR)
-+#define LINK_EH_SPEC "--eh-frame-hdr"
-+#endif
-+
-+/* Provide a LINK_SPEC appropriate for DragonFly. Here we provide support
-+ for the special GCC options -static and -shared, which allow us to
-+ link things in one of these three modes by applying the appropriate
-+ combinations of options at link-time.
-+
-+ When the -shared link option is used a final link is not being
-+ done. */
-+
-+#define DFBSD_LINK_SPEC \
-+ "%{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
-+ %{v:-V} \
-+ %{assert*} %{R*} %{rpath*} %{defsym*} \
-+ %{shared:-Bshareable %{h*} %{soname*}} \
-+ %{!shared: \
-+ %{!static: \
-+ %{rdynamic:-export-dynamic} \
-+ -dynamic-linker %(dfbsd_dynamic_linker) \
-+ } \
-+ %{static:-Bstatic} \
-+ } \
-+ %{!static:--hash-style=gnu -rpath @PREFIX@/gcc-aux/lib} \
-+ %{symbolic:-Bsymbolic}"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC DFBSD_LINK_SPEC
-+
-+#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
-+
-+
-+/* Use --as-needed -lgcc_s for eh support. */
-+#ifdef HAVE_LD_AS_NEEDED
-+#define USE_LD_AS_NEEDED 1
-+#endif
-+
-+/************************[ Target stuff ]***********************************/
-+
-+/* All DragonFly Architectures support the ELF object file format. */
-+#undef OBJECT_FORMAT_ELF
-+#define OBJECT_FORMAT_ELF
-+
-+/* Don't assume anything about the header files. */
-+#undef NO_IMPLICIT_EXTERN_C
-+#define NO_IMPLICIT_EXTERN_C 1
-+
-+/* Follow DragonFly's standard headers (<machine/stdint.h>, etc...). */
-+
-+#undef WCHAR_TYPE
-+#define WCHAR_TYPE "int"
-+
-+#undef WINT_TYPE
-+#define WINT_TYPE "int"
-+
-+/*
-+ * Profile libraries are found at /usr/lib/profile with standard names
-+ * #define MATH_LIBRARY_PROFILE "m_p"
-+ */
-+
-+/* Code generation parameters. */
-+
-+/* Use periods rather than dollar signs in special g++ assembler names.
-+ This ensures the configuration knows our system correctly so we can link
-+ with libraries compiled with the native cc. */
-+#undef NO_DOLLAR_IN_LABEL
-+
-+/* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
-+ This enables the test coverage code to use file locking when exiting a
-+ program, which avoids race conditions if the program has forked. */
-+#define TARGET_POSIX_IO
---- /dev/null
-+++ gcc/config/dragonfly.opt
-@@ -0,0 +1,65 @@
-+; DragonFlyBSD options.
-+
-+; Copyright (C) 2010, 2011
-+; 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/>.
-+
-+; See the GCC internals manual (options.texi) for a description of this file's format.
-+
-+; Please try to keep this file in ASCII collating order.
-+
-+assert
-+Driver Separate
-+
-+assert=
-+Driver JoinedOrMissing
-+
-+defsym
-+Driver Separate
-+
-+defsym=
-+Driver JoinedOrMissing
-+
-+posix
-+Driver
-+
-+profile
-+Driver
-+
-+pthread
-+Driver
-+
-+rdynamic
-+Driver
-+
-+rpath-link
-+Driver Separate
-+
-+rpath-link=
-+Driver JoinedOrMissing
-+
-+rpath=
-+Driver JoinedOrMissing
-+
-+soname
-+Driver Separate
-+
-+soname=
-+Driver JoinedOrMissing
-+
-+; This comment is to ensure we retain the blank line above.
---- /dev/null
-+++ gcc/config/i386/dragonfly.h
-@@ -0,0 +1,105 @@
-+/* Definitions for Intel 386 running DragonFly with ELF format
-+ Copyright (C) 1996, 2000, 2002, 2004, 2007, 2010, 2011
-+ Free Software Foundation, Inc.
-+ Contributed by Eric Youngdale.
-+ Modified for stabs-in-ELF by H.J. Lu.
-+ Adapted from GNU/Linux version by John Polstra.
-+ Continued development by David O'Brien <obrien@freebsd.org>
-+
-+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/>. */
-+
-+
-+/* Override the default comment-starter of "/". */
-+#undef ASM_COMMENT_START
-+#define ASM_COMMENT_START "#"
-+
-+#undef ASM_APP_ON
-+#define ASM_APP_ON "#APP\n"
-+
-+#undef ASM_APP_OFF
-+#define ASM_APP_OFF "#NO_APP\n"
-+
-+#undef DBX_REGISTER_NUMBER
-+#define DBX_REGISTER_NUMBER(n) \
-+ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
-+
-+#undef NO_PROFILE_COUNTERS
-+#define NO_PROFILE_COUNTERS 1
-+
-+/* Tell final.c that we don't need a label passed to mcount. */
-+
-+#undef MCOUNT_NAME
-+#define MCOUNT_NAME ".mcount"
-+
-+/* Make gcc agree with <machine/ansi.h>. */
-+
-+#undef SIZE_TYPE
-+#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
-+
-+#undef PTRDIFF_TYPE
-+#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
-+
-+#undef WCHAR_TYPE_SIZE
-+#define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD)
-+
-+#undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
-+#define SUBTARGET_EXTRA_SPECS \
-+ { "dfbsd_dynamic_linker", DFBSD_DYNAMIC_LINKER }
-+
-+
-+/* A C statement to output to the stdio stream FILE an assembler
-+ command to advance the location counter to a multiple of 1<<LOG
-+ bytes if it is within MAX_SKIP bytes.
-+
-+ This is used to align code labels according to Intel recommendations. */
-+
-+#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
-+#undef ASM_OUTPUT_MAX_SKIP_ALIGN
-+#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \
-+ if ((LOG) != 0) { \
-+ if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
-+ else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
-+ }
-+#endif
-+
-+/* Don't default to pcc-struct-return, we want to retain compatibility with
-+ older gcc versions AND pcc-struct-return is nonreentrant.
-+ (even though the SVR4 ABI for the i386 says that records and unions are
-+ returned in memory). */
-+
-+#undef DEFAULT_PCC_STRUCT_RETURN
-+#define DEFAULT_PCC_STRUCT_RETURN 0
-+
-+/* DragonFly sets the rounding precision of the FPU to 53 bits. Let the
-+ compiler get the contents of <float.h> and std::numeric_limits correct. */
-+#undef TARGET_96_ROUND_53_LONG_DOUBLE
-+#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
-+
-+/* Put all *tf routines in libgcc. */
-+#undef LIBGCC2_HAS_TF_MODE
-+#define LIBGCC2_HAS_TF_MODE 1
-+#define LIBGCC2_TF_CEXT q
-+#define TF_SIZE 113
-+
-+/* Static stack checking is supported by means of probes. */
-+#define STACK_CHECK_STATIC_BUILTIN 1
-+
-+/* Support for i386 has been removed from DragonFly for several releases */
-+#define SUBTARGET32_DEFAULT_CPU "i486"
-+
-+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-+
---- gcc/config/i386/freebsd.h.orig
-+++ gcc/config/i386/freebsd.h
-@@ -90,6 +90,14 @@
- When the -shared link option is used a final link is not being
- done. */
-
-+#if FBSD_MAJOR < 9
-+#define ELF_HASH_STYLE ""
-+#elif FBSD_MAJOR < 10
-+#define ELF_HASH_STYLE "--hash-style=both "
-+#else
-+#define ELF_HASH_STYLE "--hash-style=gnu "
-+#endif
-+
- #undef LINK_SPEC
- #define LINK_SPEC "\
- %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
-@@ -101,6 +109,7 @@
- %{rdynamic:-export-dynamic} \
- -dynamic-linker %(fbsd_dynamic_linker) } \
- %{static:-Bstatic}} \
-+ %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/gcc-aux/lib} \
- %{symbolic:-Bsymbolic}"
-
- /* A C statement to output to the stdio stream FILE an assembler
-@@ -147,3 +156,5 @@
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
-+/* Compile in __enable_execute_stack (void *) (see config.host) */
-+#define HAVE_ENABLE_EXECUTE_STACK
---- gcc/config/i386/freebsd64.h.orig
-+++ gcc/config/i386/freebsd64.h
-@@ -41,4 +41,5 @@
- %{rdynamic:-export-dynamic} \
- -dynamic-linker %(fbsd_dynamic_linker) } \
- %{static:-Bstatic}} \
-+ %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/gcc-aux/lib} \
- %{symbolic:-Bsymbolic}"
---- gcc/ginclude/stddef.h.orig
-+++ gcc/ginclude/stddef.h
-@@ -50,6 +50,11 @@
- one less case to deal with in the following. */
- #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
- #include <machine/ansi.h>
-+#if !defined(_MACHINE_ANSI_H_)
-+#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
-+#define _MACHINE_ANSI_H_
-+#endif
-+#endif
- #endif
- /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
- #if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
-@@ -133,6 +138,7 @@
- #ifndef _BSD_PTRDIFF_T_
- #ifndef ___int_ptrdiff_t_h
- #ifndef _GCC_PTRDIFF_T
-+#ifndef _PTRDIFF_T_DECLARED /* DragonFly */
- #define _PTRDIFF_T
- #define _T_PTRDIFF_
- #define _T_PTRDIFF
-@@ -141,10 +147,12 @@
- #define _BSD_PTRDIFF_T_
- #define ___int_ptrdiff_t_h
- #define _GCC_PTRDIFF_T
-+#define _PTRDIFF_T_DECLARED
- #ifndef __PTRDIFF_TYPE__
- #define __PTRDIFF_TYPE__ long int
- #endif
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
-+#endif /* _PTRDIFF_T_DECLARED */
- #endif /* _GCC_PTRDIFF_T */
- #endif /* ___int_ptrdiff_t_h */
- #endif /* _BSD_PTRDIFF_T_ */
-@@ -198,6 +206,7 @@
- #define _GCC_SIZE_T
- #define _SIZET_
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
-+ || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
- #elif defined (__VMS__)
---- include/libiberty.h.orig
-+++ include/libiberty.h
-@@ -106,7 +106,16 @@
- to find the declaration so provide a fully prototyped one. If it
- is 1, we found it so don't provide any declaration at all. */
- #if !HAVE_DECL_BASENAME
--#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
-+#if defined (__GNU_LIBRARY__ ) \
-+ || defined (__linux__) \
-+ || defined (__DragonFly__) \
-+ || defined (__FreeBSD__) \
-+ || defined (__OpenBSD__) \
-+ || defined (__NetBSD__) \
-+ || defined (__CYGWIN__) \
-+ || defined (__CYGWIN32__) \
-+ || defined (__MINGW32__) \
-+ || defined (HAVE_DECL_BASENAME)
- extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
- #else
- /* Do not allow basename to be used if there is no prototype seen. We
---- libgcc/crtstuff.c.orig
-+++ libgcc/crtstuff.c
-@@ -79,11 +79,19 @@
- }
- #endif
-
-+#if defined(TARGET_DL_ITERATE_PHDR) && \
-+ ( defined(__FreeBSD__) \
-+ || defined(__OpenBSD__) \
-+ || defined(__NetBSD__) \
-+ || defined(__DragonFly__))
-+#define BSD_DL_ITERATE_PHDR_AVAILABLE
-+#endif
-+
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-- && defined(__FreeBSD__) && __FreeBSD__ >= 7
-+ && defined(BSD_DL_ITERATE_PHDR_AVAILABLE)
- #include <link.h>
- # define USE_PT_GNU_EH_FRAME
- #endif
---- /dev/null
-+++ libgcc/enable-execute-stack-freebsd.c
-@@ -0,0 +1,58 @@
-+/* Implement __enable_execute_stack using mprotect(2).
-+ Copyright (C) 2011, 2012 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.
-+
-+ 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/>. */
-+
-+#include <sys/mman.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+
-+#define STACK_PROT_RWX (PROT_READ | PROT_WRITE | PROT_EXEC)
-+
-+extern void __enable_execute_stack (void *);
-+
-+void
-+__enable_execute_stack (void *addr)
-+{
-+ static int size;
-+ static long mask;
-+ char *page, *ends;
-+ long page_addr, ends_addr;
-+
-+ if (size == 0)
-+ {
-+ size = getpagesize ();
-+ mask = ~((long) size - 1);
-+ }
-+ page_addr = (long) addr;
-+ ends_addr = (long) (addr + __LIBGCC_TRAMPOLINE_SIZE__);
-+
-+ page = (char *) (page_addr & mask);
-+ ends = (char *) ((ends_addr & mask) + size);
-+
-+ /*
-+ * Note that no errors should be emitted by mprotect; it is considered
-+ * dangerous for library calls to send messages to stdout/stderr.
-+ */
-+ if (mprotect (page, ends - page, STACK_PROT_RWX) < 0)
-+ abort ();
-+}
---- libgcc/unwind-dw2-fde-dip.c.orig
-+++ libgcc/unwind-dw2-fde-dip.c
-@@ -58,11 +58,19 @@
- #endif
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__FreeBSD__) && __FreeBSD__ >= 7
-+ && defined(TARGET_DL_ITERATE_PHDR) \
-+ && (defined(__FreeBSD__) || defined(__DragonFly__))
- # define ElfW __ElfN
- # define USE_PT_GNU_EH_FRAME
- #endif
-
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR) \
-+ && (defined(__OpenBSD__) || defined(__NetBSD__))
-+# define ElfW(n) Elf_##n
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(__OpenBSD__)
- # define ElfW(type) Elf_##type
---- /dev/null
-+++ libgcc/config/i386/dragonfly-unwind.h
-@@ -0,0 +1,158 @@
-+/* DWARF2 EH unwinding support for DragonFly BSD: AMD x86-64 and x86.
-+ Copyright (C) 2010 John Marino <draco@marino.st> */
-+
-+/* Do code reading to identify a signal frame, and set the frame
-+ state data appropriately. See unwind-dw2.c for the structs. */
-+
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <signal.h>
-+#include <sys/ucontext.h>
-+#include <machine/sigframe.h>
-+
-+
-+#define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg
-+
-+#ifdef __x86_64__
-+#define MD_FALLBACK_FRAME_STATE_FOR x86_64_dragonfly_fallback_frame_state
-+
-+
-+static void
-+x86_64_sigtramp_range (unsigned char **start, unsigned char **end)
-+{
-+ unsigned long ps_strings;
-+ int mib[2];
-+ size_t len;
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_PS_STRINGS;
-+ len = sizeof (ps_strings);
-+ sysctl (mib, 2, &ps_strings, &len, NULL, 0);
-+
-+ *start = (unsigned char *)ps_strings - 32;
-+ *end = (unsigned char *)ps_strings;
-+}
-+
-+
-+static _Unwind_Reason_Code
-+x86_64_dragonfly_fallback_frame_state
-+(struct _Unwind_Context *context, _Unwind_FrameState *fs)
-+{
-+ unsigned char *pc = context->ra;
-+ unsigned char *sigtramp_start, *sigtramp_end;
-+ struct sigframe *sf;
-+ long new_cfa;
-+
-+ x86_64_sigtramp_range(&sigtramp_start, &sigtramp_end);
-+ if (pc >= sigtramp_end || pc < sigtramp_start)
-+ return _URC_END_OF_STACK;
-+
-+ sf = (struct sigframe *) context->cfa;
-+ new_cfa = sf->REG_NAME(rsp);
-+ fs->regs.cfa_how = CFA_REG_OFFSET;
-+ /* Register 7 is rsp */
-+ fs->regs.cfa_reg = 7;
-+ fs->regs.cfa_offset = new_cfa - (long) context->cfa;
-+
-+ /* The SVR4 register numbering macros aren't usable in libgcc. */
-+ fs->regs.reg[0].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(rax) - new_cfa;
-+ fs->regs.reg[1].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(rdx) - new_cfa;
-+ fs->regs.reg[2].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(rcx) - new_cfa;
-+ fs->regs.reg[3].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(rbx) - new_cfa;
-+ fs->regs.reg[4].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[4].loc.offset = (long)&sf->REG_NAME(rsi) - new_cfa;
-+ fs->regs.reg[5].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(rdi) - new_cfa;
-+ fs->regs.reg[6].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(rbp) - new_cfa;
-+ fs->regs.reg[8].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(r8) - new_cfa;
-+ fs->regs.reg[9].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[9].loc.offset = (long)&sf->REG_NAME(r9) - new_cfa;
-+ fs->regs.reg[10].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[10].loc.offset = (long)&sf->REG_NAME(r10) - new_cfa;
-+ fs->regs.reg[11].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[11].loc.offset = (long)&sf->REG_NAME(r11) - new_cfa;
-+ fs->regs.reg[12].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[12].loc.offset = (long)&sf->REG_NAME(r12) - new_cfa;
-+ fs->regs.reg[13].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[13].loc.offset = (long)&sf->REG_NAME(r13) - new_cfa;
-+ fs->regs.reg[14].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[14].loc.offset = (long)&sf->REG_NAME(r14) - new_cfa;
-+ fs->regs.reg[15].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[15].loc.offset = (long)&sf->REG_NAME(r15) - new_cfa;
-+ fs->regs.reg[16].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[16].loc.offset = (long)&sf->REG_NAME(rip) - new_cfa;
-+ fs->retaddr_column = 16;
-+ fs->signal_frame = 1;
-+ return _URC_NO_REASON;
-+}
-+
-+#else /* Next section is for i386 */
-+
-+#define MD_FALLBACK_FRAME_STATE_FOR x86_dragonfly_fallback_frame_state
-+
-+
-+static void
-+x86_sigtramp_range (unsigned char **start, unsigned char **end)
-+{
-+ unsigned long ps_strings;
-+ int mib[2];
-+ size_t len;
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_PS_STRINGS;
-+ len = sizeof (ps_strings);
-+ sysctl (mib, 2, &ps_strings, &len, NULL, 0);
-+
-+ *start = (unsigned char *)ps_strings - 128;
-+ *end = (unsigned char *)ps_strings;
-+}
-+
-+
-+static _Unwind_Reason_Code
-+x86_dragonfly_fallback_frame_state
-+(struct _Unwind_Context *context, _Unwind_FrameState *fs)
-+{
-+ unsigned char *pc = context->ra;
-+ unsigned char *sigtramp_start, *sigtramp_end;
-+ struct sigframe *sf;
-+ long new_cfa;
-+
-+ x86_sigtramp_range(&sigtramp_start, &sigtramp_end);
-+
-+ if (pc >= sigtramp_end || pc < sigtramp_start)
-+ return _URC_END_OF_STACK;
-+
-+ sf = (struct sigframe *) context->cfa;
-+ new_cfa = sf->REG_NAME(esp);
-+ fs->regs.cfa_how = CFA_REG_OFFSET;
-+ fs->regs.cfa_reg = 4;
-+ fs->regs.cfa_offset = new_cfa - (long) context->cfa;
-+
-+ /* The SVR4 register numbering macros aren't usable in libgcc. */
-+ fs->regs.reg[0].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(eax) - new_cfa;
-+ fs->regs.reg[3].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(ebx) - new_cfa;
-+ fs->regs.reg[1].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(ecx) - new_cfa;
-+ fs->regs.reg[2].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(edx) - new_cfa;
-+ fs->regs.reg[6].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(esi) - new_cfa;
-+ fs->regs.reg[7].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[7].loc.offset = (long)&sf->REG_NAME(edi) - new_cfa;
-+ fs->regs.reg[5].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(ebp) - new_cfa;
-+ fs->regs.reg[8].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(eip) - new_cfa;
-+ fs->retaddr_column = 8;
-+ fs->signal_frame = 1;
-+ return _URC_NO_REASON;
-+}
-+#endif /* ifdef __x86_64__ */
---- /dev/null
-+++ libgcc/config/i386/freebsd-unwind.h
-@@ -0,0 +1,198 @@
-+/* DWARF2 EH unwinding support for FreeBSD: AMD x86-64 and x86.
-+ * Copyright (C) 2010, 2012, 2014 John Marino <draco@marino.st>
-+ *
-+ * Do code reading to identify a signal frame, and set the frame
-+ * state data appropriately. See unwind-dw2.c for the structs.
-+ */
-+
-+#include <sys/types.h>
-+#include <signal.h>
-+#include <sys/ucontext.h>
-+#include <machine/sigframe.h>
-+
-+#define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg
-+
-+#ifdef __x86_64__
-+#define MD_FALLBACK_FRAME_STATE_FOR x86_64_freebsd_fallback_frame_state
-+
-+#if (__FreeBSD__ < 9)
-+#include <sys/sysctl.h>
-+static void
-+x86_64_sigtramp_range (unsigned char **start, unsigned char **end)
-+{
-+ unsigned long ps_strings;
-+ int mib[2];
-+ size_t len;
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_PS_STRINGS;
-+ len = sizeof (ps_strings);
-+ sysctl (mib, 2, &ps_strings, &len, NULL, 0);
-+
-+ *start = (unsigned char *)ps_strings - 32;
-+ *end = (unsigned char *)ps_strings;
-+}
-+#endif
-+
-+
-+static _Unwind_Reason_Code
-+x86_64_freebsd_fallback_frame_state
-+(struct _Unwind_Context *context, _Unwind_FrameState *fs)
-+{
-+ struct sigframe *sf;
-+ long new_cfa;
-+
-+#if (__FreeBSD__ < 9)
-+ unsigned char *pc = context->ra;
-+ unsigned char *sigtramp_start, *sigtramp_end;
-+
-+ x86_64_sigtramp_range(&sigtramp_start, &sigtramp_end);
-+ if (pc >= sigtramp_end || pc < sigtramp_start)
-+ return _URC_END_OF_STACK;
-+#else
-+ /* Prior to FreeBSD 9, the signal trampoline was located immediately
-+ before the ps_strings. To support non-executable stacks on AMD64,
-+ the sigtramp was moved to a shared page for FreeBSD 9. We are
-+ stuck looking for frame patterns again (sys/amd64/amd64/sigtramp.S):
-+
-+ <pc + 00>: lea 0x10(%rsp),%rdi
-+ <pc + 05>: pushq $0x0
-+ <pc + 17>: mov $0x1a1,%rax
-+ <pc + 14>: syscall
-+
-+ If we can't find this pattern, we're at the end of the stack.
-+ */
-+
-+ if (!( *(unsigned int *)(context->ra) == 0x247c8d48
-+ && *(unsigned int *)(context->ra + 4) == 0x48006a10
-+ && *(unsigned int *)(context->ra + 8) == 0x01a1c0c7
-+ && *(unsigned int *)(context->ra + 12) == 0x050f0000 ))
-+ return _URC_END_OF_STACK;
-+#endif
-+
-+ sf = (struct sigframe *) context->cfa;
-+ new_cfa = sf->REG_NAME(rsp);
-+ fs->regs.cfa_how = CFA_REG_OFFSET;
-+ /* Register 7 is rsp */
-+ fs->regs.cfa_reg = 7;
-+ fs->regs.cfa_offset = new_cfa - (long) context->cfa;
-+
-+ /* The SVR4 register numbering macros aren't usable in libgcc. */
-+ fs->regs.reg[0].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(rax) - new_cfa;
-+ fs->regs.reg[1].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(rdx) - new_cfa;
-+ fs->regs.reg[2].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(rcx) - new_cfa;
-+ fs->regs.reg[3].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(rbx) - new_cfa;
-+ fs->regs.reg[4].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[4].loc.offset = (long)&sf->REG_NAME(rsi) - new_cfa;
-+ fs->regs.reg[5].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(rdi) - new_cfa;
-+ fs->regs.reg[6].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(rbp) - new_cfa;
-+ fs->regs.reg[8].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(r8) - new_cfa;
-+ fs->regs.reg[9].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[9].loc.offset = (long)&sf->REG_NAME(r9) - new_cfa;
-+ fs->regs.reg[10].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[10].loc.offset = (long)&sf->REG_NAME(r10) - new_cfa;
-+ fs->regs.reg[11].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[11].loc.offset = (long)&sf->REG_NAME(r11) - new_cfa;
-+ fs->regs.reg[12].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[12].loc.offset = (long)&sf->REG_NAME(r12) - new_cfa;
-+ fs->regs.reg[13].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[13].loc.offset = (long)&sf->REG_NAME(r13) - new_cfa;
-+ fs->regs.reg[14].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[14].loc.offset = (long)&sf->REG_NAME(r14) - new_cfa;
-+ fs->regs.reg[15].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[15].loc.offset = (long)&sf->REG_NAME(r15) - new_cfa;
-+ fs->regs.reg[16].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[16].loc.offset = (long)&sf->REG_NAME(rip) - new_cfa;
-+ fs->retaddr_column = 16;
-+ fs->signal_frame = 1;
-+ return _URC_NO_REASON;
-+}
-+
-+#else /* Next section is for i386 */
-+
-+#define MD_FALLBACK_FRAME_STATE_FOR x86_freebsd_fallback_frame_state
-+
-+/*
-+ * We can't use KERN_PS_STRINGS anymore if we want to support FreeBSD32
-+ * compat on AMD64. The sigtramp is in a shared page in that case so the
-+ * x86_sigtramp_range only works on a true i386 system. We have to
-+ * search for the sigtramp frame if we want it working everywhere.
-+
-+#include <sys/sysctl.h>
-+static void
-+x86_sigtramp_range (unsigned char **start, unsigned char **end)
-+{
-+ unsigned long ps_strings;
-+ int mib[2];
-+ size_t len;
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_PS_STRINGS;
-+ len = sizeof (ps_strings);
-+ sysctl (mib, 2, &ps_strings, &len, NULL, 0);
-+
-+ *start = (unsigned char *)ps_strings - 128;
-+ *end = (unsigned char *)ps_strings;
-+}
-+*/
-+
-+
-+static _Unwind_Reason_Code
-+x86_freebsd_fallback_frame_state
-+(struct _Unwind_Context *context, _Unwind_FrameState *fs)
-+{
-+ struct sigframe *sf;
-+ long new_cfa;
-+
-+/*
-+ * i386 sigtramp frame we are looking for follows.
-+ * Apparently PSL_VM is variable, so we can't look past context->ra + 4
-+ * <sigcode>:
-+ * 0: ff 54 24 10 call *0x10(%esp) *SIGF_HANDLER
-+ * 4: 8d 44 24 20 lea 0x20(%esp),%eax SIGF_UC
-+ * 8: 50 push %eax
-+ * 9: f7 40 54 00 00 02 00 testl $0x20000,0x54(%eax) $PSL_VM
-+ * 10: 75 03 jne 15 <sigcode+0x15>
-+ * 12: 8e 68 14 mov 0x14(%eax),%gs UC_GS
-+ * 15: b8 a1 01 00 00 mov 0x1a1,%eax $SYS_sigreturn
-+ */
-+
-+ if (!( *(unsigned int *)(context->ra - 4) == 0x102454ff
-+ && *(unsigned int *)(context->ra) == 0x2024448d ))
-+ return _URC_END_OF_STACK;
-+
-+ sf = (struct sigframe *) context->cfa;
-+ new_cfa = sf->REG_NAME(esp);
-+ fs->regs.cfa_how = CFA_REG_OFFSET;
-+ fs->regs.cfa_reg = 4;
-+ fs->regs.cfa_offset = new_cfa - (long) context->cfa;
-+
-+ /* The SVR4 register numbering macros aren't usable in libgcc. */
-+ fs->regs.reg[0].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(eax) - new_cfa;
-+ fs->regs.reg[3].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(ebx) - new_cfa;
-+ fs->regs.reg[1].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(ecx) - new_cfa;
-+ fs->regs.reg[2].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(edx) - new_cfa;
-+ fs->regs.reg[6].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(esi) - new_cfa;
-+ fs->regs.reg[7].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[7].loc.offset = (long)&sf->REG_NAME(edi) - new_cfa;
-+ fs->regs.reg[5].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(ebp) - new_cfa;
-+ fs->regs.reg[8].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(eip) - new_cfa;
-+ fs->retaddr_column = 8;
-+ fs->signal_frame = 1;
-+ return _URC_NO_REASON;
-+}
-+#endif /* ifdef __x86_64__ */
---- libiberty/getpagesize.c.orig
-+++ libiberty/getpagesize.c
-@@ -20,6 +20,7 @@
-
- */
-
-+#ifndef __ANDROID__
- #ifndef VMS
-
- #include "config.h"
-@@ -88,3 +89,4 @@
- }
-
- #endif /* VMS */
-+#endif /* __ANDROID__ */
---- libiberty/setproctitle.c.orig
-+++ libiberty/setproctitle.c
-@@ -40,9 +40,11 @@
- void
- setproctitle (const char *name ATTRIBUTE_UNUSED, ...)
- {
-+#ifndef __ANDROID__
- #ifdef PR_SET_NAME
- /* On GNU/Linux this sets the top visible "comm", but not
- necessarily the name visible in ps. */
- prctl (PR_SET_NAME, name);
- #endif
-+#endif
- }
---- gcc/config.gcc.orig
-+++ gcc/config.gcc
-@@ -687,6 +687,26 @@
- # need_64bit_hwint=yes # system compiler has this for all arch!
- use_gcc_stdint=wrap
- ;;
-+*-*-dragonfly*)
-+ gas=yes
-+ gnu_ld=yes
-+ tmake_file="t-slibgcc"
-+ case ${enable_threads} in
-+ "" | yes | posix)
-+ thread_file='posix'
-+ ;;
-+ no | gnat | single)
-+ # Let these non-posix thread selections fall through if requested
-+ ;;
-+ *)
-+ echo 'Unknown thread configuration for DragonFly BSD'
-+ exit 1
-+ ;;
-+ esac
-+ extra_options="$extra_options rpath.opt dragonfly.opt"
-+ default_use_cxa_atexit=yes
-+ use_gcc_stdint=wrap
-+ ;;
- *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
- extra_options="$extra_options gnu-user.opt"
- gas=yes
-@@ -743,6 +763,7 @@
- target_has_targetcm=yes
- ;;
- *-*-netbsd*)
-+ use_gcc_stdint=wrap
- tmake_file="t-slibgcc"
- gas=yes
- gnu_ld=yes
-@@ -1357,6 +1378,14 @@
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
- tmake_file="i386/t-i386elf t-svr4"
- ;;
-+i[34567]86-*-dragonfly*)
-+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
-+ tmake_file="${tmake_file} i386/t-crtstuff"
-+ ;;
-+x86_64-*-dragonfly*)
-+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
-+ tmake_file="${tmake_file} i386/t-crtstuff"
-+ ;;
- i[34567]86-*-freebsd*)
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
- ;;
-@@ -1364,12 +1393,14 @@
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
- ;;
- i[34567]86-*-netbsdelf*)
-- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
-+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.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-elf.h i386/x86-64.h i386/netbsd64.h"
-+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h netbsd-stdint.h"
- extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
-+ tmake_file="${tmake_file} i386/t-crtstuff"
- ;;
- i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
- tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
-@@ -1380,6 +1411,7 @@
- use_collect2=yes
- ;;
- i[34567]86-*-openbsd*)
-+ tm_defines="${tm_defines} PIE_DEFAULT=1"
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
- tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
- extra_options="${extra_options} openbsd.opt"
-@@ -1387,6 +1419,7 @@
- gnu_ld=yes
- ;;
- x86_64-*-openbsd*)
-+ tm_defines="${tm_defines} PIE_DEFAULT=1"
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
- tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
- extra_options="${extra_options} openbsd.opt"
-@@ -2945,6 +2978,12 @@
- arch_without_sse2=yes
- arch_without_64bit=yes
- ;;
-+ i386-*-openbsd*)
-+ arch=i486
-+ cpu=generic
-+ arch_without_sse2=yes
-+ arch_without_64bit=yes
-+ ;;
- i386-*-*)
- arch=i386
- cpu=i386
-@@ -4127,6 +4166,8 @@
- ;;
- i[34567]86-*-mingw* | x86_64-*-mingw*)
- ;;
-+ i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
-+ ;;
- i[34567]86-*-freebsd* | x86_64-*-freebsd*)
- ;;
- ia64*-*-linux*)
---- gcc/configure.orig
-+++ gcc/configure
-@@ -27570,6 +27570,20 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-*-dragonfly* | *-*-freebsd*)
-+ 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
-+ gcc_cv_target_dl_iterate_phdr=no
-+ fi
-+ ;;
-+ *-*-netbsd*)
-+ if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ else
-+ gcc_cv_target_dl_iterate_phdr=no
-+ fi
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
---- gcc/Makefile.in.orig
-+++ gcc/Makefile.in
-@@ -1152,7 +1152,6 @@
- insn-emit.o \
- insn-extract.o \
- insn-latencytab.o \
-- insn-modes.o \
- insn-opinit.o \
- insn-output.o \
- insn-peep.o \
-@@ -1487,13 +1486,18 @@
- ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
- $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
- $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
-- lto-wrapper.o
-+ insn-modes.o insn-modes-ada.o lto-wrapper.o
-
- # This lists all host object files, whether they are included in this
- # compilation or not.
- ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
-
- BACKEND = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \
-+ insn-modes.o \
-+ $(CPPLIB) $(LIBDECNUMBER)
-+
-+BACKEND2 = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \
-+ insn-modes-ada.o \
- $(CPPLIB) $(LIBDECNUMBER)
-
- # This is defined to "yes" if Tree checking is enabled, which roughly means
-@@ -2124,6 +2128,7 @@
-
- insn-modes.c: s-modes; @true
- insn-modes.h: s-modes-h; @true
-+insn-modes-ada.c: s-modes-ada; @true
- min-insn-modes.c: s-modes-m; @true
-
- s-modes: build/genmodes$(build_exeext)
-@@ -2141,6 +2146,12 @@
- $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
- $(STAMP) s-modes-m
-
-+s-modes-ada: s-modes
-+ $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \
-+ < insn-modes.c > tmp-modes-ada.c)
-+ $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c
-+ $(STAMP) s-modes-ada
-+
- insn-preds.c: s-preds; @true
- tm-preds.h: s-preds-h; @true
- tm-constrs.h: s-constrs-h; @true
-@@ -3219,6 +3230,9 @@
- ( cd $(DESTDIR)$(bindir) && \
- $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \
- fi
-+ -if [ -f gnat1$(exeext) ] ; then \
-+ ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \
-+ fi
- -if [ ! -f gcc-cross$(exeext) ] \
- && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
- rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
---- libgcc/config.host.orig
-+++ libgcc/config.host
-@@ -207,6 +207,11 @@
- tmake_file="$tmake_file t-darwin ${cpu_type}/t-darwin t-libgcc-pic t-slibgcc-darwin"
- extra_parts="crt3.o crttms.o crttme.o"
- ;;
-+*-*-dragonfly*)
-+ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
-+ tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
-+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
-+ ;;
- *-*-freebsd*)
- # This is the generic ELF configuration of FreeBSD. Later
- # machine-specific sections may refine and add to this
-@@ -238,7 +243,8 @@
- extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- ;;
- *-*-netbsd*)
-- tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
-+ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
-+ tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
- # NetBSD 1.7 and later are set up to use GCC's crtstuff for
- # ELF configurations. We will clear extra_parts in the
- # a.out configurations.
-@@ -302,7 +308,10 @@
- esac
-
- case ${host} in
--*-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2*)
-+*-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
-+ enable_execute_stack=enable-execute-stack-freebsd.c
-+ ;;
-+*-*-darwin* | *-*-solaris2*)
- enable_execute_stack=enable-execute-stack-mprotect.c
- ;;
- i[34567]86-*-mingw* | x86_64-*-mingw*)
-@@ -545,16 +554,29 @@
- x86_64-*-elf*)
- tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
- ;;
-+i[34567]86-*-dragonfly*)
-+ tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
-+ md_unwind_header=i386/dragonfly-unwind.h
-+ ;;
-+x86_64-*-dragonfly*)
-+ tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
-+ md_unwind_header=i386/dragonfly-unwind.h
-+ ;;
- i[34567]86-*-freebsd*)
- tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
-+ md_unwind_header=i386/freebsd-unwind.h
- ;;
- x86_64-*-freebsd*)
- tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
-+ md_unwind_header=i386/freebsd-unwind.h
- ;;
- i[34567]86-*-netbsdelf*)
-+ tmake_file="${tmake_file} i386/t-crtstuff"
-+ md_unwind_header=i386/netbsd-unwind.h
- ;;
- x86_64-*-netbsd*)
- tmake_file="${tmake_file} i386/t-crtstuff"
-+ md_unwind_header=i386/netbsd-unwind.h
- ;;
- i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
- ;;
-@@ -1262,6 +1284,7 @@
- i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
- i[34567]86-*-cygwin* | x86_64-*-cygwin* | \
- i[34567]86-*-mingw* | x86_64-*-mingw* | \
-+ i[34567]86-*-dragonfly* | x86_64-*-dragonfly* | \
- i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
- i[34567]86-*-openbsd* | x86_64-*-openbsd*)
- tmake_file="${tmake_file} t-softfp-tf"
---- libcilkrts/runtime/os-unix.c.orig
-+++ libcilkrts/runtime/os-unix.c
-@@ -56,6 +56,12 @@
- // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output
- #elif defined __FreeBSD__
- // No additional include files
-+#elif defined __DragonFly__
-+// No additional include files
-+#elif defined __NetBSD__
-+// No additional include files
-+#elif defined __OpenBSD__
-+// No additional include files
- #elif defined __CYGWIN__
- // Cygwin on Windows - no additional include files
- #elif defined __VXWORKS__
-@@ -374,7 +380,8 @@
- assert((unsigned)count == count);
-
- return count;
--#elif defined __FreeBSD__ || defined __CYGWIN__
-+#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__ \
-+ || defined __NetBSD__ || defined __OpenBSD__
- int ncores = sysconf(_SC_NPROCESSORS_ONLN);
-
- return ncores;
-@@ -402,6 +409,12 @@
- // On MacOS, call sched_yield to yield quantum. I'm not sure why we
- // don't do this on Linux also.
- sched_yield();
-+#elif defined(__DragonFly__)
-+ sched_yield();
-+#elif defined(__NetBSD__)
-+ sched_yield();
-+#elif defined(__OpenBSD__)
-+ sched_yield();
- #elif defined(__MIC__)
- // On MIC, pthread_yield() really trashes things. Arch's measurements
- // showed that calling _mm_delay_32() (or doing nothing) was a better
---- libitm/configure.tgt.orig
-+++ libitm/configure.tgt
-@@ -139,6 +139,7 @@
- ;;
-
- *-*-gnu* | *-*-k*bsd*-gnu \
-+ | *-*-dragonfly* \
- | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
- | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
- | *-*-darwin* | *-*-aix*)
diff --git a/lang/gcc-aux/files/diff-cxx b/lang/gcc-aux/files/diff-cxx
deleted file mode 100644
index 51aae24..0000000
--- a/lang/gcc-aux/files/diff-cxx
+++ /dev/null
@@ -1,999 +0,0 @@
---- /dev/null
-+++ libstdc++-v3/config/locale/dragonfly/c_locale.cc
-@@ -0,0 +1,300 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-+// Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <cmath> // For isinf, finite, finitef, fabs
-+#include <cstdlib> // For strof, strtold
-+#include <cstring>
-+#include <cstdio>
-+#include <locale>
-+#include <limits>
-+
-+#ifdef _GLIBCXX_HAVE_IEEEFP_H
-+#include <ieeefp.h>
-+#endif
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale&) throw()
-+ {
-+ // Assumes __s formatted for "C" locale.
-+ char* __old = setlocale(LC_ALL, 0);
-+ const size_t __len = strlen(__old) + 1;
-+ char* __sav = new char[__len];
-+ memcpy(__sav, __old, __len);
-+ setlocale(LC_ALL, "C");
-+ char* __sanity;
-+ bool __overflow = false;
-+
-+#if !__FLT_HAS_INFINITY__
-+ errno = 0;
-+#endif
-+
-+#ifdef _GLIBCXX_HAVE_STRTOF
-+ __v = strtof(__s, &__sanity);
-+#else
-+ double __d = strtod(__s, &__sanity);
-+ __v = static_cast<float>(__d);
-+#ifdef _GLIBCXX_HAVE_FINITEF
-+ if (!finitef (__v))
-+ __overflow = true;
-+#elif defined (_GLIBCXX_HAVE_FINITE)
-+ if (!finite (static_cast<double> (__v)))
-+ __overflow = true;
-+#elif defined (_GLIBCXX_HAVE_ISINF)
-+ if (isinf (static_cast<double> (__v)))
-+ __overflow = true;
-+#else
-+ if (fabs(__d) > numeric_limits<float>::max())
-+ __overflow = true;
-+#endif
-+#endif // _GLIBCXX_HAVE_STRTOF
-+
-+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
-+ // 23. Num_get overflow result.
-+ if (__sanity == __s || *__sanity != '\0')
-+ {
-+ __v = 0.0f;
-+ __err = ios_base::failbit;
-+ }
-+ else if (__overflow
-+#if __FLT_HAS_INFINITY__
-+ || __v == numeric_limits<float>::infinity()
-+ || __v == -numeric_limits<float>::infinity()
-+#else
-+ || ((__v > 1.0f || __v < -1.0f) && errno == ERANGE)
-+#endif
-+ )
-+ {
-+ if (__v > 0.0f)
-+ __v = numeric_limits<float>::max();
-+ else
-+ __v = -numeric_limits<float>::max();
-+ __err = ios_base::failbit;
-+ }
-+
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale&) throw()
-+ {
-+ // Assumes __s formatted for "C" locale.
-+ char* __old = setlocale(LC_ALL, 0);
-+ const size_t __len = strlen(__old) + 1;
-+ char* __sav = new char[__len];
-+ memcpy(__sav, __old, __len);
-+ setlocale(LC_ALL, "C");
-+ char* __sanity;
-+
-+#if !__DBL_HAS_INFINITY__
-+ errno = 0;
-+#endif
-+
-+ __v = strtod(__s, &__sanity);
-+
-+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
-+ // 23. Num_get overflow result.
-+ if (__sanity == __s || *__sanity != '\0')
-+ {
-+ __v = 0.0;
-+ __err = ios_base::failbit;
-+ }
-+ else if (
-+#if __DBL_HAS_INFINITY__
-+ __v == numeric_limits<double>::infinity()
-+ || __v == -numeric_limits<double>::infinity())
-+#else
-+ (__v > 1.0 || __v < -1.0) && errno == ERANGE)
-+#endif
-+ {
-+ if (__v > 0.0)
-+ __v = numeric_limits<double>::max();
-+ else
-+ __v = -numeric_limits<double>::max();
-+ __err = ios_base::failbit;
-+ }
-+
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v,
-+ ios_base::iostate& __err, const __c_locale&) throw()
-+ {
-+ // Assumes __s formatted for "C" locale.
-+ char* __old = setlocale(LC_ALL, 0);
-+ const size_t __len = strlen(__old) + 1;
-+ char* __sav = new char[__len];
-+ memcpy(__sav, __old, __len);
-+ setlocale(LC_ALL, "C");
-+
-+#if !__LDBL_HAS_INFINITY__
-+ errno = 0;
-+#endif
-+
-+#if defined(_GLIBCXX_HAVE_STRTOLD) && !defined(_GLIBCXX_HAVE_BROKEN_STRTOLD)
-+ char* __sanity;
-+ __v = strtold(__s, &__sanity);
-+
-+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
-+ // 23. Num_get overflow result.
-+ if (__sanity == __s || *__sanity != '\0')
-+#else
-+ typedef char_traits<char>::int_type int_type;
-+ int __p = sscanf(__s, "%Lf", &__v);
-+
-+ if (!__p || static_cast<int_type>(__p) == char_traits<char>::eof())
-+#endif
-+ {
-+ __v = 0.0l;
-+ __err = ios_base::failbit;
-+ }
-+ else if (
-+#if __LDBL_HAS_INFINITY__
-+ __v == numeric_limits<long double>::infinity()
-+ || __v == -numeric_limits<long double>::infinity())
-+#else
-+ (__v > 1.0l || __v < -1.0l) && errno == ERANGE)
-+#endif
-+ {
-+ if (__v > 0.0l)
-+ __v = numeric_limits<long double>::max();
-+ else
-+ __v = -numeric_limits<long double>::max();
-+ __err = ios_base::failbit;
-+ }
-+
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+ }
-+
-+
-+ /* DragonFly's implementation of setlocale won't accept something like
-+ "de_DE". According to nls manpage, the expected format is:
-+ language[_territory][.codeset][@modifier], but it seems that both
-+ the _territory and .codeset components are required.
-+
-+ As an attempt to correct for this, we'll tack on ".UTF-8" if
-+ a period is not detected in the locale string.
-+
-+ There are no locales with modifiers on DragonFly so if found, they
-+ will just be stripped off silently. e.g "de_DE@euro" will be reduced
-+ to "de_DE". The UTF-8 default would be added after that.
-+ */
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale)
-+ {
-+ const size_t size__s = (__s == NULL) ? 1 : strlen (__s);
-+ const char UTF8[] = ".UTF-8";
-+ char localspec[size__s + 6 + 1];
-+
-+ if (__s == NULL) {
-+ localspec[0] = NULL;
-+ } else {
-+ strcpy (localspec, __s);
-+ char * pch = strchr (localspec, '@');
-+ if (pch != NULL)
-+ *pch = 0;
-+
-+ if ( (strchr (__s, '.') == NULL)
-+ && (strcmp (__s, "C") != 0)
-+ && (strcmp (__s, "POSIX") != 0))
-+ strncat (localspec, UTF8, 6);
-+ }
-+
-+ const char * result = std::setlocale(LC_ALL, localspec);
-+
-+ if ((strcmp(result, "C") != 0) && (strcmp (result, localspec) != 0))
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ __cloc = 0;
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ { __cloc = 0; }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale&) throw()
-+ { return __c_locale(); }
-+
-+ __c_locale
-+ locale::facet::_S_lc_ctype_c_locale(__c_locale, const char*)
-+ { return __c_locale(); }
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
-+
-+namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES"
-+ };
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
-+
-+// XXX GLIBCXX_ABI Deprecated
-+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
-+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
-+ extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
---- /dev/null
-+++ libstdc++-v3/config/locale/dragonfly/ctype_members.cc
-@@ -0,0 +1,174 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-+// Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstdio>
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+ }
-+ }
-+
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(
-+ const mask __attribute__((__unused__)) __m) const throw()
-+ {
-+ // DragonFly uses the same codes for 'char' as 'wchar_t', so this routine
-+ // never gets called.
-+ return __wmask_type();
-+ };
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return towupper(__c); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = towupper(*__lo);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return towlower(__c); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = towlower(*__lo);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+ const int __c = wctob(__wc);
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype() throw()
-+ {
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __i = 0;
-+ __i < sizeof(_M_widen) / sizeof(wint_t); ++__i)
-+ _M_widen[__i] = btowc(__i);
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
---- /dev/null
-+++ libstdc++-v3/config/os/bsd/dragonfly/ctype_base.h
-@@ -0,0 +1,75 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 2000, 2003, 2009, 2010 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+//
-+// ISO C++ 14882: 22.1 Locales
-+//
-+
-+// Information as gleaned from /usr/include/ctype.h on DragonFly.
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+ /// @brief Base class for ctype.
-+ struct ctype_base
-+ {
-+ // Non-standard typedefs.
-+ typedef const int* __to_type;
-+
-+ // NB: Offsets into ctype<char>::_M_table force a particular size
-+ // on the mask type. Because of this, we don't use an enum.
-+#ifdef _CTYPE_S
-+ // DragonFly 3.6 and later
-+ typedef unsigned long 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_A | _CTYPE_D | _CTYPE_P;
-+ static const mask cntrl = _CTYPE_C;
-+ static const mask punct = _CTYPE_P;
-+ static const mask alnum = _CTYPE_A | _CTYPE_D;
-+#else
-+ // DragonFly 3.4 and older
-+ typedef unsigned short mask;
-+ static const mask upper = _CTYPEMASK_U;
-+ static const mask lower = _CTYPEMASK_L;
-+ static const mask alpha = _CTYPEMASK_A;
-+ static const mask digit = _CTYPEMASK_D;
-+ static const mask xdigit = _CTYPEMASK_X;
-+ static const mask space = _CTYPEMASK_S;
-+ static const mask print = _CTYPEMASK_R;
-+ static const mask graph = _CTYPEMASK_G;
-+ static const mask cntrl = _CTYPEMASK_C;
-+ static const mask punct = _CTYPEMASK_P;
-+ static const mask alnum = _CTYPEMASK_A | _CTYPEMASK_D;
-+#endif
-+ };
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
---- /dev/null
-+++ libstdc++-v3/config/os/bsd/dragonfly/ctype_configure_char.cc
-@@ -0,0 +1,99 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 2011 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+/** @file ctype_configure_char.cc */
-+
-+//
-+// ISO C++ 14882: 22.1 Locales
-+//
-+
-+#include <locale>
-+#include <cstdlib>
-+#include <cstring>
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+// Information as gleaned from /usr/include/ctype.h
-+
-+ const ctype_base::mask*
-+ ctype<char>::classic_table() throw()
-+ { return 0; }
-+
-+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
-+ size_t __refs)
-+ : facet(__refs), _M_del(__table != 0 && __del),
-+ _M_toupper(NULL), _M_tolower(NULL),
-+ _M_table(__table ? __table : classic_table())
-+ {
-+ memset(_M_widen, 0, sizeof(_M_widen));
-+ _M_widen_ok = 0;
-+ memset(_M_narrow, 0, sizeof(_M_narrow));
-+ _M_narrow_ok = 0;
-+ }
-+
-+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
-+ : facet(__refs), _M_del(__table != 0 && __del),
-+ _M_toupper(NULL), _M_tolower(NULL),
-+ _M_table(__table ? __table : classic_table())
-+ {
-+ memset(_M_widen, 0, sizeof(_M_widen));
-+ _M_widen_ok = 0;
-+ memset(_M_narrow, 0, sizeof(_M_narrow));
-+ _M_narrow_ok = 0;
-+ }
-+
-+ char
-+ ctype<char>::do_toupper(char __c) const
-+ { return ::toupper((int) __c); }
-+
-+ const char*
-+ ctype<char>::do_toupper(char* __low, const char* __high) const
-+ {
-+ while (__low < __high)
-+ {
-+ *__low = ::toupper((int) *__low);
-+ ++__low;
-+ }
-+ return __high;
-+ }
-+
-+ char
-+ ctype<char>::do_tolower(char __c) const
-+ { return ::tolower((int) __c); }
-+
-+ const char*
-+ ctype<char>::do_tolower(char* __low, const char* __high) const
-+ {
-+ while (__low < __high)
-+ {
-+ *__low = ::tolower((int) *__low);
-+ ++__low;
-+ }
-+ return __high;
-+ }
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
---- /dev/null
-+++ libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h
-@@ -0,0 +1,187 @@
-+// Locale support -*- C++ -*-
-+
-+// Copyright (C) 2000, 2003, 2004, 2005, 2009, 2010
-+// Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+/** @file bits/ctype_inline.h
-+ * This is an internal header file, included by other library headers.
-+ * Do not attempt to use it directly. @headername{locale}
-+ */
-+
-+//
-+// ISO C++ 14882: 22.1 Locales
-+//
-+
-+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
-+// functions go in ctype.cc
-+
-+namespace std _GLIBCXX_VISIBILITY(default)
-+{
-+_GLIBCXX_BEGIN_NAMESPACE_VERSION
-+
-+ bool
-+ ctype<char>::
-+ is(mask __m, char __c) const
-+ {
-+ if (_M_table)
-+ return _M_table[static_cast<unsigned char>(__c)] & __m;
-+ else
-+#ifdef _CTYPE_S
-+ return __istype(__c, __m);
-+#else
-+ return __libc_ctype_ [__c + 1] & __m;
-+#endif
-+ }
-+
-+ const char*
-+ ctype<char>::
-+ is(const char* __low, const char* __high, mask* __vec) const
-+ {
-+ if (_M_table)
-+ while (__low < __high)
-+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
-+ else
-+ for (;__low < __high; ++__vec, ++__low)
-+ {
-+#ifdef _CTYPE_S
-+ *__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
-+ | space | print | graph | cntrl | punct | alnum);
-+#else
-+ mask __m = 0;
-+ if (this->is(upper, *__low)) __m |= upper;
-+ if (this->is(lower, *__low)) __m |= lower;
-+ if (this->is(alpha, *__low)) __m |= alpha;
-+ if (this->is(digit, *__low)) __m |= digit;
-+ if (this->is(xdigit, *__low)) __m |= xdigit;
-+ if (this->is(space, *__low)) __m |= space;
-+ if (this->is(print, *__low)) __m |= print;
-+ if (this->is(graph, *__low)) __m |= graph;
-+ if (this->is(cntrl, *__low)) __m |= cntrl;
-+ if (this->is(punct, *__low)) __m |= punct;
-+ // Do not include explicit line for alnum mask since it is a
-+ // pure composite of masks on DragonFly.
-+ *__vec = __m;
-+#endif
-+ }
-+ return __high;
-+ }
-+
-+ const char*
-+ ctype<char>::
-+ scan_is(mask __m, const char* __low, const char* __high) const
-+ {
-+ if (_M_table)
-+ while (__low < __high
-+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
-+ ++__low;
-+ else
-+ while (__low < __high && !this->is(__m, *__low))
-+ ++__low;
-+ return __low;
-+ }
-+
-+ const char*
-+ ctype<char>::
-+ scan_not(mask __m, const char* __low, const char* __high) const
-+ {
-+ if (_M_table)
-+ while (__low < __high
-+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
-+ ++__low;
-+ else
-+ while (__low < __high && this->is(__m, *__low) != 0)
-+ ++__low;
-+ return __low;
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ inline bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+#ifdef _CTYPE_S
-+ return __istype (__c, __m);
-+#else
-+ return __libc_ctype_ [__c + 1] & __m;
-+#endif
-+ }
-+
-+ inline const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+#ifdef _CTYPE_S
-+ *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
-+ | space | print | graph | cntrl | punct | alnum);
-+#else
-+ {
-+ mask __m = 0;
-+ if (isupper (*__lo)) __m |= _CTYPEMASK_U;
-+ if (islower (*__lo)) __m |= _CTYPEMASK_L;
-+ if (isdigit (*__lo)) __m |= _CTYPEMASK_D;
-+ if (isspace (*__lo)) __m |= _CTYPEMASK_S;
-+ if (ispunct (*__lo)) __m |= _CTYPEMASK_P;
-+ if (isblank (*__lo)) __m |= _CTYPEMASK_B;
-+ if (iscntrl (*__lo)) __m |= _CTYPEMASK_C;
-+ if (isalpha (*__lo)) __m |= _CTYPEMASK_A;
-+ if (isgraph (*__lo)) __m |= _CTYPEMASK_G;
-+ if (isprint (*__lo)) __m |= _CTYPEMASK_R;
-+ if (isxdigit(*__lo)) __m |= _CTYPEMASK_X;
-+ /* alnum already covered = alpha | digit */
-+
-+ *__vec = __m;
-+ }
-+#endif
-+ return __hi;
-+ }
-+
-+ inline const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+#ifdef _CTYPE_S
-+ while (__lo < __hi && ! __istype (*__lo, __m))
-+#else
-+ while (__lo < __hi && !(__libc_ctype_ [*__lo + 1] & __m))
-+#endif
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ inline const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+#ifdef _CTYPE_S
-+ while (__lo < __hi && __istype (*__lo, __m))
-+#else
-+ while (__lo < __hi && (__libc_ctype_ [*__lo + 1] & __m))
-+#endif
-+ ++__lo;
-+ return __lo;
-+ }
-+#endif
-+
-+_GLIBCXX_END_NAMESPACE_VERSION
-+} // namespace
---- /dev/null
-+++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h
-@@ -0,0 +1,37 @@
-+// Specific definitions for BSD -*- C++ -*-
-+
-+// Copyright (C) 2014-2015 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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.
-+
-+// This library 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.
-+
-+// 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/>.
-+
-+
-+#ifndef _GLIBCXX_OS_DEFINES
-+#define _GLIBCXX_OS_DEFINES 1
-+
-+// System-specific #define, typedefs, corrections, etc, go here. This
-+// file will come before all others.
-+
-+#define _GLIBCXX_USE_C99_CHECK 1
-+#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
-+#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
-+#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
-+
-+#endif
---- libstdc++-v3/acinclude.m4.orig
-+++ libstdc++-v3/acinclude.m4
-@@ -1989,6 +1989,9 @@
- darwin* | freebsd*)
- enable_clocale_flag=darwin
- ;;
-+ dragonfly*)
-+ enable_clocale_flag=dragonfly
-+ ;;
- openbsd*)
- enable_clocale_flag=newlib
- ;;
-@@ -2075,6 +2078,23 @@
- CMESSAGES_H=config/locale/generic/messages_members.h
- CMESSAGES_CC=config/locale/generic/messages_members.cc
- CMONEY_CC=config/locale/generic/monetary_members.cc
-+ CNUMERIC_CC=config/locale/generic/numeric_members.cc
-+ CTIME_H=config/locale/generic/time_members.h
-+ CTIME_CC=config/locale/generic/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-+ ;;
-+
-+ dragonfly)
-+ AC_MSG_RESULT(dragonfly)
-+
-+ CLOCALE_H=config/locale/generic/c_locale.h
-+ CLOCALE_CC=config/locale/dragonfly/c_locale.cc
-+ CCODECVT_CC=config/locale/generic/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/generic/collate_members.cc
-+ CCTYPE_CC=config/locale/dragonfly/ctype_members.cc
-+ CMESSAGES_H=config/locale/generic/messages_members.h
-+ CMESSAGES_CC=config/locale/generic/messages_members.cc
-+ CMONEY_CC=config/locale/generic/monetary_members.cc
- CNUMERIC_CC=config/locale/generic/numeric_members.cc
- CTIME_H=config/locale/generic/time_members.h
- CTIME_CC=config/locale/generic/time_members.cc
---- libstdc++-v3/configure.orig
-+++ libstdc++-v3/configure
-@@ -15849,6 +15849,9 @@
- darwin* | freebsd*)
- enable_clocale_flag=darwin
- ;;
-+ dragonfly*)
-+ enable_clocale_flag=dragonfly
-+ ;;
- openbsd*)
- enable_clocale_flag=newlib
- ;;
-@@ -15988,6 +15991,24 @@
- CMESSAGES_H=config/locale/generic/messages_members.h
- CMESSAGES_CC=config/locale/generic/messages_members.cc
- CMONEY_CC=config/locale/generic/monetary_members.cc
-+ CNUMERIC_CC=config/locale/generic/numeric_members.cc
-+ CTIME_H=config/locale/generic/time_members.h
-+ CTIME_CC=config/locale/generic/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-+ ;;
-+
-+ dragonfly)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: dragonfly" >&5
-+$as_echo "dragonfly" >&6; }
-+
-+ CLOCALE_H=config/locale/generic/c_locale.h
-+ CLOCALE_CC=config/locale/dragonfly/c_locale.cc
-+ CCODECVT_CC=config/locale/generic/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/generic/collate_members.cc
-+ CCTYPE_CC=config/locale/dragonfly/ctype_members.cc
-+ CMESSAGES_H=config/locale/generic/messages_members.h
-+ CMESSAGES_CC=config/locale/generic/messages_members.cc
-+ CMONEY_CC=config/locale/generic/monetary_members.cc
- CNUMERIC_CC=config/locale/generic/numeric_members.cc
- CTIME_H=config/locale/generic/time_members.h
- CTIME_CC=config/locale/generic/time_members.cc
---- libstdc++-v3/configure.host.orig
-+++ libstdc++-v3/configure.host
-@@ -232,6 +232,12 @@
- os_include_dir="os/generic"
- atomicity_dir="cpu/generic"
- ;;
-+ dragonfly*)
-+ os_include_dir="os/bsd/dragonfly"
-+ ;;
-+ linux-android*)
-+ os_include_dir="os/bionic"
-+ ;;
- bsd*)
- # Plain BSD attempts to share FreeBSD files.
- os_include_dir="os/bsd/freebsd"
---- libstdc++-v3/config/os/bionic/ctype_base.h.orig
-+++ libstdc++-v3/config/os/bionic/ctype_base.h
-@@ -40,6 +40,18 @@
- // Non-standard typedefs.
- typedef const int* __to_type;
-
-+#ifdef _CTYPE_U
-+#define _U _CTYPE_U
-+#define _L _CTYPE_L
-+#define _D _CTYPE_D
-+#define _S _CTYPE_S
-+#define _P _CTYPE_P
-+#define _C _CTYPE_C
-+#define _X _CTYPE_X
-+#define _B _CTYPE_B
-+#define _N _CTYPE_D
-+#endif
-+
- // 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 char mask;
diff --git a/lang/gcc-aux/files/diff-cxx-testsuite b/lang/gcc-aux/files/diff-cxx-testsuite
deleted file mode 100644
index 073ea95..0000000
--- a/lang/gcc-aux/files/diff-cxx-testsuite
+++ /dev/null
@@ -1,50 +0,0 @@
---- gcc/testsuite/c-c++-common/Wconversion-real.c.orig
-+++ gcc/testsuite/c-c++-common/Wconversion-real.c
-@@ -5,6 +5,12 @@
- /* { dg-options "-std=c99 -Wconversion" { target c } } */
- /* { dg-options "-Wconversion" { target c++ } } */
- /* { dg-require-effective-target large_double } */
-+/* Due to i386 rounding of long doubles on FreeBSD and DragonFly, the tests
-+ should be set to "xfail" for those platforms, but it's not possible to
-+ set both "target" and "xfail" together. An attempt to mark it
-+ UNSUPPORTED for large_long_double and not (i386 FreeBSD i386 DragonFly)
-+ failed. All the supported platforms of gcc-aux have large long double
-+ so we'll just assume it for these two tests and use xfail instead. */
-
- float vfloat;
- double vdouble;
-@@ -24,8 +30,8 @@
- vfloat = 3.1; /* { dg-warning "conversion" } */
- ffloat (3.1L); /* { dg-warning "conversion" } */
- vfloat = 3.1L; /* { dg-warning "conversion" } */
-- fdouble (3.1L); /* { dg-warning "conversion" "" { target large_long_double } } */
-- vdouble = 3.1L; /* { dg-warning "conversion" "" { target large_long_double } } */
-+ fdouble (3.1L); /* { dg-warning "conversion" "" { xfail { i?86-*-freebsd* i?86-*-dragonfly* } } } */
-+ vdouble = 3.1L; /* { dg-warning "conversion" "" { xfail { i?86-*-freebsd* i?86-*-dragonfly* } } } */
- ffloat (vdouble); /* { dg-warning "conversion" } */
- vfloat = vdouble; /* { dg-warning "conversion" } */
- ffloat (vlongdouble); /* { dg-warning "conversion" } */
---- libstdc++-v3/testsuite/lib/libstdc++.exp.orig
-+++ libstdc++-v3/testsuite/lib/libstdc++.exp
-@@ -881,17 +881,18 @@
- set f [open $src "w"]
- puts $f "#include <locale>"
- puts $f "#include <cstdio>"
-- puts $f "using namespace std;"
-+ puts $f "using namespace std;"
- puts $f "int main (int argc, char** argv)"
- puts $f "{"
-+ puts $f " const char* mlx = *(argv + 1);"
- puts $f " try"
- puts $f " {"
-- puts $f " locale(*(argv + 1));"
-+ puts $f " locale((char*)(mlx));"
- puts $f " return 0;"
- puts $f " }"
- puts $f " catch(...)"
- puts $f " {"
-- puts $f " printf(\"locale '%s' not supported\\n\", *(argv + 1));"
-+ puts $f " printf(\"locale '%s' not supported\\n\", mlx);"
- puts $f " return 1;"
- puts $f " }"
- puts $f "}"
diff --git a/lang/gcc-aux/files/diff-fortran-testsuite b/lang/gcc-aux/files/diff-fortran-testsuite
deleted file mode 100644
index 4241318..0000000
--- a/lang/gcc-aux/files/diff-fortran-testsuite
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc/testsuite/gfortran.dg/open_errors.f90.orig
-+++ gcc/testsuite/gfortran.dg/open_errors.f90
-@@ -22,7 +22,7 @@
- if (msg /= "File 'temptestfile' does not exist") call abort()
-
- open(77,file="./", iomsg=msg, iostat=i)
--if (msg /= "'./' is a directory" .and. msg /= "Invalid argument") call abort()
-+if (msg /= "'./' is a directory" .and. msg /= "Invalid argument" .and. msg /= "File './' already exists") call abort()
-
- open(77,file=n,status="new")
- i = chmod(n, "-w")
diff --git a/lang/gcc-aux/files/diff-gcc-testsuite b/lang/gcc-aux/files/diff-gcc-testsuite
deleted file mode 100644
index a9a330e..0000000
--- a/lang/gcc-aux/files/diff-gcc-testsuite
+++ /dev/null
@@ -1,46 +0,0 @@
---- gcc/testsuite/gcc.dg/format/ext-1.c.orig
-+++ gcc/testsuite/gcc.dg/format/ext-1.c
-@@ -8,7 +8,7 @@
- #include "format.h"
-
- void
--foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
-+foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
- unsigned long long int ull, int i, unsigned int u, double d,
- char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
- {
---- gcc/testsuite/gcc.dg/format/ext-2.c.orig
-+++ gcc/testsuite/gcc.dg/format/ext-2.c
-@@ -8,7 +8,7 @@
- #include "format.h"
-
- void
--foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
-+foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
- unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
- int *ip, unsigned int *up)
- {
---- gcc/testsuite/gcc.dg/format/format.h.orig
-+++ gcc/testsuite/gcc.dg/format/format.h
-@@ -71,8 +71,8 @@
- #endif
-
- /* %q formats want a "quad"; GCC considers this to be a long long. */
--typedef llong quad_t;
--typedef ullong u_quad_t;
-+typedef llong quad2_t;
-+typedef ullong u_quad2_t;
-
- __extension__ typedef __INTMAX_TYPE__ intmax_t;
- __extension__ typedef __UINTMAX_TYPE__ uintmax_t;
---- gcc/testsuite/gcc.dg/pch/pch.exp.orig
-+++ gcc/testsuite/gcc.dg/pch/pch.exp
-@@ -44,6 +44,8 @@
- set test "largefile.c"
- set testh "largefile.hs"
- set f [open $test w]
-+puts $f "/* { dg-do run { target *-*-solaris* } } */"
-+puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
- puts $f "/* { dg-timeout-factor 4.0 } */"
- set v 0
- for { set v 0 } { $v < 10000 } { incr v } {
diff --git a/lang/gcc-aux/files/gnatdroid.exp b/lang/gcc-aux/files/gnatdroid.exp
deleted file mode 100644
index 978319f..0000000
--- a/lang/gcc-aux/files/gnatdroid.exp
+++ /dev/null
@@ -1,14 +0,0 @@
-# gnatdroid testsuite running over ssh.
-
-load_generic_config "android"
-
-process_multilib_options ""
-
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
-
-set_board_info rsh_prog /usr/bin/ssh
-set_board_info rcp_prog /usr/bin/scp
-set_board_info protocol standard
-set_board_info hostname tablet
-set_board_info username root
diff --git a/lang/gcc-aux/pkg-descr b/lang/gcc-aux/pkg-descr
deleted file mode 100644
index c7eff9c..0000000
--- a/lang/gcc-aux/pkg-descr
+++ /dev/null
@@ -1,14 +0,0 @@
-The AUX compiler supports several languages: Ada, C, C++, Fortran and
-Objective-C. Since Ada support must be built by an Ada-capable compiler,
-only platforms for which a bootstrap compiler is available can build it.
-
-The AUX compiler is based on release versions of the Free Software
-Foundation's GNU Compiler Collection. It uses the GCC Runtime Library
-Exception, so the resulting binaries have no licensing requirements.
-Binaries produced by the AUX compiler should be legally handled the same
-as binaries produced by any FSF compiler.
-
-This compiler implements the full Ada-83, Ada-95, Ada-2005 and Ada-2012
-standards.
-
-WWW: http://www.dragonlace.net/
OpenPOWER on IntegriCloud