From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30220 invoked by alias); 18 May 2012 10:33:59 -0000 Received: (qmail 30206 invoked by uid 22791); 18 May 2012 10:33:56 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 10:33:35 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4IAXYG5011184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 May 2012 06:33:34 -0400 Received: from Gift.fritz.box.redhat.com (ovpn-112-19.ams2.redhat.com [10.36.112.19]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4IAXWff002605 for ; Fri, 18 May 2012 06:33:33 -0400 From: Nick Clifton 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 Message-ID: <87aa15aijn.fsf@Gift.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00674.txt.bz2 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 PR 14072 * wrapper.c: Include config.h before system header files. sim/common/ChangeLog 2012-05-18 Nick Clifton 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 PR 14072 * sim-if.c: Include config.h before system header files. sim/h8300/ChangeLog 2012-05-18 Nick Clifton PR 14072 * compile.c: Include config.h before system header files. * sim-main.h: Likewise. sim/m32c/ChangeLog 2012-05-18 Nick Clifton 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 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 #include #include 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 #include 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 . */ +#include "config.h" #include #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 . */ +#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 \n"); printf ("#include \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 #ifdef HAVE_TIME_H #include 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 . */ - +#include "config.h" #include #include #include 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 . */ - +#include "config.h" #include #include #include 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 . */ - +#include "config.h" #include #include #include 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 . */ - +#include "config.h" #include #include #include 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 . */ +#include "config.h" #include "libiberty.h" #include "bfd.h" #include "sim-main.h"