[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#485002: marked as done (gcc needs -mstructure-size-boundary=8 on arm)



Your message dated Sun, 8 Jun 2008 12:37:58 +0300
with message-id <20080608093758.GA29566@kos.to>
and subject line Not a bug, correct according to ABI
has caused the Debian Bug report #485002,
regarding gcc needs -mstructure-size-boundary=8 on arm
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
485002: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485002
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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\n", 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>



--- End Message ---
--- Begin Message ---
See the original FAQ for motivation for this behaviour:

http://netwinder.osuosl.org/users/b/brianbr/public_html/alignment.html

Armel (with new ABI), does not have this behaviour:

http://wiki.debian.org/ArmEabiPort#head-ac8234e3f8101f882450c1af8947c608a65aab7c

-- 
"rm -rf" only sounds scary if you don't have backups


--- End Message ---

Reply to: