avr-libc Fehlermeldung beim compilen

Gast #2285688
Lesenswert?

$ ./configure --prefix=$PREFIX --build=`./config.guess` --host=avr
$ make


avr-gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../common 
-I../../../include -I../../../include  -g -Wall -W -Wstrict-prototypes 
-mmcu=avr2 -D__COMPILING_AVR_LIBC__ -mcall-prologues -Os  -MT dtostre.o 
-MD -MP -MF .deps/dtostre.Tpo -c -o dtostre.o 
../../../libc/stdlib/dtostre.c
../../../libc/stdlib/dtostre.c: In function 'dtostre':

../../../libc/stdlib/dtostre.c:40:42: error: variable 'str_nan' must be 
const in order to be put into read-only section by means of 
'__attribute__((progmem))'

../../../libc/stdlib/dtostre.c:42:42: error: variable 'str_inf' must be 
const in order to be put into read-only section by means of 
'__attribute__((progmem))'
make[5]: *** [dtostre.o] Error 1
Gast #2285701
Lesenswert?

Ich kann hier aus static const machen, kein thema, aber ob das nicht 
auswirkungen hat? am ende funzt nix mehr und es libt an der libc selbst

    __attribute__((progmem)) static char str_nan[2][4] =
        {"nan", "NAN"};
    __attribute__((progmem)) static char str_inf[2][sizeof(str_nan[0])] 
=
        {"inf", "INF"};
Persönliche Seite #2285726
Lesenswert?

Simon schrieb:
> Ich wollte ansich nur avr-gcc compilen

Offenbar nicht, du compilierst avr-libc ;-)

https://savannah.nongnu.org/bugs/?32988

> Ich kann hier aus static const machen, ...

Nein! Du machst aus "static" ein "static const". Es sind 2 oder 3 
Stellen const zu machenen, also nicht static durch const ersetzen.

Hier die notwendigen Änderungen:
   http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2239
   http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2241

Alternativ die aktuellen abr-libc Quellen verwenden, d.h. direkt auf dem 
CVS.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren