[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3rd problem: Bug cross-compiling bash (with buildroot): mkbuiltins u
Re: 3rd problem: Bug cross-compiling bash (with buildroot): mkbuiltins uses config.h
Wed, 13 Apr 2005 13:17:28 -0400
Mozilla Thunderbird 1.0.2 (Macintosh/20050317)
kus Kusche Klaus wrote:
>>>The same problem occurs when compiling psize.c:
>>>It is compiled for the host with the defines in "config.h",
>>>which are valid for the target environment only.
>>>Moreover, running "psize.c" on the host is irrelevant anyway:
>>>The size of a pipe on the host is not the same as the size of
>>>a pipe on the target...
>>Luckily, this provides only a last-ditch default. Just about every
>>system should have the posix defines that provide the correct value.
> Well, if it is a last-ditch default only, than it is even worse that
> its compilation causes the whole bash build to fail:
> psize.c does not compile at all with the wrong config.h included
> on my system, and make stops.
The problem is that these auxiliary C programs (mkbuiltins, psize, etc.)
are non-trivial enough to have the same sort of portability problems as
any other program. Arguably the inclusion of config.h is imperfect, but
there's not really a good solution, and including config.h solves the
problem in the vast majority of cases.
> Besides, make also ran psize on my system, although the target system
> defines PIPE_BUF in its headers. What are you checking / looking for
> for the pipe size?
Because it quickly becomes more complicated than desirable to
conditionally execute make actions based on the existence of defines
in system headers.
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/