From owner-freebsd-arm@FreeBSD.ORG Fri Jan 25 13:05:35 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1846016A41B for ; Fri, 25 Jan 2008 13:05:35 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mail.digiware.nl (www.tegenbosch28.nl [217.21.251.97]) by mx1.freebsd.org (Postfix) with ESMTP id C102D13C458 for ; Fri, 25 Jan 2008 13:05:34 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from localhost (localhost.digiware.nl [127.0.0.1]) by mail.digiware.nl (Postfix) with ESMTP id DBB1B1715B for ; Fri, 25 Jan 2008 14:05:33 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from mail.digiware.nl ([127.0.0.1]) by localhost (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RMltolhovHhp for ; Fri, 25 Jan 2008 14:05:31 +0100 (CET) Received: from [212.61.27.67] (opteron.digiware.nl [212.61.27.67]) by mail.digiware.nl (Postfix) with ESMTP id 3309E1712B for ; Fri, 25 Jan 2008 14:05:31 +0100 (CET) Message-ID: <4799DE99.8010207@digiware.nl> Date: Fri, 25 Jan 2008 14:05:29 +0100 From: Willem Jan Withagen Organization: Digiware User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: freebsd-arm@freebsd.org References: <479880A7.1030107@digiware.nl> <20080124.084828.1608359032.imp@bsdimp.com> <864pd386mj.fsf@ds4.des.no> <20080124.110954.179240992.imp@bsdimp.com> <47991E08.6070609@digiware.nl> <20080125041540.GA30262@zibbi.meraka.csir.co.za> <4799A2B3.4060003@digiware.nl> <86prvq5eua.fsf@ds4.des.no> <20080125113916.GP81396@plum.flirble.org> In-Reply-To: <20080125113916.GP81396@plum.flirble.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: sshd broken on arm? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2008 13:05:35 -0000 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