Re: Running gdb-14.0.50
Rainer Orth <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Nemo Nusquam <[email protected]> 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