[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #40 from schwab at suse dot de 2007-04-25 15:46 --- Closing for now. -- schwab at suse dot de changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #33 from mmitchel at gcc dot gnu dot org 2007-04-24 22:51 --- Geoff, do you intend to backport these Darwin patches to 4.2.0? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #34 from geoffk at gcc dot gnu dot org 2007-04-25 00:14 --- I don't know what patches you're referring to, so no. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #35 from howarth at nitro dot med dot uc dot edu 2007-04-25 01:04 --- (In reply to comment #33) Geoff, do you intend to backport these Darwin patches to 4.2.0? Mark, Are you under the impression that the libstdc++-v3 and libjava patches were only applied to trunk? That isn't the case as those went into 4.2 branch some time ago as r115654 and r117259. The only outstanding issue I see is comment 31 which doesn't seem to be Darwin specific. Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #36 from howarth at nitro dot med dot uc dot edu 2007-04-25 01:19 --- (In reply to comment #31) When configuring with --with-system-libunwind, GCC should not include unwind-compat.o (or any unwind code) in the build of libgcc_s. Then the configure check will work correctly. Steve, Does this problem merit a P1 blocker status? For that specific issue, can't we downgrade this bug report to P2? Is it essential that --with-system-libunwind work in gcc 4.2.0 or could that just be retargeted for gcc 4.2.1? Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #37 from mrs at apple dot com 2007-04-25 01:42 --- libgcc_s.10.5.dylib now includes __Unwind_GetIPInfo on mainline and in 4.2... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #38 from mrs at apple dot com 2007-04-25 01:56 --- I think a non-working --with-system-libunwind corner case on darwin is a P4 at best? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #39 from howarth at nitro dot med dot uc dot edu 2007-04-25 02:06 --- Mike, Why don't you close this report as RESOLVED and create another one just for the non-working --with-system-libunwind issue as a P4. That might help prevent folks from constantly reopening this PR as a P1. Jack -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #31 from sje at cup dot hp dot com 2007-04-02 16:36 --- When configuring with --with-system-libunwind, GCC should not include unwind-compat.o (or any unwind code) in the build of libgcc_s. Then the configure check will work correctly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #32 from schwab at suse dot de 2007-04-02 20:42 --- unwind-compat is _required_ for the system libunwind. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #30 from schwab at suse dot de 2007-03-31 10:57 --- The configure check is finding the definition of _Unwind_GetIPInfo in libgcc_s (from unwind-compat.o) when configuring with --with-system-libunwind. -- schwab at suse dot de changed: What|Removed |Added BugsThisDependsOn||27880 Status|RESOLVED|REOPENED Resolution|FIXED | Bug 26792 depends on bug 27880, which changed state. Bug 27880 Summary: [4.2 regression] undefined reference to `_Unwind_GetIPInfo' http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27880 What|Old Value |New Value Status|RESOLVED|REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #29 from aph at gcc dot gnu dot org 2007-01-19 15:25 --- Subject: Bug 26792 Author: aph Date: Fri Jan 19 15:25:34 2007 New Revision: 120968 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=120968 Log: 2006-07-21 Steve Ellcey [EMAIL PROTECTED] PR target/26792 * unwind_ipinfo.m4: New. Added: branches/redhat/gcc-4_1-branch-java-merge-20070117/config/unwind_ipinfo.m4 - copied unchanged from r115653, trunk/config/unwind_ipinfo.m4 Modified: branches/redhat/gcc-4_1-branch-java-merge-20070117/config/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #28 from tromey at gcc dot gnu dot org 2006-10-11 21:06 --- I doubt those configure warnings are very important. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #25 from tromey at gcc dot gnu dot org 2006-09-27 21:24 --- Subject: Bug 26792 Author: tromey Date: Wed Sep 27 21:24:23 2006 New Revision: 117259 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117259 Log: 2006-09-26 Jack Howarth [EMAIL PROTECTED] PR target/26792: * exception.cc (PERSONALITY_FUNCTION): use _Unwind_GetIP if HAVE_GETIPINFO not defined. * stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Likewise. (_Jv_StackTrace::getLineNumberForFrame): Likewise. * configure.ac: use GCC_CHECK_UNWIND_GETIPINFO. * aclocal.m4, configure, include/config.h.in, Makefile.in: Rebuilt. Modified: trunk/libjava/ChangeLog trunk/libjava/Makefile.in trunk/libjava/aclocal.m4 trunk/libjava/configure trunk/libjava/configure.ac trunk/libjava/exception.cc trunk/libjava/gcj/Makefile.in trunk/libjava/include/Makefile.in trunk/libjava/include/config.h.in trunk/libjava/stacktrace.cc trunk/libjava/testsuite/Makefile.in -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #26 from tromey at gcc dot gnu dot org 2006-09-27 21:43 --- Fix checked in. -- tromey at gcc dot gnu dot org changed: What|Removed |Added CC||tromey at gcc dot gnu dot ||org Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #27 from howarth at nitro dot med dot uc dot edu 2006-09-28 04:41 --- One last minor nit with regards to the autoconf changes for both libstdc++-v3 and libjava. I notice that in config.log in libstdc++-v3 for example, I get... configure:31103: checking for _Unwind_GetIPInfo configure:31130: /sw/src/fink.build/gcc4-4.1.-20060927/darwin_objdir/./gcc/xgcc -shared-libgcc -B/sw/src/fink.build/gcc4-4.1.99 99-20060927/darwin_objdir/./gcc -nostdinc++ -L/sw/src/fink.build/gcc4-4.1.-20060927/darwin_objdir/powerpc-apple-darwin8/libstdc+ +-v3/src -L/sw/src/fink.build/gcc4-4.1.-20060927/darwin_objdir/powerpc-apple-darwin8/libstdc++-v3/src/.libs -B/sw/lib/gcc4/power pc-apple-darwin8/bin/ -B/sw/lib/gcc4/powerpc-apple-darwin8/lib/ -isystem /sw/lib/gcc4/powerpc-apple-darwin8/include -isystem /sw/lib /gcc4/powerpc-apple-darwin8/sys-include -o conftest -g -O2 -fno-exceptions conftest.cc -lm 5 /sw/lib/odcctools/bin/ld: warning -L: directory name (/sw/src/fink.build/gcc4-4.1.-20060927/darwin_objdir/powerpc-apple-darwin8/ libstdc++-v3/src) does not exist /sw/lib/odcctools/bin/ld: warning -L: directory name (/sw/src/fink.build/gcc4-4.1.-20060927/darwin_objdir/powerpc-apple-darwin8/ libstdc++-v3/src/.libs) does not exist /sw/lib/odcctools/bin/ld: Undefined symbols: __Unwind_GetIPInfo which suggests that configure is attempting to use directories before they exist. Is that worth fixing in both libstdc++-v3 and libjava? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #24 from howarth at nitro dot med dot uc dot edu 2006-09-26 23:27 --- Created an attachment (id=12333) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12333action=view) revised libjava patch preventing double deincrementation -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #23 from howarth at nitro dot med dot uc dot edu 2006-09-21 13:03 --- Proposed patches are posted at... http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00906.html http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00908.html ...which together should allow this PR to be finally closed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #22 from howarth at nitro dot med dot uc dot edu 2006-09-21 04:16 --- Okay, the autoconf changes for libstdc++ and libgcj actually work okay. The test program uses the static libgcc.a to link (which lacks the __Unwind_GetIP symbol) so that HAVE_GETIPINFO remains undefined regardless of whether MACOSX_DEPLOYMENT_TARGET is set or not. I believe this is the behavior we want on Darwin since the alternative of allowing MACOSX_DEPLOYMENT_TARGET unset to cause __Unwind_GetIP to be used in libstdc++ and libgcj would create libraries that couldn't be used when MACOSX_DEPLOYMENT_TARGET was set to 10.4 or 10.5. I'll post the patches to gcc-patches shortly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #21 from howarth at nitro dot med dot uc dot edu 2006-09-19 16:11 --- Steve has checked in the changes to config/unwind_ipinfo.m4, so I believe all we need now is... Index: libjava/configure.ac === --- libjava/configure.ac(revision 117056) +++ libjava/configure.ac(working copy) @@ -1480,6 +1480,9 @@ # See if we support thread-local storage. GCC_CHECK_TLS +# For _Unwind_GetIPInfo. +GCC_CHECK_UNWIND_GETIPINFO + # Check if linker supports static linking on a per library basis LD_START_STATIC_SPEC= LD_FINISH_STATIC_SPEC= I'll test that with tonight's gcc trunk build using MACOSX_DEPLOYMENT_TARGET unset which should create both a libstdc++ and libgcj with the _Unwind_GetIPInfo symbols. This should complete the fix for this PR. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #17 from bryce at mckinlay dot net dot nz 2006-09-18 03:49 --- (In reply to comment #15) Yes, I think the #ifdef is a reasonable solution. Stack traces will be inaccurate when GetIPInfo is unavailable, but I don't see any easy way around that. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #18 from howarth at nitro dot med dot uc dot edu 2006-09-18 04:34 --- Created an attachment (id=12288) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12288action=view) Patch to revert to _Unwind_GetIP when HAVE_GETIPINFO undefined -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #19 from howarth at nitro dot med dot uc dot edu 2006-09-18 04:40 --- Tested the patch on Darwin 8 with no regressions. Verified that the _Unwind_GetIPInfo symbols are absent for libgcj with HAVE_GETIPINFO undefined. While the patch is over 10 lines, I would argue that I only wrote the lines with the preprocessor statements and the rest is simply a return of previously existing code from others. LAST_UPDATED: Tue Sep 5 01:41:47 UTC 2006 (revision 116689) Native configuration is powerpc-apple-darwin8 === libjava tests === Running target unix === libjava Summary === # of expected passes6989 # of expected failures 12 # of untested testcases 8 Compiler version: gcc libjava Platform: powerpc-apple-darwin8 configure flags: --prefix=/sw --prefix=/sw/lib/gcc4 --with-gmp=/sw --with-included-gettext --host=powerpc-apple-darwin8 --with-as=/sw/lib/odcctools/bin/as --with-ld=/sw/lib/odcctools/bin/ld --with-nm=/sw/lib/odcctools/bin/nm '--mandir=\${prefix}/share/man' '--infodir=\${prefix}/share/info' --with-libiconv-prefix=/sw --disable-bootstrap --enable-languages=c,c++,fortran,java,objc -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #20 from howarth at nitro dot med dot uc dot edu 2006-09-18 04:58 --- Created an attachment (id=12289) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12289action=view) clean up whitespace in Changelog for patch to revert to _Unwind_GetIP when HAVE_GETIPINFO undefined -- howarth at nitro dot med dot uc dot edu changed: What|Removed |Added Attachment #12288|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #16 from howarth at nitro dot med dot uc dot edu 2006-09-16 20:39 --- Is this what we are waiting for? I came up with that by just placing wrappers around the changes submitted on... http://gcc.gnu.org/viewcvs/trunk/libjava/stacktrace.cc?r1=115069r2=115235pathrev=115235 and http://gcc.gnu.org/bugzilla/attachment.cgi?id=10915 so that the previous code was in place when HAVE_GETIPINFO is false. Index: exception.cc === --- exception.cc(revision 116995) +++ exception.cc(working copy) @@ -231,7 +231,11 @@ PERSONALITY_FUNCTION (int version, // Parse the LSDA header. p = parse_lsda_header (context, language_specific_data, info); + #ifdef HAVE_GETIPINFO ip = _Unwind_GetIPInfo (context, ip_before_insn); + #else + ip = _Unwind_GetIP (context) - 1; + #endif if (! ip_before_insn) --ip; landing_pad = 0; Index: stacktrace.cc === --- stacktrace.cc (revision 116995) +++ stacktrace.cc (working copy) @@ -131,6 +131,7 @@ _Jv_StackTrace::UnwindTraceFn (struct _U else #endif { +#ifdef HAVE_GETIPINFO _Unwind_Ptr ip; int ip_before_insn = 0; ip = _Unwind_GetIPInfo (context, ip_before_insn); @@ -139,9 +140,13 @@ _Jv_StackTrace::UnwindTraceFn (struct _U // to ensure we get the correct line number for the call itself. if (! ip_before_insn) --ip; - +#endif state-frames[pos].type = frame_native; +#ifdef HAVE_GETIPINFO state-frames[pos].ip = (void *) ip; +#else + state-frames[pos].ip = (void *) _Unwind_GetIP (context); +#endif state-frames[pos].start_ip = func_addr; } @@ -217,6 +222,12 @@ _Jv_StackTrace::getLineNumberForFrame(_J else offset = (_Unwind_Ptr) ip - (_Unwind_Ptr) info.base; +#ifndef HAVE_GETIPINFO + // The unwinder gives us the return address. In order to get the right + // line number for the stack trace, roll it back a little. + offset -= 1; +#endif + finder-lookup (binaryName, (jlong) offset); *sourceFileName = finder-getSourceFile(); *lineNum = finder-getLineNum(); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792
[Bug target/26792] [4.2 Regression] need to use autoconf when using newly-added libgcc functions
--- Comment #15 from sje at cup dot hp dot com 2006-09-11 22:31 --- Bryce, have you looked at ifdef'ing the use of _Unwind_GetIPInfo in the Java library? Would you be willing to do so? I have created an autoconf test (GCC_CHECK_UNWIND_GETIPINFO) in trunk/config/unwind_ipinfo.m4 and the C++ runtime library is checking for HAVE_GETIPINFO before using it. I believe the un-ifdef'ed use of this function in the java library is the reason this PR is still open. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26792