From: Nemo Nusquam <cym224@gmail.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gdb@sourceware.org
Subject: Re: Unable to build GDB 13.1 on Solaris 11.3 Sparc
Date: Thu, 9 Mar 2023 13:45:44 -0500 [thread overview]
Message-ID: <e53d36b5-4af7-7930-9fd8-1423c4131e5a@gmail.com> (raw)
In-Reply-To: <yddpm9i7uoh.fsf@CeBiTec.Uni-Bielefeld.DE>
On 2023-03-08 17:19, Rainer Orth wrote (in part):
> Nemo Nusquam via Gdb <gdb@sourceware.org> writes:
>
> > > I am trying (and failing) to build GDB 13.1 on Solaris 11.3 Sparc.
> > >
> > > Here is my configuration script.
> > >
> > > CXXFLAGS='-g3 -O0' \
> > > CFLAGS='-g3 -O0' \
>
> Why? Do you want/need to debug the resulting gdb itself? Otherwise,
> just leave the defaults (-g -O2).
These options are those specified on the GDB Wiki
(https://sourceware.org/gdb/wiki/BuildingNatively).
> > > NM=/usr/bin/gnm \
> > > SHELL=/usr/bin/bash \
>
> Probably rather CONFIG_SHELL. Btw., it's often best to have
> /usr/gnu/bin before /usr/bin in $PATH: configure scripts sometimes
> assume the GNU tools and fail in weird ways with the native ones.
>
> > > AR=/usr/bin/gar \
> > > AS=/usr/bin/as \
>
> Unnecessary for gdb.
The gar options are different than the ar options. Specifying AR
seems necessary.
> Even when building gcc, use --with-as=/usr/bin/as
> --without-gnu-as as documented in the installation guide. Relying on
> $PATH is risky and fragile.
Noted though I have built dozens of different versions of GCC this way.
> > > CC=/home/build/gcc/git/bin/gcc \
> > > CXX=/home/build/gcc/git/bin/g++ \
>
> I suppose this is a 32-bit-default gcc (i.e. configured for
> sparc-sun-solaris2.11, not sparcv9-sun-solaris2.11)? Any reason not to
> use the bundled gcc 7.3.0? That one is 64-bit-default.
Solaris 11.3 came bundled with gcc-4.8.2. I relied on config.guess,
which specifies sparc-sun-solaris2.11. I shall try sparcv9-sun-solaris2.11.
> > > ../configure \
> > > --with-mpc=/usr/local \
> > > --with-gmp=/usr/local \
> > > --with-mpfr=/usr/local \
> > > --enable-64-bit-bfd \
> > > --enable-tui \
> > > --with-curses \
> > > --disable-bootstrap \
>
> This is gcc only, thus unnecessary for a gdb build.
Noted.
> > > --disable-binutils \
> > > --disable-ld \
> > > --disable-gprof \
> > > --disable-gprofng \
> > > --disable-gold \
> > > --disable-gas \
> > > --disable-sim
>
> If you're building from the gdb 13.1 tarball, you can omit those.
Again, the options were taken from the GDB Wiki.
> Btw.,
> --disable-binutils is harmful: gdb depends on libbfd and won't link
> without, as you've discovered.
Again, the option was taken from the GDB Wiki.
> > > (Some flags taken from
https://sourceware.org/gdb/wiki/BuildingNatively .)
>
> In general, please start with the bare minimum of configure flags (like
> the --with-* stuff). Unless you known 200% what you're doing,
> additional flags usually cause more harm then anything.
Noted.
> Hope this helps.
>
> Rainer
>
Thank you.
Sincerely,
N.
next prev parent reply other threads:[~2023-03-09 18:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 21:33 Nemo Nusquam
2023-03-08 22:19 ` Rainer Orth
2023-03-09 8:08 ` Andreas Schwab
2023-03-09 10:37 ` Rainer Orth
2023-03-09 18:45 ` Nemo Nusquam [this message]
2023-03-08 22:43 ` Andrew Pinski
2023-03-09 18:20 ` Nemo Nusquam
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=e53d36b5-4af7-7930-9fd8-1423c4131e5a@gmail.com \
--to=cym224@gmail.com \
--cc=gdb@sourceware.org \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/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).