FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 06-07-2008, 04:55 PM
Jay Berkenbilt
 
Default Bug#485002: gcc needs -mstructure-size-boundary=8 on arm

Package: gcc

I'm not really sure what the correct package is for this bug (if it's
a bug). Please reassign as needed.

In researching bug #484138, I realized that gcc on arm appears to be
configured to pad structures at 32-bit boundaries. The following
program:

------------------------------
#include <stdio.h>

typedef struct {
unsigned short a, b, c;
} A;

int main()
{
printf("%d
", sizeof(A));
return 0;
}
------------------------------

prints "8" on agnesi.debian.org in an etch or sid chroot. It prints 6
on my ix86 box and also on agricola.debian.org, an armel system. I
can get the above program to print 6 on agnesi as well by compiling
with "gcc -mstructure-size-boundary=8", but I'm not sure why this
should be necessary. There's nothing in the gcc output that suggests
why it is happening. Here's the output of gcc -v on a sid chroot on
agnesi.

----------------------------------------------------------------------
Using built-in specs.
Target: arm-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.0-5' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release --build=arm-linux-gnu --host=arm-linux-gnu --target=arm-linux-gnu
Thread model: posix
gcc version 4.3.1 20080523 (prerelease) (Debian 4.3.0-5)
COLLECT_GCC_OPTIONS='-v'
/usr/lib/gcc/arm-linux-gnu/4.3.1/cc1 -quiet -v a.c -quiet -dumpbase a.c -auxbase a -version -o /tmp/ccMZwsRl.s
ignoring nonexistent directory "/usr/local/include/arm-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnu/4.3.1/../../../../arm-linux-gnu/include"
ignoring nonexistent directory "/usr/include/arm-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/arm-linux-gnu/4.3.1/include
/usr/lib/gcc/arm-linux-gnu/4.3.1/include-fixed
/usr/include
End of search list.
GNU C (Debian 4.3.0-5) version 4.3.1 20080523 (prerelease) (arm-linux-gnu)
compiled by GNU C version 4.3.1 20080523 (prerelease), GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=34 --param ggc-min-heapsize=7690
Compiler executable checksum: 7e1491e820500274f4e85f459af6289f
COLLECT_GCC_OPTIONS='-v'
as -o /tmp/ccxzGJhC.o /tmp/ccMZwsRl.s
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v'
/usr/lib/gcc/arm-linux-gnu/4.3.1/cc1 -quiet -v a.c -quiet -dumpbase a.c -auxbase a -version -o /tmp/ccMZwsRl.s
ignoring nonexistent directory "/usr/local/include/arm-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnu/4.3.1/../../../../arm-linux-gnu/include"
ignoring nonexistent directory "/usr/include/arm-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/arm-linux-gnu/4.3.1/include
/usr/lib/gcc/arm-linux-gnu/4.3.1/include-fixed
/usr/include
End of search list.
GNU C (Debian 4.3.0-5) version 4.3.1 20080523 (prerelease) (arm-linux-gnu)
compiled by GNU C version 4.3.1 20080523 (prerelease), GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=34 --param ggc-min-heapsize=7690
Compiler executable checksum: 7e1491e820500274f4e85f459af6289f
COLLECT_GCC_OPTIONS='-v'
as -o /tmp/ccxzGJhC.o /tmp/ccMZwsRl.s
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/:/usr/lib/gcc/arm-linux-gnu/4.3.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v'
/usr/lib/gcc/arm-linux-gnu/4.3.1/collect2 --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -X -m armelf_linux -p /usr/lib/gcc/arm-linux-gnu/4.3.1/../../../crt1.o /usr/lib/gcc/arm-linux-gnu/4.3.1/../../../crti.o /usr/lib/gcc/arm-linux-gnu/4.3.1/crtbegin.o -L/usr/lib/gcc/arm-linux-gnu/4.3.1 -L/usr/lib/gcc/arm-linux-gnu/4.3.1 -L/usr/lib/gcc/arm-linux-gnu/4.3.1/../../.. /tmp/ccxzGJhC.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnu/4.3.1/crtend.o /usr/lib/gcc/arm-linux-gnu/4.3.1/../../../crtn.o
----------------------------------------------------------------------

--
Jay Berkenbilt <qjb@debian.org>



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org