uisp-dev
[Top][All Lists]
Advanced

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

Re: [Uisp-dev] [patch] Alignment on ARM


From: E. Weddington
Subject: Re: [Uisp-dev] [patch] Alignment on ARM
Date: Wed, 20 Apr 2005 13:19:02 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Raphael Assenat wrote:

E. Weddington wrote:

Wojtek Kaniewski wrote:

unfortunately it's only a gcc extension, so if anyone tries to compile uisp with another compiled, it will probably throw an error. #ifdef __GNUC__ would be nice. however if uisp is said to compile only with gcc, this is not the case.

An alternative: instead of using the packed attribute, you can compile the file with the -fpack-struct compiler switch, which should do the same thing. However, the tradeoff is that you then have to make sure that that flag gets included in the build structure, i.e. makefile.

I tried that previously but it did not work. Just to be sure I tried again. Here is what I did:

export CFLAGS=-fpack-struct
export CXXFLAGS=-fpack-struct
./configure
make

And here is the is the relevant compilation line. -fpack-struct is present:

arm-linux-g++ -DHAVE_CONFIG_H -I. -I. -I. -Wall -Werror -fpack-struct -c -o Stk500.o `test -f 'Stk500.C' || echo './'`Stk500.C

Still, the sizeof was 24 instead of 22. Maybe it does not work with C++?


Oh! That's right. I now seem to remember something I saw on the gcc mailing list that -fpack-struct doesn't work with C++, just C. Thanks for jogging my memory.

Sorry for the confusion.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]