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]
Other format: [Raw text]

RFA: Fix target/47091: non-elf arm targets fail to build


Having the constructor / destructor prototypes conditional on OBJECT_FORMAT_ELF
seems to be a holdover from when the constructor definition was conditional on
#ifndef AOF_ASSEMBLER . The definition has been made unconditional in 2007.
My patch makes the prototype unconditional, too.


Tested "all-gcc" cross-build on x86_64-pc-linux-gnu for:
  arm-wrs-vxworks arm-netbsdelf arm-netbsd arm-linux
  arm-linux-androideabi arm-uclinux_eabi arm-ecos-elf arm-eabi
  arm-symbianelf arm-rtems arm-elf arm-wince-pe arm-pe

2010-12-30  Joern Rennecke  <amylaar@spamcop.net>

	PR target/47091
	* config/arm/arm.c (arm_handle_pcs_attribute): Add ATTRIBUTE_UNUSED
	to declaration.
	(arm_elf_asm_constructor, arm_elf_asm_destructor):
	Declare unconditionally.

Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(revision 168346)
+++ config/arm/arm.c	(working copy)
@@ -121,7 +121,8 @@ static tree arm_handle_fndecl_attribute 
 static tree arm_handle_pcs_attribute (tree *, tree, tree, int, bool *);
 static tree arm_handle_isr_attribute (tree *, tree, tree, int, bool *);
 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
-static tree arm_handle_notshared_attribute (tree *, tree, tree, int, bool *);
+static tree arm_handle_notshared_attribute (tree *, tree, tree, int, bool *)
+  ATTRIBUTE_UNUSED;
 #endif
 static void arm_output_function_epilogue (FILE *, HOST_WIDE_INT);
 static void arm_output_function_prologue (FILE *, HOST_WIDE_INT);
@@ -173,10 +174,8 @@ static rtx aapcs_allocate_return_reg (en
 				      const_tree);
 static int aapcs_select_return_coproc (const_tree, const_tree);
 
-#ifdef OBJECT_FORMAT_ELF
 static void arm_elf_asm_constructor (rtx, int) ATTRIBUTE_UNUSED;
 static void arm_elf_asm_destructor (rtx, int) ATTRIBUTE_UNUSED;
-#endif
 #ifndef ARM_PE
 static void arm_encode_section_info (tree, rtx, int);
 #endif

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