From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21585 invoked by alias); 18 Oct 2008 09:00:54 -0000 Received: (qmail 21565 invoked by uid 22791); 18 Oct 2008 09:00:51 -0000 X-Spam-Check-By: sourceware.org Received: from adelie.canonical.com (HELO adelie.canonical.com) (91.189.90.139) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Oct 2008 09:00:00 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.60 #1 (Debian)) id 1Kr7f9-0005yZ-Vk; Sat, 18 Oct 2008 09:59:55 +0100 Received: from dslb-088-074-013-160.pools.arcor-ip.net ([88.74.13.160] helo=[192.168.42.17]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kr7f9-0000RP-Ou; Sat, 18 Oct 2008 09:59:55 +0100 Message-ID: <48F9A586.3020509@ubuntu.com> Date: Sat, 18 Oct 2008 17:19:00 -0000 From: Matthias Klose User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: sje@cup.hp.com CC: gcc-patches@gcc.gnu.org Subject: Re: _Unwind_GetIPInfo Redux: Patch for PR target/27880 References: <1224089619.528219.25255.nullmailer@hpsje.cup.hp.com> In-Reply-To: <1224089619.528219.25255.nullmailer@hpsje.cup.hp.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg00773.txt.bz2 sje@cup.hp.com schrieb: > I have been looking at the _Unwind_GetIPInfo issues again. There are two > problems, one is PR target/27880 where static linking on IA64 Linux does > not work when GCC is built with --with-system-libunwind and the other is > the fact that we use link based tests to determine if _Unwind_GetIPInfo > exists in the libstdc++-v3 and libjava configures and this does not > work if you are building cross-compilers. This patch is my attempt to > address both issues. > > At first I tried to fix the link test in the gcc directory to set or not > set HAVE_GETIPINFO correctly. I think that if we are on IA64 Linux and > we specify --with-system-libunwind then HAVE_GETIPINFO should not be set > because the IA64 system unwind library does not have this routine in it. > > This doesn't work though because _Unwind_GetIPInfo exists in libgcc (from > unwind-compat.o) on IA64 so even if the system libunwind doesn't have > _Unwind_GetIPInfo we still think it does because we find it in libgcc. > There doesn't seem to be anyway around this problem since GCC's that have > this have already been released and could be used to build the latest GCC. > > My second thought was to set the default values for with_system_libunwind > and for HAVE_GETIPINFO in gcc/configure.ac and then allow those > values to be overridden in config.gcc (based on target) or with the > --with-system-libunwind option to configure. This seems doable and > reasonable but it doesn't address the checks in libstdc++-v3 and libjava > where we would still need to do link tests to check for GetIPInfo and we > don't want to do that (for cross-compiling reasons) and they won't work > correctly because of the _Unwind_GetIPInfo in libgcc. I couldn't think > of any good way for the HAVE_GETIPINFO value set in the gcc directory > to be communicated to the libstdc++-v3 and libjava configures. > > So my final fix was to put the default settings of with_system_libunwind > and HAVE_GETIPINFO into the GCC_CHECK_UNWIND_GETIPINFO autoconf macro > in config/unwind_ipinfo.m4 and let that macro use the target variable > and the --with-system-libunwind configure option to change the defaults > if needed. Then gcc, libstdc++-v3, and libjava will all use the same > method to determine HAVE_GETIPINFO and it won't be a link based test. > > The only problem is that we now have an autoconf macro looking directly > at the $target variable. While I don't think that is ideal, I think it > might be acceptable as a way to address both of the _Unwind_GetIPInfo > issues that we want to fix. > > Here is a patch, I am still testing it but I wanted to send it out and > see what people think, see if this is an acceptable approach, or if > someone might have a better idea of how to fix the problem. > > Comments? Built a native ia64-linux compiler configured --with-system-libunwind , with ada enabled, after regenerating the config files in libstdc==-v3 and libjava. No regressions seen in the testsuite compared to a build without this patch. Matthias