Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: PR 14072: Include config.h before system header files
Date: Fri, 18 May 2012 10:33:00 -0000	[thread overview]
Message-ID: <87aa15aijn.fsf@Gift.fritz.box> (raw)

Hi Guys,

  I recently applied a patch to the binutils sources for PR 14072.  This
  patch checks that config.h has been included before bfd.h (so that the
  correct #defines are set up), but this has broken the building of
  several simulators.  Below is a patch to fix all of these.

  OK to apply ?

Cheers
  Nick

sim/arm/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* wrapper.c: Include config.h before system header files.

sim/common/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* callback.c: Include config.h before system header files.
	* cgen-trace.c: Likewise.
	* cgen-utils.c: Likewise.
	* gentmap.c: Likewise.

sim/cris/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* sim-if.c: Include config.h before system header files.

sim/h8300/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* compile.c: Include config.h before system header files.
	* sim-main.h: Likewise.

sim/m32c/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* gdb-if.c: Include config.h before system header files.
	* load.c: Likewise.
	* syscalls.c: Likewise.
	* trace.c: Likewise.

sim/mips/ChangeLog
2012-05-18  Nick Clifton  <nickc@redhat.com>

	PR 14072
	* interp.c: Include config.h before system header files.

Index: sim/arm/wrapper.c
===================================================================
RCS file: /cvs/src/src/sim/arm/wrapper.c,v
retrieving revision 1.42
diff -u -3 -p -r1.42 wrapper.c
--- sim/arm/wrapper.c	4 Jan 2012 08:28:02 -0000	1.42
+++ sim/arm/wrapper.c	18 May 2012 10:21:37 -0000
@@ -21,6 +21,7 @@
    run.c and gdb (when the simulator is linked with gdb).
    All simulator interaction should go through this file.  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
Index: sim/common/callback.c
===================================================================
RCS file: /cvs/src/src/sim/common/callback.c,v
retrieving revision 1.32
diff -u -3 -p -r1.32 callback.c
--- sim/common/callback.c	4 Jan 2012 08:28:04 -0000	1.32
+++ sim/common/callback.c	18 May 2012 10:21:37 -0000
@@ -24,6 +24,7 @@
 #ifdef HAVE_CONFIG_H
 #include "cconfig.h"
 #endif
+#include "config.h"
 #include "ansidecl.h"
 #include <stdarg.h>
 #include <stdio.h>
Index: sim/common/cgen-trace.c
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-trace.c,v
retrieving revision 1.14
diff -u -3 -p -r1.14 cgen-trace.c
--- sim/common/cgen-trace.c	4 Jan 2012 08:28:04 -0000	1.14
+++ sim/common/cgen-trace.c	18 May 2012 10:21:37 -0000
@@ -17,6 +17,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include <errno.h>
 #include "dis-asm.h"
 #include "bfd.h"
Index: sim/common/cgen-utils.c
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-utils.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 cgen-utils.c
--- sim/common/cgen-utils.c	4 Jan 2012 08:28:04 -0000	1.10
+++ sim/common/cgen-utils.c	18 May 2012 10:21:37 -0000
@@ -17,6 +17,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include "bfd.h"
 #include "sim-main.h"
 #include "dis-asm.h"
Index: sim/common/gentmap.c
===================================================================
RCS file: /cvs/src/src/sim/common/gentmap.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 gentmap.c
--- sim/common/gentmap.c	7 Nov 2006 19:29:59 -0000	1.3
+++ sim/common/gentmap.c	18 May 2012 10:21:37 -0000
@@ -66,6 +66,7 @@ gen_targ_map_c ()
   printf ("/* Target value mapping utilities needed by the simulator and gdb.  */\n");
   printf ("/* This file is machine generated by gentmap.c.  */\n\n");
 
+  printf ("#include \"config.h\"\n");
   printf ("#include <errno.h>\n");
   printf ("#include <fcntl.h>\n");
   printf ("#include \"ansidecl.h\"\n");
Index: sim/cris/sim-if.c
===================================================================
RCS file: /cvs/src/src/sim/cris/sim-if.c,v
retrieving revision 1.15
diff -u -3 -p -r1.15 sim-if.c
--- sim/cris/sim-if.c	4 Jan 2012 08:28:08 -0000	1.15
+++ sim/cris/sim-if.c	18 May 2012 10:21:37 -0000
@@ -20,6 +20,7 @@ along with this program.  If not, see <h
 /* Based on the fr30 file, mixing in bits from the i960 and pruning of
    dead code.  */
 
+#include "config.h"
 #include "libiberty.h"
 #include "bfd.h"
 #include "elf-bfd.h"
Index: sim/h8300/compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.49
diff -u -3 -p -r1.49 compile.c
--- sim/h8300/compile.c	5 Jul 2011 19:06:37 -0000	1.49
+++ sim/h8300/compile.c	18 May 2012 10:21:37 -0000
@@ -17,6 +17,7 @@
  * AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#include "config.h"
 #include <signal.h>
 #ifdef HAVE_TIME_H
 #include <time.h>
Index: sim/h8300/sim-main.h
===================================================================
RCS file: /cvs/src/src/sim/h8300/sim-main.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 sim-main.h
--- sim/h8300/sim-main.h	16 Dec 2003 20:21:09 -0000	1.4
+++ sim/h8300/sim-main.h	18 May 2012 10:21:37 -0000
@@ -1,5 +1,6 @@
 /* Main header for the Hitachi h8/300 architecture.  */
 
+#include "config.h"
 #include "bfd.h"
 
 #ifndef SIM_MAIN_H
Index: sim/m32c/gdb-if.c
===================================================================
RCS file: /cvs/src/src/sim/m32c/gdb-if.c,v
retrieving revision 1.14
diff -u -3 -p -r1.14 gdb-if.c
--- sim/m32c/gdb-if.c	4 Jan 2012 08:28:12 -0000	1.14
+++ sim/m32c/gdb-if.c	18 May 2012 10:21:37 -0000
@@ -18,7 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
 #include <stdio.h>
 #include <assert.h>
 #include <signal.h>
Index: sim/m32c/load.c
===================================================================
RCS file: /cvs/src/src/sim/m32c/load.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 load.c
--- sim/m32c/load.c	4 Jan 2012 08:28:12 -0000	1.9
+++ sim/m32c/load.c	18 May 2012 10:21:37 -0000
@@ -18,7 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
Index: sim/m32c/syscalls.c
===================================================================
RCS file: /cvs/src/src/sim/m32c/syscalls.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 syscalls.c
--- sim/m32c/syscalls.c	4 Jan 2012 08:28:12 -0000	1.9
+++ sim/m32c/syscalls.c	18 May 2012 10:21:37 -0000
@@ -18,7 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
Index: sim/m32c/trace.c
===================================================================
RCS file: /cvs/src/src/sim/m32c/trace.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 trace.c
--- sim/m32c/trace.c	4 Jan 2012 08:28:12 -0000	1.9
+++ sim/m32c/trace.c	18 May 2012 10:21:37 -0000
@@ -18,7 +18,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
Index: sim/mips/interp.c
===================================================================
RCS file: /cvs/src/src/sim/mips/interp.c,v
retrieving revision 1.28
diff -u -3 -p -r1.28 interp.c
--- sim/mips/interp.c	5 Jul 2011 19:06:38 -0000	1.28
+++ sim/mips/interp.c	18 May 2012 10:21:37 -0000
@@ -29,6 +29,7 @@ code on the hardware.
 #define TRACE (1)
 #endif
 
+#include "config.h"
 #include "bfd.h"
 #include "sim-main.h"
 #include "sim-utils.h"
Index: sim/sh64/sim-if.c
===================================================================
RCS file: /cvs/src/src/sim/sh64/sim-if.c,v
retrieving revision 1.10
diff -u -3 -p -r1.10 sim-if.c
--- sim/sh64/sim-if.c	4 Jan 2012 08:28:26 -0000	1.10
+++ sim/sh64/sim-if.c	18 May 2012 10:21:37 -0000
@@ -17,6 +17,7 @@ GNU General Public License for more deta
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include "libiberty.h"
 #include "bfd.h"
 #include "sim-main.h"


             reply	other threads:[~2012-05-18 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 10:33 Nick Clifton [this message]
2012-05-18 11:28 ` Frank Ch. Eigler
2012-05-19  3:50 ` Mike Frysinger

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=87aa15aijn.fsf@Gift.fritz.box \
    --to=nickc@redhat.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