public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Bart Veer <bartv@redhat.com>
To: luca.spinacci@marconicomms.com
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] ...porting software developed under cygwin with gcc to diab compiler...
Date: Mon, 05 Feb 2001 05:09:00 -0000	[thread overview]
Message-ID: <200102051309.f15D9bb14537@sheesh.cambridge.redhat.com> (raw)
In-Reply-To: <C12569EA.004605A3.00@marconicomms.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

      reply	other threads:[~2001-02-05  5:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-05  4:47 luca.spinacci
2001-02-05  5:09 ` Bart Veer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200102051309.f15D9bb14537@sheesh.cambridge.redhat.com \
    --to=bartv@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=luca.spinacci@marconicomms.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).