mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 21:03:55 +08:00
Fix gdbsupport build
I'm seeing this on F27 (a clean build from scratch): ~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: Entering directory '/home/pedro/brno/pedro/gdb/binutils-gdb/build/gdbsupport' CC gdb_tilde_expand.o In file included from /home/pedro/gdb/binutils-gdb/src/gdbsupport/../gnulib/import/libc-config.h:33:0, from ../gnulib/import/glob.h:544, from /home/pedro/gdb/binutils-gdb/src/gdbsupport/gdb_tilde_expand.c:22: ../bfd/config.h:7:4: error: #error config.h must be #included before system headers # error config.h must be #included before system headers ^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ libc-config.h, where it includes config.h, says: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* This is intended to be a good-enough substitute for glibc system macros like those defined in <sys/cdefs.h>, so that Gnulib code shared with glibc can do this as the first #include: #ifndef _LIBC # include <libc-config.h> #endif When compiled as part of glibc this is a no-op; when compiled as part of Gnulib this includes Gnulib's <config.h> and defines macros that glibc library code would normally assume. */ #include <config.h> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The issue is that that '#include <config.h>' picks up bfd's config.h instead of gnulib's. This problem doesn't trigger in the gdb dir because there we generate config.h under that exact name so gnulib's libc-config.h ends up picking gdb's config.h instead of gnulib.c and that ends up harmless. In gdbsupport, the config.h file is really named support-config.h, so that '#include <config.h>' in libc-config.h doesn't pick it like it would if it had the conventional config.h name. This patch fixes it by simply renaming gdbserver's support-config.h to config.h. gdbsupport/ChangeLog: 2020-01-17 Pedro Alves <palves@redhat.com> * configure.ac: Generate config.h instead of support-config.h. * common-defs.h: Include <gdbsupport/config.h> instead of <gdbsupport/support-config.h>. * Makefile.in: Regenerate. * configure: Regenerate.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2020-01-17 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* configure.ac: Generate config.h instead of support-config.h.
|
||||||
|
* common-defs.h: Include <gdbsupport/config.h> instead of
|
||||||
|
<gdbsupport/support-config.h>.
|
||||||
|
* Makefile.in: Regenerate.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2020-01-14 Tom Tromey <tom@tromey.com>
|
2020-01-14 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* Makefile.in: Rebuild.
|
* Makefile.in: Rebuild.
|
||||||
|
@ -132,7 +132,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
|||||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
configure.lineno config.status.lineno
|
configure.lineno config.status.lineno
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||||
CONFIG_HEADER = support-config.h
|
CONFIG_HEADER = config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
LIBRARIES = $(noinst_LIBRARIES)
|
LIBRARIES = $(noinst_LIBRARIES)
|
||||||
@ -388,7 +388,7 @@ libgdbsupport_a_SOURCES = \
|
|||||||
xml-utils.c \
|
xml-utils.c \
|
||||||
$(selftest)
|
$(selftest)
|
||||||
|
|
||||||
all: support-config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
@ -427,20 +427,20 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
support-config.h: stamp-h1
|
config.h: stamp-h1
|
||||||
@test -f $@ || rm -f stamp-h1
|
@test -f $@ || rm -f stamp-h1
|
||||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||||
|
|
||||||
stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
|
stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
|
||||||
@rm -f stamp-h1
|
@rm -f stamp-h1
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status support-config.h
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||||
rm -f stamp-h1
|
rm -f stamp-h1
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
distclean-hdr:
|
distclean-hdr:
|
||||||
-rm -f support-config.h stamp-h1
|
-rm -f config.h stamp-h1
|
||||||
|
|
||||||
clean-noinstLIBRARIES:
|
clean-noinstLIBRARIES:
|
||||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
@ -565,7 +565,7 @@ distclean-tags:
|
|||||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(LIBRARIES) support-config.h
|
all-am: Makefile $(LIBRARIES) config.h
|
||||||
installdirs:
|
installdirs:
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#else /* GDBSERVER */
|
#else /* GDBSERVER */
|
||||||
|
|
||||||
#include <gdbsupport/support-config.h>
|
#include <gdbsupport/config.h>
|
||||||
|
|
||||||
#undef PACKAGE_NAME
|
#undef PACKAGE_NAME
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
|
4
gdbsupport/configure
vendored
4
gdbsupport/configure
vendored
@ -2713,7 +2713,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_headers="$ac_config_headers support-config.h:config.in"
|
ac_config_headers="$ac_config_headers config.h:config.in"
|
||||||
|
|
||||||
ac_aux_dir=
|
ac_aux_dir=
|
||||||
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
||||||
@ -11563,7 +11563,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
for ac_config_target in $ac_config_targets
|
for ac_config_target in $ac_config_targets
|
||||||
do
|
do
|
||||||
case $ac_config_target in
|
case $ac_config_target in
|
||||||
"support-config.h") CONFIG_HEADERS="$CONFIG_HEADERS support-config.h:config.in" ;;
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
|
||||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
|
|
||||||
AC_INIT([gdbsupport], 1.0)
|
AC_INIT([gdbsupport], 1.0)
|
||||||
AC_CONFIG_SRCDIR(common-defs.h)
|
AC_CONFIG_SRCDIR(common-defs.h)
|
||||||
AC_CONFIG_HEADER(support-config.h:config.in)
|
AC_CONFIG_HEADER(config.h:config.in)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
AC_CONFIG_AUX_DIR(..)
|
AC_CONFIG_AUX_DIR(..)
|
||||||
|
Reference in New Issue
Block a user