This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix inclusion of generated files
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 29 Oct 2002 10:16:56 -0500
- Subject: Fix inclusion of generated files
I ran into the same problem in glibc last night, and they kindly pointed out
the solution: Use <> when you want to honor -I. instead of starting in the
source directory.
I'm going to apply this patch later today unless someone objects. It means
that if a header is generated in the build directory the built copy will be
included, instead of the copy in the source directory (if any). Affected
files are gas/itbl-parse.h and ld/ldgram.h.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-10-29 Daniel Jacobowitz <drow@mvista.com>
* gas/itbl-lex.l: Use #include <> for generated headers.
* gas/itbl-ops.c: Likewise.
2002-10-29 Daniel Jacobowitz <drow@mvista.com>
* ld/emultempl/aix.em: Use include <> for generated headers.
* ld/emultempl/beos.em: Likewise.
* ld/emultempl/elf32.em: Likewise.
* ld/emultempl/pe.em: Likewise.
* ld/ldctor.c: Likewise.
* ld/ldexp.c: Likewise.
* ld/ldfile.c: Likewise.
* ld/ldlang.c: Likewise.
* ld/ldlex.c: Likewise.
* ld/ldlex.l: Likewise.
* ld/ldmain.c: Likewise.
* ld/ldmisc.c: Likewise.
* ld/ldwrite.c: Likewise.
* ld/lexsup.c: Likewise.
* ld/mri.c: Likewise.
* ld/pe-dll.c: Likewise.
Index: gas/itbl-lex.l
===================================================================
RCS file: /cvs/src/src/gas/itbl-lex.l,v
retrieving revision 1.3
diff -u -p -r1.3 itbl-lex.l
--- gas/itbl-lex.l 19 Sep 2001 05:33:19 -0000 1.3
+++ gas/itbl-lex.l 29 Oct 2002 15:08:35 -0000
@@ -22,7 +22,8 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include "itbl-parse.h"
+
+#include <itbl-parse.h>
#ifdef DEBUG
#define DBG(x) printf x
Index: gas/itbl-ops.c
===================================================================
RCS file: /cvs/src/src/gas/itbl-ops.c,v
retrieving revision 1.10
diff -u -p -r1.10 itbl-ops.c
--- gas/itbl-ops.c 11 Oct 2001 12:20:25 -0000 1.10
+++ gas/itbl-ops.c 29 Oct 2002 15:08:35 -0000
@@ -92,7 +92,7 @@
#include <stdlib.h>
#include <string.h>
#include "itbl-ops.h"
-#include "itbl-parse.h"
+#include <itbl-parse.h>
/* #define DEBUG */
Index: ld/ldctor.c
===================================================================
RCS file: /cvs/src/src/ld/ldctor.c,v
retrieving revision 1.4
diff -u -p -r1.4 ldctor.c
--- ld/ldctor.c 19 Sep 2001 05:33:33 -0000 1.4
+++ ld/ldctor.c 29 Oct 2002 15:08:36 -0000
@@ -29,7 +29,7 @@ Software Foundation, 59 Temple Place - S
#include "ldexp.h"
#include "ldlang.h"
#include "ldmisc.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldmain.h"
#include "ldctor.h"
Index: ld/ldexp.c
===================================================================
RCS file: /cvs/src/src/ld/ldexp.c,v
retrieving revision 1.16.2.2
diff -u -p -r1.16.2.2 ldexp.c
--- ld/ldexp.c 25 Sep 2002 02:43:16 -0000 1.16.2.2
+++ ld/ldexp.c 29 Oct 2002 15:08:36 -0000
@@ -36,7 +36,7 @@ Software Foundation, 59 Temple Place - S
#include "ldmain.h"
#include "ldmisc.h"
#include "ldexp.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlang.h"
#include "libiberty.h"
#include "safe-ctype.h"
Index: ld/ldfile.c
===================================================================
RCS file: /cvs/src/src/ld/ldfile.c,v
retrieving revision 1.19.2.1
diff -u -p -r1.19.2.1 ldfile.c
--- ld/ldfile.c 28 Oct 2002 18:45:52 -0000 1.19.2.1
+++ ld/ldfile.c 29 Oct 2002 15:08:36 -0000
@@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - S
#include "ldlang.h"
#include "ldfile.h"
#include "ldmain.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldemul.h"
#include "libiberty.h"
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.93.2.5
diff -u -p -r1.93.2.5 ldlang.c
--- ld/ldlang.c 28 Oct 2002 18:45:52 -0000 1.93.2.5
+++ ld/ldlang.c 29 Oct 2002 15:08:37 -0000
@@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - S
#include "ldmain.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
Index: ld/ldlex.c
===================================================================
RCS file: /cvs/src/src/ld/Attic/ldlex.c,v
retrieving revision 1.1.8.1
diff -u -p -r1.1.8.1 ldlex.c
--- ld/ldlex.c 5 Aug 2002 20:43:49 -0000 1.1.8.1
+++ ld/ldlex.c 29 Oct 2002 15:08:37 -0000
@@ -1261,7 +1261,7 @@ This was written by steve chamberlain
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldfile.h"
#include "ldlex.h"
#include "ldmain.h"
Index: ld/ldlex.l
===================================================================
RCS file: /cvs/src/src/ld/ldlex.l,v
retrieving revision 1.16
diff -u -p -r1.16 ldlex.l
--- ld/ldlex.l 1 Jul 2002 08:07:29 -0000 1.16
+++ ld/ldlex.l 29 Oct 2002 15:08:38 -0000
@@ -42,7 +42,7 @@ This was written by steve chamberlain
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldfile.h"
#include "ldlex.h"
#include "ldmain.h"
Index: ld/ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.49.2.1
diff -u -p -r1.49.2.1 ldmain.c
--- ld/ldmain.c 23 Sep 2002 22:15:57 -0000 1.49.2.1
+++ ld/ldmain.c 29 Oct 2002 15:08:38 -0000
@@ -36,7 +36,7 @@ Software Foundation, 59 Temple Place - S
#include "ldwrite.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldfile.h"
#include "ldemul.h"
Index: ld/ldmisc.c
===================================================================
RCS file: /cvs/src/src/ld/ldmisc.c,v
retrieving revision 1.11
diff -u -p -r1.11 ldmisc.c
--- ld/ldmisc.c 2 Jul 2002 04:21:57 -0000 1.11
+++ ld/ldmisc.c 29 Oct 2002 15:08:38 -0000
@@ -36,7 +36,7 @@ Software Foundation, 59 Temple Place - S
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldmain.h"
#include "ldfile.h"
Index: ld/ldwrite.c
===================================================================
RCS file: /cvs/src/src/ld/ldwrite.c,v
retrieving revision 1.9
diff -u -p -r1.9 ldwrite.c
--- ld/ldwrite.c 23 May 2002 13:12:52 -0000 1.9
+++ ld/ldwrite.c 29 Oct 2002 15:08:38 -0000
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "ldlang.h"
#include "ldwrite.h"
#include "ldmisc.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldmain.h"
static void build_link_order PARAMS ((lang_statement_union_type *));
Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.50.2.1
diff -u -p -r1.50.2.1 lexsup.c
--- ld/lexsup.c 23 Sep 2002 22:15:57 -0000 1.50.2.1
+++ ld/lexsup.c 29 Oct 2002 15:08:38 -0000
@@ -33,7 +33,7 @@ Software Foundation, 59 Temple Place - S
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldfile.h"
#include "ldver.h"
Index: ld/mri.c
===================================================================
RCS file: /cvs/src/src/ld/mri.c,v
retrieving revision 1.9
diff -u -p -r1.9 mri.c
--- ld/mri.c 8 Jun 2002 07:39:45 -0000 1.9
+++ ld/mri.c 29 Oct 2002 15:08:38 -0000
@@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - S
#include "ldlang.h"
#include "ldmisc.h"
#include "mri.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "libiberty.h"
struct section_name_struct {
Index: ld/pe-dll.c
===================================================================
RCS file: /cvs/src/src/ld/pe-dll.c,v
retrieving revision 1.41.2.2
diff -u -p -r1.41.2.2 pe-dll.c
--- ld/pe-dll.c 28 Oct 2002 18:45:52 -0000 1.41.2.2
+++ ld/pe-dll.c 29 Oct 2002 15:08:39 -0000
@@ -32,7 +32,7 @@
#include "ldlang.h"
#include "ldwrite.h"
#include "ldmisc.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldmain.h"
#include "ldfile.h"
#include "ldemul.h"
Index: ld/emultempl/aix.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/aix.em,v
retrieving revision 1.26.2.1
diff -u -p -r1.26.2.1 aix.em
--- ld/emultempl/aix.em 23 Sep 2002 22:15:59 -0000 1.26.2.1
+++ ld/emultempl/aix.em 29 Oct 2002 15:08:39 -0000
@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "ldfile.h"
#include "ldemul.h"
#include "ldctor.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "coff/internal.h"
#include "coff/xcoff.h"
Index: ld/emultempl/beos.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/beos.em,v
retrieving revision 1.18
diff -u -p -r1.18 beos.em
--- ld/emultempl/beos.em 22 May 2002 09:02:04 -0000 1.18
+++ ld/emultempl/beos.em 29 Oct 2002 15:08:39 -0000
@@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.79.2.2
diff -u -p -r1.79.2.2 elf32.em
--- ld/emultempl/elf32.em 28 Oct 2002 18:45:53 -0000 1.79.2.2
+++ ld/emultempl/elf32.em 29 Oct 2002 15:08:39 -0000
@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "elf/common.h"
static void gld${EMULATION_NAME}_before_parse
Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.65.2.1
diff -u -p -r1.65.2.1 pe.em
--- ld/emultempl/pe.em 20 Jul 2002 13:45:41 -0000 1.65.2.1
+++ ld/emultempl/pe.em 29 Oct 2002 15:08:40 -0000
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
-#include "ldgram.h"
+#include <ldgram.h>
#include "ldlex.h"
#include "ldmisc.h"
#include "ldctor.h"