g77 invoking C functions when gcc 4.x is default
I was asked to consult on a migration of a legacy application from OpenVMS to Linux (Red Hat Enterprise 5 for now, RHEL 6 and/or 7 eventually), having performed a successful migration a few years ago.
The application is mostly written in Fortran, a mix of Fortran 77 and pre-F77 usages. Among the latter are non-standard approaches to handling character data. Due to these usages, such as REAL*8 for short strings up to 8 bytes, and LOGICAL*1 for individual characters, gfortran cannot be used. The developer has chosen g77 with switches like -fugly, and insists that that is more expedient than updating the thousands of lines of code in his application -- even to F77 standards.
I have pointed out that g77 is no longer supported, and that g77 requires gcc lib 3.4.x, which is outdated. But he is willing to live with that, and is using g77 on RHEL v5 to compile his code.
A complicating factor is that many recently written components of the application are C functions that were developed by a third organization. On OpenVMS, these were compatible with the Fortran code. On RHEL v5, the installed version of gcc is 4.2.x, and on RHEL v6, it is 4.4.x.
I am somewhat skittish about compiling the C code with the latest version of gcc, and then trying to link that into an application that has g77-generated object code intended for use with version 3.4.6 of the gcc library.
My questions:
1) Are my concerns valid? Is there a specific failure that would justify my reluctance to support this approach?
2) Can I use an older version of gcc for this application and simply compile statically with no library dependencies at run-time?
3) What factors might cause a statically linked gcc 3.4.x application to fail on a future version of RHEL?
Thanks -- and sorry for the length of this question.
-- Jay
|