Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Dec 2015 16:04:22 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r403127 - in head/lang: . gcc6-aux gcc6-aux/files
Message-ID:  <201512061604.tB6G4MN2043621@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sun Dec  6 16:04:22 2015
New Revision: 403127
URL: https://svnweb.freebsd.org/changeset/ports/403127

Log:
  Add new port lang/gcc6-aux
  
  This will be the successor to lang/gcc5-aux.  GCC6 is still in development
  although the Ada front end is generally stable.  Once gcc6-aux is released,
  the lang/gcc-aux port will likely be removed.  For that to happen, the
  gnatdroid compilers need to move from it to gcc5-aux or gcc6-aux.  The
  Ada framework will also move to gcc6-aux by default as well.

Added:
  head/lang/gcc6-aux/
     - copied from r403116, head/lang/gcc5-aux/
Deleted:
  head/lang/gcc6-aux/files/diff-cxx-testsuite
Modified:
  head/lang/Makefile
  head/lang/gcc6-aux/Makefile
  head/lang/gcc6-aux/Makefile.common
  head/lang/gcc6-aux/Makefile.version
  head/lang/gcc6-aux/distinfo
  head/lang/gcc6-aux/files/diff-ada
  head/lang/gcc6-aux/files/diff-ada-testsuite
  head/lang/gcc6-aux/files/diff-core
  head/lang/gcc6-aux/files/diff-cxx

Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile	Sun Dec  6 16:02:15 2015	(r403126)
+++ head/lang/Makefile	Sun Dec  6 16:04:22 2015	(r403127)
@@ -101,6 +101,7 @@
     SUBDIR += gcc5
     SUBDIR += gcc5-aux
     SUBDIR += gcc5-devel
+    SUBDIR += gcc6-aux
     SUBDIR += gcc6-devel
     SUBDIR += gcl
     SUBDIR += gforth

Modified: head/lang/gcc6-aux/Makefile
==============================================================================
--- head/lang/gcc5-aux/Makefile	Sun Dec  6 14:52:27 2015	(r403116)
+++ head/lang/gcc6-aux/Makefile	Sun Dec  6 16:04:22 2015	(r403127)
@@ -1,7 +1,7 @@
 # Created by: John Marino <marino@FreeBSD.org>
 # $FreeBSD$
 
-PORTNAME=	gcc5-aux
+PORTNAME=	gcc6-aux
 PORTVERSION=	${SNAPSHOT}
 PORTREVISION=	${MAIN_PR}
 CATEGORIES=	lang
@@ -115,7 +115,6 @@ DISTFILES=	\
 
 .if ${PORT_OPTIONS:MFORT} && !${PORT_OPTIONS:MBOOTSTRAP}
 LANGS+=		fortran
-#APPLY_DIFFS+=	fortran
 EXTRA_CONFIG+=	--enable-libquadmath
 .else
 EXTRA_CONFIG+=	--disable-libquadmath
@@ -128,7 +127,6 @@ LANGS+=		objc
 .if ${PORT_OPTIONS:MTESTSUITE} && !${PORT_OPTIONS:MBOOTSTRAP}
 BUILD_DEPENDS+=	dejagnu>=1.4:${PORTSDIR}/misc/dejagnu
 APPLY_DIFFS+=	ada-testsuite
-APPLY_DIFFS+=	cxx-testsuite
 APPLY_DIFFS+=	gcc-testsuite
 .endif
 
@@ -196,15 +194,6 @@ post-extract:
 	@${ECHO} "Applying composite patch diff-${suffix}"
 	@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
 .endfor
