From owner-svn-ports-head@FreeBSD.ORG Sun Mar 9 18:15:14 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9300B519; Sun, 9 Mar 2014 18:15:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E270663; Sun, 9 Mar 2014 18:15:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s29IFEPj084858; Sun, 9 Mar 2014 18:15:14 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s29IFD27084851; Sun, 9 Mar 2014 18:15:13 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201403091815.s29IFD27084851@svn.freebsd.org> From: John Marino Date: Sun, 9 Mar 2014 18:15:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r347679 - in head/lang: . gcc47-aux gcc47-aux/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 18:15:14 -0000 Author: marino Date: Sun Mar 9 18:15:13 2014 New Revision: 347679 URL: http://svnweb.freebsd.org/changeset/ports/347679 QAT: https://qat.redports.org/buildarchive/r347679/ Log: Duplicate port lang/gcc-aux => lang/gcc47-aux A new version of the Ada compiler is coming imminently. Not all ports will immediately build with the gcc49-based compiler, so a few ports will be directed to use the current compiler in this new location instead. It will require a change in Uses/ada.mk (upcoming). Some ports will require updates to use upcoming lang/gcc-aux version. The last set of ports that will be converted is likely the gnatdroid ports as these will require a lot of time running testsuites, which takes some time wirelessly on the Android target. Added: head/lang/gcc47-aux/ head/lang/gcc47-aux/Makefile (contents, props changed) head/lang/gcc47-aux/Makefile.common (contents, props changed) head/lang/gcc47-aux/Makefile.version (contents, props changed) head/lang/gcc47-aux/distinfo (contents, props changed) head/lang/gcc47-aux/files/ head/lang/gcc47-aux/files/diff-ada (contents, props changed) head/lang/gcc47-aux/files/diff-ada-testsuite (contents, props changed) head/lang/gcc47-aux/files/diff-core (contents, props changed) head/lang/gcc47-aux/files/diff-cxx (contents, props changed) head/lang/gcc47-aux/files/diff-cxx-testsuite (contents, props changed) head/lang/gcc47-aux/files/diff-fortran (contents, props changed) head/lang/gcc47-aux/files/diff-fortran-testsuite (contents, props changed) head/lang/gcc47-aux/files/diff-gcc-testsuite (contents, props changed) head/lang/gcc47-aux/files/diff-static-version (contents, props changed) head/lang/gcc47-aux/pkg-descr (contents, props changed) Modified: head/lang/Makefile Modified: head/lang/Makefile ============================================================================== --- head/lang/Makefile Sun Mar 9 18:14:50 2014 (r347678) +++ head/lang/Makefile Sun Mar 9 18:15:13 2014 (r347679) @@ -88,6 +88,7 @@ SUBDIR += gcc-ecj45 SUBDIR += gcc46 SUBDIR += gcc47 + SUBDIR += gcc47-aux SUBDIR += gcc48 SUBDIR += gcc49 SUBDIR += gcl Added: head/lang/gcc47-aux/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc47-aux/Makefile Sun Mar 9 18:15:13 2014 (r347679) @@ -0,0 +1,305 @@ +# Created by: John Marino +# $FreeBSD$ + +PORTNAME= gcc47-aux +PORTVERSION= ${SNAPSHOT} +PORTREVISION= 4 +CATEGORIES= lang +MASTER_SITES= http://downloads.dragonlace.net/src/:boot \ + ${MASTER_SITE_GCC} +MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION} +DISTFILES= gcc-${GCC_VERSION}.tar.bz2 + +MAINTAINER= marino@FreeBSD.org +COMMENT= Version of GCC ${GCC_BRANCH} with full Ada support + +LICENSE= GPLv3 GPLv3RLE +LICENSE_COMB= multi + +.include "${.CURDIR}/Makefile.common" + +LANGS= c +APPLY_DIFFS= core +INTENDED_COMPILER= NATIVE +BOOTSTRAP_COMPILER= NOT_REQUIRED +BOOTSTRAP_TRIPLET= NOT_SET +FULL_GNATGCC= NOT_SET +OS_LABEL4VERS= [${OPSYS}] +GARCH= ${ARCH:S/amd64/x86_64/} +NO_LICENSES_INSTALL= yes +NO_MTREE= yes + +OPTIONS_DEFINE= ADA CXX FORT OBJC STATIC TESTSUITE NLS +OPTIONS_DEFAULT= ADA CXX FORT OBJC +NO_OPTIONS_SORT= yes + +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 + +.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 +. else +BOOTSTRAP_TRIPLET= i386-bootstrap-freebsd8.0/4.6.0 +. 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 +CFG_SCRIPT= ${WRKSRC}/configure +REVFILE= ${WRKSRC}/gcc/REVISION +BOOTSTRAP_PREFIX= ${WRKDIR}/bootstrap +PKG_PREFIX= ${PREFIX}/${PORTNAME} +STICONV= ${PREFIX}/lib/libiconv.a +STINTL= \$${top_builddir}/../intl/libintl.a +AWKMANPAGE= '{if ($$0 ~ /^man\/man[1-9]\/.+[1-9]$$/) print $$0 ".gz"; else print $$0}' + +# 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_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/gnatgcc +FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/bin +DISTFILES+= ${BOOTSTRAP_COMPILER}:boot +.if ${OPSYS} == DragonFly && ${DFLYVERSION} > 300500 +BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libc.so.7:${PORTSDIR}/misc/compat34x +.endif +.endif + +# 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 + +########### +## Ada ## +########### + +.if ${PORT_OPTIONS:MADA} +LANGS+= ada +APPLY_DIFFS+= ada +.endif + +########### +## C++ ## +########### + +.if ${PORT_OPTIONS:MCXX} +LANGS+= c++ +APPLY_DIFFS+= cxx +.endif + +############### +## Fortran ## +############### + +.if ${PORT_OPTIONS:MFORT} +LANGS+= fortran +APPLY_DIFFS+= fortran +EXTRA_CONFIG+= --enable-libquadmath +.else +EXTRA_CONFIG+= --disable-libquadmath +.endif + +################### +## Objective-C ## +################### + +.if ${PORT_OPTIONS:MOBJC} +LANGS+= objc +.endif + +######################### +## Testsuite Support ## +######################### + +.if ${PORT_OPTIONS:MTESTSUITE} +BUILD_DEPENDS+= dejagnu>=1.4:${PORTSDIR}/misc/dejagnu +APPLY_DIFFS+= ada-testsuite +APPLY_DIFFS+= fortran-testsuite +APPLY_DIFFS+= cxx-testsuite +APPLY_DIFFS+= gcc-testsuite +.endif + +################################# +## NATIONAL LANGUAGE SUPPORT ## +################################# + +.if ${PORT_OPTIONS:MNLS} +USES+= gettext:build +EXTRA_CONFIG+= --enable-nls +.else +EXTRA_CONFIG+= --disable-nls +.endif + +############################### +## STATICALLY BUILT OPTION ## +############################### +# +# The "static" option is handled in the post-extract phase. + +# Establish Ada-aware compiler for use +ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC} +ADA_CONFIGURE_ENV+= PATH=${FULL_PATH} +ADA_MAKE_ENV= PATH=${FULL_PATH} +ADA_MAKE_ENV+= ICONVPREFIX=${PREFIX} +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-bootstrap +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 +.if ${PORT_OPTIONS:MCXX} + ${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly + ${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly +.endif + + # 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 + + # Update LINK_SPEC to add gcc47-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 ${PORT_OPTIONS:MSTATIC} + @${ECHO} "Reconfiguring GCC Makefile to build compiler statically" + @${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-static-version +.if ${PORT_OPTIONS:MNLS} + @${REINPLACE_CMD} -e 's;\@LIBINTL\@;${STINTL} ${STICONV};' \ + ${WRKSRC}/intl/config.intl.in + @${REINPLACE_CMD} -e 's;\@LIBICONV\@;;' \ + ${WRKSRC}/gcc/Makefile.in \ + ${WRKSRC}/libcpp/Makefile.in \ + ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in +.else + @${REINPLACE_CMD} -e 's;\@LIBICONV\@;${STICONV};' \ + ${WRKSRC}/gcc/Makefile.in \ + ${WRKSRC}/libcpp/Makefile.in \ + ${WRKSRC}/gcc/ada/gcc-interface/Makefile.in +.endif +.endif + +.if ${INTENDED_COMPILER} == BOOTSTRAP + ${MKDIR} ${BOOTSTRAP_PREFIX} + ${MV} ${BOOTSTRAP_PREFIX}/../bin ${BOOTSTRAP_PREFIX} + ${MV} ${BOOTSTRAP_PREFIX}/../lib ${BOOTSTRAP_PREFIX} + ${MV} ${BOOTSTRAP_PREFIX}/../libexec ${BOOTSTRAP_PREFIX} + + # 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. + + ${RM} -rf ${BOOTSTRAP_PREFIX}/lib/gcc/${BOOTSTRAP_TRIPLET}/include-fixed +.endif + +do-configure: + ${MKDIR} ${BUILDDIR} + cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \ + ${CFG_SCRIPT} ${ADA_CONFIG_ARGS} + +do-build: + cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -j${MAKE_JOBS_NUMBER} all + +test: build test-ada test-fortran test-objc test-cxx test-c + +test-ada: +.if ${PORT_OPTIONS:MADA} && ${PORT_OPTIONS:MTESTSUITE} + cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-ada +.endif + +test-fortran: +.if ${PORT_OPTIONS:MFORT} && ${PORT_OPTIONS:MTESTSUITE} + cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-fortran +.endif + +test-objc: +.if ${PORT_OPTIONS:MOBJC} && ${PORT_OPTIONS:MTESTSUITE} + cd ${BUILDDIR} && ${SETENV} ${ADA_MAKE_ENV} ${GMAKE} -sk check-objc +.endif + +test-cxx: +.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 ${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=${STAGEDIR} + +post-install: + ${MV} ${STAGEDIR}${PKG_PREFIX}/share/man ${STAGEDIR}/${PKG_PREFIX} + cd ${STAGEDIR}${PKG_PREFIX}; ${FIND} * -type d -empty | \ + ${SORT} -dr | ${XARGS} ${RMDIR} + cd ${STAGEDIR}${PREFIX}; ${FIND} ${PORTNAME} \( -type f -or -type l \) | \ + ${AWK} ${AWKMANPAGE} | ${SORT} >> ${TMPPLIST} + cd ${STAGEDIR}${PREFIX}; ${FIND} ${PORTNAME} -type d | ${SORT} -r | \ + ${SED} -E -e 's/^/@dirrm /g' >> ${TMPPLIST} + +.include Added: head/lang/gcc47-aux/Makefile.common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc47-aux/Makefile.common Sun Mar 9 18:15:13 2014 (r347679) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include "${.CURDIR}/Makefile.version" + +LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp +LIB_DEPENDS+= libmpfr.so:${PORTSDIR}/math/mpfr +LIB_DEPENDS+= libmpc.so:${PORTSDIR}/math/mpc + +ONLY_FOR_ARCHS= i386 amd64 + +GNU_CONFIGURE= yes +USE_BZIP2= yes +USES= iconv gmake perl5 +USE_PERL5= build +ALL_TARGET= default Added: head/lang/gcc47-aux/Makefile.version ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc47-aux/Makefile.version Sun Mar 9 18:15:13 2014 (r347679) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +GCC_BRANCH= 4.7 +GCC_POINT= 3 +GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} +SNAPSHOT= 20130411 Added: head/lang/gcc47-aux/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc47-aux/distinfo Sun Mar 9 18:15:13 2014 (r347679) @@ -0,0 +1,10 @@ +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 +SIZE (gnat-bootstrap.x86_64.freebsd.tar.bz2) = 31565201 Added: head/lang/gcc47-aux/files/diff-ada ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc47-aux/files/diff-ada Sun Mar 9 18:15:13 2014 (r347679) @@ -0,0 +1,9620 @@ +--- gcc/ada/a-exetim-posix.adb.orig ++++ gcc/ada/a-exetim-posix.adb +@@ -106,11 +106,11 @@ + -- Time is equal to Duration (although it is a private type) and + -- CPU_Time is equal to Time. + +- function clock_gettime ++ function clock_gettime_int + (clock_id : Interfaces.C.int; + tp : access timespec) + return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime_int, "clock_gettime"); + -- Function from the POSIX.1b Realtime Extensions library + + begin +@@ -118,7 +118,7 @@ + raise Program_Error; + end if; + +- Result := clock_gettime ++ Result := clock_gettime_int + (clock_id => CLOCK_THREAD_CPUTIME_ID, tp => TS'Unchecked_Access); + pragma Assert (Result = 0); + +--- /dev/null ++++ gcc/ada/a-intnam-dragonfly.ads +@@ -0,0 +1,136 @@ ++------------------------------------------------------------------------------ ++-- -- ++-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- ++-- -- ++-- A D A . I N T E R R U P T S . N A M E S -- ++-- -- ++-- S p e c -- ++-- -- ++-- Copyright (C) 1991-2011, Free Software Foundation, Inc. -- ++-- -- ++-- GNARL is free software; you can redistribute it and/or modify it under -- ++-- terms of the GNU General Public License as published by the Free Soft- -- ++-- ware Foundation; either version 3, or (at your option) any later ver- -- ++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- ++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- ++-- or FITNESS FOR A PARTICULAR PURPOSE. -- ++-- -- ++-- As a special exception under Section 7 of GPL version 3, you are granted -- ++-- additional permissions described in the GCC Runtime Library Exception, -- ++-- version 3.1, as published by the Free Software Foundation. -- ++-- -- ++-- You should have received a copy of the GNU General Public License and -- ++-- a copy of the GCC Runtime Library Exception along with this program; -- ++-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- ++-- . -- ++-- -- ++-- 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; +--- /dev/null ++++ gcc/ada/a-intnam-netbsd.ads +@@ -0,0 +1,139 @@ ++------------------------------------------------------------------------------ ++-- -- ++-- 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 -- ++-- . -- ++-- -- ++-- GNARL was developed by the GNARL team at Florida State University. -- ++-- Extensive contributions were provided by Ada Core Technologies, Inc. -- ++-- -- ++------------------------------------------------------------------------------ ++ ++-- This is the NetBSD 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 ++ ++ SIGPWR : constant Interrupt_ID := ++ System.OS_Interface.SIGPWR; -- power fail/restart ++ ++end Ada.Interrupts.Names; +--- /dev/null ++++ gcc/ada/a-intnam-openbsd.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 -- ++-- . -- ++-- -- ++-- GNARL was developed by the GNARL team at Florida State University. -- ++-- Extensive contributions were provided by Ada Core Technologies, Inc. -- ++-- -- ++------------------------------------------------------------------------------ ++ ++-- This is the OpenBSD 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 +@@ -1077,6 +1077,7 @@ + strcpy (path, "GNAT-XXXXXX"); + + #if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \ ++ || defined (__DragonFly__) \ + || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks) + return mkstemp (path); + #elif defined (__Lynx__) +@@ -1227,7 +1228,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) ++ strcpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX"); ++ else ++ sprintf (tmp_filename, "%s/local/tmp/gnat-XXXXXX", datadir); ++ ++ testfd = mkstemp (tmp_filename); ++ if (testfd != -1) ++ { ++ close (testfd); ++ return; ++ } ++ ++ char *sdcard = getenv ("EXTERNAL_STORAGE"); ++ ++ if (sdcard == NULL) ++ strcpy (tmp_filename, "/sdcard/gnat-XXXXXX"); ++ else ++ sprintf (tmp_filename, "%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"); +@@ -2468,6 +2511,8 @@ + int cores = 1; + + #if defined (linux) || defined (sun) || defined (AIX) \ ++ || defined (__FreeBSD__) || defined (__DragonFly__) \ ++ || defined (__OpenBSD__) || defined (__NetBSD__) \ + || (defined (__alpha__) && defined (_osf_)) || defined (__APPLE__) + cores = (int) sysconf (_SC_NPROCESSORS_ONLN); + +@@ -3530,37 +3575,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 (__alpha__) && defined (__osf__)) \ +- && ! defined (VMS) \ +- && ! defined (__MINGW32__) \ +- && ! (defined (__mips) && defined (__sgi))) +- +-/* 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 +@@ -3864,6 +3878,17 @@ + CPU_SET (cpu - 1, set); + } + #endif ++ ++#ifdef __ANDROID__ ++/* No-op, Android doesn't support pthread_rwlockattr_setkind_np, but we want ++ to use the s-taprop-linux.ads without modification */ ++int __gnat_set_threadlock_kind (pthread_rwlockattr_t *attr ATTRIBUTE_UNUSED, ++ int pref ATTRIBUTE_UNUSED) ++{ ++ return 0; ++} ++#endif ++ + #endif + + #ifdef __cplusplus +--- gcc/ada/adaint.h.orig ++++ gcc/ada/adaint.h +@@ -257,6 +257,20 @@ + + #include + ++#ifdef __ANDROID__ ++struct pthread_rwlockattr; ++typedef struct pthread_rwlockattr *pthread_rwlockattr_t; ++typedef struct { ++ unsigned long int __bits[ 1 ]; ++} cpu_set_t; ++# define __CPU_MASK(x) ((unsigned long int)1 << ((x) & 31)) ++# define CPU_ZERO(set_) do { (set_)->__bits[0] = 0; } while(0) ++# define CPU_SET(cpu_,set_) \ ++ do { size_t __cpu = (cpu_); \ ++ if (__cpu < 32) (set_)->__bits[0] |= __CPU_MASK(__cpu); } while (0) ++int __gnat_set_threadlock_kind (pthread_rwlockattr_t *, int); ++#endif ++ + extern cpu_set_t *__gnat_cpu_alloc (size_t); + extern size_t __gnat_cpu_alloc_size (size_t); + extern void __gnat_cpu_free (cpu_set_t *); +--- gcc/ada/cio.c.orig ++++ gcc/ada/cio.c +@@ -46,7 +46,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 + #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,10 @@ + *p = '\\'; + } + +-#elif defined (sgi) || defined (__FreeBSD__) ++#elif defined (sgi) \ ++ || 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 +@@ -188,7 +188,9 @@ + LIB$SIGNAL (status); + } + +-#elif (defined (__vxworks) && defined (__RTP__)) || defined (__APPLE__) ++#elif (defined (__vxworks) && defined (__RTP__)) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***