This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
frv compilation problems
- From: Richard Henderson <rth at twiddle dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Apr 2003 23:45:16 -0700
- Subject: frv compilation problems
Looks like this port wasn't updated properly before
being committed even for the first time. Tsk tsk.
r~
* config/frv/frv.c (frv_asm_out_constructor): New.
(frv_asm_out_destructor): New.
* config/frv/frv.h (CTORS_SECTION_ASM_OP): New.
(DTORS_SECTION_ASM_OP): New.
(ASM_OUTPUT_CONSTRUCTOR): Remove.
(ASM_OUTPUT_DESTRUCTOR): Remove.
Index: frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.18
diff -c -p -d -u -r1.18 frv.c
--- frv.c 19 Feb 2003 18:03:09 -0000 1.18
+++ frv.c 17 Apr 2003 06:41:32 -0000
@@ -284,6 +284,8 @@ static bool frv_in_small_data_p PARAMS
static void frv_asm_output_mi_thunk
PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
static bool frv_rtx_costs PARAMS ((rtx, int, int, int*));
+static void frv_asm_out_constructor PARAMS ((rtx, int));
+static void frv_asm_out_destructor PARAMS ((rtx, int));
/* Initialize the GCC target structure. */
#undef TARGET_ASM_FUNCTION_PROLOGUE
@@ -304,6 +306,10 @@ static bool frv_rtx_costs PARAMS ((rtx
#define TARGET_IN_SMALL_DATA_P frv_in_small_data_p
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS frv_rtx_costs
+#undef TARGET_ASM_CONSTRUCTOR
+#define TARGET_ASM_CONSTRUCTOR frv_asm_out_constructor
+#undef TARGET_ASM_DESTRUCTOR
+#define TARGET_ASM_DESTRUCTOR frv_asm_out_destructor
#undef TARGET_ASM_OUTPUT_MI_THUNK
#define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk
@@ -9852,4 +9858,24 @@ frv_rtx_costs (x, code, outer_code, tota
default:
return false;
}
+}
+
+static void
+frv_asm_out_constructor (symbol, priority)
+ rtx symbol;
+ int priority ATTRIBUTE_UNUSED;
+{
+ ctors_section ();
+ assemble_align (POINTER_SIZE);
+ assemble_integer_with_op ("\t.picptr\t", symbol);
+}
+
+static void
+frv_asm_out_destructor (symbol, priority)
+ rtx symbol;
+ int priority ATTRIBUTE_UNUSED;
+{
+ dtors_section ();
+ assemble_align (POINTER_SIZE);
+ assemble_integer_with_op ("\t.picptr\t", symbol);
}
Index: frv.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.h,v
retrieving revision 1.18
diff -c -p -d -u -r1.18 frv.h
--- frv.h 9 Mar 2003 22:01:14 -0000 1.18
+++ frv.h 17 Apr 2003 06:41:35 -0000
@@ -2640,6 +2640,11 @@ __asm__("\n" \
#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\""
#define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\""
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\""
+#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\""
+
/* A C expression whose value is a string containing the assembler operation to
switch to the fixup section that records all initialized pointers in a -fpic
program so they can be changed program startup time if the program is loaded
@@ -2860,27 +2865,6 @@ do { \
init section is not actually run automatically, but is still useful for
collecting the lists of constructors and destructors. */
#define INVOKE__main
-
-/* Output appropriate code tp call a static constructor. */
-#undef ASM_OUTPUT_CONSTRUCTOR
-#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
-do { \
- ctors_section (); \
- fprintf (STREAM, "\t.picptr\t"); \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, "\n"); \
-} while (0)
-
-/* Output appropriate code tp call a static destructor. */
-#undef ASM_OUTPUT_DESTRUCTOR
-#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
-do { \
- dtors_section (); \
- fprintf (STREAM, "\t.picptr\t"); \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, "\n"); \
-} while (0)
-
/* Output of Assembler Instructions. */