aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-04-30 11:38:19 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-04-30 11:38:19 +0000
commite2328653a6a84c5c8b93558bb03b309f2b80388c (patch)
treef90965dc29924ba8af1f72d12767f94d3499fca6 /lang
parentc52c2b43f7f7279b58070be835f1097e9aac873b (diff)
downloadports-e2328653a6a84c5c8b93558bb03b309f2b80388c.tar.gz
ports-e2328653a6a84c5c8b93558bb03b309f2b80388c.zip
Update to gcc 4.7.3
Convert to new options framework Use binutils from ports on FreeBSD 8 PR: ports/178143 Submitted by: John Marino <draco@marino.st>
Notes
Notes: svn path=/head/; revision=316915
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc-aux/Makefile106
-rw-r--r--lang/gcc-aux/Makefile.common4
-rw-r--r--lang/gcc-aux/distinfo8
-rw-r--r--lang/gcc-aux/files/diff-ada47
-rw-r--r--lang/gcc-aux/files/diff-core64
-rw-r--r--lang/gcc-aux/files/diff-cxx58
-rw-r--r--lang/gcc-aux/files/diff-cxx-testsuite13
7 files changed, 164 insertions, 136 deletions
diff --git a/lang/gcc-aux/Makefile b/lang/gcc-aux/Makefile
index a42878780619..162201bedadf 100644
--- a/lang/gcc-aux/Makefile
+++ b/lang/gcc-aux/Makefile
@@ -1,16 +1,10 @@
-# New ports collection makefile for: gcc-aux
-# Date created: 2012-07-15
-# Whom: John Marino <draco@marino.st>
-#
+# Created by: John Marino <draco@marino.st>
# $FreeBSD$
-#
PORTNAME= gcc-aux
PORTVERSION= ${SNAPSHOT}
-PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://downloads.dragonlace.net/src/:boot \
- http://dragonlace.mirrors.ada.cx/src/:boot \
${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION}
DISTFILES= gcc-${GCC_VERSION}.tar.bz2
@@ -26,29 +20,46 @@ INTENDED_COMPILER= NATIVE
BOOTSTRAP_COMPILER= NOT_REQUIRED
BOOTSTRAP_TRIPLET= NOT_SET
FULL_GNATGCC= NOT_SET
+OS_LABEL4VERS= [${OPSYS}]
+GARCH= ${ARCH:S/amd64/x86_64/}
+
+OPTIONS_DEFINE= ADA CXX FORT OBJC STATIC TESTSUITE NLS
+OPTIONS_DEFAULT= ADA CXX FORT OBJC
+NO_OPTIONS_SORT= yes
-OPTIONS= ADA "Build Ada language" on
-OPTIONS+= CXX "Build C++ language" on
-OPTIONS+= FORT "Build Fortran language" on
-OPTIONS+= OBJC "Build Objective-C language" on
-OPTIONS+= STATIC "Build with no shared libraries other than libc" off
-OPTIONS+= TESTSUITE "Activate test support" off
-OPTIONS+= NLS "Native Language Support" off
+ADA_DESC= Build Ada language
+CXX_DESC= Build C++ language
+FORT_DESC= Build Fortran language
+OBJC_DESC= Build Objective-C language
+STATIC_DESC= Build with no shared libraries other than libc
+TESTSUITE_DESC= Activate test support
-.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
-.if ${ARCH} == "amd64"
-BLD_TARGET= x86_64-aux-freebsd${OSREL}
+.if ${OPSYS} == FreeBSD
+. if ${OSVERSION} < 900000
+USE_BINUTILS= yes
+EXTRA_CONFIG+= --with-as=${LOCALBASE}/bin/as
+EXTRA_CONFIG+= --with-ld=${LOCALBASE}/bin/ld
+RUN_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
+. endif
+. if ${GARCH} == x86_64
OS_LABEL4VERS= [FreeBSD64]
BOOTSTRAP_TRIPLET= x86_64-bootstrap-freebsd8.1/4.6.0
-BOOTSTRAP_COMPILER= gnat-bootstrap.x86_64.freebsd.tar.bz2
-.else
-BLD_TARGET= i386-aux-freebsd${OSREL}
-OS_LABEL4VERS= [FreeBSD]
+. else
BOOTSTRAP_TRIPLET= i386-bootstrap-freebsd8.0/4.6.0
-BOOTSTRAP_COMPILER= gnat-bootstrap.i386.freebsd.tar.bz2
+. endif
+.endif
+.if ${OPSYS} == DragonFly
+. if ${GARCH} == x86_64
+OS_LABEL4VERS= [DragonFly64]
+BOOTSTRAP_TRIPLET= x86_64-bootstrap-dragonfly2.8/4.6.0
+. else
+BOOTSTRAP_TRIPLET= i386-bootstrap-dragonfly2.8/4.6.0
+. endif
.endif
+BLD_TARGET= ${GARCH}-aux-${OPSYS:L}${OSREL}
+BOOTSTRAP_COMPILER= gnat-bootstrap.${GARCH}.${OPSYS:L}.tar.bz2
WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION}
BUILDDIR= ${WRKDIR}/build
@@ -79,7 +90,7 @@ FULL_PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/${PORTNAME}/bin:${PREFIX}/bin
.endif
# If FULL_GNATGCC is not set, we'll request the bootstrap compiler
-.if ${FULL_GNATGCC} == "NOT_SET"
+.if ${FULL_GNATGCC} == NOT_SET
INTENDED_COMPILER=BOOTSTRAP
FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gnatgcc
FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin
@@ -89,6 +100,8 @@ DISTFILES+= ${BOOTSTRAP_COMPILER}:boot
# for port maintenance, invoke "make makesum PLUS_BOOTSTRAPS=1"
.if defined(PLUS_BOOTSTRAPS)
DISTFILES=gcc-${GCC_VERSION}.tar.bz2 \
+ gnat-bootstrap.i386.dragonfly.tar.bz2:boot \
+ gnat-bootstrap.x86_64.dragonfly.tar.bz2:boot \
gnat-bootstrap.i386.freebsd.tar.bz2:boot \
gnat-bootstrap.x86_64.freebsd.tar.bz2:boot
.endif
@@ -97,7 +110,7 @@ DISTFILES=gcc-${GCC_VERSION}.tar.bz2 \
## Ada ##
###########
-.if defined(WITH_ADA)
+.if ${PORT_OPTIONS:MADA}
LANGS+= ada
APPLY_DIFFS+= ada
.endif
@@ -106,7 +119,7 @@ APPLY_DIFFS+= ada
## C++ ##
###########
-.if defined(WITH_CXX)
+.if ${PORT_OPTIONS:MCXX}
LANGS+= c++
APPLY_DIFFS+= cxx
MAN1+= g++.1
@@ -116,7 +129,7 @@ MAN1+= g++.1
## Fortran ##
###############
-.if defined(WITH_FORT)
+.if ${PORT_OPTIONS:MFORT}
LANGS+= fortran
APPLY_DIFFS+= fortran
MAN1+= gfortran.1
@@ -129,7 +142,7 @@ EXTRA_CONFIG+= --disable-libquadmath
## Objective-C ##
###################
-.if defined(WITH_OBJC)
+.if ${PORT_OPTIONS:MOBJC}
LANGS+= objc
.endif
@@ -137,7 +150,7 @@ LANGS+= objc
## Testsuite Support ##
#########################
-.if defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MTESTSUITE}
BUILD_DEPENDS= dejagnu>=1.4:${PORTSDIR}/misc/dejagnu
APPLY_DIFFS+= ada-testsuite
APPLY_DIFFS+= fortran-testsuite
@@ -149,8 +162,8 @@ APPLY_DIFFS+= gcc-testsuite
## NATIONAL LANGUAGE SUPPORT ##
#################################
-.if defined(WITH_NLS)
-BUILD_DEPENDS= gettext>=0.18:${PORTSDIR}/devel/gettext
+.if ${PORT_OPTIONS:MNLS}
+USES+= gettext:build
EXTRA_CONFIG+= --enable-nls
.else
EXTRA_CONFIG+= --disable-nls
@@ -191,7 +204,7 @@ post-extract:
@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE}
# Create new directories in preparation of applying diff files
-.if defined(WITH_CXX)
+.if ${PORT_OPTIONS:MCXX}
${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly
${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly
.endif
@@ -204,14 +217,15 @@ post-extract:
# Update LINK_SPEC to add gcc-aux lib runpath in every binary
@${ECHO} "Configuring LINK_SPEC runpath"
- @perl -pi -e 's;\@PREFIX\@;${PREFIX};' \
+ @${PERL} -pi -e 's;\@PREFIX\@;${PREFIX};' \
+ ${WRKSRC}/gcc/config/dragonfly.h \
${WRKSRC}/gcc/config/i386/freebsd64.h \
${WRKSRC}/gcc/config/i386/freebsd.h
-.if defined(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
@${ECHO} "Reconfiguring GCC Makefile to build compiler statically"
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-static-version
-.if defined(WITH_NLS)
+.if ${PORT_OPTIONS:MNLS}
@${PERL} -pi -e 's;\@LIBINTL\@;${STINTL} ${STICONV};' ${WRKSRC}/intl/config.intl.in
@${PERL} -pi -e 's;\@LIBICONV\@;;' \
${WRKSRC}/gcc/Makefile.in \
@@ -225,7 +239,7 @@ post-extract:
.endif
.endif
-.if ${INTENDED_COMPILER} == "BOOTSTRAP"
+.if ${INTENDED_COMPILER} == BOOTSTRAP
${MKDIR} ${BOOTSTRAP_PREFIX}
${MV} ${BOOTSTRAP_PREFIX}/../bin ${BOOTSTRAP_PREFIX}
${MV} ${BOOTSTRAP_PREFIX}/../lib ${BOOTSTRAP_PREFIX}
@@ -234,12 +248,8 @@ post-extract:
# Bootstrap compiler has statically linked z, gmp, mpc, mpfr and iconv
# The only shared lib is libc.so.7, so it should work for a long time.
-.if ${OSVERSION} > 900000
- # Since June 7, bootstrap compiler's include-fixed headers have been
- # incompatible with FreeBSD 9.0-CURRENT
${RM} -rf ${BOOTSTRAP_PREFIX}/lib/gcc/${BOOTSTRAP_TRIPLET}/include-fixed
.endif
-.endif
do-configure:
${MKDIR} ${BUILDDIR}
@@ -252,34 +262,34 @@ do-build:
test: build test-ada test-fortran test-objc test-cxx test-c
test-ada:
-.if defined(WITH_ADA) && defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MADA} && ${PORT_OPTIONS:MTESTSUITE}
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-ada
.endif
test-fortran:
-.if defined(WITH_FORT) && defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MFORT} && ${PORT_OPTIONS:MTESTSUITE}
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-fortran
.endif
test-objc:
-.if defined(WITH_OBJC) && defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MOBJC} && ${PORT_OPTIONS:MTESTSUITE}
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-objc
.endif
test-cxx:
-.if defined(WITH_CXX) && defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MCXX} && ${PORT_OPTIONS:MTESTSUITE}
# libstdc++ testsuite will break every time, TRUE used to force continuation
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c++ || true
.endif
test-c:
-.if defined(WITH_TESTSUITE)
+.if ${PORT_OPTIONS:MTESTSUITE}
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-c
.endif
do-install:
cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} install-strip DESTDIR=${DESTINY}
- ${CP} -pr ${DESTINY}${PREFIX}/ ${PREFIX}/
+ ${CP} -pR ${DESTINY}${PREFIX}/ ${PREFIX}/
post-install:
${RM} -f ${WRKDIR}/PLIST.all
@@ -293,7 +303,8 @@ post-install:
${SED} -e 's/^/@dirrm /g' >> ${WRKDIR}/PLIST.all
cd ${WRKDIR}; ${SED} -i -e "/PLIST.all/ r PLIST.all" ${TMPPLIST}
-.if ${OSVERSION} > 900000 && ${OSVERSION} < 900507
+.if ${OPSYS} == FreeBSD
+. if ${OSVERSION} > 900000 && ${OSVERSION} < 900507
@${ECHO_MSG} "===================================================================="
@${ECHO_MSG} " NOTICE REGARDING ADA TASKING ON FREEBSD 9.0:"
@${ECHO_MSG} " Due to a bug in the FreeBSD 9.0 threading library, an exiting task"
@@ -303,6 +314,7 @@ post-install:
@${ECHO_MSG} " 2) Patch and rebuild thread library as described in"
@${ECHO_MSG} " http://www.dragonlace.net/posts/F9_Fix/"
@${ECHO_MSG} "===================================================================="
+. endif
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/lang/gcc-aux/Makefile.common b/lang/gcc-aux/Makefile.common
index b491618c4ebc..8778613bd619 100644
--- a/lang/gcc-aux/Makefile.common
+++ b/lang/gcc-aux/Makefile.common
@@ -14,8 +14,8 @@ USE_PERL5_BUILD= yes
ALL_TARGET= default
MAKE_JOBS_SAFE= yes
-SNAPSHOT= 20120614
+SNAPSHOT= 20130411
GCC_BRANCH= 4.7
-GCC_POINT= 1
+GCC_POINT= 3
GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT}
diff --git a/lang/gcc-aux/distinfo b/lang/gcc-aux/distinfo
index 8d27674ff5af..26b348fd8790 100644
--- a/lang/gcc-aux/distinfo
+++ b/lang/gcc-aux/distinfo
@@ -1,5 +1,9 @@
-SHA256 (gcc-4.7.1.tar.bz2) = 16093f6fa01732adf378d97fe338f113c933bdf56da22bf87c76beff13da406f
-SIZE (gcc-4.7.1.tar.bz2) = 82639660
+SHA256 (gcc-4.7.3.tar.bz2) = 2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
+SIZE (gcc-4.7.3.tar.bz2) = 82904224
+SHA256 (gnat-bootstrap.i386.dragonfly.tar.bz2) = 9148952791231e7d302238b690b183af72867b19ecac8ac482f035c06583cb0c
+SIZE (gnat-bootstrap.i386.dragonfly.tar.bz2) = 28205489
+SHA256 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = ccd361f3fa15fad38ea68530b120517f0049767d6b98cf02898d5adf9ef2b23e
+SIZE (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 31380342
SHA256 (gnat-bootstrap.i386.freebsd.tar.bz2) = c38e1c960f651c3f248c1ef540b1df724058fa71c1d046af93ce975483abb645
SIZE (gnat-bootstrap.i386.freebsd.tar.bz2) = 27973176
SHA256 (gnat-bootstrap.x86_64.freebsd.tar.bz2) = c4abd6af1281785d47d99352e28e41b2a1455e25ff347eca0de5791cdede9ed8
diff --git a/lang/gcc-aux/files/diff-ada b/lang/gcc-aux/files/diff-ada
index cc2bdea0ca89..0a5d1b41b834 100644
--- a/lang/gcc-aux/files/diff-ada
+++ b/lang/gcc-aux/files/diff-ada
@@ -2228,7 +2228,7 @@
/* VxWorks Section */
/*******************/
-@@ -2416,9 +2487,13 @@
+@@ -2450,9 +2521,13 @@
initialization of the FP processor. This version is used under INTERIX
and WIN32. */
@@ -8971,14 +8971,13 @@
EH_MECHANISM=-gcc
THREADSLIB= -lpthread
GMEM_LIB = gmemlib
-@@ -1231,26 +1240,101 @@
+@@ -1231,14 +1240,21 @@
MISCLIB = -lutil
endif
--ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
+
+# FREEBSD AMD64
-+ifeq ($(strip $(filter-out x86_64 freebsd%,$(arch) $(osys))),)
+ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
+ a-exetim.adb<a-exetim-posix.adb \
+ a-exetim.ads<a-exetim-default.ads \
@@ -8996,8 +8995,7 @@
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix.adb \
-- g-trasym.adb<g-trasym-dwarf.adb \
- $(ATOMICS_TARGET_PAIRS) \
+@@ -1246,10 +1262,11 @@
$(X86_64_TARGET_PAIRS) \
system.ads<system-freebsd-x86_64.ads
@@ -9008,13 +9006,13 @@
+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
+ EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
+
-+ EH_MECHANISM=-gcc
-+ THREADSLIB= -lpthread
-+ GMEM_LIB = gmemlib
-+ LIBRARY_VERSION := $(LIB_VERSION)
-+ MISCLIB = -lutil
-+endif
-+
+ EH_MECHANISM=-gcc
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+@@ -1257,6 +1274,268 @@
+ MISCLIB = -lutil
+ endif
+
+
+# DRAGONFLY i386
+ifeq ($(strip $(filter-out %86 dragonfly%,$(arch) $(osys))),)
@@ -9076,13 +9074,13 @@
+ EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
+ EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
+
- EH_MECHANISM=-gcc
- THREADSLIB= -lpthread
- GMEM_LIB = gmemlib
-@@ -1258,6 +1342,200 @@
- MISCLIB = -lutil
- endif
-
++ EH_MECHANISM=-gcc
++ THREADSLIB= -lpthread
++ GMEM_LIB = gmemlib
++ LIBRARY_VERSION := $(LIB_VERSION)
++ MISCLIB = -lutil
++endif
++
+
+# OPENBSD i386
+ifeq ($(strip $(filter-out %86 openbsd%,$(arch) $(osys))),)
@@ -9280,15 +9278,6 @@
ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS_COMMON = \
a-intnam.ads<a-intnam-linux.ads \
-@@ -2597,7 +2875,7 @@
- $(MAKE) $(FLAGS_TO_PASS) \
- GNATLIBFLAGS="$(GNATLIBFLAGS)" \
- GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
-- GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
-+ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
- MULTISUBDIR="$(MULTISUBDIR)" \
- THREAD_KIND="$(THREAD_KIND)" \
- gnatlib
--- gnattools/configure.orig
+++ gnattools/configure
@@ -2058,7 +2058,27 @@
diff --git a/lang/gcc-aux/files/diff-core b/lang/gcc-aux/files/diff-core
index c9da30bbe455..10c21d7ba5d6 100644
--- a/lang/gcc-aux/files/diff-core
+++ b/lang/gcc-aux/files/diff-core
@@ -4,7 +4,7 @@
+release
--- gcc/config.gcc.orig
+++ gcc/config.gcc
-@@ -573,6 +573,9 @@
+@@ -581,6 +581,9 @@
"" | yes | posix)
thread_file='posix'
;;
@@ -14,7 +14,7 @@
*)
echo 'Unknown thread configuration for FreeBSD'
exit 1
-@@ -589,6 +592,26 @@
+@@ -597,6 +600,26 @@
# need_64bit_hwint=yes # system compiler has this for all arch!
use_gcc_stdint=wrap
;;
@@ -41,7 +41,7 @@
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
extra_options="$extra_options gnu-user.opt"
gas=yes
-@@ -644,6 +667,7 @@
+@@ -652,6 +675,7 @@
esac
;;
*-*-netbsd*)
@@ -49,11 +49,11 @@
tmake_file="t-slibgcc"
gas=yes
gnu_ld=yes
-@@ -885,7 +909,32 @@
- tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
- tmake_file="arm/t-arm arm/t-arm-elf"
+@@ -903,7 +927,32 @@
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
+ tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
;;
--arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
+-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+arm*-android-eabi*)
+ gas=yes
+ gnu_ld=yes
@@ -79,11 +79,11 @@
+ # Correctly modeling that requires the use of TImode.
+ need_64bit_hwint=yes
+ ;;
-+arm*-*-symbianelf* | arm*-*-rtemseabi*)
++arm*-*-symbianelf* | arm*-*-rtems*)
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
-@@ -894,11 +943,6 @@
+@@ -912,11 +961,6 @@
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
tmake_file="arm/t-arm arm/t-arm-elf"
case ${target} in
@@ -92,10 +92,10 @@
- tmake_file="${tmake_file} arm/t-bpabi"
- use_gcc_stdint=wrap
- ;;
- arm*-*-rtemseabi*)
+ arm*-*-rtems*)
tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
-@@ -1196,19 +1240,31 @@
+@@ -1216,19 +1260,31 @@
x86_64-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
;;
@@ -129,7 +129,7 @@
;;
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"
-@@ -3530,6 +3586,8 @@
+@@ -3577,6 +3633,8 @@
;;
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
@@ -768,21 +768,21 @@
enable_execute_stack=enable-execute-stack-mprotect.c
;;
i[34567]86-*-mingw* | x86_64-*-mingw*)
-@@ -354,11 +368,11 @@
+@@ -358,11 +372,11 @@
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
--arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
-+arm*-*-symbianelf* | arm*-*-rtemseabi*)
+-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
++arm*-*-symbianelf* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
tm_file="$tm_file arm/bpabi-lib.h"
case ${host} in
-- arm*-*-eabi* | arm*-*-rtemseabi*)
-+ arm*-*-rtemseabi*)
+- arm*-*-eabi* | arm*-*-rtems*)
++ arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-bpabi"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
-@@ -523,16 +537,29 @@
+@@ -526,16 +540,29 @@
x86_64-*-elf*)
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
@@ -812,7 +812,7 @@
;;
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
;;
-@@ -1160,6 +1187,7 @@
+@@ -1167,6 +1194,7 @@
i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
@@ -925,8 +925,8 @@
+#endif
+
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(TARGET_DL_ITERATE_PHDR) \
- && defined(__sun__) && defined(__svr4__)
+ && defined(__OpenBSD__)
+ # define ElfW(type) Elf_##type
--- /dev/null
+++ libgcc/config/i386/dragonfly-unwind.h
@@ -0,0 +1,158 @@
@@ -1473,7 +1473,7 @@
}
--- gcc/configure.orig
+++ gcc/configure
-@@ -26810,6 +26810,20 @@
+@@ -26902,6 +26902,20 @@
gcc_cv_target_dl_iterate_phdr=no
fi
;;
@@ -1496,7 +1496,7 @@
if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
--- gcc/Makefile.in.orig
+++ gcc/Makefile.in
-@@ -1150,7 +1150,6 @@
+@@ -1165,7 +1165,6 @@
insn-automata.o \
insn-emit.o \
insn-extract.o \
@@ -1504,7 +1504,7 @@
insn-opinit.o \
insn-output.o \
insn-peep.o \
-@@ -1469,13 +1468,18 @@
+@@ -1484,13 +1483,18 @@
ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
$(OBJS-libcommon-target) @TREEBROWSER@ main.o gccspec.o cppspec.o \
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) mips-tfile.o mips-tdump.o \
@@ -1525,7 +1525,7 @@
$(CPPLIB) $(LIBDECNUMBER)
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
-@@ -3506,6 +3510,8 @@
+@@ -3522,6 +3526,8 @@
$(TM_H) $(RTL_H) $(DIAGNOSTIC_CORE_H) insn-config.h $(RECOG_H)
insn-modes.o : insn-modes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(MACHMODE_H)
@@ -1534,7 +1534,7 @@
insn-opinit.o : insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TM_P_H) insn-config.h $(FLAGS_H) $(RECOG_H) \
$(EXPR_H) $(OPTABS_H) reload.h
-@@ -3599,6 +3605,7 @@
+@@ -3615,6 +3621,7 @@
insn-modes.c: s-modes; @true
insn-modes.h: s-modes-h; @true
@@ -1542,7 +1542,7 @@
min-insn-modes.c: s-modes-m; @true
s-modes: build/genmodes$(build_exeext)
-@@ -3616,6 +3623,12 @@
+@@ -3632,6 +3639,12 @@
$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
$(STAMP) s-modes-m
@@ -1555,7 +1555,7 @@
insn-preds.c: s-preds; @true
tm-preds.h: s-preds-h; @true
tm-constrs.h: s-constrs-h; @true
-@@ -4378,7 +4391,7 @@
+@@ -4394,7 +4407,7 @@
DESTDIR=$(@D) \
$(SHELL) $(srcdir)/doc/install.texi2html
@@ -1564,7 +1564,7 @@
generated-manpages: man
-@@ -4530,7 +4543,7 @@
+@@ -4546,7 +4559,7 @@
# Install the driver last so that the window when things are
# broken is small.
install: install-common $(INSTALL_HEADERS) \
@@ -1573,7 +1573,7 @@
install-driver install-lto-wrapper install-gcc-ar
ifeq ($(enable_plugin),yes)
-@@ -4655,6 +4668,9 @@
+@@ -4671,6 +4684,9 @@
-rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
-( cd $(DESTDIR)$(bindir) && \
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
@@ -1583,7 +1583,7 @@
-if [ -f gcc-cross$(exeext) ] ; then \
if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
-@@ -4728,10 +4744,7 @@
+@@ -4744,10 +4760,7 @@
install-man: lang.install-man \
$(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) \
$(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext) \
@@ -1597,7 +1597,7 @@
-rm -f $@
--- configure.orig
+++ configure
-@@ -14412,7 +14412,7 @@
+@@ -14419,7 +14419,7 @@
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
diff --git a/lang/gcc-aux/files/diff-cxx b/lang/gcc-aux/files/diff-cxx
index 8a0cd904a570..9eafda5c6028 100644
--- a/lang/gcc-aux/files/diff-cxx
+++ b/lang/gcc-aux/files/diff-cxx
@@ -44,7 +44,7 @@
--- libstdc++-v3/configure.orig
+++ libstdc++-v3/configure
-@@ -15704,7 +15704,7 @@
+@@ -15738,7 +15738,7 @@
if test "${enable_clocale+set}" = set; then :
enableval=$enable_clocale;
case "$enableval" in
@@ -53,7 +53,7 @@
*) as_fn_error "Unknown argument to enable/disable clocale" "$LINENO" 5 ;;
esac
-@@ -15742,6 +15742,9 @@
+@@ -15776,6 +15776,9 @@
darwin* | freebsd*)
enable_clocale_flag=darwin
;;
@@ -63,7 +63,7 @@
*)
if test x"$with_newlib" = x"yes"; then
enable_clocale_flag=newlib
-@@ -15883,7 +15886,23 @@
+@@ -15917,7 +15920,23 @@
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -622,7 +622,7 @@
+ struct ctype_base
+ {
+ // Non-standard typedefs.
-+ typedef const unsigned char* __to_type;
++ 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.
@@ -746,7 +746,7 @@
+} // namespace
--- /dev/null
+++ libstdc++-v3/config/os/bsd/dragonfly/ctype_inline.h
-@@ -0,0 +1,127 @@
+@@ -0,0 +1,161 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2003, 2004, 2005, 2009, 2010
@@ -791,14 +791,38 @@
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
-+ { return _M_table[(unsigned char)(__c)] & __m; }
++ {
++ if (_M_table)
++ return _M_table[static_cast<unsigned char>(__c)] & __m;
++ else
++ return __libc_ctype_ [__c + 1] & __m;
++ }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
-+ while (__low < __high)
-+ *__vec++ = _M_table[*__low++];
++ if (_M_table)
++ while (__low < __high)
++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
++ else
++ for (;__low < __high; ++__vec, ++__low)
++ {
++ 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;
++ }
+ return __high;
+ }
+
@@ -806,8 +830,13 @@
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
-+ while (__low < __high && !this->is(__m, *__low))
-+ ++__low;
++ 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;
+ }
+
@@ -815,8 +844,13 @@
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
-+ while (__low < __high && this->is(__m, *__low) != 0)
-+ ++__low;
++ 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;
+ }
+
diff --git a/lang/gcc-aux/files/diff-cxx-testsuite b/lang/gcc-aux/files/diff-cxx-testsuite
index 2cfcf6980a99..53d3e42bb362 100644
--- a/lang/gcc-aux/files/diff-cxx-testsuite
+++ b/lang/gcc-aux/files/diff-cxx-testsuite
@@ -508,20 +508,9 @@
// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
// { dg-require-cstdint "" }
---- libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc.orig
-+++ libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc
-@@ -1,5 +1,5 @@
--// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
--// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
-+// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
- // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
- // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
- // { dg-require-cstdint "" }
--- libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc.orig
+++ libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc
-@@ -1,5 +1,5 @@
--// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+@@ -1,5 +1,5 @@-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+// { dg-do run { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-dragonfly* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }