Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311581 - cross-avr/gcc-4.4.3: sizeof(64bit type) returns 0 for avr targets
Summary: cross-avr/gcc-4.4.3: sizeof(64bit type) returns 0 for avr targets
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-27 08:06 UTC by Jens
Modified: 2012-03-02 19:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2010-03-27 08:06:09 UTC
no 64bit support with crossdev in avr-gcc (Gentoo 4.4.3 p1.0) 4.4.3.
 sizeof(long long) shows zero. after building my own gcc, without patching anything with this "http://www.nongnu.org/avr-libc/user-manual/install_tools.html#install_avr_gcc" instruction

 "$ bunzip2 -c gcc-<version>.tar.bz2 | tar xf -
$ cd gcc-<version>
$ mkdir obj-avr
$ cd obj-avr
$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ \
    --disable-nls --disable-libssp --with-dwarf2
$ make
$ make install"

it works. i used the gcc in distfiles.

Reproducible: Always

Steps to Reproduce:
1. compile some programm with uint64_t/long long etc, (any datatype with 64bit in size)
2. download to avr, and show the size of this datatype
3.

Actual Results:  
sizeof(uint64_t) shows 0

Expected Results:  
sizeof(uint64_t) shows 8
Comment 1 SpanKY gentoo-dev 2010-04-07 18:21:15 UTC
someone who actually cares about avr will have to track this down
Comment 2 Jens 2010-04-07 21:34:49 UTC
"someone who actually cares about avr will have to track this down"
Who has build the avr part in crossdev? 

Comment 3 SpanKY gentoo-dev 2010-04-09 04:59:12 UTC
crossdev isnt relevant
Comment 4 solar (RETIRED) gentoo-dev 2010-04-09 06:24:02 UTC
Can an 8bit toolchain even handle 64bit ints?
Comment 5 SpanKY gentoo-dev 2010-06-10 03:32:29 UTC
anything is possible with enough generated code thrown at it
Comment 6 SpanKY gentoo-dev 2012-03-02 19:01:20 UTC
seems to work with gcc-4.5.3

$ avr-gcc --version
avr-gcc (Gentoo 4.5.3-r2 p1.1, pie-0.4.7) 4.5.3

$ echo 'char foo[sizeof(long long)];' | avr-gcc -x c -c - -o test.o

$ readelf -s test.o | grep foo
    12: 00000001     8 OBJECT  GLOBAL DEFAULT  COM foo