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]

PATCH: Fix toplev.c breakage on PA after eh merge


Here is a possible fix for the problem noted here:
<http://gcc.gnu.org/ml/gcc-patches/2001-05/msg00860.html>.  I moved the
code to open the assembler and aux info files before the data initialization.
I also included dwarf2asm.h because there is no prototype for
dw2_output_indirect_constants ().  Should this be ifdef'd?

The patch is untested as there is still more breakage to resolve:

/xxx/gnu/gcc-3.0/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.0/objdir/gcc/ -nostdinc++ -L/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src -L/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src/.libs -B/usr/local/hppa1.1-hp-hpux10.20/bin/ -B/usr/local/hppa1.1-hp-hpux10.20/lib/ -isystem /usr/local/hppa1.1-hp-hpux10.20/include -I../../../../libstdc++-v3/../gcc -I../../../../libstdc++-v3/../include -I../../../../libstdc++-v3/include -I../../../../libstdc++-v3/include/std -I../../../../libstdc++-v3/include/c_std -I../include -I../../../../libstdc++-v3/libsupc++ -g -O2 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -c ../../../../libstdc++-v3/libsupc++/eh_aux_runtime.cc  -fPIC -DPIC -o eh_aux_runtime.o
../../../../libstdc++-v3/libsupc++/eh_aux_runtime.cc:0: warning: -ffunction-sections
   may affect debugging on some targets.
/var/tmp/ccGhYlpq.s: Assembler messages:
/var/tmp/ccGhYlpq.s:213: Error: operation combines symbols in different segments
/var/tmp/ccGhYlpq.s:360: Error: operation combines symbols in different segments
make[3]: *** [eh_aux_runtime.lo] Error 1
make[3]: Leaving directory `/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2
Mon May 14 12:45:10 EDT 2001

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-05-14  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* toplev.c: Include dwarf2out.h.
	(compile_file): Open aux_info_file and asm_out_file before
	initializing data.

--- toplev.c.orig	Sun May 13 13:09:19 2001
+++ toplev.c	Mon May 14 12:13:36 2001
@@ -72,6 +72,8 @@
 #include "dwarfout.h"
 #endif
 
+#include "dwarf2asm.h"
+
 #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
 #include "dwarf2out.h"
 #endif
@@ -2157,35 +2159,6 @@
   init_timevar ();
   timevar_start (TV_TOTAL);
 
-  /* Initialize data in various passes.  */
-
-  init_obstacks ();
-  name = init_parse (name);
-  init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
-		  || debug_info_level == DINFO_LEVEL_VERBOSE
-		  || flag_test_coverage
-		  || warn_notreached);
-  init_regs ();
-  init_alias_once ();
-  init_decl_processing ();
-  init_eh ();
-  init_optabs ();
-  init_stmt ();
-  init_loop ();
-  init_reload ();
-  init_function_once ();
-  init_stor_layout_once ();
-  init_varasm_once ();
-
-  /* The following initialization functions need to generate rtl, so
-     provide a dummy function context for them.  */
-  init_dummy_function_start ();
-  init_expmed ();
-  init_expr_once ();
-  if (flag_caller_saves)
-    init_caller_save ();
-  expand_dummy_function_end ();
-
   /* If auxiliary info generation is desired, open the output file.
      This goes in the same directory as the source file--unlike
      all the other output files.  */
@@ -2226,6 +2199,35 @@
            _IOFBF, IO_BUFFER_SIZE);
 #endif
 
+  /* Initialize data in various passes.  */
+
+  init_obstacks ();
+  name = init_parse (name);
+  init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
+		  || debug_info_level == DINFO_LEVEL_VERBOSE
+		  || flag_test_coverage
+		  || warn_notreached);
+  init_regs ();
+  init_alias_once ();
+  init_decl_processing ();
+  init_eh ();
+  init_optabs ();
+  init_stmt ();
+  init_loop ();
+  init_reload ();
+  init_function_once ();
+  init_stor_layout_once ();
+  init_varasm_once ();
+
+  /* The following initialization functions need to generate rtl, so
+     provide a dummy function context for them.  */
+  init_dummy_function_start ();
+  init_expmed ();
+  init_expr_once ();
+  if (flag_caller_saves)
+    init_caller_save ();
+  expand_dummy_function_end ();
+
   if (name != 0)
     name = ggc_strdup (name);
 


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