-	# Try to test more locale stuff than stock GCC
-	@(cd ${WRKSRC}/libstdc++-v3/testsuite/22_locale && ${REINPLACE_CMD} \
-		-e 's|ISO-8859|ISO8859|g' \
-		-e 's|ja_JP.eucjp|ja_JP.eucJP|g' \
-		-e 's|en_HK|zh_HK|g' \
-		-e 's|en_PH|en_NZ|g' \
-		-e 's|se_NO|no_NO|g' \
-		-e 's|es_MX|es_ES|g' \
-		-e 's|ru_RU.UTF8|ru_RU.UTF-8|g' ${LOCALE22FIX})
 .if ${PORT_OPTIONS:MSTATIC} || ${PORT_OPTIONS:MBOOTSTRAP}
 	# Ensure GNAT tools are built statically
 	${REINPLACE_CMD} -e 's/^GCC_LINK_FLAGS=.*/GCC_LINK_FLAGS=-static/' \

Modified: head/lang/gcc6-aux/Makefile.common
==============================================================================
--- head/lang/gcc5-aux/Makefile.common	Sun Dec  6 14:52:27 2015	(r403116)
+++ head/lang/gcc6-aux/Makefile.common	Sun Dec  6 16:04:22 2015	(r403127)
@@ -12,132 +12,3 @@ GNU_CONFIGURE=		yes
 USES=			gmake libtool perl5 tar:bzip2
 USE_PERL5=		build
 ALL_TARGET=		default
-
-LOCALE22FIX= \
-	codecvt/always_noconv/char/wrapped_locale.cc \
-	codecvt/always_noconv/wchar_t/2.cc \
-	codecvt/always_noconv/wchar_t/3.cc \
-	codecvt/always_noconv/wchar_t/wrapped_locale.cc \
-	codecvt/encoding/char/wrapped_locale.cc \
-	codecvt/encoding/wchar_t/2.cc \
-	codecvt/encoding/wchar_t/3.cc \
-	codecvt/encoding/wchar_t/wrapped_locale.cc \
-	codecvt/in/char/wrapped_locale.cc \
-	codecvt/in/wchar_t/2.cc \
-	codecvt/in/wchar_t/3.cc \
-	codecvt/in/wchar_t/wrapped_locale.cc \
-	codecvt/length/char/wrapped_locale.cc \
-	codecvt/length/wchar_t/2.cc \
-	codecvt/length/wchar_t/3.cc \
-	codecvt/length/wchar_t/wrapped_locale.cc \
-	codecvt/max_length/char/wrapped_locale.cc \
-	codecvt/max_length/wchar_t/2.cc \
-	codecvt/max_length/wchar_t/3.cc \
-	codecvt/max_length/wchar_t/wrapped_locale.cc \
-	codecvt/out/char/wrapped_locale.cc \
-	codecvt/out/wchar_t/2.cc \
-	codecvt/out/wchar_t/3.cc \
-	codecvt/out/wchar_t/7.cc \
-	codecvt/out/wchar_t/wrapped_locale.cc \
-	codecvt/unshift/char/wrapped_locale.cc \
-	codecvt/unshift/wchar_t/2.cc \
-	codecvt/unshift/wchar_t/3.cc \
-	codecvt/unshift/wchar_t/wrapped_locale.cc \
-	collate/compare/char/wrapped_locale.cc \
-	collate/compare/wchar_t/wrapped_locale.cc \
-	collate/hash/char/wrapped_locale.cc \
-	collate/hash/wchar_t/wrapped_locale.cc \
-	collate/transform/char/wrapped_locale.cc \
-	collate/transform/wchar_t/wrapped_locale.cc \
-	ctype/cons/char/wrapped_locale.cc \
-	ctype/is/char/wrapped_locale.cc \
-	ctype/is/wchar_t/wrapped_locale.cc \
-	ctype/narrow/char/wrapped_locale.cc \
-	ctype/narrow/wchar_t/3.cc \
-	ctype/narrow/wchar_t/wrapped_locale.cc \
-	ctype/scan/char/wrapped_locale.cc \
-	ctype/scan/wchar_t/wrapped_locale.cc \
-	ctype/to/char/wrapped_locale.cc \
-	ctype/to/wchar_t/wrapped_locale.cc \
-	ctype/widen/char/wrapped_locale.cc \
-	ctype/widen/wchar_t/2.cc \
-	ctype/widen/wchar_t/3.cc \
-	ctype/widen/wchar_t/wrapped_locale.cc \
-	facet/2.cc \
-	locale/cons/40184.cc \
-	locale/cons/5.cc \
-	locale/cons/unicode.cc \
-	locale/global_locale_objects/2.cc \
-	messages/members/char/wrapped_locale.cc \
-	money_get/get/char/16.cc \
-	money_get/get/char/18.cc \
-	money_get/get/char/2.cc \
-	money_get/get/char/4.cc \
-	money_get/get/char/wrapped_env.cc \
-	money_get/get/char/wrapped_locale.cc \
-	money_get/get/wchar_t/16.cc \
-	money_get/get/wchar_t/18.cc \
-	money_get/get/wchar_t/2.cc \
-	money_get/get/wchar_t/4.cc \
-	money_get/get/wchar_t/wrapped_env.cc \
-	money_get/get/wchar_t/wrapped_locale.cc \
-	money_put/put/char/2.cc \
-	money_put/put/char/wrapped_env.cc \
-	money_put/put/char/wrapped_locale.cc \
-	money_put/put/wchar_t/2.cc \
-	money_put/put/wchar_t/wrapped_env.cc \
-	money_put/put/wchar_t/wrapped_locale.cc \
-	moneypunct/members/char/wrapped_locale.cc \
-	moneypunct/members/wchar_t/wrapped_locale.cc \
-	num_get/get/char/3.cc \
-	num_get/get/char/wrapped_env.cc \
-	num_get/get/char/wrapped_locale.cc \
-	num_get/get/wchar_t/3.cc \
-	num_get/get/wchar_t/wrapped_env.cc \
-	num_get/get/wchar_t/wrapped_locale.cc \
-	num_put/put/char/3.cc \
-	num_put/put/char/wrapped_env.cc \
-	num_put/put/char/wrapped_locale.cc \
-	num_put/put/wchar_t/3.cc \
-	num_put/put/wchar_t/wrapped_env.cc \
-	num_put/put/wchar_t/wrapped_locale.cc \
-	numpunct/members/char/wrapped_locale.cc \
-	numpunct/members/wchar_t/wrapped_locale.cc \
-	time_get/date_order/char/wrapped_locale.cc \
-	time_get/date_order/wchar_t/wrapped_locale.cc \
-	time_get/get_date/char/2.cc \
-	time_get/get_date/char/wrapped_env.cc \
-	time_get/get_date/char/wrapped_locale.cc \
-	time_get/get_date/wchar_t/2.cc \
-	time_get/get_date/wchar_t/wrapped_env.cc \
-	time_get/get_date/wchar_t/wrapped_locale.cc \
-	time_get/get_monthname/char/2.cc \
-	time_get/get_monthname/char/wrapped_env.cc \
-	time_get/get_monthname/char/wrapped_locale.cc \
-	time_get/get_monthname/wchar_t/2.cc \
-	time_get/get_monthname/wchar_t/wrapped_env.cc \
-	time_get/get_monthname/wchar_t/wrapped_locale.cc \
-	time_get/get_time/char/2.cc \
-	time_get/get_time/char/wrapped_env.cc \
-	time_get/get_time/char/wrapped_locale.cc \
-	time_get/get_time/wchar_t/2.cc \
-	time_get/get_time/wchar_t/wrapped_env.cc \
-	time_get/get_time/wchar_t/wrapped_locale.cc \
-	time_get/get_weekday/char/2.cc \
-	time_get/get_weekday/char/38081-1.cc \
-	time_get/get_weekday/char/38081-2.cc \
-	time_get/get_weekday/char/wrapped_env.cc \
-	time_get/get_weekday/char/wrapped_locale.cc \
-	time_get/get_weekday/wchar_t/2.cc \
-	time_get/get_weekday/wchar_t/wrapped_env.cc \
-	time_get/get_weekday/wchar_t/wrapped_locale.cc \
-	time_get/get_year/char/wrapped_locale.cc \
-	time_get/get_year/wchar_t/wrapped_locale.cc \
-	time_put/put/char/3.cc \
-	time_put/put/char/7.cc \
-	time_put/put/char/wrapped_env.cc \
-	time_put/put/char/wrapped_locale.cc \
-	time_put/put/wchar_t/3.cc \
-	time_put/put/wchar_t/7.cc \
-	time_put/put/wchar_t/wrapped_env.cc \
-	time_put/put/wchar_t/wrapped_locale.cc

