The following command lines demonstrate the
minimum set of options required to
compile and link an eCos program written in C++.
Note: Remember that when this manual shows
TARGET-g++
you should use the full name of the cross compiler,
e.g. i386-elf-g++,
arm-elf-g++, or
sh-elf-g++. When compiling for the
synthetic Linux target, use the native
g++ which must have the features
required by eCos.
Note: Certain targets may require extra options,
for example the SPARClite architectures require the option
-mcpu=sparclite. Examine the
BASE_DIR/packages/targets
file or BASE_DIR/examples/Makefile
or the “Global compiler flags” option
(CYGBLD_GLOBAL_CFLAGS) in your generated
eCos configuration) to see if any extra options are
required, and if so, what they are.
The following command lines use some other options
which are recommended because they use the
selective linking feature: