From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: "Peter O'Gorman" <gdb-patches@mlists.thewrittenword.com>
Cc: gdb-patches@sourceware.org
Subject: Re: minor portability patches
Date: Thu, 23 Sep 2010 22:03:00 -0000 [thread overview]
Message-ID: <20100923194438.GA9536@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <20100921164814.GC32745@tw.local>
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 <jan.kratochvil@redhat.com>
* 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)
prev parent reply other threads:[~2010-09-23 19:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 19:59 Peter O'Gorman
2010-09-21 20:06 ` Tom Tromey
2010-09-21 20:40 ` Joel Brobecker
2010-09-21 20:50 ` Peter O'Gorman
2010-09-21 21:56 ` Joel Brobecker
2010-09-21 21:09 ` Peter O'Gorman
2010-09-22 16:15 ` Doug Evans
2010-09-23 22:03 ` Jan Kratochvil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100923194438.GA9536@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@mlists.thewrittenword.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox