From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31570 invoked by alias); 23 Sep 2010 19:44:50 -0000 Received: (qmail 31558 invoked by uid 22791); 23 Sep 2010 19:44:49 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Sep 2010 19:44:44 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8NJigKf013674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Sep 2010 15:44:42 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8NJieo4003722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Sep 2010 15:44:42 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o8NJidDs025111; Thu, 23 Sep 2010 21:44:39 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o8NJick1025107; Thu, 23 Sep 2010 21:44:38 +0200 Date: Thu, 23 Sep 2010 22:03:00 -0000 From: Jan Kratochvil To: "Peter O'Gorman" Cc: gdb-patches@sourceware.org Subject: Re: minor portability patches Message-ID: <20100923194438.GA9536@host1.dyn.jankratochvil.net> References: <20100921164814.GC32745@tw.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100921164814.GC32745@tw.local> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00417.txt.bz2 On Tue, 21 Sep 2010 18:48:16 +0200, Peter O'Gorman wrote: > -rdynamic was being added regardless, causing link failures on multiple > platforms. > 0003-Don-t-use-rdynamic-by-default-for-non-gcc.patch [...] > - found="-rdynamic" > - RDYNAMIC="-rdynamic" > + if test "$GCC" = "yes"; then > + found="-rdynamic" > + RDYNAMIC="-rdynamic" > + else > + found=none > + RDYNAMIC= > + fi I would slightly prefer to bring it more on-par with gdbserver/configure.ac using AC_TRY_LINK. On local OpenSolaris there is gcc but Sun linker. Still it worked there, though - as gcc complains but works even with -dynamic. Thanks, Jan 2010-09-23 Jan Kratochvil * configure.ac: Use -rdynamic optionally, based on AC_TRY_LINK. * configure: Regenerate. --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1496,8 +1496,13 @@ if $dynamic_list; then found="-Wl,--dynamic-list" RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' else - found="-rdynamic" - RDYNAMIC="-rdynamic" + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$old_LDFLAGS -rdynamic" + AC_TRY_LINK([], [], [found="-rdynamic" + RDYNAMIC="-rdynamic"], + [found="no" + RDYNAMIC=""]) + LDFLAGS="$old_LDFLAGS" fi AC_SUBST(RDYNAMIC) AC_MSG_RESULT($found)