On 16/07/2020 17:39, Eli Zaretskii wrote: >> From: Keith Marshall, Wed, 15 Jul 2020 21:10:29 +0100 >> >> 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. > > FTR, I was building snapshots of what will shortly become GDB 10.1. Yes, I had understood that, thanks. My rationale for choosing 9.2 is that, with 9.2 being the current stable release, if I can iron out the wrinkles with it, I should be better placed to progress to GDB-10 when it is, eventually, released. >> 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! > > Maybe it's worth reporting to gdb-p****@sourc*****, as a > potential bug. Will do. Can I post as a guest, or do I need to subscribe? >> 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. > > I think the canonical ways of doing this is to set CPPFLAGS when > running 'configure', i.e. > > CPPFLAGS=-I/mingw ./configure ... That is the archaic (pre autoconf-2.50, IIRC) way; contemporary autoconf wisdom would express it as ./configure CPPFLAGS=-I/mingw/include ... (with the correction, as I posted later), but the effect should be the same either way, and yes ... > Did you try that? I did, (using the contemporary syntax); it doesn't work. The reason is that most of GDB's configuration (in subdirectories) is deferred until the top level "make" is run, and the top level configure's notion of CPPFLAGS isn't propagated, through the "make" phase, to the subdirectory "configure" runs. OTOH, running CPPFLAGS=-I/mingw/include make at top level causes the subdirectory configures to run, as if invoked with the archaic syntax, and they pick up the proper CPPFLAGS through the environment, as it prevails when they are run. -- 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/20200717/008a0294/attachment.sig>