* building GDB natively using 'configure' at 'two' levels
@ 2021-09-08 7:25 SAIFI
2021-09-08 8:12 ` Andrew Burgess
0 siblings, 1 reply; 4+ messages in thread
From: SAIFI @ 2021-09-08 7:25 UTC (permalink / raw)
To: gdb
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/ ?
warm regards
Saifi.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building GDB natively using 'configure' at 'two' levels
2021-09-08 7:25 building GDB natively using 'configure' at 'two' levels SAIFI
@ 2021-09-08 8:12 ` Andrew Burgess
2021-09-08 9:47 ` SAIFI
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2021-09-08 8:12 UTC (permalink / raw)
To: SAIFI; +Cc: gdb
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building GDB natively using 'configure' at 'two' levels
2021-09-08 8:12 ` Andrew Burgess
@ 2021-09-08 9:47 ` SAIFI
2021-09-08 11:30 ` Andrew Burgess
0 siblings, 1 reply; 4+ messages in thread
From: SAIFI @ 2021-09-08 9:47 UTC (permalink / raw)
To: gdb
On Wed, 8 Sep 2021, Andrew Burgess wrote:
>
> Here's how I'd configure and build GDB:
>
> ...
> ../src/configure .... all configure options here ....
>
> ....
> Configure options passed to src/configure will be forwarded to
> src/gdb/configure automatically.
>
Thanks Andrew !
in essence, 'sub'-configure options can be specified to the 'top'-configure
${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 \
--disable-largefile \
--with-gnu-ld \
--with-expat=no \
--with-python=no \
--with-guile=no \
--with-intel-pt=no \
--with-babeltrace=no
in other words,
as an example, given that there are three sub directories with a configure script
sub_dir_01
sub_dir_02
sub_dir_03
if sub_dir_01 'configure' had options
o1
o2
o3
and sub_dir_02 'configure' had options
o4
o5
then top level 'configure' will apply the 'union' of all the options specified
o1
o2
o3
o4
o5
to each sub-directory which has a 'configure' script, ie.
sub_dir_01
sub_dir_02
sub_dir_03
sorry for being pedantic, just making sure that i understood 'the manner of application of options' correctly.
warm regards
Saifi.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building GDB natively using 'configure' at 'two' levels
2021-09-08 9:47 ` SAIFI
@ 2021-09-08 11:30 ` Andrew Burgess
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2021-09-08 11:30 UTC (permalink / raw)
To: SAIFI; +Cc: gdb
* SAIFI <saifi@strikr.io> [2021-09-08 09:47:12 +0000]:
> On Wed, 8 Sep 2021, Andrew Burgess wrote:
> >
> > Here's how I'd configure and build GDB:
> >
> > ...
> > ../src/configure .... all configure options here ....
> >
> > ....
> > Configure options passed to src/configure will be forwarded to
> > src/gdb/configure automatically.
> >
>
> Thanks Andrew !
>
> in essence, 'sub'-configure options can be specified to the 'top'-configure
>
> ${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 \
> --disable-largefile \
> --with-gnu-ld \
> --with-expat=no \
> --with-python=no \
> --with-guile=no \
> --with-intel-pt=no \
> --with-babeltrace=no
>
> in other words,
>
> as an example, given that there are three sub directories with a configure script
> sub_dir_01
> sub_dir_02
> sub_dir_03
>
> if sub_dir_01 'configure' had options
> o1
> o2
> o3
> and sub_dir_02 'configure' had options
> o4
> o5
> then top level 'configure' will apply the 'union' of all the options specified
> o1
> o2
> o3
> o4
> o5
> to each sub-directory which has a 'configure' script, ie.
> sub_dir_01
> sub_dir_02
> sub_dir_03
>
> sorry for being pedantic, just making sure that i understood 'the
> manner of application of options' correctly.
You are correct.
This works for us thanks to AC_DISABLE_OPTION_CHECKING in our top level
configure.ac file.
There's more details about this here:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Option-Checking.html
Because we have a model where we have a top level configure script
recursively invokes the configure script for each sub-module, we need
the top level script not to error if it sees an option it doesn't
understand.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-08 11:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 7:25 building GDB natively using 'configure' at 'two' levels SAIFI
2021-09-08 8:12 ` Andrew Burgess
2021-09-08 9:47 ` SAIFI
2021-09-08 11:30 ` Andrew Burgess
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).