Chapter 14. Toolchain
To build GCC for use with this package, it is necessary to follow some additional steps compared with what would ordinarily be required for building the compiler. These steps are required to provide the eCos header files which are used by the GCC build, to determine properties of the run-time system and to apply a set of changes (a “patch”) to allow eCos to provide C++ exception support in a flexible and future-proof way. This patch takes particular care to ensure that the compiler and libstdc++ continue to behave correctly when no eCos kernel is present.
With eCos installed, the
ECOS_REPOSITORY
environment variable set and ecosconfig in yourPATH
variable, run the following commands at a bash shell prompt in an empty directory, choosing a TARGET of the appropriate architecture:$
ecosconfig new
$TARGET
libstdc++ecosconfig tree
$make headers
-
Take the header tree generated under
install/include
and install it in the
subdirectory where you intend to install your tools. For example if you wish to install the new tools toTARGET
/sys-include/opt/newtools
, then place the headers in a new directory/opt/newtools/
. (Note you must ensure you have write-access toTARGET
/sys-include/opt
in this example, or you can choose an alternate path). A C++ exception support patch is supplied on the eCosPro Developer's Kit CD-ROM. Once the patch has been applied, it is necessary to run the following command:
$
contrib/gcc_update --touch
Configure GCC from within an empty build directory as follows, ensuring that the GNU binary utilities are at the head of the
PATH
:$
/src/gcc-
3.x.x
/configure --target=TARGET
\ --prefix=/opt/newtools --enable-languages=c,C++ \ --with-gnu-as --with-gnu-ld --with-newlib \ --enable-threads
2024-03-18 | eCosPro Non-Commercial Public License |