Binutils with MCST patches
Go to file
Pedro Alves 3684d331fd 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.
2020-01-17 15:14:56 +00:00
bfd Automatic date update in version.in 2020-01-17 00:00:32 +00:00
binutils Moev declaration of loop variable outside of the loop. 2020-01-13 17:28:41 +00:00
config Add support for debuginfod to the binutils (disable by default, enabled via a configure time option). 2020-01-09 13:19:20 +00:00
contrib contrib: Update dg-extract-results.* from gcc 2019-10-21 15:26:48 +01:00
cpu ubsan: fr30: left shift of negative value 2020-01-13 12:12:05 +10:30
elfcpp Re: Update year range in copyright notice of binutils files 2020-01-01 18:55:18 +10:30
etc texi2pod.pl: import support for @t{...} from gcc 2020-01-15 12:58:09 -05:00
gas x86: Add {vex} pseudo prefix 2020-01-17 07:07:55 -08:00
gdb gdb: remove uses of iterate_over_inferiors in top.c 2020-01-17 09:59:10 -05:00
gdbsupport Fix gdbsupport build 2020-01-17 15:14:56 +00:00
gnulib Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
gold Re: Update year range in copyright notice of binutils files 2020-01-01 18:55:18 +10:30
gprof Add support for the GBZ80, Z180, and eZ80 variants of the Z80 architecure. Add an ELF based target for these as well. 2020-01-02 14:14:59 +00:00
include Update libiberty sources with changes in the gcc mainline. 2020-01-17 14:13:22 +00:00
intl
ld MSP430: Remove unused linker script template elf32msp430_3.sc 2020-01-16 13:45:29 +00:00
libctf Fix libctf ChangeLog date in most recent entry. 2020-01-05 09:53:14 +04:00
libdecnumber
libiberty Update libiberty sources with changes in the gcc mainline. 2020-01-17 14:13:22 +00:00
opcodes x86: Add {vex} pseudo prefix 2020-01-17 07:07:55 -08:00
readline Fix compilation of Readline on mingw.org's MinGW 2019-12-23 16:28:32 +02:00
sim Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore Add profiling outputs to .gitignore 2019-12-26 06:54:58 +01:00
ar-lib
ChangeLog Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
compile
config-ml.in
config.guess config.guess,config.sub: synchronize with config project master sources 2019-05-23 18:19:56 +02:00
config.rpath
config.sub config.guess,config.sub: synchronize with config project master sources 2019-05-23 18:19:56 +02:00
configure Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
configure.ac Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
Makefile.def Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
Makefile.in Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
Makefile.tpl Revert "Sync top level files with versions from gcc." 2019-05-30 11:17:19 +01:00
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh Move gdbsupport to the top level 2020-01-14 16:25:02 -07:00
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.