This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ...porting software developed under cygwin with gcc to diab compiler...
- To: luca dot spinacci at marconicomms dot com
- Subject: Re: [ECOS] ...porting software developed under cygwin with gcc to diab compiler...
- From: Bart Veer <bartv at redhat dot com>
- Date: Mon, 5 Feb 2001 13:09:37 GMT
- Cc: ecos-discuss at sourceware dot cygnus dot com
- References: <C12569EA.004605A3.00@marconicomms.com>
- Reply-To: bartv at redhat dot com
>>>>> "Luca" == luca spinacci <luca.spinacci@marconicomms.com> writes:
Luca> I'm working with a real time operative system (for Windows
Luca> NT) whose compiler is DIAB (cross compiler).
Luca> I' m trying to compile with the above a project developed,
Luca> compiled and built under cygwin with GCC compiler and link
Luca> that project with an existing project compiled under DIAB.
Luca> I haven't succeeded so far since there are C++ features
Luca> (template functions in template class...) that the DIAB
Luca> compiler isn't able to solve. I used eCOS on my PC and
Luca> successfully compiled the imported project. I tried to GCC
Luca> compile those same files generating the assembly code and
Luca> then to build the project by means of DIAB.
Luca> Obviously I got linking problems due to different name
Luca> mangling of GCC and DIAB. I know name mangling is different
Luca> on different compilers but it would be helpful to know if
Luca> GCC has compiler options to standardize its name mangling or
Luca> there's a standard follwed by some compilers.
There is no such compiler option, deliberately so. Traditionally the
code generated by different C++ compilers is incompatible in numerous
ways, e.g. layout of the virtual function table. Any attempt to mix
code generated by different compilers is pretty much doomed to
failure. The use of incompatible name mangling schemes acts as a
safety net, it ensures that you will get errors at link-time rather
than weird and undebuggable crashes at run-time.
There is work in progress on standardizing a C++ ABI for certain
platforms. On the g++ side this ABI should be supported when gcc 3.0
gets released, see http://gcc.gnu.org for more information.
Bart