|
Recompiling the C++ Simulation Libraries |
Category |
Purpose |
Intended Audience |
Applicable to |
Description |
Limitations |
See also
Setup
If you wish to use a compiler other than the one officially
supported for your Host architecture, you will need to rebuild
the C++ Simulation Libraries using the new compiler/linker/archiver.
All users
ObjecTime 4.4
From The 4.3/4.4 Documentation Errata
Recompiling the C++ Simulation Libraries
If you wish to use some other compiler for your design work then you
will need to recompile these libraries. The following steps can be
used to accomplish this.
- Select a name for the library. The steps below assume that this
name is 'NewLib'. The names 'ARCH' and 'arch' used below have
values defined by teh following table depending on the host
platform for the compiler to be used in conjunction with this new
library.
Host | ARCH | arch |
SunOS 4.x | SUN4 | sun |
SunOS 5.x | SUN5 | sun5 |
(Solaris) |
HP-UX | HP400 | hp400 |
9000/4xx |
HP-UX | HP700 | hp700 |
9000/7xx |
AIX xx | IBMRS | ibmRS |
- Set your permission mask so everyone will have access to the new
library:
umask 022
- Got to the source directory:
cd $OBJECTIME_HOME/C++/SimulationRTS/src
- Create the following directory:
mkdir ../NewLib
- Edit the Makefile. Find the group of targets for the compile host.
For example, if the compiler is hosted on a SUN5 platform, add your
target 'NewLib.sun5' to the group that includes 'gnu2.sun5'. The
actions associated with this target should not need to be modified.
- Create the file 'Makefile-NewLib.arch':
cp Makefile-gnu2.arch Makefile-NewLib.arch
- Edit Makefile-NewLib.arch to reflect the compiler you wish to use.
Changes here will include:
- verify that the ARCH variable has a value taken from the table above.
- the specification of the complete path to the C++ compiler via the CC
make variable.
- compiler options used when compiling the library. These are specified
via EXTRAFLAGS and are in addition to those in
'../targets/extras/lib-NewLib'.
- the variable LIBSET should be 'NewLib'.
- the variable LOPTS is
- the variable RANLIB should be 'ranlib' or 'true' depending on whether
or not ranlib needs to be invoked on object archives produced with 'ar'.
- SHLIB should be 'SHARED_LIBS' or nothing according to whether the
selected compiler supports shared libraries or not.
- SOEXT is the filename extension used when creating a shared library
if SHLIB is non-empty.
- Create the file 'targets/NEWLIB' which will be referenced as the 'Overrides
File' in the target specification to be defined in the toolset and included
by the generated makefile. Begin wih a copy of one of the existing files
in the targets directory designed to be used on the same host architecture.
- LD should specify a suitable command prefix to be used for the link phase.
- ARCHIVE_REPLACE: usually 'ar r'.
- RANLIB: as in Makefile-NewLib.arch.
- ARCH: as in Makefil-NewLIb.arch.
- LIB_TAG: link-time option to reference object library.
- DIR_TAG: link-time option to add directory to library search path.
- INCLUDE_TAG: compile-time option to add directory to include search path.
- DEFINE_TAG: compile-time option to define preprocessor macro.
- OBJECT_TAG: compile-time option to stop afer producing objectfile.
- DEBUG_TAG: compile-time option to include debugging symbols.
- OUTPUT_TAG: compile-time option to direct output.
- EXTRACCFLAGS: extra compile-time options.
- EXTRALDFLAGS: extra link-time options as required.
- EXTRALIBS: additional link libraries if necessary
- Create the file targets/extras/lib-NewLib. This file will be included
(indirectly) by Makefile-NewLib and the file created in step 8.
- LIBSETFLAGS: compile-time options used both when compiling library and
when compiling application.
- Create the files target/FooBar, targets/extras/lib-NewLib and
targets/extras/platNewLib. The first will be referenced by the generated
makefile based on the target specification to be defined in ther toolset.
It and the makefile created in step 6 will include the other two.
- CCFLAGS: compile-time options - must include '-DTARGET=platXXXX'
None
C++ User Guide & Reference: Chpt.5 C++ Compilation Setup
Toolset Guide: Chpt.23 Compilation Setup Browsers
|
Copyright © 1999, ObjecTime Limited. |