]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/Makefile.in
Do not accidentally include in-tree readline headers
authorTom Tromey <tom@tromey.com>
Wed, 26 Sep 2018 12:54:17 +0000 (06:54 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 7 Oct 2018 04:46:56 +0000 (22:46 -0600)
commita8a5dbcab8df0b3a9e04745d4fe8d64740acb323
treeb61a60b157158db8b066c30de7fe84b6855a962f
parent2a8be20359dba9cc684fd3ffa222d985399f3b18
Do not accidentally include in-tree readline headers

PR build/17077 points out that when --with-system-readline is given,
gdb will still pick up the in-tree readline headers.  Normally this is
not a big problem, because readline is very stable and so the ABI does
not change much; but it is clearly a bug to do this, and could bite at
some point.

The basic problem is that OPCODES_CFLAGS uses -I$(OPCODES_SRC)/..  so
that #include "opcodes/..." works.  However, this also makes it so the

This patch fixes the problem in a mildly hacky way: remove the
offending -I option, and change gdb to use #include "../opcodes/..."
instead.  This continues to make it clear where the header comes from,
without allowing incorrect behavior.

Tested by rebuilding and then looking at the *.Po files.

gdb/ChangeLog
2018-10-06  Tom Tromey  <tom@tromey.com>

PR build/17077:
* Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
* arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
#include.
gdb/ChangeLog
gdb/Makefile.in
gdb/arc-tdep.c
gdb/frv-tdep.c
gdb/lm32-tdep.c
gdb/mep-tdep.c
gdb/microblaze-tdep.c
gdb/or1k-tdep.h