Re: [PATCH 2/3] Consistently use BFD's time

Joel Brobecker
2020-09-02T14:59:45Z

> Joel> I think our only realistic options are to take a more radical approach,
> Joel> either:
>
> Joel> - Stop using the stat module from gnulib (which I think we said
> Joel> we want to keep); or
>
> Joel> - Patch the gnulib implementation for now to block the incompatible
> Joel> behavior.
> [...]
> Joel> - Something else?
>
> One remaining option is to change BFD to use gnulib as well.
>
> This is workable as long as gdb never tries to use an out-of-tree
> library that uses struct stat (or a stat-derived time_t) as part of its
> API. To my knowledge gdb is currently safe on this front. I'd guess it
> seems likely to remain safe too, though of course one can't be certain.

Indeed.

IIRC, this is something that was briefly discussed with the binutils
team. They were open to the idea, but on the other hand, I think
they needed a bit more information about the expected gains they could
hope for. We can pursue this again with them if we'd like and we think
this could be decided and implemented relatively quickly. My feeling
is that this is not a trivial move, and thus would deserve a bit of
discussion before moving forward. Doing that just before we branch
seems a bit riskier. Perhaps we could first go with the local gnulib
patch, and then discuss with binutils about them adopting gnulib.

PS: Do we have an idea how binutils depending on gnulib might affect
binutils standalone distribution (e.g. the binutils libs provided
by the various distros)?

--
Joel