building GDB natively using 'configure' at 'two' levels

Andrew Burgess andrew.burgess@embecosm.com
Wed Sep 8 08:12:51 GMT 2021


* SAIFI <saifi@strikr.io> [2021-09-08 07:25:09 +0000]:

> Hi:
> 
> git cloned GDB and would like to build GDB natively using 'configure' at 'two' levels.
> 
> at the top of the source tree ${SRC}/gdb/, i have
> 
> ${SRC}/gdb/configure                \
>       --prefix=/opt/gdb             \
>       --datadir=/opt/gdb/data       \
>       --htmldir=/opt/gdb/doc        \
>       --disable-binutils            \
>       --disable-ld                  \
>       --disable-gold                \
>       --disable-gas                 \
>       --disable-sim                 \
>       --disable-gprof               \
> 
> and at ${SRC}/gdb/gdb/, i have
> 
> ${SRC}/gdb/gdb/configure            \
>       --prefix=/opt/gdb             \
>       --datadir=/opt/gdb/data       \
>       --htmldir=/opt/gdb/doc        \
>       --disable-largefile           \
>       --with-gnu-ld                 \
>       --with-expat=no               \
>       --with-python=no              \
>       --with-guile=no               \
>       --with-intel-pt=no            \
>       --with-babeltrace=no
> 
> what is the recommended way to run 'configure' at the top of the
> source tree, so that it will execute the custom configure in
> gdb/gdb/ ?

Here's how I'd configure and build GDB:

  mkdir binutils-gdb
  cd binutils-gdb
  git clone git://sourceware.org/git/binutils-gdb.git src
  mkdir build
  cd build
  ../src/configure .... all configure options here ....
  make all-gdb
  make check-gdb	# Optional, if you want to check it's working.
  make install-gdb

Configure options passed to src/configure will be forwarded to
src/gdb/configure automatically.

Hope that helps,

Thanks,
Andrew


More information about the Gdb mailing list