This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Simplify the IPA parts of the gdbserver Makefile
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?
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.
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.
Thanks,
Pedro Alves