Re: [PATCH v2] Enable GDB build with in-tree GMP and MPFR

Bernd Edlinger
2021-01-16T18:01:09Z

On 1/11/21 4:22 AM, Joel Brobecker wrote:
>>> But I prefer having none of them, and just having a built mpfr/gmp
>>> be a prerequisite step to building GDB.
>>
>> Hmm, I see, but it was argued previously on this list, that it is okay
>> for GDB to have a mandatory dependency to GMP because GCC has the same
>> dependency.
>
> I think it was to show that this extra dependency wasn't going to
> introduce an unreasonable burden on the developers of some specific
> platform. Other that that, I wasn't trying to "follow" GCC.
>
>> However GCC offers exactly the same convenience as it allows GMP
>> to be optionally built in-tree.
>
> I wouldn't object to that convenience, but I'm in the same camp as
> Simon on that one. I know that this convenience is easier, and
> I used to take advantage of something like that for e.g. libiconv;
> but I soon realized that I kept rebuilding the same thing over and over
> every time I rebuilt everything from scratch. In the end, it took a tiny
> bit of effort to build and install that library once, and that was it,
> I used that same library build until I had to switch to a different
> machine. Maybe those libraries aren't big enough to make that much of
> a difference (I haven't checked), but I found in the end that I didn't
> really miss the convenience.
>
> Another option if you are on GNU/Linux is to install the system version
> together with the corresponding "devel" package. I assume it's not
> something that works for you?
>

Sure, but from time to time, I also want to build using a cross-compiler
for an entirely different target. And for that I would like the binary
to be completely self-contained if possible, just like when I build
gcc for a different target.
I don't say it is impossible to set up a statically built cross-gmp for that,
but it is not straight-forward either, and since the top-level configury
handles everything automatically for cross-builds, it is rather simple
in comparison.

Bernd.