linux-mips
[Top] [All Lists]

Re: Dumb Question on Cross-Development

To: Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: Dumb Question on Cross-Development
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Wed, 4 Apr 2001 14:06:22 +0200 (MET DST)
Cc: Florian Lohoff <flo@rfc822.org>, "Kevin D. Kissell" <kevink@mips.com>, "MIPS/Linux List (SGI)" <linux-mips@oss.sgi.com>
In-reply-to: <20010403171005.A31953@bacchus.dhis.org>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Tue, 3 Apr 2001, Ralf Baechle wrote:

> Brokeness starts with autoconf's AC_CHECK_SIZEOF macro implementation
> which is used frequently throughout a whole distribution and there are
> so many test that require actually execution of code on the target that
> fix a whole distribution for crosscompilation and keeping it uptodate
> is seriously double-plus un-fun.

 Well, I can't see any other way to check sizeof of a type.  OTOH, I
haven't seen many programs that call AC_CHECK_SIZEOF on unions or structs
-- that's where the real problem might be as predicting member alignment
is not always easy (especially for "evil" objects -- but if such ones
exist the actual problem is a badly written program begging for a
rewrite).  There is no need to check sizeof for simple types -- ISO C
<stdint.h> types might be used if a desired number of bits in a type is
needed with a fallback to AC_CHECK_SIZEOF for legacy hosts only (which we
don't care that much of).  In short, the macro shouldn't really be used in
most cases. 

 I sustain the problem does not lie in the tool but in its usage.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>