This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Another 3 debug hooks


David Edelsohn wrote:-

> 	I am very disturbed that you are making significant changes
> affecting xcoffout, but you do not appear to be bootstrapping or testing
> on AIX.  It is possible to build a powerpc-ibm-aix4.3 target as a
> cross-compiler to verify correctness at this level.  You should be much
> more careful when making these types of changes.

Hi David,

I'm sorry I broke your build; I looked in the files carefully for used
externals and such, but hadn't remembered they could sneak in through
macros.  I suspect we should try and do something to prevent these
backdoor dependencies.  The dbxout was just a thinko; I'd not seen I
was in a conditionally compiled block.  In future I'll test an AIX
target compile.

The following patch builds to the end of stage1 for an AIX 4.1 rs6000
target.  I hope this fixes things for you.  I'll commit this now.

Neil.

	* Makefile.in (toplev.o, final.o, varasm.o): Update dependencies.
	* toplev.c, varasm.c, final.c: Include xcoffout.h if appropriate.
	* dbxout.c (dbxout_global_decl): Move outside #ifdef.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.498
diff -u -p -r1.498 toplev.c
--- toplev.c	2001/07/24 23:42:40	1.498
+++ toplev.c	2001/07/26 06:52:20
@@ -79,6 +79,11 @@ Boston, MA 02111-1307, USA.  */
 #ifdef SDB_DEBUGGING_INFO
 #include "sdbout.h"
 #endif
+
+#ifdef XCOFF_DEBUGGING_INFO
+#include "xcoffout.h"		/* Needed for external data
+				   declarations for e.g. AIX 4.x.  */
+#endif
 
 #ifdef VMS
 /* The extra parameters substantially improve the I/O performance.  */
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.183
diff -u -p -r1.183 varasm.c
--- varasm.c	2001/07/26 01:28:01	1.183
+++ varasm.c	2001/07/26 06:52:34
@@ -47,6 +47,11 @@ Boston, MA 02111-1307, USA.  */
 #include "tm_p.h"
 #include "debug.h"
 
+#ifdef XCOFF_DEBUGGING_INFO
+#include "xcoffout.h"		/* Needed for external data
+				   declarations for e.g. AIX 4.x.  */
+#endif
+
 #ifndef TRAMPOLINE_ALIGNMENT
 #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
 #endif
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.187
diff -u -p -r1.187 final.c
--- final.c	2001/07/19 21:17:08	1.187
+++ final.c	2001/07/26 06:52:44
@@ -68,6 +68,11 @@ Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "debug.h"
 
+#ifdef XCOFF_DEBUGGING_INFO
+#include "xcoffout.h"		/* Needed for external data
+				   declarations for e.g. AIX 4.x.  */
+#endif
+
 #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
 #include "dwarf2out.h"
 #endif
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.98
diff -u -p -r1.98 dbxout.c
--- dbxout.c	2001/07/25 22:03:03	1.98
+++ dbxout.c	2001/07/26 06:52:59
@@ -625,18 +625,6 @@ dbxout_end_block (line, n)
   ASM_OUTPUT_INTERNAL_LABEL (asmfile, "LBE", n);
 }
 
-/* Debug information for a global DECL.  Called from toplev.c after
-   compilation proper has finished.  */
-static void
-dbxout_global_decl (decl)
-     tree decl;
-{
-  if (TREE_CODE (decl) == VAR_DECL
-      && ! DECL_EXTERNAL (decl)
-      && DECL_RTL_SET_P (decl))	/* Not necessary?  */
-    dbxout_symbol (decl, 0);
-} 
-
 /* Output dbx data for a function definition.
    This includes a definition of the function name itself (a symbol),
    definitions of the parameters (locating them in the parameter list)
@@ -665,6 +653,18 @@ dbxout_function_decl (decl)
 }
 
 #endif /* DBX_DEBUGGING_INFO  */
+
+/* Debug information for a global DECL.  Called from toplev.c after
+   compilation proper has finished.  */
+static void
+dbxout_global_decl (decl)
+     tree decl;
+{
+  if (TREE_CODE (decl) == VAR_DECL
+      && ! DECL_EXTERNAL (decl)
+      && DECL_RTL_SET_P (decl))	/* Not necessary?  */
+    dbxout_symbol (decl, 0);
+} 
 
 /* At the end of compilation, finish writing the symbol table.
    Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.702
diff -u -p -r1.702 Makefile.in
--- Makefile.in	2001/07/22 21:33:57	1.702
+++ Makefile.in	2001/07/26 06:53:04
@@ -1339,7 +1339,7 @@ diagnostic.o : diagnostic.c diagnostic.h
    $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(TM_P_H) flags.h \
    $(GGC_H) input.h $(INSN_ATTR_H) insn-config.h toplev.h intl.h
 toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) function.h \
-   flags.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
+   flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
    debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
    graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \
@@ -1362,7 +1362,8 @@ errors.o : errors.c $(GCONFIG_H) $(SYSTE
 
 varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
    function.h $(EXPR_H) hard-reg-set.h $(REGS_H) $(OBSTACK_H) \
-   output.h c-pragma.h toplev.h debug.h $(GGC_H) $(TM_P_H) $(HASHTAB_H)
+   output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
+   $(HASHTAB_H)
 function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
    function.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
    insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) $(TM_P_H)
@@ -1523,7 +1524,7 @@ sched-vis.o : sched-vis.c $(CONFIG_H) $(
    hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H)
 final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \
    $(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \
-   real.h output.h hard-reg-set.h except.h debug.h \
+   real.h output.h hard-reg-set.h except.h debug.h xcoffout.h \
    toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H)
 recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \
    $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]