gcc: 2014-09-23 Joern Rennecke <joern.renne...@embecosm.com>
* config/avr/avr.h (LIBSTDCXX): Don't define. * config/avr/avr.c (TARGET_UNWIND_WORD_MODE): Define. (avr_unwind_word_mode): New function. * config/avr/avr.c (avr_asm_function_rodata_section): When merging something into a ".gnu.linkonce.t.*" function-specific section, always add the SECTION_CODE flag. Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 216243) +++ config/avr/avr.c (working copy) @@ -8667,8 +8667,20 @@ avr_asm_function_rodata_section (tree de { const char *rname = ACONCAT ((new_prefix, name + strlen (old_prefix), NULL)); - flags &= ~SECTION_CODE; - flags |= AVR_HAVE_JMP_CALL ? 0 : SECTION_CODE; + if (i == 0) + { + flags &= ~SECTION_CODE; + flags |= AVR_HAVE_JMP_CALL ? 0 : SECTION_CODE; + } + else + { + /* The flags have to match the existing section where the + function proper went, lest varasm.c:get_section will + complain: ...include/bits/locale_facets_nonio.tcc: + In member function '<447 chars of c++ name>': + <447 chars of c++ name> causes a section type conflict */ + flags |= SECTION_CODE; + } return get_section (rname, flags, frodata->named.decl); } @@ -12721,6 +12733,16 @@ #define TARGET_ADDR_SPACE_LEGITIMATE_ADD #undef TARGET_PRINT_OPERAND_PUNCT_VALID_P #define TARGET_PRINT_OPERAND_PUNCT_VALID_P avr_print_operand_punct_valid_p +#undef TARGET_UNWIND_WORD_MODE +#define TARGET_UNWIND_WORD_MODE avr_unwind_word_mode + +static enum machine_mode +avr_unwind_word_mode (void) +{ + return Pmode; +} + + struct gcc_target targetm = TARGET_INITIALIZER; Index: config/avr/avr.h =================================================================== --- config/avr/avr.h (revision 216243) +++ config/avr/avr.h (working copy) @@ -516,9 +516,6 @@ #define LINK_SPEC "\ #define LIB_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}" -#define LIBSTDCXX "gcc" -/* No libstdc++ for now. Empty string doesn't work. */ - #define LIBGCC_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}"