public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/28332] New: [11 regression] configure check for GMP is insufficient
Date: Mon, 13 Sep 2021 08:39:32 +0000	[thread overview]
Message-ID: <bug-28332-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28332

            Bug ID: 28332
           Summary: [11 regression] configure check for GMP is
                    insufficient
           Product: gdb
           Version: 11.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: sparcv9-sun-solaris2.11, amd64-pc-solaris.2.11
            Target: sparcv9-sun-solaris2.11, amd64-pc-solaris.2.11
             Build: sparcv9-sun-solaris2.11, amd64-pc-solaris.2.11

gdb's configure check for GMP is insufficient to build gdb 11.1 on Solaris
11.3:

* The bundled gmp is too old (at least for gcc's requirements), and even if it
  were ok for gdb, gmp.h lives in /usr/include/gmp, thus the header isn't
found.

* A self-compiled libgmp isn't found for a 64-bit build.  While the header
lives
  in $prefix/include, the library lives in $prefix/lib/sparcv9 resp.
  $prefix/lib/amd64 for the 64-bit case.  Solaris being multilibbed, the 32-bit
  libraries live in .../lib, while the 64-bit libs live in .../lib/sparcv9 etc.
  subdirs.

gdb's --with-gmp-prefix is not enough to describe this situation because it
only
supports $prefix/include and $prefix/lib.  Neither the Solaris 11.3-native
/usr/include/gmp directory for the header no the non-default
$prefix/lib/{sparcv9,amd64} can be described that way.

I tried configuring with LDFLAGS=-L$prefix/lib/sparcv9 so the library is found
at configure time, but this doesn't work because the link line is

gcc -o conftest -g -O2     -I/vol/gcc/include  -L/vol/gcc/lib/sparcv9
conftest.c -lncurses -lsocket -lnsl -lm  /vol/gcc/lib/libgmp.a

i.e. the static library is specified with a (wrong) full path.

gcc gets things right by providing --with-gmp=$dir for the default case, but
allowing to specify --with-gmp-include and --with-gmp-lib separately to allow
for specific situations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-09-13  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  8:39 ro at gcc dot gnu.org [this message]
2021-09-13  8:45 ` [Bug build/28332] " ro at gcc dot gnu.org
2022-03-06 16:05 ` tromey at sourceware dot org
2022-03-06 16:09 ` tromey at sourceware dot org

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=bug-28332-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).