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]

Re: [Patch,AVR] Fix PR51409: error linking lto1 for target avr


Georg-Johann Lay schrieb:
Denis Chertykov wrote:

Georg-Johann Lay:

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

Maybe the patch can be pre-approved so that the others can proceed with their work?

Better to complete this work.


Denis.

http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02574.html


As this is a blocker and I am blocked myself by a collect2 issue:

Eric, Denis, could one of you test the patch and apply it if it is okay?
It is PR51409.

Applying is to issue for me, but running the tests with LTO enabled breaks anything that involves -flto because collect2 calls wrong linker, see link to gcc-help@ below.

As it appears I will have to debug/fix collect2 by myself which will take quite some time because I am not familiar with LTO/collect2.

Johann

I now switched back to --disable-lto as I could not resolve the problems that
appear to be a collect2 issue, see

http://gcc.gnu.org/ml/gcc-help/2011-12/msg00016.html

What I can do is:

* build the compiler with the patch and with LTO enabled and without
  getting a linker error for c_addr_space_name.

* I cannot get usable results from testsuite because of collect2 breakage

* Testsuite passes fine with the patch and --disable-lto [...]

Ok for trunk?

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.


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