This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
arm.c bug in handling of TARGET_ASM_INIT_SECTIONS
- From: Jeff Law <law at redhat dot com>
- To: "gcc at gnu dot org" <gcc at gnu dot org>
- Date: Fri, 2 Dec 2016 14:16:14 -0700
- Subject: arm.c bug in handling of TARGET_ASM_INIT_SECTIONS
- Authentication-results: sourceware.org; auth=none
Trying to build arm-netbsdelf:
g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I.
-I/home/cygnus/law/gcc-testing/gcc/gcc
-I/home/cygnus/law/gcc-testing/gcc/gcc/.
-I/home/cygnus/law/gcc-testing/gcc/gcc/../include
-I/home/cygnus/law/gcc-testing/gcc/gcc/../libcpp/include
-I/opt/cfarm/mpc/include
-I/home/cygnus/law/gcc-testing/gcc/gcc/../libdecnumber
-I/home/cygnus/law/gcc-testing/gcc/gcc/../libdecnumber/dpd
-I../libdecnumber -I/home/cygnus/law/gcc-testing/gcc/gcc/../libbacktrace
-o arm.o -MT arm.o -MMD -MP -MF ./.deps/arm.TPo
/home/cygnus/law/gcc-testing/gcc/gcc/config/arm/arm.c
/home/cygnus/law/gcc-testing/gcc/gcc/config/arm/arm.c:600:0: error:
"TARGET_ASM_INIT_SECTIONS" redefined [-Werror]
#define TARGET_ASM_INIT_SECTIONS arm_asm_init_sections
In file included from
/home/cygnus/law/gcc-testing/gcc/gcc/target-def.h:106:0,
from
/home/cygnus/law/gcc-testing/gcc/gcc/config/arm/arm.c:69:
./target-hooks-def.h:86:0: note: this is the location of the previous
definition
#define TARGET_ASM_INIT_SECTIONS hook_void_void
It's referring to this section of code. Note the placement of the
#endif. Looks weird, not sure if it's in the right place, should be a
line earlier or a line later:
#if ARM_UNWIND_INFO
#undef TARGET_ASM_UNWIND_EMIT
#define TARGET_ASM_UNWIND_EMIT arm_unwind_emit
/* EABI unwinding tables use a different format for the typeinfo tables. */
#undef TARGET_ASM_TTYPE
#define TARGET_ASM_TTYPE arm_output_ttype
#undef TARGET_ARM_EABI_UNWINDER
#define TARGET_ARM_EABI_UNWINDER true
#undef TARGET_ASM_EMIT_EXCEPT_PERSONALITY
#define TARGET_ASM_EMIT_EXCEPT_PERSONALITY arm_asm_emit_except_personality
#undef TARGET_ASM_INIT_SECTIONS
#endif /* ARM_UNWIND_INFO */
#define TARGET_ASM_INIT_SECTIONS arm_asm_init_sections