This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Target control of Fortran options
- From: Paul Koning <paulkoning at comcast dot net>
- To: gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 3 Oct 2018 17:04:51 -0400
- Subject: Target control of Fortran options
In the C and C++ parts of GCC, the target has some ways to adjust the compiler options depending on target settings. I'm looking for a way to do that with gfortran.
The specific issue is in pdp11, which has an option to specify that "float" is 8 bytes (same as "double") rather than 4 bytes. And the 8 byte choice is the default.
As a result, if I invoke gfortran for that target, I get an ICE because real*4 can't be found. If I say -fdefault-real-8 it works.
So what I'm hoping to do is to have the target switch processing code (for the TARGET_HANDLE_OPTION hook) react to the -mfloat32 and -mfloat64 switches by passing appropriate -fdefault-real-* switches to Fortran. Is that possible?
paul