On 02/12/16 21:16, Jeff Law wrote: > > 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 Hi Jeff,
Sorry about that, I meant to copy the whole thing out of the #if. Committed this as obvious in revision r243240. gcc/ChangeLog: * config/arm/arm.c (TARGET_ASM_INIT_SECTIONS): Fix wrong undef location.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ec1f5fc5e0d9ff8ba41778ff5bb698bc50eefc5b..437da6fe3d34978e7a3a72f7ec39dc76a54d6408 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -595,8 +595,9 @@ static const struct attribute_spec arm_attribute_table[] = #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 */ + +#undef TARGET_ASM_INIT_SECTIONS #define TARGET_ASM_INIT_SECTIONS arm_asm_init_sections #undef TARGET_DWARF_REGISTER_SPAN