Re: Two observations using GDB 13 snapshot

Eli Zaretskii via Gdb-patches
2023-01-07T16:22:08Z

> Date: Sat, 7 Jan 2023 16:16:16 +0000 (UTC)
> From: Hannes Domani <ssbssa@yahoo.de>
> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
>
> Am Samstag, 7. Januar 2023, 17:10:33 MEZ hat Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
>
> > > >> That does not happen for me.  Did you configure with --enable-shared?
> > > >
> > > > No.  Why would I need to?
> > >
> > > Without it, libtool should have no reason to put gdb in .libs.
> >
> > I see.  Well, here it is.
> >
> >
> > > > GDB is not a library, and doesn't build libraries that need to be
> > > > installed, AFAIK.
> > >
> > > So why does it create the gdb binary in .libs?  It is empty for me.
> >
> >
> > I don't know.  Any libtool experts around here?
>
> Isn't --enable-shared the default?

Yes, it is. I see this in gdb/config.log:

Target: mingw32
Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgversion='MinGW.org GCC Build-2'
Thread model: win32

So does it mean I should build with --disable-shared?

Anyway, --enable-shared is a legitimate configuration, so if it causes
the GDB executable to be created in .libs/, IMO the build should act
accordingly nad have a copy of gdb-gdb.gdb in that subdirectory.
Right?

> I think this behavior is a bit different for Windows targets, because of this
> part in libtool:
>
>       *cygwin* | *mingw* )
>         if test "$build_libtool_libs" != yes; then
>           wrappers_required=no
>         fi
>         ;;