script uses the
string to make decisions on a number of configurable items.
While in a 'regular' build we can, for example, compile and run a test program to determine some of this information we can compile but we cannot run a test program that is being cross-compiled.
In these cases, you should look at the
file to for hints on how you should proceed.
Please submit reports at https://bugs.ntp.org
to improve the ability to cross-compile ntp.
Basic Cross-compile instructions
If you are using a GNU toolchain and the cross-compile tools have been installed under "proper" names, this is pretty easy.
Get the CPU-Vendor-OS strings for the build
machines. In GNU AutoConf parlance, the build
machine is the machine you will be compiling on, and the host
machine is where you expect the binaries to run.
script is not in your path, the copy NTP uses is in
In a "proper" cross-compile environment, there will be named toolchains for a variety of platforms, including the build
environment and at least one host
machine that has a cross-compile environment for
, you should find the following executables on your system:
gcc (which is probably symlinked to
To build an
FreeBSD version of
Solaris machine you could:
> cd ntp-dev
> mkdir A.i386-unknown-freebsd6.2
> cd A.i386-unknown-freebsd6.2
> ../configure --host=i386-unknown-freebsd6.2 --build=sparc-sun-solaris2.10
> make DESTDIR=`pwd`/:Built install
and you will have all of the pieces ready to be installed under the
If you do not have a GNU cross-compile toolchain installed, it's still pretty easy. In this case, I recommend installing symlinks to the needed tools using the naming style described above. In most cases the
part of the "triple" is not significant, so you can use whatever name works for you in that case in the above examples.
Building for VxWorks
for VxWorks used to be easy. Please see VxWorksPortingIssues
for more information.