[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] my alltime favorive compiler error.
From: |
Steve Franks |
Subject: |
Re: [avr-chat] my alltime favorive compiler error. |
Date: |
Sun, 13 Jan 2008 22:15:46 -0700 |
> Message: 1
> Date: Sat, 12 Jan 2008 22:56:17 +0100 (MET)
> From: address@hidden (Joerg Wunsch)
> Subject: Re: [avr-chat] my alltime favorive compiler error.
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> "Steve Franks" <address@hidden> wrote:
>
> > (.text.fplib+0x24): relocation truncated to fit: R_AVR_13_PCREL
> > against symbol `__subsf3' defined in .text section in
>
> This is probably the oldest report yet still unresolved avr-libc bug:
>
> https://savannah.nongnu.org/bugs/index.php?14855
>
> Ah no, the second oldest, but it's related to the oldest one (if not
> even the same).
>
> Alas, fixing it is not so easy. It would require to transfer code
> from avr-libc to libgcc.S which is in the domain of GCC.
>
> Working around it is very easy though: just add -lm. Do always add
> it: if you don't need it, it doesn't hurt, but if you need it, it will
> be right there.
>
Interesting. We are using the floating point versions of vs*f(), so I
would have to say we are -lm 'ing. Is the link order important? I
just looked at a bunch of past makefiles, and I see -lm before -lgcc,
after, and both before and after. I suspect either those were long
ago debug attempts that were left in, or more likely borrowed from
others, in which case I'm interested why the ordering. It seems the
offending project has -lm both as the first and last link arguments,
but then, that's just what's in CVS, so I can't rule out my partner
having broke it on the development machine on the other side of the
city - will check tomorrow.
Steve