public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
Date: Thu, 05 Jan 2012 14:46:00 -0000	[thread overview]
Message-ID: <201201051446.q05EkJVV016755@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <20120104204235.GA20047@host2.jankratochvil.net> from "Jan Kratochvil" at Jan 04, 2012 09:42:35 PM

Jan Kratochvil wrote:

> this is the second part for solving corelow after the s390x regression:
> 	[patch 2/2] Do not build libgdb.a by default
> 	http://sourceware.org/ml/gdb-patches/2011-12/msg00716.html
> ->
> 	corelow.o:(.bss+0x0): multiple definition of `core_gdbarch'
> 	corelow.o:(.bss+0x0): first defined here
> 	corelow.o: In function `deprecated_add_core_fns':
> 	corelow.c:(.text+0x0): multiple definition of `deprecated_add_core_fns'
> 	corelow.o:corelow.c:(.text+0x0): first defined here
> 
> 
> For targets using new set_gdbarch_regset_from_core_section it would not be
> a problem, just put corelow.o into the right entry of gdb/configure.tgt.

Huh, at least for s390 this would certainly be the correct solution; the
target actually is fully switched to modern gdbarch core handling ...

This needs to be done anyway to properly handle cross-debugging targeting
s390 core files.  Unless you already have done so, I can prepare a patch.

> But for legacy targets still using deprecated_add_core_fns (like
> sparc-solaris2.6 etc.) the addition to gdb/configure.tgt would enable
> corelow.o even for cross-targeted GDBs where there is unfortunately still no
> core files support.
> 
> Created the original configuration, just avoiding a duplicate corelow.o entry.
> A better idea is welcome.

Maybe a better way would be to just unconditionally add corelow.o to
COMMON_OBS and be done with it?  What would be the harm in having the
core target always present, even in configurations where no core file
formats will be recognized?

Or, if we want to keep the existing behaviour exactly, we could just
filter out all objects from TARGET_OBS that are already present in
NATDEPFILES (or vice versa).  This would at least avoid the ad-hoc
handling of one specific file ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2012-01-05 14:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 20:43 Jan Kratochvil
2012-01-05 14:46 ` Ulrich Weigand [this message]
2012-01-05 15:25   ` Jan Kratochvil
2012-01-05 17:10     ` [commit, s390] Move corelow.o to target config (Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal) Ulrich Weigand
2012-01-05 17:12     ` [patch 2/2] Fix linking on non-x86* after libgdb.a removal Ulrich Weigand
2012-01-09 21:02       ` Jan Kratochvil
2012-01-10 16:06         ` Ulrich Weigand
2012-01-10 17:17           ` [commit] " Jan Kratochvil
2012-01-10 19:32         ` Pedro Alves
2012-01-10 19:55           ` Jan Kratochvil

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=201201051446.q05EkJVV016755@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).