Modified: head/lang/gcc6-aux/Makefile.version
==============================================================================
--- head/lang/gcc5-aux/Makefile.version	Sun Dec  6 14:52:27 2015	(r403116)
+++ head/lang/gcc6-aux/Makefile.version	Sun Dec  6 16:04:22 2015	(r403127)
@@ -1,14 +1,13 @@
 # $FreeBSD$
 
-GCC_BRANCH=		5
-GCC_POINT=		3.0
+GCC_BRANCH=		6
+GCC_POINT=		0.0
 GCC_VERSION=		${GCC_BRANCH}.${GCC_POINT}
-SNAPSHOT=		20151204
-BUILD_RELEASE=		yes
+SNAPSHOT=		20151129
+BUILD_RELEASE=		no
 MAIN_PR=		0
 UTIL_PR=		0
 ARMV7_PR=		0
-X86_PR=			0
 
 .if ${BUILD_RELEASE:Mno}
 # Snapshot naming pattern

Modified: head/lang/gcc6-aux/distinfo
==============================================================================
--- head/lang/gcc5-aux/distinfo	Sun Dec  6 14:52:27 2015	(r403116)
+++ head/lang/gcc6-aux/distinfo	Sun Dec  6 16:04:22 2015	(r403127)
@@ -1,5 +1,5 @@
-SHA256 (gcc-5.3.0.tar.bz2) = b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db
-SIZE (gcc-5.3.0.tar.bz2) = 95441837
+SHA256 (gcc-6-20151129.tar.bz2) = 9fc70384a69ced8d3014d1182d874c9376fdaaa5d2bb4adb47a0df35a81e3834
+SIZE (gcc-6-20151129.tar.bz2) = 93779686
 SHA256 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 7231209f2600275f554f788ad1d036cf633c4339ebd25bd479a5bb1ddcddedf3
 SIZE (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 41229192
 SHA256 (ada-bootstrap.x86_64.dragonfly.41.tar.bz2) = eb7785d8b842aee2bb04b43adfb1346b178ee4e83d8775b4e6705fd23f1586f0

Modified: head/lang/gcc6-aux/files/diff-ada
==============================================================================
--- head/lang/gcc5-aux/files/diff-ada	Sun Dec  6 14:52:27 2015	(r403116)
+++ head/lang/gcc6-aux/files/diff-ada	Sun Dec  6 16:04:22 2015	(r403127)
@@ -1,187 +1,6 @@
---- /dev/null
-+++ gcc/ada/a-intnam-dragonfly.ads
-@@ -0,0 +1,136 @@
-+------------------------------------------------------------------------------
-+--                                                                          --
-+--                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
-+--                                                                          --
-+--                   A D A . I N T E R R U P T S . N A M E S                --
-+--                                                                          --
-+--                                  S p e c                                 --
-+--                                                                          --
-+--          Copyright (C) 1991-2011, Free Software Foundation, Inc.         --
-+--                                                                          --
-+-- GNARL is free software; you can  redistribute it  and/or modify it under --
-+-- terms of the  GNU General Public License as published  by the Free Soft- --
-+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
-+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
-+--                                                                          --
-+-- As a special exception under Section 7 of GPL version 3, you are granted --
-+-- additional permissions described in the GCC Runtime Library Exception,   --
-+-- version 3.1, as published by the Free Software Foundation.               --
-+--                                                                          --
-+-- You should have received a copy of the GNU General Public License and    --
-+-- a copy of the GCC Runtime Library Exception along with this program;     --
-+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-+-- <http://www.gnu.org/licenses/>.                                          --
-+--                                                                          --
-+-- GNARL was developed by the GNARL team at Florida State University.       --
-+-- Extensive contributions were provided by Ada Core Technologies, Inc.     --
-+--                                                                          --
-+------------------------------------------------------------------------------
-+
-+--  This is the DragonFly BSD THREADS version of this package
-+
-+with System.OS_Interface;
-+
-+package Ada.Interrupts.Names is
-+
-+   --  All identifiers in this unit are implementation defined
-+
-+   pragma Implementation_Defined;
-+
-+   --  Beware that the mapping of names to signals may be many-to-one. There
-+   --  may be aliases. Also, for all signal names that are not supported on
-+   --  the current system the value of the corresponding constant will be zero.
-+
-+   SIGHUP : constant Interrupt_ID :=
-+     System.OS_Interface.SIGHUP;      --  hangup
-+
-+   SIGINT : constant Interrupt_ID :=
-+     System.OS_Interface.SIGINT;      --  interrupt (rubout)
-+
-+   SIGQUIT : constant Interrupt_ID :=
-+     System.OS_Interface.SIGQUIT;     --  quit (ASCD FS)
-+
-+   SIGILL : constant Interrupt_ID :=
-+     System.OS_Interface.SIGILL;      --  illegal instruction (not reset)
-+
-+   SIGTRAP : constant Interrupt_ID :=
-+     System.OS_Interface.SIGTRAP;     --  trace trap (not reset)
-+
-+   SIGIOT : constant Interrupt_ID :=
-+     System.OS_Interface.SIGIOT;      --  IOT instruction
-+
-+   SIGABRT : constant Interrupt_ID := --  used by abort,
-+     System.OS_Interface.SIGABRT;     --  replace SIGIOT in the  future
-+
-+   SIGFPE : constant Interrupt_ID :=
-+     System.OS_Interface.SIGFPE;      --  floating point exception
-+
-+   SIGKILL : constant Interrupt_ID :=
-+     System.OS_Interface.SIGKILL;     --  kill (cannot be caught or ignored)
-+
-+   SIGBUS : constant Interrupt_ID :=
-+     System.OS_Interface.SIGBUS;      --  bus error
-+
-+   SIGSEGV : constant Interrupt_ID :=
-+     System.OS_Interface.SIGSEGV;     --  segmentation violation
-+
-+   SIGPIPE : constant Interrupt_ID := --  write on a pipe with
-+     System.OS_Interface.SIGPIPE;     --  no one to read it
-+
-+   SIGALRM : constant Interrupt_ID :=
-+     System.OS_Interface.SIGALRM;     --  alarm clock
-+
-+   SIGTERM : constant Interrupt_ID :=
-+     System.OS_Interface.SIGTERM;     --  software termination signal from kill
-+
-+   SIGURG : constant Interrupt_ID :=
-+     System.OS_Interface.SIGURG;      --  urgent condition on IO channel
-+
-+   SIGSTOP : constant Interrupt_ID :=
-+     System.OS_Interface.SIGSTOP;     --  stop (cannot be caught or ignored)
-+
-+   SIGTSTP : constant Interrupt_ID :=
-+     System.OS_Interface.SIGTSTP;     --  user stop requested from tty
-+
-+   SIGCONT : constant Interrupt_ID :=
-+     System.OS_Interface.SIGCONT;     --  stopped process has been continued
-+
-+   SIGCHLD : constant Interrupt_ID :=
-+     System.OS_Interface.SIGCHLD;     --  4.3BSD's/POSIX name for SIGCLD
-+
-+   SIGCLD : constant Interrupt_ID :=
-+     System.OS_Interface.SIGCLD;      --  child status change
-+
-+   SIGTTIN : constant Interrupt_ID :=
-+     System.OS_Interface.SIGTTIN;     --  background tty read attempted
-+
-+   SIGTTOU : constant Interrupt_ID :=
-+     System.OS_Interface.SIGTTOU;     --  background tty write attempted
-+
-+   SIGIO : constant Interrupt_ID :=   --  input/output possible,
-+     System.OS_Interface.SIGIO;       --  SIGPOLL alias (Solaris)
-+
-+   SIGXCPU : constant Interrupt_ID :=
-+     System.OS_Interface.SIGXCPU;     --  CPU time limit exceeded
-+
-+   SIGXFSZ : constant Interrupt_ID :=
-+     System.OS_Interface.SIGXFSZ;     --  filesize limit exceeded
-+
-+   SIGVTALRM : constant Interrupt_ID :=
-+     System.OS_Interface.SIGVTALRM;   --  virtual timer expired
-+
-+   SIGPROF : constant Interrupt_ID :=
-+     System.OS_Interface.SIGPROF;     --  profiling timer expired
-+
-+   SIGWINCH : constant Interrupt_ID :=
-+     System.OS_Interface.SIGWINCH;    --  window size change
-+
-+   SIGUSR1 : constant Interrupt_ID :=
-+     System.OS_Interface.SIGUSR1;     --  user defined signal 1
-+
-+   SIGUSR2 : constant Interrupt_ID :=
-+     System.OS_Interface.SIGUSR2;     --  user defined signal 2
-+
-+end Ada.Interrupts.Names;
 --- gcc/ada/adaint.c.orig
 +++ gcc/ada/adaint.c
-@@ -497,8 +497,8 @@
-   GNAT_STRUCT_STAT stat_result;
-   int fd;
- 
--  sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file);
--  sprintf (temp_file, "%s%cTMP-%ld-%ld",
-+  snprintf (full_path, 256, "%s%c%s", dir, DIR_SEPARATOR, file);
-+  snprintf (temp_file, 256, "%s%cTMP-%ld-%ld",
-            dir, DIR_SEPARATOR, (long)getpid(), (long)getppid ());
- 
-   /* Create the temporary file and write the process number.  */
-@@ -659,7 +659,8 @@
-   strcpy (encoding, "encoding=utf8");
-   *e_length = strlen (encoding);
- #else
--  strcpy (os_name, filename);
-+  /* o_length is initialized with max os_name size (2x filename size) */
-+  strncpy (os_name, filename, *o_length);
-   *o_length = strlen (filename);
-   *e_length = 0;
- #endif
-@@ -738,7 +739,7 @@
- }
- 
- #if defined (_WIN32) || defined (linux) || defined (sun) \
--  || defined (__FreeBSD__)
-+  || defined (__FreeBSD__) || defined(__DragonFly__)
- #define HAS_TARGET_WCHAR_T
- #endif
- 
-@@ -973,9 +974,10 @@
-   int fd;
-   int o_fmode = O_BINARY;
- 
--  strcpy (path, "GNAT-XXXXXX");
-+  strncpy (path, "GNAT-XXXXXX", 12);
- 
- #if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
-+  || defined (__DragonFly__) \
-   || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks)
-   return mkstemp (path);
- #elif defined (__Lynx__)
-@@ -1147,21 +1149,58 @@
+@@ -1157,6 +1157,47 @@
      free (pname);
    }
  
