On Wed, Apr 04, 2001 at 02:06:22PM +0200, Maciej W. Rozycki wrote:
> Date: Wed, 4 Apr 2001 14:06:22 +0200 (MET DST)
> From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
> To: Ralf Baechle <ralf@oss.sgi.com>
> cc: Florian Lohoff <flo@rfc822.org>, "Kevin D. Kissell" <kevink@mips.com>,
> "MIPS/Linux List (SGI)" <linux-mips@oss.sgi.com>
> Subject: Re: Dumb Question on Cross-Development
>
> 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.
stdint.h isn't available everywhere. Aside of that I won't object ...
Ralf
|