From e909c376098c953741a887797561e7e1ca9e3fb4 Mon Sep 17 00:00:00 2001 From: coryan Date: Tue, 13 Feb 2001 17:10:22 +0000 Subject: ChangeLogTag:Tue Feb 13 09:09:01 2001 Carlos O'Ryan --- TAO/TAO-INSTALL.html | 160 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 30 deletions(-) (limited to 'TAO/TAO-INSTALL.html') diff --git a/TAO/TAO-INSTALL.html b/TAO/TAO-INSTALL.html index 6f1d68799bd..df108775dc1 100644 --- a/TAO/TAO-INSTALL.html +++ b/TAO/TAO-INSTALL.html @@ -132,16 +132,101 @@ If you are building TAO for a VxWorks target, please see the detailed instructions for building and installing ACE and TAO in $ACE_ROOT/ACE-INSTALL.html.

-Cross-compiling TAO is not much different than building it for -self-host. The one major difference is that TAO's IDL compiler must -be built and run on the host; it's not necessary to run it on the -target. It's easiest to set this up by using a symlink (Unix) or copy -of tao_idl (NT). By way of example, here is how I setup -my Unix (SunOS5, using g++) workspace to support cross-compilation -(for VxWorks). It assumes that the ACE+TAO distribution has been -unpacked, with TAO below ACE_wrappers. It uses the -ACE_wrappers/bin/create_ace_build script to create a shadow build -tree:

+

Cross-compiling TAO is not much different than building it for + self-host. The one major difference is that TAO's IDL compiler + must be built and run on the host; it's not necessary to run it + on the target. + There are several ways to do this, below we document the two + most common approaches: +

+ +

Modifying the default location for the IDL compiler

+ +

By default TAO assumes that the IDL compiler is located in: + $TAO_ROOT/TAO_IDL/tao_idl and that the GPERF tool + is located in $ACE_ROOT/bin/gperf, this is fine for + hosted builds, but not for cross-compilation. + Unfortunately there is no good default for cross-compilation + builds because different sites choose a different location for + their tools. +

+

You can override the default values by adding two lines in your + platform_macros.GNU file, as follows: +

+$ echo 'TAO_IDL := /your/path/tao_idl' \
+     >> platform_macros.GNU
+$ echo 'TAO_IDLFLAGS := -g /your/path/gperf' \
+
+

+

You could even use: +

+$ echo 'TAO_IDL := tao_idl' \
+     >> platform_macros.GNU
+$ echo 'TAO_IDLFLAGS := -g gperf' \
+
+ if the tools are in your path. +

+ +

Obviously you must first build the tools for the host platform, + typically you would do this as follows: +

+# (1) Create a clone directory for the host:
+
+$ cd ACE_wrappers
+$ mkdir -p build/HOST
+$ ./bin/create_ace_build build/HOST
+
+# (2) Configure the host build:
+
+$ echo '#include "ace/config-HOST.h"' > build/HOST/ace/config.h
+$ echo 'include $(ACE_ROOT)/include/makeinclude/platform_HOST.GNU' \
+     > build/HOST/include/makeinclude/platform_macros.GNU
+
+# Often host builds are static:
+$ echo 'static_libs_only=1' \
+     >> build/HOST/include/makeinclude/platform_macros.GNU
+
+# (3) Build the host tools
+
+$ cd build/HOST
+$ export ACE_ROOT=$PWD
+$ make -C ace
+$ make -C apps/gperf
+$ make -C TAO/TAO_IDL
+
+ +

Then configuring the location of the tools for the target + could be done as shown here: +

+# (4) Create a clone directory for the target:
+
+$ cd ACE_wrappers
+$ mkdir -p build/TARGET
+$ ./bin/create_ace_build build/TARGET
+
+# (5) Configure the target build:
+
+$ echo '#include "ace/config-TARGET.h"' > build/HOST/ace/config.h
+$ echo 'include $(ACE_ROOT)/include/makeinclude/platform_TARGET.GNU' \
+     > build/TARGET/include/makeinclude/platform_macros.GNU
+
+# (6) Configure the TARGET build to use the HOST IDL compiler and
+#     gperf tools, as described above.
+
+ +

Alternative configuration, using links

+ +

Some developers prefer to set up the host tools using symbolic + links (Unix) or copy of tao_idl (NT). + By way of example, here is how you could setup a + croos-compilation environment for Unix, + the host is SunOS5/g++, + the target is VxWorks. + It assumes that the ACE+TAO distribution has been + unpacked, with TAO below ACE_wrappers. It uses the + ACE_wrappers/bin/create_ace_build script to create a shadow + build + tree:

  1. cd ACE_wrappers
  2. bin/create_ace_build SunOS5_g++ @@ -149,9 +234,10 @@ tree:

  3. cd build/vxworks/TAO
  4. /bin/rm -r TAO_IDL
  5. ln -s ../../SunOS5_g++/TAO/TAO_IDL -

+ +

-To build on the host: +

To build on the host:

  1. cd build/SunOS5_g++
  2. export ACE_ROOT=`pwd`; @@ -162,24 +248,38 @@ To build on the host:
  3. export ACE_ROOT=`pwd`
  4. (cd ace; make && cd ../tests; make && cd ../TAO; make) > make.log -

- -For NT hosts, please see the detailed instructions for building and -installing ACE and TAO in ../ACE-INSTALL.html. For -NT hosts, see Building -ACE on Tornado/NT hosts for VxWorks targets

- -Please note that dynamic loading of libraries is not supported by TAO -for any cross-compiled target. Therefore, dynamic service -configuration of the TAO ORB is not supported.

- -If using perfect hashing, TAO_IDL needs gperf to be built on the host. -That's the default on many platforms. First, build gperf -in the ACE_wrappers/apps/gperf/src/ directory. Then, add -a symlink or copy to the bin/ directory for the -target.

- +

+ +

For NT hosts, please see the detailed instructions for building + and installing ACE and TAO in + ../ACE-INSTALL.html, + and + Building ACE on + Tornado/NT hosts for VxWorks targets +

+ +

Please note that dynamic loading of libraries is not supported + by TAO for any cross-compiled target. Therefore, dynamic + service configuration of the TAO ORB is not supported. +

+ +

If using perfect hashing, TAO_IDL needs gperf to be built on + the host. That's the default on many platforms. First, build + gperf in the + ACE_wrappers/apps/gperf/src/ directory. Then, add + a symlink or copy to the bin/ directory for the + target. +

+ +

Which one is right for me?

+ +

Using links to cross-compile TAO may appear simpler at first + glance. However, storing the location in the + platform_macros.GNU is more amenable for + sites where many developers share the same configuration files, + or where ACE+TAO are compiled once and used by a medium or large + size group. +


On Windows NT

-- cgit v1.2.1