[Top] [All Lists]

Re: Dumb Question on Cross-Development

To: Ralf Baechle <>
Subject: Re: Dumb Question on Cross-Development
From: "Maciej W. Rozycki" <>
Date: Wed, 4 Apr 2001 14:06:22 +0200 (MET DST)
Cc: Florian Lohoff <>, "Kevin D. Kissell" <>, "MIPS/Linux List (SGI)" <>
In-reply-to: <>
Organization: Technical University of Gdansk
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:, PGP key available        +

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