This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: error linking lto1 for target avr
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: avr at gjlay dot de, sean at depagnier dot com
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Sat, 26 Nov 2011 21:55:34 +0100
- Subject: Re: error linking lto1 for target avr
> In avr.c there is:
>
> ...
> #include "c-family/c-common.h"
> ...
That is the problem: avr.c should be language independent. Here you
are trying to link code calling C-family functions in a non-C language
(lto1 is just another front end for gcc, just like
cc1/cc1plus/etc...).
You should use extra target files for language specific target code.
Plenty examples in config/*/*-c.* ...
Ciao!
Steven