public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Nemo Nusquam <cym224@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Running gdb-14.0.50
Date: Mon, 27 Mar 2023 16:00:41 +0200	[thread overview]
Message-ID: <ydd1qlawaye.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <dee444f2-e93e-8148-ae31-9a25b9dc61b5@gmail.com> (Nemo Nusquam's message of "Sun, 26 Mar 2023 20:53:55 -0400")

Nemo Nusquam <cym224@gmail.com> writes:

>>> CFLAGS='-m64 -g3 -O0' \
>>> CXXFLAGS='-m64 -g3 -O0' \
>> I've asked this before: why do you need a gdb with full debug info?  If
>> running into problems, start with a bare-minimum configuration,
>> i.e. omit CFLAGS/CXXFLAGS completely.  If your gcc doesn't create 64-bit
>> binaries by default, better use CC='gcc -m64' CXX='g++ -m64'.
>
> Please read the section on the GDB Wiki: Building GDB Natively
> (https://sourceware.org/gdb/wiki/BuildingNatively), where these flags 
> are specified.

This page is obviously targeted at GDB developers.  Besides, it states

> Of course, you can still do a simple ./configure && make, but you
> might actually want to disable a few projects that don't need to be
> built (and that take a long time to build).

Unless you need to debug gdb with itself, you don't need to build with
-g3 -O0.  So far, you haven't stated what's your goal in building from
a git clone instead of just building the latest release as a regular
user.

>>> AR=/usr/bin/gar \
>> No need for this: the build should be fine with either Solaris ar or GNU
>> ar.  If it's not, please file a bug report.
>
> I removed this option and configure built a Makefile that invoked
> sparcv9-sun-solaris11-ar, so I put it back in.

You absolutely need to remove all remnants of tools with
*-*-solaris11-*: those are using an invalid configure triple and thus of
no use at all, or rather harmful.  If that were
sparcv9-sun-solaris2.11-ar, that's just an alternative name of GNU ar.

>>> --enable-64-bit-bfd \
>>> --enable-tui \
>>> --with-curses \
>> I never had a need for any of those.  If you do, please explain.
>
> These are leftovers from a very old script.  They were removed.

I known: one tends to carry forward stuff like this years after they may
have been necessary.  That's why I insist of starting with the most
basic configure invocation possible and only add stuff if you 200% know
what/why you are doing that.

> Here is my final configuration script:
>
> CFLAGS='-g3 -O0' \
> CXXFLAGS='-g3 -O0' \
> CC="/home/build/gcc/64/bin/gcc -m64" \
> CXX="/home/build/gcc/64/bin/g++ -m64" \
> ../gdb-14.0.50.20230322/configure \
> --with-gmp-prefix=/usr/local \
> --with-mpfr-prefix=/usr/local \
> --build=sparcv9-sun-solaris2.11 \
> --disable-binutils \
> --disable-gold \
> --disable-gprof \
> --disable-gas \
> --disable-intl \
> --disable-ld \
> --disable-sim

Looks sensible indeed, although should should consider removing
CFLAGS/CXXFLAGS for serious use: the defaults can help performance
tremendously ;-)

> And here is the configuration reported by the resulting binary.
[...]
> ("Relocatable" means the directory can be moved with the GDB installation
> tree, and GDB will still find it.)

Indeed: both gdb and gcc can be for quite some time.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

      reply	other threads:[~2023-03-27 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 22:56 Nemo Nusquam
2023-03-23 13:05 ` Rainer Orth
2023-03-27  0:53   ` Nemo Nusquam
2023-03-27 14:00     ` Rainer Orth [this message]

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=ydd1qlawaye.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=cym224@gmail.com \
    --cc=gdb@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).