Fri Mar 2 16:00:58 2012 UTC ()
lang/gnat-aux: Sync with gcc 4.6.3

GCC 4.6.3 was released 01 MAR 2012.  It is a bug-fix release for regressions
and serious bugs.  Seventy-four bug reports were addressed.  The link is
available at bottom of http://gcc.gnu.org/gcc-4.6/changes.html

Unlike release 4.6.2, a few Ada issues were among those addressed.


(marino)
diff -r1.11 -r1.12 pkgsrc/lang/gnat-aux/Makefile
diff -r1.8 -r1.9 pkgsrc/lang/gnat-aux/distinfo
diff -r1.1 -r1.2 pkgsrc/lang/gnat-aux/files/diff-ada
diff -r1.1 -r1.2 pkgsrc/lang/gnat-aux/files/diff-core

cvs diff -r1.11 -r1.12 pkgsrc/lang/gnat-aux/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/gnat-aux/Attic/Makefile 2012/01/12 15:38:45 1.11
+++ pkgsrc/lang/gnat-aux/Attic/Makefile 2012/03/02 16:00:58 1.12
@@ -1,30 +1,30 @@ @@ -1,30 +1,30 @@
1# $NetBSD: Makefile,v 1.11 2012/01/12 15:38:45 hans Exp $ 1# $NetBSD: Makefile,v 1.12 2012/03/02 16:00:58 marino Exp $
2# 2#
3 3
4PKGNAME= gnat-aux-${SNAPSHOT} 4PKGNAME= gnat-aux-${SNAPSHOT}
5DISTNAME= gcc-${GCC_VERSION} 5DISTNAME= gcc-${GCC_VERSION}
6CATEGORIES= lang 6CATEGORIES= lang
7MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/} 7MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
8DISTFILES= gcc-core-${GCC_VERSION}.tar.bz2 8DISTFILES= gcc-core-${GCC_VERSION}.tar.bz2
9 9
10MAINTAINER= draco@marino.st 10MAINTAINER= draco@marino.st
11HOMEPAGE= http://www.dragonlace.net/ 11HOMEPAGE= http://www.dragonlace.net/
12COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH} 12COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH}
13LICENSE= gnu-gpl-v3 AND gnu-lgpl-v3 13LICENSE= gnu-gpl-v3 AND gnu-lgpl-v3
14 14
15SNAPSHOT= 20111026 15SNAPSHOT= 20120301
16GCC_BRANCH= 4.6 16GCC_BRANCH= 4.6
17GCC_POINT= 2 17GCC_POINT= 3
18GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} 18GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT}
19LANGS= c 19LANGS= c
20 20
21PKG_DESTDIR_SUPPORT= user-destdir 21PKG_DESTDIR_SUPPORT= user-destdir
22 22
23USE_TOOLS+= gmake sed perl makeinfo bzip2 patch pod2man 23USE_TOOLS+= gmake sed perl makeinfo bzip2 patch pod2man
24USE_BUILTIN.iconv= no 24USE_BUILTIN.iconv= no
25APPLY_DIFFS= core 25APPLY_DIFFS= core
26 26
27.include "../../mk/bsd.prefs.mk" 27.include "../../mk/bsd.prefs.mk"
28.include "options.mk" 28.include "options.mk"
29 29
30# Requires bootstrap compiler, which is only available for NetBSD i386/AMD64 30# Requires bootstrap compiler, which is only available for NetBSD i386/AMD64

