Re: Statically linking with libgmp and libmpfr

"Vahedi, Shahab via Gdb" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi Andrew,

On 5/16/25 11:42 AM, Andrew Pinski wrote:

> On Fri, May 16, 2025 at 1:57 AM Vahedi, Shahab via Gdb
> <[email protected]> wrote:
>>
>>
>> I still am interested in an out-of-the-box approach, if any, like GDB <= 13.2.
> 
> The out of the box approach is to put the GMP/MPFR sources in the top
> level directory and that will build gmp/mpfr (static only) and link
> against those .

Like how GCC does it too. It basically works, because those libs are built
with:

  --disable-shared
  --enable-static

Same logic applies as the work-around I mentioned earlier, because there's
no *.so files to pick first, the build falls back to the static libraries.

Before, it was possible to instruct the build process to pick the static
version of these libraries wherever it is hinted (system-level or
--with-{gmp,mpfr}-lib).


Cheers,
Shahab
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.