- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have managed to get our code building and running on Ubuntu 10.10. The
code uses both C++ compiled with GCC 4.5 and fortran compiled with the
latest version of ifort. We may be required to support an older embedded
linux platform with a version of GCC several years old (still awaiting
specs from client). Unfortunately their software and hardware has been
speced for military use so it can't be upgraded. My question is are we
likely to face ABI issues building our application with the old version
of GCC and linking it with libraries compiled with the latest version of
ifort?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One would guess that the Fortran part of your software does not use the C-interoperability features of F2003, and that your code is all 32-bit. Were that not the case, you would have to operate under the basic restriction that every F200x compiler has a specified "companion C processor", and an old version of GCC is probably not the companion C processor for a current version of Intel Fortran.
In the absence of C-interoperability features in the Fortran code, the programmer has no choice but to be aware of the ABI of the Fortran compiler as well as that of the C compiler (with, perhaps, exceptions for toy examples). Likewise, the programmer would learn about those compiler options that make achieving binary compatibility easier.
Since your military specs restrict the ABI on the C side to that for GCC 4.5, the only variable is the ABI of Intel Fortran. As you can see from numerous Forum posts, there are a number of calling conventions that are commonly used and supported by IFort, including old conventions such as STDCALL.
You need to watch out for the presence of real type arguments and return values. In that case, are you restricted to x87, or do you use SSEn?
In the absence of C-interoperability features in the Fortran code, the programmer has no choice but to be aware of the ABI of the Fortran compiler as well as that of the C compiler (with, perhaps, exceptions for toy examples). Likewise, the programmer would learn about those compiler options that make achieving binary compatibility easier.
Since your military specs restrict the ABI on the C side to that for GCC 4.5, the only variable is the ABI of Intel Fortran. As you can see from numerous Forum posts, there are a number of calling conventions that are commonly used and supported by IFort, including old conventions such as STDCALL.
You need to watch out for the presence of real type arguments and return values. In that case, are you restricted to x87, or do you use SSEn?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your inter-language interface is all C compatible ("extern C" if in C++) you should not see changes in gcc affecting the interface at least since gcc 4.0.
It looks like you are facing specifications which go beyond what you can meet with casual assurances on this forum.
It looks like you are facing specifications which go beyond what you can meet with casual assurances on this forum.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page