[ntp:questions] Re: cross compiling ntp-4.2.0: ./ntpdc-layout: cannot execute binary file
stenn at maccarony.ntp.org
Sat Jan 24 03:18:52 UTC 2004
The point of that test is to make sure the structure is aligned identically
on all targets.
If the layout differs there is a problem that must be solved, as we are
talking about a "network" data structure.
In article <Pine.LNX.4.55.0401240337250.3223 at jurand.ds.pg.gda.pl>,
Maciej W. Rozycki <macro at ds2.pg.gda.pl> wrote:
>On Sat, 24 Jan 2004, Harlan Stenn wrote:
>> It would be best to generate the structure layout using the --host stuff,
>> and then build the result using the --build stuff so we can make sure
>> the layout is correct. I don't know how to do that (and I don't have the
>> time to look at it now).
> Well, as you want to test for such things as unwanted padding it's really
>impossible to do that this way. If you want to check of the layout of a
>struct as emitted by the host compiler on the build system, the only way,
>AFAIK, is to exploit compile-time range checks, just like autoconf does
>for AC_CHECK_SIZEOF. You cannot run the created binary and if you build
>it with a native compiler for the build system instead, then the layout
More information about the questions