From owner-freebsd-current@FreeBSD.ORG Sun Nov 12 19:28:22 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F55D16A4C9; Sun, 12 Nov 2006 19:28:22 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59E1D43DA2; Sun, 12 Nov 2006 19:28:09 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 07FDE6046; Sun, 12 Nov 2006 22:28:07 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id D852D5EDD; Sun, 12 Nov 2006 22:28:06 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kACJSAj6027872; Sun, 12 Nov 2006 22:28:10 +0300 (MSK) (envelope-from ru) Date: Sun, 12 Nov 2006 22:28:10 +0300 From: Ruslan Ermilov To: Alexander Kabaev Message-ID: <20061112192810.GC1173@rambler-co.ru> References: <20061112133929.9194773068@freebsd-current.sentex.ca> <20061112140010.GA47660@rambler-co.ru> <20061112144230.GC2331@kobe.laptop> <20061112145151.GC49703@rambler-co.ru> <20061112151150.GA2988@kobe.laptop> <20061112155723.GB50349@rambler-co.ru> <20061112165904.GP6501@plum.flirble.org> <20061112171436.GF50349@rambler-co.ru> <20061112180758.GD4237@kobe.laptop> <20061112132105.6bac38d6@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ALfTUftag+2gvp1h" Content-Disposition: inline In-Reply-To: <20061112132105.6bac38d6@kan.dnsalias.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: arm@FreeBSD.org, Giorgos Keramidas , current@FreeBSD.org Subject: Re: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 19:28:22 -0000 --ALfTUftag+2gvp1h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2006 at 01:21:05PM -0500, Alexander Kabaev wrote: > GCC expects 4-byte aligned structured on ARM but does not necessarily > have to. We can change the default at the expense of possible more > inefficient code generated and lost binary compatibility with other ARM > OSes out there. So this is trade off between unclear performance > penalty and an unspecified but certainly sizable number of other > landmines like this lurking on the code. >=20 > We should decide what evil we regard as lesser. >=20 This is the only buildworld problem so far on FreeBSD/ARM, so my feeling is that we can actually benefit from leaving it "as is", as it has a potential of making our code more portable. Of course if binary compatibility for structs across platforms is an issue, a structure should be "packed", because otherwise the C standard says that "Each non-bit-field member of a structure or union object is aligned in an implementation-defined manner appropriate to its type." On the other hand, having GCC align "struct foo { char x[11]; }" on a four-byte boundary (other than for backward compatibility) doesn't make too much sense to me. I don't know GCC rules for alignment of structure members. For example, if it's guaranteed (in GCC) that offsetof(struct foo, bar) is always 1 for "struct foo { char foo; char bar; }" (without the "packed" attribute) on all platforms and OSes GCC supports? I'd expect the latter to be "4" for FreeBSD/ARM but fortunately it stays "1", i.e., only the structure alignment is affected, and not of structure members (which is POLA but makes the 4 byte for structure alignment questionable). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --ALfTUftag+2gvp1h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFV3XKqRfpzJluFF4RAkf+AJ9iKs5nW9ORpNQnI4vQUWSAHMFMWACfdLsB aBsZvSlKNYnR6XkANypmCdg= =CPYa -----END PGP SIGNATURE----- --ALfTUftag+2gvp1h--