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

Pedro Alves
2020-06-19T12:02:34Z

On 6/18/20 6:54 PM, Eli Zaretskii wrote:
>> Cc: gdb-patches@sourceware.org, tromey@adacore.com
>> From: Pedro Alves <palves@redhat.com>
>> Date: Thu, 18 Jun 2020 18:32:42 +0100
>>
>>>> 2. Use --avoid=stat --avoid=fstat. So far this seems like the best
>>>> approach. Pedro pointed out that this means we won't get any gnulib
>>>> fixes for other bugs in this area. However, given gdb's relatively
>>>> minimal needs from stat, and given the fact that gnulib is
>>>> introducing other bugs, this seems like an acceptable tradeoff to me.
>>>
>>> If that works, I think it's an okay solution.
>>
>> I disagree. It's not only GDB's stat usage that counts, it's the
>> other gnulib modules that depend on the stat module fixes too. Also,
>> that approach disables the stat module for all systems, not just
>> mingw. I think it's just bad policy to disable a module like that.
>
> What would you suggest instead?
>

I had presented two different ways forward back when this was originally
discussed:

[Handle different "struct stat" between GDB and BFD]
[users/palves/stat branch]
https://sourceware.org/legacy-ml/gdb-patches/2020-01/msg00608.html

[use gnulib --avoid=largefile, let ACX_LARGEFILE handle enabling largefile support consistently
throughout the tree]
[users/palves/gnulib-largefile branch]
https://sourceware.org/legacy-ml/gdb-patches/2020-01/msg00637.html

Back then IIRC, I was thinking that the --avoid=largefile solution
was the best one, but for some reason, the gnulib build fails with that,
which seemed like a gnulib bug. Since you then said back then you didn't
really care for a solution to this problem, I ended up forgetting about
this whole issue and many of the details. :-/

Thanks,
Pedro Alves