sshd broken on arm?
Willem Jan Withagen
wjw at digiware.nl
Fri Jan 25 05:05:35 PST 2008
Nicholas Clark wrote:
> On Fri, Jan 25, 2008 at 12:23:09PM +0100, Dag-Erling Smrgrav wrote:
>
>> None of this matters. What John pointed out means that the code is
>> wrong and the compiler is right. The code is not allowed to assume that
>> an object is correctly aligned unless it is of a type that requires the
>> correct alignment. The easiest way to do this is with a union, e.g.
>
> Whilst that is correct, why is the compiler changing the alignment of the
> struct for different optimiser settings but all other flags identical?
> [Have I got that right?] Surely that's a compiler bug too?
>
> (In that it is in breach of an ABI, even if ANSI permits different padding
> for any different compiler flags, making no special reference to
> "optimisation")
In the assembly output I looked at things were correctly aligned. But
then that was still an horribly old version of GCC.
I'm in the process of getting 4.2.1 to work.
But for the moment I have the feeling that cc1 thinks it is compiling
for C++:
cc1: warning: command line option "-Wnested-externs" is valid for C/ObjC
but not for C++
cc1: warning: command line option "-Wstrict-prototypes" is valid for
C/ObjC but not for C++
cc1: warning: command line option "-Wmissing-prototypes" is valid for
C/ObjC but not for C++
cc1: warning: command line option "-Wno-pointer-sign" is valid for
C/ObjC but not for C++
cc1: warning: command line option "-std=c99" is valid for C/ObjC but not
for C++
cc1: warning: command line option "-ffreestanding" is valid for C/ObjC
but not for C++
So please bare with me, I'll get there in the end. ;)
--WjW
More information about the freebsd-arm
mailing list