cvs diff -r1.8 -r1.9 pkgsrc/lang/gnat-aux/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/gnat-aux/Attic/distinfo 2012/01/08 11:17:07 1.8
+++ pkgsrc/lang/gnat-aux/Attic/distinfo 2012/03/02 16:00:58 1.9
@@ -1,33 +1,33 @@ @@ -1,33 +1,33 @@
1$NetBSD: distinfo,v 1.8 2012/01/08 11:17:07 marino Exp $ 1$NetBSD: distinfo,v 1.9 2012/03/02 16:00:58 marino Exp $
2 2
3SHA1 (gcc-ada-4.6.2.tar.bz2) = e6eaa9b8111ac8e550844a7cc2d161f8c3c96522 3SHA1 (gcc-ada-4.6.3.tar.bz2) = dad948b980357bab992d0ac9aaa1f9859f1671e7
4RMD160 (gcc-ada-4.6.2.tar.bz2) = 6f5d5af97c374411e13698c32314b43b1afd99cf 4RMD160 (gcc-ada-4.6.3.tar.bz2) = 33d0077a366edc8705d6907ca98ff2c53a434498
5Size (gcc-ada-4.6.2.tar.bz2) = 6064757 bytes 5Size (gcc-ada-4.6.3.tar.bz2) = 6092418 bytes
6SHA1 (gcc-core-4.6.2.tar.bz2) = 23d259e2269a40f6e203cf6f57bc7eb7a207a8b3 6SHA1 (gcc-core-4.6.3.tar.bz2) = eaefb90df5a833c94560a8dda177bd1e165c2a88
7RMD160 (gcc-core-4.6.2.tar.bz2) = 82c25532303759b6195bbd53d7f371f1974ff182 7RMD160 (gcc-core-4.6.3.tar.bz2) = 071371eae1ce10dbb44c077b69256f2ec2ee1b6b
8Size (gcc-core-4.6.2.tar.bz2) = 30258326 bytes 8Size (gcc-core-4.6.3.tar.bz2) = 30305971 bytes
9SHA1 (gcc-fortran-4.6.2.tar.bz2) = aba480c9a42d58eca6c34355b6d2f5f487de051d 9SHA1 (gcc-fortran-4.6.3.tar.bz2) = 4dc62a4b995391584e7f80e05353e9635407e647
10RMD160 (gcc-fortran-4.6.2.tar.bz2) = 6a966d647e9d3fe35996d390fbcd7ff0622edfb8 10RMD160 (gcc-fortran-4.6.3.tar.bz2) = 95b338486d4427f1ba54d3c652fcb628da2c5576
11Size (gcc-fortran-4.6.2.tar.bz2) = 1676539 bytes 11Size (gcc-fortran-4.6.3.tar.bz2) = 1676490 bytes
12SHA1 (gcc-g++-4.6.2.tar.bz2) = f0bc2b4e1c23c5dc1462599efd5df4b9807b23af 12SHA1 (gcc-g++-4.6.3.tar.bz2) = 528d010ee7af50e023bd4d476d65d08df71a7f65
13RMD160 (gcc-g++-4.6.2.tar.bz2) = afb274990e9102b55cb5f5dc11876c96e6b31c96 13RMD160 (gcc-g++-4.6.3.tar.bz2) = 2540b113a2ee983c517b1bed6910d8d60c1292c3
14Size (gcc-g++-4.6.2.tar.bz2) = 6955594 bytes 14Size (gcc-g++-4.6.3.tar.bz2) = 6928430 bytes
15SHA1 (gcc-objc-4.6.2.tar.bz2) = 32e5fbc31f1e8dd5e7c7e7ed9172afaf6136ea4e 15SHA1 (gcc-objc-4.6.3.tar.bz2) = a584c2b3505a7f6411167027cc7fe473182c6e1c
16RMD160 (gcc-objc-4.6.2.tar.bz2) = 3c38c655edb90fadb2805043219296a4af43c56a 16RMD160 (gcc-objc-4.6.3.tar.bz2) = 1a673690aad47472126e518d4f56f3b385751877
17Size (gcc-objc-4.6.2.tar.bz2) = 342544 bytes 17Size (gcc-objc-4.6.3.tar.bz2) = 342441 bytes
18SHA1 (gcc-testsuite-4.6.2.tar.bz2) = 514c0ed8b9e4ed22e55303ae2426dd6f1e8a24f2 18SHA1 (gcc-testsuite-4.6.3.tar.bz2) = 31f428af55332ee45bfae7184139a65d130ac2df
19RMD160 (gcc-testsuite-4.6.2.tar.bz2) = 859486da17497b61e0919f53f13efc04eeaef751 19RMD160 (gcc-testsuite-4.6.3.tar.bz2) = 6b2d96cc4db33bd28c0b98fe43526acdc69ecd0d
20Size (gcc-testsuite-4.6.2.tar.bz2) = 6309400 bytes 20Size (gcc-testsuite-4.6.3.tar.bz2) = 6354781 bytes
21SHA1 (gnat-bootstrap.i386.dragonfly.tar.bz2) = d7a8103243a2df3723d9d3c3ec0da9c3bb725214 21SHA1 (gnat-bootstrap.i386.dragonfly.tar.bz2) = d7a8103243a2df3723d9d3c3ec0da9c3bb725214
22RMD160 (gnat-bootstrap.i386.dragonfly.tar.bz2) = 9e6fde444e0ed76ee404810af6d6b7eb48659c09 22RMD160 (gnat-bootstrap.i386.dragonfly.tar.bz2) = 9e6fde444e0ed76ee404810af6d6b7eb48659c09
23Size (gnat-bootstrap.i386.dragonfly.tar.bz2) = 28205489 bytes 23Size (gnat-bootstrap.i386.dragonfly.tar.bz2) = 28205489 bytes
24SHA1 (gnat-bootstrap.i386.netbsd.tar.bz2) = 19b61f54fae8e237a4e678ff03f20f50b47db1df 24SHA1 (gnat-bootstrap.i386.netbsd.tar.bz2) = 19b61f54fae8e237a4e678ff03f20f50b47db1df
25RMD160 (gnat-bootstrap.i386.netbsd.tar.bz2) = ade03f223b2af229daece20a749915f7da0eb0a6 25RMD160 (gnat-bootstrap.i386.netbsd.tar.bz2) = ade03f223b2af229daece20a749915f7da0eb0a6
26Size (gnat-bootstrap.i386.netbsd.tar.bz2) = 27654956 bytes 26Size (gnat-bootstrap.i386.netbsd.tar.bz2) = 27654956 bytes
27SHA1 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 77a637a497c61e4085de31b24a205f24b1776a15 27SHA1 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 77a637a497c61e4085de31b24a205f24b1776a15
28RMD160 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 4d0eb7b8a5f901333f1ffd190a5bf72072b2b52e 28RMD160 (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 4d0eb7b8a5f901333f1ffd190a5bf72072b2b52e
29Size (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 31380342 bytes 29Size (gnat-bootstrap.x86_64.dragonfly.tar.bz2) = 31380342 bytes
30SHA1 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 84f0e9179998daa643046a5d139321c4130ea84d 30SHA1 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 84f0e9179998daa643046a5d139321c4130ea84d
31RMD160 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 0b2943349536c323a62b56dc05ff1fedd6d7e17a 31RMD160 (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 0b2943349536c323a62b56dc05ff1fedd6d7e17a
32Size (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 30572187 bytes 32Size (gnat-bootstrap.x86_64.netbsd.tar.bz2) = 30572187 bytes
33SHA1 (gnat-bootstrap.i386.solaris.tar.bz2) = 4962657bfc894a20ad3102c1f6fe8e566b47cb51 33SHA1 (gnat-bootstrap.i386.solaris.tar.bz2) = 4962657bfc894a20ad3102c1f6fe8e566b47cb51

cvs diff -r1.1 -r1.2 pkgsrc/lang/gnat-aux/files/Attic/diff-ada (expand / switch to unified diff)

--- pkgsrc/lang/gnat-aux/files/Attic/diff-ada 2012/01/08 11:17:07 1.1
+++ pkgsrc/lang/gnat-aux/files/Attic/diff-ada 2012/03/02 16:00:58 1.2
@@ -772,29 +772,29 @@ @@ -772,29 +772,29 @@
772+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 772+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
773+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 773+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
774+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 774+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
775+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 775+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
776+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 776+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
777+ */ 777+ */
778+ 778+
779+/* 779+/*
780+ * original function name: strlcpy 780+ * original function name: strlcpy
781+ * Copy src to string dst of size siz. At most siz-1 characters 781+ * Copy src to string dst of size siz. At most siz-1 characters
782+ * will be copied. Always NUL terminates (unless siz == 0). 782+ * will be copied. Always NUL terminates (unless siz == 0).
783+ * Returns strlen(src); if retval >= siz, truncation occurred. 783+ * Returns strlen(src); if retval >= siz, truncation occurred.
784+ * 784+ *
785+ * $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ 785+ * OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp
786+ * $FreeBSD: src/lib/libc/string/strlcpy.c,v 1.10 2008/10/19 delphij Exp $ 786+ * FreeBSD: src/lib/libc/string/strlcpy.c,v 1.10 2008/10/19 delphij Exp
787+ * $DragonFly: src/lib/libc/string/strlcpy.c,v 1.4 2005/09/18 asmodai Exp $ 787+ * DragonFly: src/lib/libc/string/strlcpy.c,v 1.4 2005/09/18 asmodai Exp
788+ */ 788+ */
789+ 789+
790+size_t 790+size_t
791+bsd_strlcpy(char *dst, const char *src, size_t siz) 791+bsd_strlcpy(char *dst, const char *src, size_t siz)
792+{ 792+{
793+ char *d = dst; 793+ char *d = dst;
794+ const char *s = src; 794+ const char *s = src;
795+ size_t n = siz; 795+ size_t n = siz;
796+ 796+
797+ /* Copy as many bytes as will fit */ 797+ /* Copy as many bytes as will fit */
798+ if (n != 0) { 798+ if (n != 0) {
799+ while (--n != 0) { 799+ while (--n != 0) {
800+ if ((*d++ = *s++) == '\0') 800+ if ((*d++ = *s++) == '\0')
@@ -813,29 +813,29 @@ @@ -813,29 +813,29 @@
813+ return(s - src - 1); /* count does not include NUL */ 813+ return(s - src - 1); /* count does not include NUL */
814+} 814+}
815+ 815+
816+ 816+
817+ 817+
818+/* 818+/*
819+ * Original function name: strlcat 819+ * Original function name: strlcat
820+ * Appends src to string dst of size siz (unlike strncat, siz is the 820+ * Appends src to string dst of size siz (unlike strncat, siz is the
821+ * full size of dst, not space left). At most siz-1 characters 821+ * full size of dst, not space left). At most siz-1 characters
822+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)). 822+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
823+ * Returns strlen(src) + MIN(siz, strlen(initial dst)). 823+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
824+ * If retval >= siz, truncation occurred. 824+ * If retval >= siz, truncation occurred.
825+ * 825+ *
826+ * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ 826+ * OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp
827+ * $FreeBSD: src/lib/libc/string/strlcat.c,v 1.11 2009/01/12 delphij Exp $ 827+ * FreeBSD: src/lib/libc/string/strlcat.c,v 1.11 2009/01/12 delphij Exp
828+ * $DragonFly: src/lib/libc/string/strlcat.c,v 1.4 2004/12/18 asmodai Exp $ 828+ * DragonFly: src/lib/libc/string/strlcat.c,v 1.4 2004/12/18 asmodai Exp
829+ */ 829+ */
830+ 830+
831+size_t 831+size_t
832+bsd_strlcat(char *dst, const char *src, size_t siz) 832+bsd_strlcat(char *dst, const char *src, size_t siz)
833+{ 833+{
834+ char *d = dst; 834+ char *d = dst;
835+ const char *s = src; 835+ const char *s = src;
836+ size_t n = siz; 836+ size_t n = siz;
837+ size_t dlen; 837+ size_t dlen;
838+ 838+
839+ /* Find the end of dst and adjust bytes left but don't go past end */ 839+ /* Find the end of dst and adjust bytes left but don't go past end */
840+ while (n-- != 0 && *d != '\0') 840+ while (n-- != 0 && *d != '\0')
841+ d++; 841+ d++;
@@ -2429,27 +2429,27 @@ @@ -2429,27 +2429,27 @@
2429+ if (__gnat_get_interrupt_state (SIGBUS) != 's') 2429+ if (__gnat_get_interrupt_state (SIGBUS) != 's')
2430+ sigaction (SIGBUS, &act, NULL); 2430+ sigaction (SIGBUS, &act, NULL);
2431+ if (__gnat_get_interrupt_state (SIGSEGV) != 's') 2431+ if (__gnat_get_interrupt_state (SIGSEGV) != 's')
2432+ sigaction (SIGSEGV, &act, NULL); 2432+ sigaction (SIGSEGV, &act, NULL);
2433+ 2433+
2434+ __gnat_handler_installed = 1; 2434+ __gnat_handler_installed = 1;
2435+} 2435+}
2436+ 2436+
2437+ 2437+
2438+/*******************/ 2438+/*******************/
2439 /* VxWorks Section */ 2439 /* VxWorks Section */
2440 /*******************/ 2440 /*******************/
2441  2441
2442@@ -2320,6 +2392,7 @@ 2442@@ -2341,6 +2413,7 @@
2443  2443
2444 #if defined (_WIN32) || defined (__INTERIX) \ 2444 #if defined (_WIN32) || defined (__INTERIX) \
2445 || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \ 2445 || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \
2446+ || defined (__DragonFly__) \ 2446+ || defined (__DragonFly__) \
2447 || defined (__OpenBSD__) 2447 || defined (__OpenBSD__)
2448  2448
2449 #define HAVE_GNAT_INIT_FLOAT 2449 #define HAVE_GNAT_INIT_FLOAT
2450--- gcc/ada/initialize.c.orig 2450--- gcc/ada/initialize.c.orig
2451+++ gcc/ada/initialize.c 2451+++ gcc/ada/initialize.c
2452@@ -27,6 +27,7 @@ 2452@@ -27,6 +27,7 @@
2453 * GNAT was originally developed by the GNAT team at New York University. * 2453 * GNAT was originally developed by the GNAT team at New York University. *
2454 * Extensive contributions were provided by Ada Core Technologies Inc. * 2454 * Extensive contributions were provided by Ada Core Technologies Inc. *
2455 * * 2455 * *

cvs diff -r1.1 -r1.2 pkgsrc/lang/gnat-aux/files/Attic/diff-core (expand / switch to unified diff)

--- pkgsrc/lang/gnat-aux/files/Attic/diff-core 2012/01/08 11:17:07 1.1
+++ pkgsrc/lang/gnat-aux/files/Attic/diff-core 2012/03/02 16:00:58 1.2
@@ -280,27 +280,27 @@ @@ -280,27 +280,27 @@
280+#define INT_FAST8_TYPE INT32_TYPE 280+#define INT_FAST8_TYPE INT32_TYPE
281+#define INT_FAST16_TYPE INT32_TYPE 281+#define INT_FAST16_TYPE INT32_TYPE
282+#define INT_FAST32_TYPE INT32_TYPE 282+#define INT_FAST32_TYPE INT32_TYPE
283+#define INT_FAST64_TYPE INT64_TYPE 283+#define INT_FAST64_TYPE INT64_TYPE
284+#define UINT_FAST8_TYPE UINT32_TYPE 284+#define UINT_FAST8_TYPE UINT32_TYPE
285+#define UINT_FAST16_TYPE UINT32_TYPE 285+#define UINT_FAST16_TYPE UINT32_TYPE
286+#define UINT_FAST32_TYPE UINT32_TYPE 286+#define UINT_FAST32_TYPE UINT32_TYPE
287+#define UINT_FAST64_TYPE UINT64_TYPE 287+#define UINT_FAST64_TYPE UINT64_TYPE
288+ 288+
289+#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? INT64_TYPE : INT32_TYPE) 289+#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? INT64_TYPE : INT32_TYPE)
290+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE) 290+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
291--- /dev/null 291--- /dev/null
292+++ gcc/config/dragonfly.h 292+++ gcc/config/dragonfly.h
293@@ -0,0 +1,141 @@ 293@@ -0,0 +1,139 @@
294+/* Base configuration file for all DragonFly targets. 294+/* Base configuration file for all DragonFly targets.
295+ Copyright (C) 1999, 2000, 2001, 2007, 2008 Free Software Foundation, Inc. 295+ Copyright (C) 1999, 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
296+ Copyright (C) 2010-2012 John R. Marino <www.dragonlace.net> 296+ Copyright (C) 2010-2012 John R. Marino <www.dragonlace.net>
297+ 297+
298+This file is part of GCC. 298+This file is part of GCC.
299+ 299+
300+GCC is free software; you can redistribute it and/or modify 300+GCC is free software; you can redistribute it and/or modify
301+it under the terms of the GNU General Public License as published by 301+it under the terms of the GNU General Public License as published by
302+the Free Software Foundation; either version 3, or (at your option) 302+the Free Software Foundation; either version 3, or (at your option)
303+any later version. 303+any later version.
304+ 304+
305+GCC is distributed in the hope that it will be useful, 305+GCC is distributed in the hope that it will be useful,
306+but WITHOUT ANY WARRANTY; without even the implied warranty of 306+but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -378,32 +378,30 @@ @@ -378,32 +378,30 @@
378+ %{v:-V} \ 378+ %{v:-V} \
379+ %{assert*} %{R*} %{rpath*} %{defsym*} \ 379+ %{assert*} %{R*} %{rpath*} %{defsym*} \
380+ %{shared:-Bshareable %{h*} %{soname*}} \ 380+ %{shared:-Bshareable %{h*} %{soname*}} \
381+ %{!shared: \ 381+ %{!shared: \
382+ %{!static: \ 382+ %{!static: \
383+ %{rdynamic:-export-dynamic} \ 383+ %{rdynamic:-export-dynamic} \
384+ -dynamic-linker %(dfbsd_dynamic_linker) } \ 384+ -dynamic-linker %(dfbsd_dynamic_linker) } \
385+ %{static:-Bstatic}} \ 385+ %{static:-Bstatic}} \
386+ %{symbolic:-Bsymbolic}" 386+ %{symbolic:-Bsymbolic}"
387+ 387+
388+#undef LINK_SPEC 388+#undef LINK_SPEC
389+#define LINK_SPEC DFBSD_LINK_SPEC 389+#define LINK_SPEC DFBSD_LINK_SPEC
390+ 390+
391+#define DFBSD_DYNAMIC_LINKER \ 391+#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
392+ "/usr/libexec/ld-elf.so.2" 
393+ 392+
394+#if defined(HAVE_LD_EH_FRAME_HDR) 393+#if defined(HAVE_LD_EH_FRAME_HDR)
395+#define LINK_EH_SPEC \ 394+#define LINK_EH_SPEC "--eh-frame-hdr"
396+ "%{!static:--eh-frame-hdr}" 
397+#endif 395+#endif
398+ 396+
399+/* Use --as-needed -lgcc_s for eh support. */ 397+/* Use --as-needed -lgcc_s for eh support. */
400+#ifdef HAVE_LD_AS_NEEDED 398+#ifdef HAVE_LD_AS_NEEDED
401+#define USE_LD_AS_NEEDED 1 399+#define USE_LD_AS_NEEDED 1
402+#endif 400+#endif
403+ 401+
404+/************************[ Target stuff ]***********************************/ 402+/************************[ Target stuff ]***********************************/
405+ 403+
406+/* All DragonFly Architectures support the ELF object file format. */ 404+/* All DragonFly Architectures support the ELF object file format. */
407+#undef OBJECT_FORMAT_ELF 405+#undef OBJECT_FORMAT_ELF
408+#define OBJECT_FORMAT_ELF 406+#define OBJECT_FORMAT_ELF
409+ 407+
@@ -1147,31 +1145,31 @@ @@ -1147,31 +1145,31 @@
1147 #undef DEFAULT_PCC_STRUCT_RETURN 1145 #undef DEFAULT_PCC_STRUCT_RETURN
1148 #define DEFAULT_PCC_STRUCT_RETURN 0 1146 #define DEFAULT_PCC_STRUCT_RETURN 0
1149  1147
1150-/* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the 1148-/* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the
1151- compiler get the contents of <float.h> and std::numeric_limits correct. */ 1149- compiler get the contents of <float.h> and std::numeric_limits correct. */
1152+/* FreeBSD sets the rounding precision of the FPU to 53 bits, but GNAT 1150+/* FreeBSD sets the rounding precision of the FPU to 53 bits, but GNAT
1153+ resets it to full precision. */ 1151+ resets it to full precision. */
1154 #undef TARGET_96_ROUND_53_LONG_DOUBLE 1152 #undef TARGET_96_ROUND_53_LONG_DOUBLE
1155-#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) 1153-#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
1156+#define TARGET_96_ROUND_53_LONG_DOUBLE 0 1154+#define TARGET_96_ROUND_53_LONG_DOUBLE 0
1157  1155
1158 /* Put all *tf routines in libgcc. */ 1156 /* Put all *tf routines in libgcc. */
1159 #undef LIBGCC2_HAS_TF_MODE 1157 #undef LIBGCC2_HAS_TF_MODE
1160@@ -147,3 +148,39 @@ 1158@@ -148,5 +149,38 @@
1161 #if FBSD_MAJOR >= 6 
1162 #define SUBTARGET32_DEFAULT_CPU "i486" 1159 #define SUBTARGET32_DEFAULT_CPU "i486"
1163 #endif 1160 #endif
1164+ 1161
 1162-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
1165+/* Define location of OS-specific unwind support configuration. */ 1163+/* Define location of OS-specific unwind support configuration. */
1166+#define MD_UNWIND_SUPPORT "config/i386/freebsd-unwind.h" 1164+#define MD_UNWIND_SUPPORT "config/i386/freebsd-unwind.h"
1167+ 1165+
1168+/* Through FreeBSD 8.2 at least, stack is denied execution rights by libthr 1166+/* Through FreeBSD 8.2 at least, stack is denied execution rights by libthr
1169+ This only affects AMD64 since i386 ignores the nx bit (non-PAE) 1167+ This only affects AMD64 since i386 ignores the nx bit (non-PAE)
1170+ However, it's still included in i386 because it's possible an AMD64 1168+ However, it's still included in i386 because it's possible an AMD64
1171+ machine will be required to run a binary generated by i386 GNAT. 1169+ machine will be required to run a binary generated by i386 GNAT.
1172+ perms = PROT_READ | PROT_WRITE | PROT_EXEC; 1170+ perms = PROT_READ | PROT_WRITE | PROT_EXEC;
1173+*/ 1171+*/
1174+#define ENABLE_EXECUTE_STACK \ 1172+#define ENABLE_EXECUTE_STACK \
1175+extern void __enable_execute_stack (void *); \ 1173+extern void __enable_execute_stack (void *); \
1176+void \ 1174+void \
1177+__enable_execute_stack (void *addr) \ 1175+__enable_execute_stack (void *addr) \
@@ -1186,27 +1184,27 @@ @@ -1186,27 +1184,27 @@
1186+ long ends_addr = (long) (addr + TRAMPOLINE_SIZE); \ 1184+ long ends_addr = (long) (addr + TRAMPOLINE_SIZE); \
1187+ int perms = 7; \ 1185+ int perms = 7; \
1188+ \ 1186+ \
1189+ if (size == 0) \ 1187+ if (size == 0) \
1190+ { \ 1188+ { \
1191+ size = getpagesize(); \ 1189+ size = getpagesize(); \
1192+ } \ 1190+ } \
1193+ mask = ~((long) size - 1); \ 1191+ mask = ~((long) size - 1); \
1194+ page = (char *) (page_addr & mask); \ 1192+ page = (char *) (page_addr & mask); \
1195+ ends = (char *) ((ends_addr & mask) + size); \ 1193+ ends = (char *) ((ends_addr & mask) + size); \
1196+ (void) mprotect (page, ends - page, perms); \ 1194+ (void) mprotect (page, ends - page, perms); \
1197+} 1195+}
1198+ 1196+
1199+ 1197
1200--- gcc/config/i386/netbsd-elf.h.orig 1198--- gcc/config/i386/netbsd-elf.h.orig
1201+++ gcc/config/i386/netbsd-elf.h 1199+++ gcc/config/i386/netbsd-elf.h
1202@@ -2,6 +2,7 @@ 1200@@ -2,6 +2,7 @@
1203 for i386/ELF NetBSD systems. 1201 for i386/ELF NetBSD systems.
1204 Copyright (C) 2001, 2002, 2004, 2007 Free Software Foundation, Inc. 1202 Copyright (C) 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
1205 Contributed by matthew green <mrg@eterna.com.au> 1203 Contributed by matthew green <mrg@eterna.com.au>
1206+ Copyright (C) 2010, 2011 John Marino <www.dragonlace.net> 1204+ Copyright (C) 2010, 2011 John Marino <www.dragonlace.net>
1207  1205
1208 This file is part of GCC. 1206 This file is part of GCC.
1209  1207
1210@@ -39,6 +40,7 @@ 1208@@ -39,6 +40,7 @@
1211  1209
1212 #undef LINK_SPEC 1210 #undef LINK_SPEC
@@ -1777,77 +1775,77 @@ @@ -1777,77 +1775,77 @@
1777 extern char *basename (const char *); 1775 extern char *basename (const char *);
1778 #else 1776 #else
1779 /* Do not allow basename to be used if there is no prototype seen. We 1777 /* Do not allow basename to be used if there is no prototype seen. We
1780--- libgcc/config.host.orig 1778--- libgcc/config.host.orig
1781+++ libgcc/config.host 1779+++ libgcc/config.host
1782@@ -1,6 +1,7 @@ 1780@@ -1,6 +1,7 @@
1783 # libgcc host-specific configuration file. 1781 # libgcc host-specific configuration file.
1784 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 1782 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
1785 # 2008, 2009, 2010 Free Software Foundation, Inc. 1783 # 2008, 2009, 2010 Free Software Foundation, Inc.
1786+# Copyright 2010-2012 John Marino <http://www.dragonlace.net> 1784+# Copyright 2010-2012 John Marino <http://www.dragonlace.net>
1787  1785
1788 #This file is part of GCC. 1786 #This file is part of GCC.
1789  1787
1790@@ -166,6 +167,8 @@ 1788@@ -157,6 +158,8 @@
1791 ;; 1789 ;;
1792 *-*-openbsd*) 1790 *-*-openbsd*)
1793 ;; 1791 ;;
1794+*-*-dragonfly*) 1792+*-*-dragonfly*)
1795+ ;; 1793+ ;;
1796 *-*-rtems*) 1794 *-*-rtems*)
1797 ;; 1795 ;;
1798 *-*-vxworks*) 1796 *-*-vxworks*)
1799@@ -287,6 +290,14 @@ 1797@@ -278,6 +281,14 @@
1800 x86_64-*-freebsd*) 1798 x86_64-*-freebsd*)
1801 tmake_file="${tmake_file} i386/t-freebsd" 1799 tmake_file="${tmake_file} i386/t-freebsd"
1802 ;; 1800 ;;
1803+i[34567]86-*-dragonfly*) 1801+i[34567]86-*-dragonfly*)
1804+ # define symbol versions (same as FreeBSD) 1802+ # define symbol versions (same as FreeBSD)
1805+ tmake_file="${tmake_file} i386/t-dragonfly" 1803+ tmake_file="${tmake_file} i386/t-dragonfly"
1806+ ;; 1804+ ;;
1807+x86_64-*-dragonfly*) 1805+x86_64-*-dragonfly*)
1808+ # define symbol versions (same as FreeBSD) 1806+ # define symbol versions (same as FreeBSD)
1809+ tmake_file="${tmake_file} i386/t-dragonfly" 1807+ tmake_file="${tmake_file} i386/t-dragonfly"
1810+ ;; 1808+ ;;
1811 i[34567]86-*-netbsdelf*) 1809 i[34567]86-*-netbsdelf*)
1812 ;; 1810 ;;
1813 i[34567]86-*-netbsd*) 1811 i[34567]86-*-netbsd*)
1814@@ -297,6 +308,8 @@ 1812@@ -288,6 +299,8 @@
1815 ;; 1813 ;;
1816 i[34567]86-*-openbsd*) 1814 i[34567]86-*-openbsd*)
1817 ;; 1815 ;;
1818+x86_64-*-openbsd*) 1816+x86_64-*-openbsd*)
1819+ ;; 1817+ ;;
1820 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*) 1818 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
1821 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" 1819 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
1822 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" 1820 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
1823@@ -628,6 +641,9 @@ 1821@@ -619,6 +632,9 @@
1824 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp" 1822 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"
1825 fi 1823 fi
1826 ;; 1824 ;;
1827+i[34567]86-*-dragonfly* | i[34567]86-*-netbsdelf*) 1825+i[34567]86-*-dragonfly* | i[34567]86-*-netbsdelf*)
1828+ tmake_file="${tmake_file} t-softfp i386/32/t-fprules-softfp" 1826+ tmake_file="${tmake_file} t-softfp i386/32/t-fprules-softfp"
1829+ ;; 1827+ ;;
1830 esac 1828 esac
1831  1829
1832 case ${host} in 1830 case ${host} in
1833--- /dev/null 1831--- /dev/null
1834+++ libgcc/config/i386/t-dragonfly 1832+++ libgcc/config/i386/t-dragonfly
1835@@ -0,0 +1,2 @@ 1833@@ -0,0 +1,2 @@
1836+# Add support for the introduction of 128-bit long double. 1834+# Add support for the introduction of 128-bit long double.
1837+SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-bsd.ver 1835+SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-bsd.ver
1838--- gcc/configure.orig 1836--- gcc/configure.orig
1839+++ gcc/configure 1837+++ gcc/configure
1840@@ -25843,6 +25843,20 @@ 1838@@ -25833,6 +25833,20 @@
1841 gcc_cv_target_dl_iterate_phdr=no 1839 gcc_cv_target_dl_iterate_phdr=no
1842 fi 1840 fi
1843 ;; 1841 ;;
1844+ *-*-dragonfly* | *-*-freebsd*) 1842+ *-*-dragonfly* | *-*-freebsd*)
1845+ if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then 1843+ if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
1846+ gcc_cv_target_dl_iterate_phdr=yes 1844+ gcc_cv_target_dl_iterate_phdr=yes
1847+ else 1845+ else
1848+ gcc_cv_target_dl_iterate_phdr=no 1846+ gcc_cv_target_dl_iterate_phdr=no
1849+ fi 1847+ fi
1850+ ;; 1848+ ;;
1851+# *-*-netbsd* | *-*-openbsd*) 1849+# *-*-netbsd* | *-*-openbsd*)
1852+# if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then 1850+# if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then
1853+# gcc_cv_target_dl_iterate_phdr=yes 1851+# gcc_cv_target_dl_iterate_phdr=yes
@@ -1880,24 +1878,53 @@ @@ -1880,24 +1878,53 @@
1880 ifeq ($(enable_plugin),yes) 1878 ifeq ($(enable_plugin),yes)
1881@@ -4665,10 +4665,7 @@ 1879@@ -4665,10 +4665,7 @@
1882 install-man: lang.install-man \ 1880 install-man: lang.install-man \
1883 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) \ 1881 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) \
1884 $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext) \ 1882 $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext) \
1885- $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) \ 1883- $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) \
1886- $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) \ 1884- $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) \
1887- $(DESTDIR)$(man7dir)/gfdl$(man7ext) \ 1885- $(DESTDIR)$(man7dir)/gfdl$(man7ext) \
1888- $(DESTDIR)$(man7dir)/gpl$(man7ext) 1886- $(DESTDIR)$(man7dir)/gpl$(man7ext)
1889+ $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) 1887+ $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext)
1890  1888
1891 $(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs 1889 $(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs
1892 -rm -f $@ 1890 -rm -f $@
 1891--- libiberty/getpagesize.c.orig
 1892+++ libiberty/getpagesize.c
 1893@@ -20,6 +20,7 @@
 1894
 1895 */
 1896
 1897+#ifndef __ANDROID__
 1898 #ifndef VMS
 1899
 1900 #include "config.h"
 1901@@ -88,3 +89,4 @@
 1902 }
 1903
 1904 #endif /* VMS */
 1905+#endif /* __ANDROID__ */
 1906--- libiberty/setproctitle.c.orig
 1907+++ libiberty/setproctitle.c
 1908@@ -40,9 +40,11 @@
 1909 void
 1910 setproctitle (const char *name ATTRIBUTE_UNUSED, ...)
 1911 {
 1912+#ifndef __ANDROID__
 1913 #ifdef PR_SET_NAME
 1914 /* On Linux this sets the top visible "comm", but not necessarily
 1915 the name visible in ps. */
 1916 prctl (PR_SET_NAME, name);
 1917 #endif
 1918+#endif
 1919 }
1893--- configure.orig 1920--- configure.orig
1894+++ configure 1921+++ configure
1895@@ -14200,7 +14200,7 @@ 1922@@ -14196,7 +14196,7 @@
1896 _ACEOF 1923 _ACEOF
1897 if ac_fn_c_try_compile "$LINENO"; then : 1924 if ac_fn_c_try_compile "$LINENO"; then :
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1899-$as_echo "yes" >&6; }; stage1_cflags="$stage1_cflags -fkeep-inline-functions" 1926-$as_echo "yes" >&6; }; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
1900+$as_echo "yes" >&6; }; 1927+$as_echo "yes" >&6; };
1901 else 1928 else
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1903 $as_echo "no" >&6; } 1930 $as_echo "no" >&6; }