From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gnulib: Ensure all libraries are used when building gdb/gdbserver
Date: Tue, 6 Oct 2020 10:10:25 -0400 [thread overview]
Message-ID: <95d52add-47c2-9621-7e60-1ff9a4331324@simark.ca> (raw)
In-Reply-To: <20201006121751.GK605036@embecosm.com>
On 2020-10-06 8:17 a.m., Andrew Burgess wrote:
> The problem here was me unconditionally trying to include
> Makefile.gnulib.inc from the gdb and gdbserver Makefile. The very
> first time you run 'make clean' after applying the patch
> Makefile.gnulib.inc doesn't exist, but the gdb/gdbserver makefiles
> still try to pull the file in unconditionally.
If the file is generated at configure-time, I think it would be ok for
Makefile.gnulib.inc to be included unconditionally. As when you run
"make clean" after pulling some changes, you're supposed to do to it
from the top level, so Makefile.gnulib.inc will be created before "make
clean" runs in GDB.
Building GDB (i.e. running "make" in gdb/) requires some other
directories (like gnulib/) to have been configured first. So if you
pull changes that affect these other directories and try to run "make"
just in gdb/ (instead of at the top-level), it's expected that some
things may not work (I think).
If there is no other legitimate situation where Makefile.gnulib.inc may
not exist, I'd slightly prefer for the include to be unconditional.
Simply because if Makefile.gnulib.inc doesn't exist, for some reason,
the error message will be much more straightforward. This:
$ make
/bin/sh config.status Makefile
config.status: creating Makefile
Makefile:242: ../gnulib/Makefile.gnulib: No such file or directory
make: *** No rule to make target '../gnulib/Makefile.gnulib'. Stop.
vs
$ make
CXX gdb.o
cc1plus: warning: command-line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/simark/src/binutils-gdb/gdb/defs.h:28,
from /home/simark/src/binutils-gdb/gdb/gdb.c:19:
/home/simark/src/binutils-gdb/gdb/../gdbsupport/common-defs.h:120:10: fatal error: pathmax.h: No such file or directory
120 | #include "pathmax.h"
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1618: gdb.o] Error 1
Finally, I don't know if the change was intentional, but the file was
previously named Makefile.gnulib.inc and is now named Makefile.gnulib.
I liked Makefile.gnulib.inc, as it shows it's not a "top-level"
Makefile, it's meant to be included.
Otherwise, the patch LGTM, thanks!
Simon
next prev parent reply other threads:[~2020-10-06 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 16:51 Andrew Burgess
2020-10-05 18:34 ` Simon Marchi
2020-10-06 12:17 ` Andrew Burgess
2020-10-06 14:10 ` Simon Marchi [this message]
2020-10-07 15:33 ` Andrew Burgess
2020-10-07 15:34 ` Simon Marchi
2020-10-09 8:34 ` Andrew Burgess
2020-10-12 11:41 ` Joel Brobecker
2020-10-12 14:16 ` Simon Marchi
2020-10-12 15:30 ` Andrew Burgess
2020-10-13 14:26 ` Simon Marchi
2020-10-14 14:09 ` Andrew Burgess
2020-10-15 8:35 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95d52add-47c2-9621-7e60-1ff9a4331324@simark.ca \
--to=simark@simark.ca \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox