Patchwork [v2,0/6] Move gdbsupport to top level

login
register
mail settings
Submitter Pedro Alves
Date Jan. 17, 2020, 1:35 p.m.
Message ID <cad16604-29de-c6d7-f74b-bf78ecf10366@redhat.com>
Download mbox | patch
Permalink /patch/37419/
State New
Headers show

Comments

Pedro Alves - Jan. 17, 2020, 1:35 p.m.
On 1/17/20 11:54 AM, Simon Marchi wrote:
> On 2020-01-16 9:29 a.m., Pedro Alves wrote:
>> On 1/16/20 4:23 AM, Simon Marchi wrote:
>>> On 2020-01-15 4:35 p.m., Pedro Alves wrote:
>>>> Here's an improved version, which fixes gdbserver's standalone
>>>> build, simplifies gdbsupport's config.h (there's no need for
>>>> #ifdef GDBSERVER stuff since gdbserver doesn't use gdbsupport 
>>>> as a library yet), and adds copyright/intro comments.
>>>
>>> I have to admit I'm a bit lost in the spaghetti of config.h inclusion.  I don't
>>> understand, for example, why GDB needs to include gdbsupport's config.  All the
>>> features that GDB needs are checked by its own configure script, aren't they?
>>
>> Good question.  I guess the idea is that instead of having all of gdb, gdbserver,
>> and gdbsupport share tests via gdbsupport/common.m4, having run them more
>> than once, we can run the tests only once by gdbsupport's configure, and then
>> include the support-config.h file.
> 
> Ok, but that's not what is done today, that's a possibility for the future, right?
> common.m4 defines a macro used by all three configure scripts, so each configure
> script ends up doing its own checks.

It's my guess, but to be sure, we'd need to hear from Tom.

> 
>>
>> I've given this another thought, and went through the process of thinking
>> that this more complicated patch isn't really necessary, and then concluded
>> that having it makes things more normalized between all the dirs.  But
>> we can simplify it -- don't need to generate the "trampoline" config.h.
>>
>> My initial thought that led to the more complicated patch was to make
>> sure that that "#include <config.h>" in gnulib's libc-config.h picks up
>> gnulib config.h.  But it's really harmless if that picks some other config.h
>> instead as long as we're sure that the gnulib config.h is also included
>> somehow.  Which we are sure of, from the fact that common-defs.h
>> is always included as first thing in every .c file.
>>
>> So while we're building gdbsupport, we don't have any config.h in the
>> include path other than the BFD one, and we hit the problem.  We could
>> add an empty gdbsupport/config/config.h file in the
>> source and add -Igdbsupport/config/ to gdbsupport's Makefile, or,
>> add gnulib's build dir to the include path, like in my original patch.
>>
>> So the original solution of adding the gnulib dir to the include path
>> isn't that bad, though I call it a hack.
> 
> I would have to see it, but it sounds like the simplest solution.

It was the first patch I posted, here:
 https://sourceware.org/ml/gdb-patches/2020-01/msg00419.html

> 
>> The gdbsupport/config/config.h approach is pedantically less of a hack
>> and more in line with the "solution" that we happen to have in gdb
>> and gdbserver's dirs currently, by chance.
>>
>> OK, so I tried that.  And then, I realized, well, if we have that
>> new config.h file, then we could as well move the gnulib config.h inclusion
>> to that file, like I was doing in the complicated patch.  Essentially
>> it's the same as the complicated patch, except the "trampoline" config.h
>> isn't generated in the build dir, but instead is put in the source tree.
>> We'd do the same to gdb and gdbserver, for consistency.
>>
>> (I actually named the new dirs "config.h", as there's already a config
>> dir under gdb.  It's more to the point, anyway.)
> 
> I think it's a bit confusing to have directories named "config.h", but not
> really a big deal.

I think (that if we do this path), it's a good name in the sense that
you find it when you go look for a config.h file in (e.g.) the gdb dir.
Naming it something else would hide it more.

OTOH, I figured that we don't really need a separate directory.
Putting it in the source dir (gdb/, gdbsuppor/, gdbserver/) works
just as well, since each dir's Makefile.in pulls in its own source
dir before other top level directories.  That results in a smaller
patch.

But, gosh makes me realize there's an even simpler solution...
Just rename support-config.h to config.h...  Do we need to call
it something else for some reason?  I couldn't find one.

> 
>>> The gdb-config.h above should be gdbserver-config.h.
>> Here's v2.  WDYT?  Which of all the approaches discussed would
>> you prefer?
> 
> Probably the solution that involves the least files and indirections.  But
> the one proposed in the latest patch is fine with me too.  It's set and
> forget, once it builds again we won't think about it, at least until the
> next time it breaks.

Note that we already kind of have the config.h indirections via common-defs.h,
where we include the multiple config.h files.  This just moves those
indirections to the file actually named config.h.

> The buildbot is struggling with this (sending many breakage emails), so I
> think you should choose one and push it.  Then we can cancel all the builds
> on the master branch until that commit.

Anyway, here's the simpler patch...    Let's call it approach #3.

Approach #1 - add -Ignulib
Approach #2 - add wrapper config.h files in the source dirs
Approach #3 - rename support-config.h -> config.h

From a9e200d48f028682372bf8ddb02a5b7d52c6f053 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 17 Jan 2020 13:09:39 +0000
Subject: [PATCH] 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:
yyyy-mm-dd  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.
---
 gdbsupport/Makefile.in   | 12 +++----
 gdbsupport/common-defs.h |  2 +-
 gdbsupport/configure     | 92 ++++++++++++++++++++++++------------------------
 gdbsupport/configure.ac  |  2 +-
 4 files changed, 54 insertions(+), 54 deletions(-)


base-commit: bf8e4b6c8144a687d5edc24eda1bf0a3687ce71e
Simon Marchi - Jan. 17, 2020, 2:10 p.m.
On 2020-01-17 8:35 a.m., Pedro Alves wrote:
>>> So the original solution of adding the gnulib dir to the include path
>>> isn't that bad, though I call it a hack.
>>
>> I would have to see it, but it sounds like the simplest solution.
> 
> It was the first patch I posted, here:
>  https://sourceware.org/ml/gdb-patches/2020-01/msg00419.html

Ok thanks, I did not follow this story from the beginning.

> But, gosh makes me realize there's an even simpler solution...
> Just rename support-config.h to config.h...  Do we need to call
> it something else for some reason?  I couldn't find one.

That's a good idea.

>>
>>>> The gdb-config.h above should be gdbserver-config.h.
>>> Here's v2.  WDYT?  Which of all the approaches discussed would
>>> you prefer?
>>
>> Probably the solution that involves the least files and indirections.  But
>> the one proposed in the latest patch is fine with me too.  It's set and
>> forget, once it builds again we won't think about it, at least until the
>> next time it breaks.
> 
> Note that we already kind of have the config.h indirections via common-defs.h,
> where we include the multiple config.h files.  This just moves those
> indirections to the file actually named config.h.
> 
>> The buildbot is struggling with this (sending many breakage emails), so I
>> think you should choose one and push it.  Then we can cancel all the builds
>> on the master branch until that commit.
> 
> Anyway, here's the simpler patch...    Let's call it approach #3.
> 
> Approach #1 - add -Ignulib
> Approach #2 - add wrapper config.h files in the source dirs
> Approach #3 - rename support-config.h -> config.h

I'd say let's go for #3, since that's how gdb and gdbserver already work,
it's been working well for years, so it's proven already.

Simon
Pedro Alves - Jan. 17, 2020, 3:17 p.m.
On 1/17/20 2:10 PM, Simon Marchi wrote:
> On 2020-01-17 8:35 a.m., Pedro Alves wrote:
>>>> So the original solution of adding the gnulib dir to the include path
>>>> isn't that bad, though I call it a hack.
>>>
>>> I would have to see it, but it sounds like the simplest solution.
>>
>> It was the first patch I posted, here:
>>  https://sourceware.org/ml/gdb-patches/2020-01/msg00419.html
> 
> Ok thanks, I did not follow this story from the beginning.
> 
>> But, gosh makes me realize there's an even simpler solution...
>> Just rename support-config.h to config.h...  Do we need to call
>> it something else for some reason?  I couldn't find one.
> 
> That's a good idea.
> 
>>>
>>>>> The gdb-config.h above should be gdbserver-config.h.
>>>> Here's v2.  WDYT?  Which of all the approaches discussed would
>>>> you prefer?
>>>
>>> Probably the solution that involves the least files and indirections.  But
>>> the one proposed in the latest patch is fine with me too.  It's set and
>>> forget, once it builds again we won't think about it, at least until the
>>> next time it breaks.
>>
>> Note that we already kind of have the config.h indirections via common-defs.h,
>> where we include the multiple config.h files.  This just moves those
>> indirections to the file actually named config.h.
>>
>>> The buildbot is struggling with this (sending many breakage emails), so I
>>> think you should choose one and push it.  Then we can cancel all the builds
>>> on the master branch until that commit.
>>
>> Anyway, here's the simpler patch...    Let's call it approach #3.
>>
>> Approach #1 - add -Ignulib
>> Approach #2 - add wrapper config.h files in the source dirs
>> Approach #3 - rename support-config.h -> config.h
> 
> I'd say let's go for #3, since that's how gdb and gdbserver already work,
> it's been working well for years, so it's proven already.

I've merged #3 now.  We discussed adding a comment to
gdbsupport/Makefile.am about the order of include paths, but it
turns out that the -I. is added by automake by default
(DEFAULT_INCLUDES), not explicitly set.  gdb and gdbserver's
Makefile.in have comments about it already.  So I applied the
patch as it was.

Thanks,
Pedro Alves
Tom Tromey - Jan. 17, 2020, 6:11 p.m.
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>>> Approach #3 - rename support-config.h -> config.h
>> 
>> I'd say let's go for #3, since that's how gdb and gdbserver already work,
>> it's been working well for years, so it's proven already.

Pedro> I've merged #3 now.  We discussed adding a comment to
Pedro> gdbsupport/Makefile.am about the order of include paths, but it
Pedro> turns out that the -I. is added by automake by default
Pedro> (DEFAULT_INCLUDES), not explicitly set.  gdb and gdbserver's
Pedro> Makefile.in have comments about it already.  So I applied the
Pedro> patch as it was.

Thank you for doing this, and please accept my apologies for landing
that patch and then being out of commission for the following days.

Tom

Patch

diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in
index 5723ae5e97e..5bbab1c310e 100644
--- a/gdbsupport/Makefile.in
+++ b/gdbsupport/Makefile.in
@@ -132,7 +132,7 @@  DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = support-config.h
+CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
@@ -388,7 +388,7 @@  libgdbsupport_a_SOURCES = \
     xml-utils.c	\
     $(selftest)
 
-all: support-config.h
+all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
@@ -427,20 +427,20 @@  $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
 
-support-config.h: stamp-h1
+config.h: stamp-h1
 	@test -f $@ || rm -f stamp-h1
 	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
 
 stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
 	@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) 
 	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 	rm -f stamp-h1
 	touch $@
 
 distclean-hdr:
-	-rm -f support-config.h stamp-h1
+	-rm -f config.h stamp-h1
 
 clean-noinstLIBRARIES:
 	-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
 check-am: all-am
 check: check-am
-all-am: Makefile $(LIBRARIES) support-config.h
+all-am: Makefile $(LIBRARIES) config.h
 installdirs:
 install: install-am
 install-exec: install-exec-am
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index d823c41607c..027bf099c1a 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -34,7 +34,7 @@ 
 
 #else  /* GDBSERVER */
 
-#include <gdbsupport/support-config.h>
+#include <gdbsupport/config.h>
 
 #undef PACKAGE_NAME
 #undef PACKAGE
diff --git a/gdbsupport/configure b/gdbsupport/configure
index a0df06bbd53..cf943e69ef5 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -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=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -9687,7 +9687,7 @@  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
 $as_echo_n "checking for sigsetjmp... " >&6; }
 if ${gdb_cv_func_sigsetjmp+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -9695,7 +9695,7 @@  else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <setjmp.h>
+  #include <setjmp.h>
 
 int
 main ()
@@ -9714,11 +9714,11 @@  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
-if test "$gdb_cv_func_sigsetjmp" = "yes"; then
+  if test "$gdb_cv_func_sigsetjmp" = "yes"; then
 
 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
 
-fi
+  fi
 
 
 # Check whether --with-intel_pt was given.
@@ -9728,23 +9728,23 @@  else
   with_intel_pt=auto
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
 $as_echo_n "checking whether to use intel pt... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
 $as_echo "$with_intel_pt" >&6; }
 
-if test "${with_intel_pt}" = no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
+  if test "${with_intel_pt}" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
-  HAVE_LIBIPT=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    HAVE_LIBIPT=no
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <linux/perf_event.h>
-#ifndef PERF_ATTR_SIZE_VER5
-# error
-#endif
+  #include <linux/perf_event.h>
+  #ifndef PERF_ATTR_SIZE_VER5
+  # error
+  #endif
 
 _ACEOF
 if ac_fn_c_try_cpp "$LINENO"; then :
@@ -9753,14 +9753,14 @@  else
   perf_event=no
 fi
 rm -f conftest.err conftest.i conftest.$ac_ext
-  if test "$perf_event" != yes; then
-    if test "$with_intel_pt" = yes; then
-      as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
+    if test "$perf_event" != yes; then
+      if test "$with_intel_pt" = yes; then
+	as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
+      else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
+      fi
     fi
-  fi
 
 
 
@@ -10224,17 +10224,17 @@  $as_echo "$LIBIPT" >&6; }
 
 
 
-  if test "$HAVE_LIBIPT" != yes; then
-    if test "$with_intel_pt" = yes; then
-      as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
+    if test "$HAVE_LIBIPT" != yes; then
+      if test "$with_intel_pt" = yes; then
+	as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
+      else
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
-    fi
-  else
-    save_LIBS=$LIBS
-    LIBS="$LIBS $LIBIPT"
-    for ac_func in pt_insn_event
+      fi
+    else
+      save_LIBS=$LIBS
+      LIBS="$LIBS $LIBIPT"
+      for ac_func in pt_insn_event
 do :
   ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
@@ -10245,7 +10245,7 @@  _ACEOF
 fi
 done
 
-    ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
+      ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
 "
 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
 
@@ -10266,12 +10266,12 @@  _ACEOF
 
 fi
 
-    LIBS=$save_LIBS
+      LIBS=$save_LIBS
+    fi
   fi
-fi
 
-if test "$ac_cv_header_sys_procfs_h" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
+  if test "$ac_cv_header_sys_procfs_h" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10308,7 +10308,7 @@  $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10345,7 +10345,7 @@  $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10382,7 +10382,7 @@  $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10419,7 +10419,7 @@  $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10456,7 +10456,7 @@  $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10493,7 +10493,7 @@  $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10530,7 +10530,7 @@  $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
  if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -10567,7 +10567,7 @@  $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
 
-fi
+  fi
 
 
 # Check whether we will enable the inclusion of unit tests when
@@ -11563,7 +11563,7 @@  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   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" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
diff --git a/gdbsupport/configure.ac b/gdbsupport/configure.ac
index af14d7bb92d..6002871c969 100644
--- a/gdbsupport/configure.ac
+++ b/gdbsupport/configure.ac
@@ -18,7 +18,7 @@  dnl Process this file with autoconf to produce a configure script.
 
 AC_INIT([gdbsupport], 1.0)
 AC_CONFIG_SRCDIR(common-defs.h)
-AC_CONFIG_HEADER(support-config.h:config.in)
+AC_CONFIG_HEADER(config.h:config.in)
 AC_CANONICAL_SYSTEM
 AM_MAINTAINER_MODE
 AC_CONFIG_AUX_DIR(..)