@@ -226,136 +45,31 @@
 +
 +  tmpnam (tmp_filename);
 +
- #elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
--  || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__ANDROID__)
-+  || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__DragonFly__)
- #define MAX_SAFE_PATH 1000
-   char *tmpdir = getenv ("TMPDIR");
- 
-   /* If tmpdir is longer than MAX_SAFE_PATH, revert to default value to avoid
-      a buffer overflow.  */
-   if (tmpdir == NULL || strlen (tmpdir) > MAX_SAFE_PATH)
--#ifdef __ANDROID__
--    strcpy (tmp_filename, "/cache/gnat-XXXXXX");
--#else
--    strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
--#endif
-+    strncpy (tmp_filename, "/tmp/gnat-XXXXXX", L_tmpnam);
-   else
--    sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir);
-+    snprintf (tmp_filename, L_tmpnam, "%s/gnat-XXXXXX", tmpdir);
- 
-   close (mkstemp(tmp_filename));
- #elif defined (__vxworks) && !(defined (__RTP__) || defined (VTHREADS))
-@@ -2247,7 +2286,9 @@
- {
-   int cores = 1;
- 
--#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__)
-+#if defined (linux) || defined (sun) || defined (AIX) \
-+ || defined (__APPLE__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
-+ || defined (__DragonFly__) || defined (__NetBSD__)
-   cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
- 
- #elif defined (__hpux__)
+ #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
+   || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
+   || defined (__DragonFly__)
 --- gcc/ada/cio.c.orig
 +++ gcc/ada/cio.c
-@@ -49,7 +49,8 @@
+@@ -49,7 +49,7 @@
  
  /* 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__)
+-#ifdef __linux__
++#if defined __linux__ && !defined __ANDROID__
  #undef putchar
  #undef getchar
  #undef fputc
 --- gcc/ada/cstreams.c.orig
 +++ gcc/ada/cstreams.c
-@@ -69,9 +69,10 @@
+@@ -69,7 +69,7 @@
  #include <unixlib.h>
  #endif
  
--#ifdef linux
-+#if defined(linux) && !defined(__ANDROID__)
+-#ifdef __linux__
++#if defined __linux__ && !defined __ANDROID__
  /* Don't use macros on GNU/Linux since they cause incompatible changes between
     glibc 2.0 and 2.1 */
-+/* Android is The exception because it uses the BIONIC library */
- 
- #ifdef stderr
- #  undef stderr
-@@ -192,7 +193,9 @@
- 	  *p = '\\';
-     }
- 
--#elif defined (__FreeBSD__)
-+#elif defined (__FreeBSD__) \
-+   || defined (__DragonFly__) \
-+   || defined (__OpenBSD__)
- 
-   /* Use realpath function which resolves links and references to . and ..
-      on those Unix systems that support it. Note that GNU/Linux provides it but
---- gcc/ada/env.c.orig
-+++ gcc/ada/env.c
-@@ -181,7 +181,9 @@
-       LIB$SIGNAL (status);
-   }
  
--#elif (defined (__vxworks) && defined (__RTP__)) || defined (__APPLE__)
-+#elif (defined (__vxworks) && defined (__RTP__)) \
-+  || defined (__APPLE__) \
-+  || defined (__OpenBSD__)
-   setenv (name, value, 1);
- 
- #else
-@@ -304,6 +306,7 @@
-   }
- #elif defined (__MINGW32__) || defined (__FreeBSD__) || defined (__APPLE__) \
-    || (defined (__vxworks) && defined (__RTP__)) || defined (__CYGWIN__) \
-+   || defined (__DragonFly__) \
-    || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__rtems__)
-   /* On Windows, FreeBSD and MacOS there is no function to clean all the
-      environment but there is a "clean" way to unset a variable. So go
---- gcc/ada/g-comlin.adb.orig
-+++ gcc/ada/g-comlin.adb
-@@ -520,6 +520,7 @@
-    begin
-       Index_In_Switches := 0;
-       Switch_Length     := 0;
-+      Param             := Parameter_None;
- 
-       --  Remove all leading spaces first to make sure that Index points
-       --  at the start of the first switch.
---- gcc/ada/g-expect.adb.orig
-+++ gcc/ada/g-expect.adb
-@@ -1350,15 +1350,20 @@
- 
-       --  The following commands are not executed on Unix systems, and are only
-       --  required for Windows systems. We are now in the parent process.
-+      --  Although the if-statement is redundant, it's here so the compiler
-+      --  doesn't complain about uninitialized variables.
- 
--      --  Restore the old descriptors
-+      if No_Fork_On_Target then
- 
--      Dup2 (Input,  GNAT.OS_Lib.Standin);
--      Dup2 (Output, GNAT.OS_Lib.Standout);
--      Dup2 (Error,  GNAT.OS_Lib.Standerr);
--      Close (Input);
--      Close (Output);
--      Close (Error);
-+         --  Restore the old descriptors
-+
-+         Dup2 (Input,  GNAT.OS_Lib.Standin);
-+         Dup2 (Output, GNAT.OS_Lib.Standout);
-+         Dup2 (Error,  GNAT.OS_Lib.Standerr);
-+         Close (Input);
-+         Close (Output);
-+         Close (Error);
-+      end if;
-    end Set_Up_Child_Communications;
- 
-    ---------------------------
 --- /dev/null
 +++ gcc/ada/g-socthi-bsd.adb
 @@ -0,0 +1,356 @@
@@ -737,110 +451,17 @@
  
     Read_Mode : constant String := "r" & ASCII.NUL;
  
---- gcc/ada/gsocket.h.orig
-+++ gcc/ada/gsocket.h
-@@ -209,6 +209,8 @@
- #endif
- 
- #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \
-+    defined (__DragonFly__) || \
-+    defined (__NetBSD__) || defined (__OpenBSD__) || \
-     defined (_WIN32) || defined (__APPLE__) || defined (__ANDROID__)
- # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
- 
-@@ -241,7 +243,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;
- 
-@@ -2496,9 +2496,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
-@@ -85,8 +85,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__)
- 
- void
- __gnat_initialize (void *eh ATTRIBUTE_UNUSED)
---- 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
-@@ -671,7 +671,7 @@
+@@ -667,7 +667,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      : String_Access := Program_Name ("gcc", "gnatmake");
++   Gcc      : String_Access := Program_Name ("ada", "gnatmake");
+    Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
+    Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
+    --  Default compiler, binder, linker programs
 --- gcc/ada/mlib-prj.adb.orig
 +++ gcc/ada/mlib-prj.adb
 @@ -335,6 +335,11 @@
@@ -903,831 +524,6 @@
     Gcc_Path : String_Access := null;
  
     Non_Empty_Node : constant Project_Node_Id := 1;
---- gcc/ada/s-oscons-tmplt.c.orig
-+++ gcc/ada/s-oscons-tmplt.c
-@@ -402,7 +402,7 @@
- 
- /* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */
- 
--#ifdef __FreeBSD__
-+#if defined (__FreeBSD__) || defined (__DragonFly__)
- # define CNI CNU
- # define IOCTL_Req_T "unsigned"
- #else
-@@ -1014,7 +1014,7 @@
- 
- */
- 
--#if defined (__FreeBSD__) || defined (linux)
-+#if defined (__FreeBSD__) || defined (linux) || defined (__DragonFly__)
- # define PTY_Library "-lutil"
- #else
- # define PTY_Library ""
-@@ -1435,7 +1435,8 @@
- #endif
- CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock")
- 
--#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530))
-+#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530)) \
-+ || defined(__DragonFly__)
- /** On these platforms use system provided monotonic clock instead of
-  ** the default CLOCK_REALTIME. We then need to set up cond var attributes
-  ** appropriately (see thread.c).
---- /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,653 @@
-+------------------------------------------------------------------------------
-+--                                                                          --
-+--                  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-2014, 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);
-+

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



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