[Patch,AVR] Was/Fix: error linking lto1 for target avr
Georg-Johann Lay
avr@gjlay.de
Tue Nov 29 21:55:00 GMT 2011
Ian Lance Taylor wrote:
> Georg-Johann Lay <avr@gjlay.de> writes:
>
>> So if a frontend can define address spaces and it is a generic feature, the
>> question is how to get the name of an address space in a generic, language
>> independent way.
>
> We could decide that all frontends that use address spaces must define a
> printable name for each address space. That would mean changing the
> middle-end address space interface to give a name to each address space.
> The current middle-end address space interface does not require that
> address spaces have a name. I was not involved in the addition of
> address spaces to gcc, and I don't know why they followed the path they
> did.
>
> Ian
Presumably they chose that approach to keep it simple or it is even a
performance issue to move the name around.
I attached a patch but I fail to find the right configure options for
gcc/binutils as the testsuite complains
./avr/bin/ld: bad -plugin option
Configured gcc with --enable-lto and binutils 2.21 with --enable-plugin.
Maybe the patch can be pre-approved so that the others can proceed with their work?
Johann
* config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
ADDR_SPACE_PGM2, ADDR_SPACE_PGM3, ADDR_SPACE_PGM4,
ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): Write as enum.
(avr_addrspace_t): New typedef.
(avr_addrspace[]): New declaration.
* config/avr/avr-c.c (avr_toupper): New static function.
(avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
avr_addrspace to get address space information.
* config/avr/avr.c (avr_addrspace): New variable.
(avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
avr_asm_named_section, avr_section_type_flags,
avr_asm_select_section, avr_addr_space_address_mode,
avr_addr_space_convert, avr_emit_movmemhi): Use it.
(avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
(avr_pgm_segment): Remove.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addrspace-name.diff
Type: text/x-patch
Size: 14621 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20111129/1e8ea44c/attachment.bin>
More information about the Gcc
mailing list