I found the patch for PR 27880 causes libgcj and libstdc++ to contain a reference to _Unwind_GetIPInfo on darwin8.11. This causes a bootstrap failure and/or the testsuite to fail all the time with an undefined symbol. /bin/sh ./libtool --tag=GCJ --mode=link /Users/apinski/src/local/gcc/objdir/gcc/gcj -B/Users/apinski/src/local/gcc/objdir/i386-apple-darwin8.11.1/libjava/ -B/Users/apinski/src/local/gcc/objdir/gcc/ -L/Users/apinski/src/local/gcc/objdir/i386-apple-darwin8.11.1/libjava -ffloat-store -fomit-frame-pointer -Usun -g -O2 -o gij -rpath /Users/apinski/local-gcc/lib/gcj-4.4.0-10 -rpath /Users/apinski/local-gcc/lib -shared-libgcc -L/Users/apinski/src/local/gcc/objdir/i386-apple-darwin8.11.1/libjava/.libs libgij.la /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: __Unwind_GetIPInfo collect2: ld returned 1 exit status
The link test was doing the correct thing as libgcc in Darwin (before 9) did not contain _Unwind_GetIPInfo.
Here is the patch which I am currently testing: Index: unwind_ipinfo.m4 =================================================================== --- unwind_ipinfo.m4 (revision 142255) +++ unwind_ipinfo.m4 (working copy) @@ -15,6 +15,10 @@ AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [ *) with_system_libunwind=no ;; esac fi + # Darwin before version 9 does not have _Unwind_GetIPInfo. + case ${target} in + *-*-darwin[0-8]*) have_unwind_getipinfo=no ;; + esac # Based on system-libunwind and target, do we have ipinfo? if test x$with_system_libunwind = xyes; then case ${target} in --- CUT --- I should note that someone almost forgot to regenerate libstdc++ after the original change went in.
This will also match darwin10.
(In reply to comment #3) > This will also match darwin10. You are correct, in fact it does not set have_unwind_getipinfo to no anyways as it was being set to yes in the else statement. Index: unwind_ipinfo.m4 =================================================================== --- unwind_ipinfo.m4 (revision 142255) +++ unwind_ipinfo.m4 (working copy) @@ -22,7 +22,11 @@ AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [ *) have_unwind_getipinfo=yes ;; esac else - have_unwind_getipinfo=yes + # Darwin before version 9 does not have _Unwind_GetIPInfo. + case ${target} in + *-*-darwin[1-8].*) have_unwind_getipinfo=no ;; + *) have_unwind_getipinfo=yes ;; + esac fi if test x$have_unwind_getipinfo = xyes; then
Andrew, This last patch would still be problematic since it will not catch targets set to *-*-darwin8 rather than *-*-darwin8.5. A better fix would be to use the approach from... ------------------------------------------------------------------------ r142417 | janis | 2008-12-03 18:41:46 -0500 (Wed, 03 Dec 2008) | 2 lines * g++.old-deja/g++.eh/badalloc1.C: Reinstate XFAIL for Darwin 3-7. ...and use a patch like.... Index: unwind_ipinfo.m4 =================================================================== --- unwind_ipinfo.m4 (revision 142255) +++ unwind_ipinfo.m4 (working copy) @@ -22,7 +22,11 @@ AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [ *) have_unwind_getipinfo=yes ;; esac else - have_unwind_getipinfo=yes + # Darwin before version 9 does not have _Unwind_GetIPInfo. + case ${target} in + *-*-darwin[3-8]*) have_unwind_getipinfo=no ;; + *) have_unwind_getipinfo=yes ;; + esac fi if test x$have_unwind_getipinfo = xyes; then ...which would work until we reach darwin30.
You can use multiple patterns: *-*-darwin[1-8]|*-*-darwin[1-8].*) ...
Remember we don't want to match darwin10. Mike Stump recommended recently that not worrying about darwin1 and darwin2 would be okay. So the alternative would be... *-*-darwin[3-8]|*-*-darwin[3-8].*) ...
Ignore my last comment. I misread the proposed syntax.
Ok with the: + *-*-darwin[3-8]*) have_unwind_getipinfo=no ;; spelling. It matches the spelling in the rest of the compiler, which makes it easier to spot and modify. Technically, the: *-*-darwin[0-8]|*-*-darwin[0-8].*) ... is a bit more perfect, but, I'm not terribly worried about darwin1 or darwin2 systems. They won't work for other reasons.
Fixed.
Subject: Bug 38300 Author: pinskia Date: Sun Dec 21 22:27:18 2008 New Revision: 142877 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142877 Log: Index: config/ChangeLog +2008-12-21 Andrew Pinski <pinskia@gmail.com> + + PR target/38300 + * unwind_ipinfo.m4: Darwin before 9 does not have _Unwind_GetIPInfo. + Index: gcc/ChangeLog +2008-12-21 Andrew Pinski <pinskia@gmail.com> + + PR target/38300 + * configure: Regenerate. Index: libstdc++-v3/ChangeLog +2008-12-21 Andrew Pinski <pinskia@gmail.com> + + PR target/38300 + * configure: Regenerate. + Index: libjava/ChangeLog +2008-12-21 Andrew Pinski <pinskia@gmail.com> + + PR target/38300 + * configure: Regenerate. Modified: trunk/config/ChangeLog trunk/config/unwind_ipinfo.m4 trunk/gcc/ChangeLog trunk/gcc/configure trunk/libjava/ChangeLog trunk/libjava/configure trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/configure