public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Simplify the IPA parts of the gdbserver Makefile
Date: Tue, 26 Nov 2019 21:06:00 -0000	[thread overview]
Message-ID: <CAPTJ0XHLrHCK+QwAzBDGR7Kq8LoVnR=3wJ3XKDq+teLCLr2D3A@mail.gmail.com> (raw)
In-Reply-To: <b0d792d5-76ff-c67f-d569-13074b3b1305@redhat.com>

On Tue, Nov 26, 2019 at 2:56 PM Pedro Alves <palves@redhat.com> wrote:
>
> On 11/26/19 8:32 PM, Christian Biesinger wrote:
> >> Currently the IPA uses gnulib headers, but not the function
> >> replacements.  What's the end goal you're after?  Why is this
> >> an improvement?
> >
> > Right. The end goal is
> > https://sourceware.org/ml/gdb-patches/2019-11/msg00922.html -- I want
> > to be able to call safe_strerror from more places, which means the
> > implementation of safe_strerror needs to be able to call glibc's
> > strerror_r. I suppose I could try adding it to UNDO_GNULIB_CFLAGS,
> > maybe, but it seemed less confusing to change it like this.
> So currently strerror_r is replaced by gnulib and you get a link
> error?

Yes, exactly.

> What bothers me is that this moves in the direction of having to
> handle portability ourselves, effectively undoing the benefits
> of gnulib.  It seems to me to walk in the opposite direction of
> the ideal, which would be for the IPA to also use gnulib.
> It doesn't use gnulib today, because the IPA is a shared library,
> so we'd need to link with a build of gnulib built with -fPIC.

Oh, is that the only reason? That seems like it should be fixable
reasonably easily, just build gdbserver's gnulib with -fPIC. And if we
move to a single Gnulib build we can just build all of it with -fPIC,
I would think, not much of a downside. I thought there may be codesize
concerns.

> The UNDO_GNULIB_CFLAGS stuff at least gives us normalized headers
> between gdb / gdbserver / IPA, which for simple header portability
> fixes and defines seems good enough, though not ideal, of course.

OK, I'll update that other patch to use that.

Do you think https://sourceware.org/ml/gdb-patches/2019-11/msg00908.html
is still worth having or should I withdraw that too?

Christian

  reply	other threads:[~2019-11-26 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 19:10 Christian Biesinger via gdb-patches
2019-11-26 20:29 ` Pedro Alves
2019-11-26 20:33   ` Christian Biesinger via gdb-patches
2019-11-26 20:56     ` Pedro Alves
2019-11-26 21:06       ` Christian Biesinger via gdb-patches [this message]
2019-11-29 17:40         ` Pedro Alves

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='CAPTJ0XHLrHCK+QwAzBDGR7Kq8LoVnR=3wJ3XKDq+teLCLr2D3A@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=palves@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).