eCos Home

RedBoot Home


About eCos

Supported Hardware

Downloading and Installation

Documentation

FAQ

Mailing lists

Problems

Licensing

Anonymous CVS

Contributions and Third Party Projects

eCos
(Answer) (Category) eCos FAQ : (Category) Porting eCos and RedBoot to a new target system :
What are the compiler dependencies?

eCos depends heavily on a number of language extensions provided by the gcc and g++ compilers. In fact a number of these extensions were added to these compilers specifically to support eCos (although they have wider applications as well). The first such extension is C++ constructor priority ordering. When you define several C++ static objects the language does not define the order in which these objects get constructed. g++ now allows static objects to be ordered using the __attribute__ mechanism, so for example it is possible to create a scheduler object before any thread objects. The second extension is selective linking. Traditionally linkers worked in terms of compilation units, in other words entire files: if an application needed a particular function from a library then all other library functions which happened to be in the same source file would become part of the application's executable. Instead the linker will now work at the finer granularity of individual functions or variables.

Other extensions provided by gcc and g++ are used wherever appropriate. For example attributes are used to define some functions with weak linkage and to provide aliases for some functions. Inline assembler is used to establish memory barriers and prevent the compiler from optimizing in places where this would be undesirable, for example in context switch code. Computed goto's may be used during exception handling.

The use of these extensions makes it very difficult to use compilers other than gcc and g++ to build eCos. In addition it is possible that other extensions will be used in future if they prove to be appropriate for the problem at hand. Therefore we recommend against attempting to use any other compiler technology for eCos development.


Previous: (Answer) How about porting eCos to a new board?
This document is: http://ecos.sourceware.org/fom/ecos?file=42
[Search] [Appearance]
This is a Faq-O-Matic 2.717.

Send any queries about the contents of this FAQ to the ecos-discuss mailing list
Send any operational queries about this FAQ to the eCos maintainers