Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Vahedi, Shahab via Gdb" <gdb@sourceware.org>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Cc: "Vahedi, Shahab" <Shahab.Vahedi@amd.com>
Subject: Statically linking with libgmp and libmpfr
Date: Fri, 16 May 2025 08:24:55 +0000	[thread overview]
Message-ID: <53e7b3f8-32e9-42f6-92d6-df13b44f0e97@amd.com> (raw)

Up to and including GDB 13.2, it was possible to statically link GDB with
GMP and MPFR libraries. It was as simple as:

$ ./configure ... --with-libgmp-type=static --with-libmpfr-type=static

However, that all changed after this commit [1]. Those parameters are
ignored after this patch. I've tried the following approaches to no
avail (See [2] why they don't work):


$ ./configure GMPLIBS="/usr/lib/libmgmp.a /usr/lib/libmpfr.a"
$ ./configure --with-gmp-lib=/usr/lib/libgmp.a --with-mpfr-lib=...
$ ./configure --with-gmp-lib=-l:libgmp.a --with-mpfr-lib=-l:libmpfr.a


Is anyone aware of other ways to do so? 


Cheers,
Shahab


[1] Use toplevel configure for GMP and MPFR for gdb
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=99118062785


[2] reasons that the illustrated alternatives don't work:

- configure GMPLIBS=...: the GMPLIBS is ignored and not transferred from
                         the top-level configure to gdb/configure

- --with-gmp-lib=/usr/lib/libgmp.a: the value is supposed to be a dir

- --with-gmp-lib=-l:libgmp.a: it gets prefixed with "-L" in configure
                              (-L-l:libgmpa.a)

             reply	other threads:[~2025-05-16  8:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  8:24 Vahedi, Shahab via Gdb [this message]
2025-05-16  8:55 ` Vahedi, Shahab via Gdb
2025-05-16  9:42   ` Andrew Pinski via Gdb
2025-05-16 12:49     ` Vahedi, Shahab via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53e7b3f8-32e9-42f6-92d6-df13b44f0e97@amd.com \
    --to=gdb@sourceware.org \
    --cc=Shahab.Vahedi@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox