1 krisbash 1.1 Synopsis:
2 =========
3
4 This short document explains how to build OMI with a cross compiler. Two such
5 targets are supported today:
6
7 MONTAVISTA_IX86_GNU
8 NETBSD_IX86_GNU
9
10 To add additional platforms, the 'buildtool' script can be extended to support
11 them. In general, one would follow the MONTAVISTA_IX86_GNU example.
12
13 Terminology:
14 ============
15
16 The 'host' platform is where the compiler is run to build OMI. The 'target'
17 platform is where the output binaries files will run. These can be the same,
18 but in the case of cross-compiling they are different. This document uses the
19 term 'target' to refer to the platform where the binaries will be run.
20
21 Configuring:
22 krisbash 1.1 ============
23
24 By default, the 'configure' script guesses the platform based on the host
25 environment. But with cross-compiling, the platform is given by the --target
26 option as shown below:
27
28 ./configure --target=MONTAVISTA_IX86_GNU
29
30 Additional options are required to specify to location of the cross-compiler
31 components. These include:
32
33 --with-cc=PATH Use C compiler given by PATH.
34 --with-cxx=PATH Use C++ compiler given by PATH.
35 --with-ar=PATH Use archive command (ar) given by PATH.
36 --openssl=PATH Full path to the 'openssl' command.
37 --opensslcflags=FLAGS Extra C flags needed for OpenSSL.
38 (e.g., "-I/usr/local/include").
39 --openssllibs=FLAGS Extra library options needed for OpenSSL.
40 (e.g., "-L/usr/local/lib -lssl -lcrypto").
41 --openssllibdir=PATH The path of the directory containing the desired
42 OpenSSL libraries (ssl and crypto).
43 krisbash 1.1
44 So to run configure, one might have something like this:
45
46 ./configure
47 --target=NETBSD_IX86_GNU
48 --with-cc=/opt/toolchain/bin/586-gcc
49 --with-cxx=/opt/toolchain/bin/586-g++
50 --with-ar=/opt/toolchain/bin/586-ar
51 --opensslcflags="-I /opt/toolchain/include"
52 --openssllibdir=/opt/toolchain/lib64
53 --openssllibs="-L/opt/toolchain/lib64 -lssl -lcrypto"
54
55 Of course this is only an example. The exact location of these components will
56 vary.
57
|