[Mingw-users] Time for a MinGW-GDB Upgrade?

Back to archive index
Keith Marshall keith****@users*****
Thu Jul 16 05:10:29 JST 2020


In message
https://osdn.net/projects/mingw/lists/archive/users/2020-July/000584.html,
Eli Zaretskii indicated that, pursuant to resolution of an issue with
the build of GCC-9.2.0, (subsequently resolved), GDB can be readily
built with MinGW.  This has prompted me to review the release status of
MinGW-GDB, (curre****@GDB-7*****).

Unfortunately, my own experience of building, from GDB-9.2 sources, has
been less positive than Eli's; the first problem I encounter is:

  In file included from ../../src/gdb-9.2/bfd/archive.c:134:
  ../../src/gdb-9.2/bfd/sysdep.h:185:11: fatal error: libintl.h:
   No such file or directory
    185 | # include <libintl.h>
        |           ^~~~~~~~~~~
  compilation terminated.

This arises because, rather than having libintl in my default GCC search
path, I have it in a /mingw staging path, whence my GCC build procedure
accesses it via a "--with-libintl-prefix=/mingw" configuration option.

Given that GDB's configuration procedure has every appearance of being a
cobbled-together derivative of GCC's, I specified this same option in my
GDB configuration, but sadly, it has no effect!  (To be fair, it is not
mentioned in GDB documentation, so likely it isn't supported); however,
CPPFLAGS, which *is* documented, *should* offer a work around for this
issue, but doesn't, because the fragmented configuration process utterly
fails to propagate it to subsidiary configurations, and thus, it does
not deliver its documented behaviour where it matters.

I can kludge around this GDB bug, by passing "CPPFLAGS=-I/mingw" through
the process environment[1], when running make:

  CPPFLAGS=-I/mingw make

but the alternative, (and possibly more natural):

  make CPPFLAGS=-I/mingw

does *not* work; in this latter case, CPPFLAGS does not propagate to the
subdirectory makefiles.

[1] Of course, I could also just move the libintl headers and libraries
into the compiler's default search path, but I would prefer not to do
so; notwithstanding that I can kludge around this, (and thus move on to
the next issue, which I'll address in a follow-up post), this is a GDB
bug, which IMO merits upstream attention.

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20200715/dfb05b95/attachment.sig>


More information about the MinGW-Users mailing list
Back to archive index