From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Apr 7 12:00:12 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D825106566C for ; Sat, 7 Apr 2012 12:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D2F408FC16 for ; Sat, 7 Apr 2012 12:00:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q37C0AfK041006 for ; Sat, 7 Apr 2012 12:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q37C0AqR041005; Sat, 7 Apr 2012 12:00:10 GMT (envelope-from gnats) Resent-Date: Sat, 7 Apr 2012 12:00:10 GMT Resent-Message-Id: <201204071200.q37C0AqR041005@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Marino Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03841065676 for ; Sat, 7 Apr 2012 11:55:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id D9F258FC19 for ; Sat, 7 Apr 2012 11:55:40 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q37Bte92001072 for ; Sat, 7 Apr 2012 11:55:40 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q37BtemY001070; Sat, 7 Apr 2012 11:55:40 GMT (envelope-from nobody) Message-Id: <201204071155.q37BtemY001070@red.freebsd.org> Date: Sat, 7 Apr 2012 11:55:40 GMT From: John Marino To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/166718: [MAINTAINER] lang/gnat-aux: upgrade to sync with gcc 4.6.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2012 12:00:12 -0000 >Number: 166718 >Category: ports >Synopsis: [MAINTAINER] lang/gnat-aux: upgrade to sync with gcc 4.6.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Apr 07 12:00:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: John Marino >Release: >Organization: >Environment: >Description: 1) Upgrades from gcc 4.6.2 to gcc 4.6.3 2) Splits off Makefile.common fragment for use in other ports 3) Adds post-install warning that Ada tasking is broken for FreeBSD 9+ Regarding #3: Due to a new panic assertion added to the thread library, exiting tasks now abort with the message "thread exits with resources held!". A significant attempt was made to patch GNAT to release thread resources on exiting tasks, but the code is highly complex and the attempts are not yet successful. Things to note: A) gnat-aux continues to work on FreeBSD 6.x, 7.x, and 8.x. B) gnat-aux has always been broken on FreeBSD 9.x, but a testsuite run didn't reveal this until recently C) gnat-aux didn't change, FreeBSD did. It considers something a fatal error that was acceptable before and doesn't leave any method to degrade back to FreeBSD 8.x behavior other than rebuilding libpthread from source with _PTHREADS_INVARIANTS undefined. D) A new version of gnat-aux based on gcc 4.7 will be needed to convince Adacore to take this issue seriously as it affects all POSIX platforms. FreeBSD is the only one to detect the held resources. (Still, the decision on the part of FreeBSD developers to make this a fatal panic is questionable). >How-To-Repeat: Regarding the FreeBSD 9.0 failures, 23 tasking test failures can be seen by doing "make test" from lang/gnat-aux. >Fix: Patch attached with submission follows: --- Makefile.orig 2012-03-01 15:25:49.000000000 +0100 +++ Makefile 2012-04-06 22:28:50.000000000 +0200 @@ -17,27 +17,10 @@ MAINTAINER= draco@marino.st COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH} -LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp -LIB_DEPENDS+= mpfr.4:${PORTSDIR}/math/mpfr -LIB_DEPENDS+= mpc.2:${PORTSDIR}/math/mpc - -ONLY_FOR_ARCHS= i386 amd64 - -GNU_CONFIGURE= yes -USE_GMAKE= yes -USE_BZIP2= yes -USE_ICONV= yes -USE_PERL5_BUILD= yes -ALL_TARGET= default -MAKE_JOBS_SAFE= yes - -SNAPSHOT= 20111026 -GCC_BRANCH= 4.6 -GCC_POINT= 2 -GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} +.include "${.CURDIR}/Makefile.common" + LANGS= c APPLY_DIFFS= core - INTENDED_COMPILER= NATIVE BOOTSTRAP_COMPILER= NOT_REQUIRED BOOTSTRAP_TRIPLET= NOT_SET @@ -287,5 +270,16 @@ ${ECHO_CMD} "@unexec ${RMDIR} %D/include/c++ 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib cd ${WRKDIR}; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST} +.if ${OSVERSION} > 900000 + @${ECHO_MSG} "========================================================" + @${ECHO_MSG} " NOTICE REGARDING ADA TASKING ON FREEBSD 9.x:" + @${ECHO_MSG} " Due to a new resource check in the threading library" + @${ECHO_MSG} " starting with FreeBSD 9.0, an exiting task panics with" + @${ECHO_MSG} " the message 'thread exits with resources held!'." + @${ECHO_MSG} " Essentially this behavior breaks Ada tasking and 23" + @${ECHO_MSG} " ACATS tests fail on FreeBSD 9.x. A solution is being" + @${ECHO_MSG} " sought, but the necessary patches will not be trivial." + @${ECHO_MSG} "========================================================" +.endif .include --- /dev/null 2012-04-06 22:33:00.000000000 +0200 +++ Makefile.common 2012-04-06 22:42:28.000000000 +0200 @@ -0,0 +1,21 @@ +# $FreeBSD$ + +LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp +LIB_DEPENDS+= mpfr.4:${PORTSDIR}/math/mpfr +LIB_DEPENDS+= mpc.2:${PORTSDIR}/math/mpc + +ONLY_FOR_ARCHS= i386 amd64 + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_BZIP2= yes +USE_ICONV= yes +USE_PERL5_BUILD= yes +ALL_TARGET= default +MAKE_JOBS_SAFE= yes + +SNAPSHOT= 20120301 +GCC_BRANCH= 4.6 +GCC_POINT= 3 +GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} + --- distinfo.orig 2012-03-01 19:28:34.000000000 +0100 +++ distinfo 2012-03-01 19:55:14.000000000 +0100 @@ -1,15 +1,15 @@ -SHA256 (gcc-core-4.6.2.tar.bz2) = dcbf391f05277b7e09d14d54f3bdaba5515a3a8e7dd1d8af93af3f6f68455e10 -SIZE (gcc-core-4.6.2.tar.bz2) = 30258326 -SHA256 (gcc-ada-4.6.2.tar.bz2) = 9ac26821ad900d02ed251b62e6a0506ee12417b506a7bb9b02ec9f09e5d9c84f -SIZE (gcc-ada-4.6.2.tar.bz2) = 6064757 -SHA256 (gcc-g++-4.6.2.tar.bz2) = 5470bea8093438cf5840fbbef3546b6dba7b0153ef6a16e142c1fba1fac6e598 -SIZE (gcc-g++-4.6.2.tar.bz2) = 6955594 -SHA256 (gcc-fortran-4.6.2.tar.bz2) = 492becd732662349eaa5e7c4e458ac009df0ccb8904df54ae295d277c4d6be6f -SIZE (gcc-fortran-4.6.2.tar.bz2) = 1676539 -SHA256 (gcc-objc-4.6.2.tar.bz2) = 74cc0e46c7455f3781c740e0f49e06355d8b04a32cb6f015d2bfde39a9ad1dd4 -SIZE (gcc-objc-4.6.2.tar.bz2) = 342544 -SHA256 (gcc-testsuite-4.6.2.tar.bz2) = 146e2ec50913515989405162e8e861e17d710c3ca1d4d19073527ea24a0ef81e -SIZE (gcc-testsuite-4.6.2.tar.bz2) = 6309400 +SHA256 (gcc-core-4.6.3.tar.bz2) = 283e00881c0de258fafc5170843e4d9b14ee2a7dc4426f0d426e6be0400251c1 +SIZE (gcc-core-4.6.3.tar.bz2) = 30305971 +SHA256 (gcc-ada-4.6.3.tar.bz2) = 7bb213ec3948646df72720580fcba3489c84aa452bd0e4238712607ef83cbdf6 +SIZE (gcc-ada-4.6.3.tar.bz2) = 6092418 +SHA256 (gcc-g++-4.6.3.tar.bz2) = b3e0c733e900e99096b0c5480f57e22e3e583ec3d83596cc2cb9986bd64b29e8 +SIZE (gcc-g++-4.6.3.tar.bz2) = 6928430 +SHA256 (gcc-fortran-4.6.3.tar.bz2) = fe1bdf3485f33e6d0a998ff7bcb42526fbf3083dbfc107c3d95a88c00739eadb +SIZE (gcc-fortran-4.6.3.tar.bz2) = 1676490 +SHA256 (gcc-objc-4.6.3.tar.bz2) = 4c193397ce0b8b7b3a6b090078f7228e22999edb14a53480ac709f7f165a4ca3 +SIZE (gcc-objc-4.6.3.tar.bz2) = 342441 +SHA256 (gcc-testsuite-4.6.3.tar.bz2) = a3448d09e5e8ce6baee4080981efc85e6af1621b66a68258dd645c04ae381bed +SIZE (gcc-testsuite-4.6.3.tar.bz2) = 6354781 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 --- files.orig/diff-ada 2012-01-12 15:24:37.000000000 +0100 +++ files/diff-ada 2012-03-02 00:04:26.000000000 +0100 @@ -782,9 +782,9 @@ + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + * -+ * $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ -+ * $FreeBSD: ports/lang/gnat-aux/files/diff-ada,v 1.1 2012/01/12 14:24:37 culot Exp $ -+ * $DragonFly: src/lib/libc/string/strlcpy.c,v 1.4 2005/09/18 asmodai Exp $ ++ * OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp ++ * FreeBSD: src/lib/libc/string/strlcpy.c,v 1.10 2008/10/19 delphij Exp ++ * DragonFly: src/lib/libc/string/strlcpy.c,v 1.4 2005/09/18 asmodai Exp + */ + +size_t @@ -823,9 +823,9 @@ + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + * -+ * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ -+ * $FreeBSD: ports/lang/gnat-aux/files/diff-ada,v 1.1 2012/01/12 14:24:37 culot Exp $ -+ * $DragonFly: src/lib/libc/string/strlcat.c,v 1.4 2004/12/18 asmodai Exp $ ++ * OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp ++ * FreeBSD: src/lib/libc/string/strlcat.c,v 1.11 2009/01/12 delphij Exp ++ * DragonFly: src/lib/libc/string/strlcat.c,v 1.4 2004/12/18 asmodai Exp + */ + +size_t @@ -2439,7 +2439,7 @@ /* VxWorks Section */ /*******************/ -@@ -2320,6 +2392,7 @@ +@@ -2341,6 +2413,7 @@ #if defined (_WIN32) || defined (__INTERIX) \ || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \ --- files.orig/diff-core 2012-01-12 15:24:37.000000000 +0100 +++ files/diff-core 2012-03-01 23:39:27.000000000 +0100 @@ -290,7 +290,7 @@ +#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE) --- /dev/null +++ gcc/config/dragonfly.h -@@ -0,0 +1,141 @@ +@@ -0,0 +1,139 @@ +/* Base configuration file for all DragonFly targets. + Copyright (C) 1999, 2000, 2001, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2010-2012 John R. Marino @@ -388,12 +388,10 @@ +#undef LINK_SPEC +#define LINK_SPEC DFBSD_LINK_SPEC + -+#define DFBSD_DYNAMIC_LINKER \ -+ "/usr/libexec/ld-elf.so.2" ++#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2" + +#if defined(HAVE_LD_EH_FRAME_HDR) -+#define LINK_EH_SPEC \ -+ "%{!static:--eh-frame-hdr}" ++#define LINK_EH_SPEC "--eh-frame-hdr" +#endif + +/* Use --as-needed -lgcc_s for eh support. */ @@ -1157,11 +1155,11 @@ /* Put all *tf routines in libgcc. */ #undef LIBGCC2_HAS_TF_MODE -@@ -147,3 +148,39 @@ - #if FBSD_MAJOR >= 6 +@@ -148,5 +149,38 @@ #define SUBTARGET32_DEFAULT_CPU "i486" #endif -+ + +-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack +/* Define location of OS-specific unwind support configuration. */ +#define MD_UNWIND_SUPPORT "config/i386/freebsd-unwind.h" + @@ -1196,7 +1194,7 @@ + (void) mprotect (page, ends - page, perms); \ +} + -+ + --- gcc/config/i386/netbsd-elf.h.orig +++ gcc/config/i386/netbsd-elf.h @@ -2,6 +2,7 @@ @@ -1787,7 +1785,7 @@ #This file is part of GCC. -@@ -166,6 +167,8 @@ +@@ -157,6 +158,8 @@ ;; *-*-openbsd*) ;; @@ -1796,7 +1794,7 @@ *-*-rtems*) ;; *-*-vxworks*) -@@ -287,6 +290,14 @@ +@@ -278,6 +281,14 @@ x86_64-*-freebsd*) tmake_file="${tmake_file} i386/t-freebsd" ;; @@ -1811,7 +1809,7 @@ i[34567]86-*-netbsdelf*) ;; i[34567]86-*-netbsd*) -@@ -297,6 +308,8 @@ +@@ -288,6 +299,8 @@ ;; i[34567]86-*-openbsd*) ;; @@ -1820,7 +1818,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" -@@ -628,6 +641,9 @@ +@@ -619,6 +632,9 @@ tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp" fi ;; @@ -1837,7 +1835,7 @@ +SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-bsd.ver --- gcc/configure.orig +++ gcc/configure -@@ -25843,6 +25843,20 @@ +@@ -25833,6 +25833,20 @@ gcc_cv_target_dl_iterate_phdr=no fi ;; @@ -1890,9 +1888,38 @@ $(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs -rm -f $@ +--- libiberty/getpagesize.c.orig ++++ libiberty/getpagesize.c +@@ -20,6 +20,7 @@ + + */ + ++#ifndef __ANDROID__ + #ifndef VMS + + #include "config.h" +@@ -88,3 +89,4 @@ + } + + #endif /* VMS */ ++#endif /* __ANDROID__ */ +--- libiberty/setproctitle.c.orig ++++ libiberty/setproctitle.c +@@ -40,9 +40,11 @@ + void + setproctitle (const char *name ATTRIBUTE_UNUSED, ...) + { ++#ifndef __ANDROID__ + #ifdef PR_SET_NAME + /* On Linux this sets the top visible "comm", but not necessarily + the name visible in ps. */ + prctl (PR_SET_NAME, name); + #endif ++#endif + } --- configure.orig +++ configure -@@ -14200,7 +14200,7 @@ +@@ -14196,7 +14196,7 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --- files.orig/diff-fortran 2012-01-12 15:24:37.000000000 +0100 +++ files/diff-fortran 2012-03-01 23:39:27.000000000 +0100 @@ -52,3 +52,23 @@ install-dvi: install-dvi-am +--- gcc/testsuite/gfortran.dg/large_real_kind_2.F90.orig ++++ gcc/testsuite/gfortran.dg/large_real_kind_2.F90 +@@ -1,6 +1,6 @@ + ! { dg-do run } + ! { dg-require-effective-target fortran_large_real } +-! { dg-xfail-if "" { "*-*-freebsd*" } { "*" } { "" } } ++! { dg-xfail-if "" { *-*-freebsd* *-*-dragonfly* *-*-netbsd* } { "*" } { "" } } + + ! Testing library calls on large real kinds (larger than kind=8) + implicit none +--- gcc/testsuite/gfortran.dg/large_real_kind_3.F90.orig ++++ gcc/testsuite/gfortran.dg/large_real_kind_3.F90 +@@ -1,6 +1,6 @@ + ! { dg-do run } + ! { dg-require-effective-target fortran_large_real } +-! { dg-xfail-if "" { "*-*-freebsd*" } { "*" } { "" } } ++! { dg-xfail-if "" { *-*-freebsd* *-*-dragonfly* *-*-netbsd* } { "*" } { "" } } + + ! Testing erf and erfc library calls on large real kinds (larger than kind=8) + implicit none >Release-Note: >Audit-Trail: >Unformatted: