[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df is never built while cross-compiling for a linux target

From: Jim Meyering
Subject: Re: df is never built while cross-compiling for a linux target
Date: Sun, 06 May 2007 16:00:33 +0200

Mike Frysinger <address@hidden> wrote:

> On Sunday 06 May 2007, Jim Meyering wrote:
>>   fu_cv_sys_stat_statvfs=yes ./configure
> i know all the neat little hacks for forcing configure tests in a certain
> direction, the purpose of my e-mail wasnt to get these things to work for me,
> but to have the normal case work out of the box

If you really want this, it's probably possible.
But at probably too high a cost...

> is there a case that may not pass properly for linux ?  if not, we could have
> the cross-compile fallback of AC_TRY_RUN() check $host for *-linux* and have
> it assume

I see that my desktop defines STAT_STATFS2_BSIZE.  If you can confirm
that (or any other approach) works for some limited set of Linux systems
(with a specific range of version numbers for both glibc and linux),
then there's a chance.

Given linux, you might be able to replace that AC_TRY_RUN test with
a similar compile+link-only one.  Assuming Linux and specific libc
versions, you can probably assume there is a prototype for statfs2,
and that should be enough to detect whether statfs takes 2 arguments.
Or maybe even don't worry about 2-arg vs N-arg, in the likely event that
glibc has never provided that function with any other number of arguments.

I think you know, but I have to say it:
There's a good reason for not doing things that way: it's not
maintainable.  There are enough 'gotcha's and and variation between
versions that I'd be very hesitant about using such short-cuts.  In
general, it's not worthwhile to try to short-circuit the run-time tests.
Doing this sort of thing is sort of like going back to pre-autoconf days,
with things like #if defined __hpux__ || defined __sun__ in your C code.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]