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]

Dodgy hpux PATCH: Target hooks for exception and eh frame sections


The following allows bootstrap of 3.1 @ Wed Oct 24 22:46:17 UTC 2001
to continue on hppa2.0-hp-hpux10.20 .
It has now died with:

stage1/xgcc -Bstage1/ -B/usr/local/hppa2.0-hp-hpux10.20/bin/ -c  -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
   -DHAVE_CONFIG_H    -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/config -I
./../gcc/gcc/../include ../../gcc/gcc/cp/decl2.c -o cp/decl2.o
../../gcc/gcc/cp/decl2.c: In function `decl_namespace':
../../gcc/gcc/cp/decl2.c:4397: Internal compiler error in alloc_aux_for_edge, at cfg.c:649
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[2]: *** [cp/decl2.o] Error 1

will look further.

In <http://gcc.gnu.org/ml/gcc-patches/2001-10/msg01158.html>
Lars Brinkhoff asked:
>         * dwarf2out.c: Include target.h.
>         (output_call_frame_info): Call target hook for eh frames.
>         (default_eh_frame_section): New function.

> + #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section

The definition of default_eh_frame_section is inside "#if defined
(DWARF2_DEBUGGING_INFO) || (DWARF2_UNWIND_INFO)".  What about targets
that define neither of those?  Can default_eh_frame_section be moved
outside the #if?

So maybe this isn't the right way to instantiate default_eh_frame_section.
The output.h patch is required for the external declaration to be visible
in config/pa/pa.c .

gcc -c  -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H
-I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include
 \
        ../../gcc/gcc/config/pa/pa.c -o pa.o
../../gcc/gcc/config/pa/pa.c:128: `default_eh_frame_section' undeclared here (not in a function)
../../gcc/gcc/config/pa/pa.c:128: initializer element is not constant
../../gcc/gcc/config/pa/pa.c:128: (near initialization for `targetm.asm_out.eh_frame_section')
../../gcc/gcc/config/pa/pa.c: In function `return_addr_rtx':../../gcc/gcc/config/pa/pa.c:3541: warning: integer constant is unsigned in ANSI
 C, signed with -traditional
make[2]: *** [pa.o] Error 1
make[2]: Leaving directory `/devel/span/rdb/src/gcc-3.1-experimental/gcc'
make[1]: *** [stage1_build] Error 2


2001-10-25  Rodney Brown  <rbrown64@csc.com.au>

     * output.h: Move default_exception_section, default_eh_frame_section
     outside of TREE_CODE #ifdef.
     * config/pa/som.h: Add null default_eh_frame_section into
     EXTRA_SECTION_FUNCTIONS.

--- gcc/output.h.orig    Tue Oct 23 11:33:36 2001
+++ gcc/output.h    Thu Oct 25 15:26:40 2001
@@ -208,12 +208,6 @@
 /* Tell assembler to switch to the section for function DECL.  */
 extern void function_section      PARAMS ((tree));

-/* Tell assembler to switch to the section for the exception table.  */
-extern void default_exception_section   PARAMS ((void));
-
-/* Tell assembler to switch to the section for the EH frames.  */
-extern void default_eh_frame_section    PARAMS ((void));
-
 /* Tell assembler to switch to the section for string merging.  */
 extern void mergeable_string_section    PARAMS ((tree, unsigned HOST_WIDE_INT,
                               unsigned int));
@@ -226,6 +220,12 @@
 /* Declare DECL to be a weak symbol.  */
 extern void declare_weak          PARAMS ((tree));
 #endif /* TREE_CODE */
+
+/* Tell assembler to switch to the section for the exception table.  */
+extern void default_exception_section   PARAMS ((void));
+
+/* Tell assembler to switch to the section for the EH frames.  */
+extern void default_eh_frame_section    PARAMS ((void));

 /* Emit any pending weak declarations.  */
 extern void weak_finish           PARAMS ((void));
--- gcc/config/pa/som.h.orig  Tue Oct 23 11:33:35 2001
+++ gcc/config/pa/som.h  Thu Oct 25 16:07:08 2001
@@ -296,6 +296,11 @@
     fprintf (asm_out_file, "%s\n", READONLY_DATA_ASM_OP);        \
       in_section = in_readonly_data;                        \
     }                                             \
+}                                            \
+                                             \
+void                                              \
+default_eh_frame_section ()                            \
+{                                            \
 }

 /* This is how to output a command to make the user-level label named NAME


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