simple minded mapping on darwin?
Jack Howarth
howarth@bromo.msbb.uc.edu
Wed May 30 04:49:00 GMT 2007
On reflection, perhaps we should scrap Andrew's patch and
try a very simple minded fix to the long double issue in
gfortran. If we could change the macro in gcc/fortran/f95-lang.c
from...
#define DO_DEFINE_MATH_BUILTIN(code, name, argtype, tbase) \
gfc_define_builtin ("__builtin_" name "l", tbase##longdouble[argtype], \
BUILT_IN_ ## code ## L, name "l", true); \
gfc_define_builtin ("__builtin_" name, tbase##double[argtype], \
BUILT_IN_ ## code, name, true); \
gfc_define_builtin ("__builtin_" name "f", tbase##float[argtype], \
BUILT_IN_ ## code ## F, name "f", true);
to become...
#define LDBL128 "l"
#ifdef __APPLE__
#ifdef __ppc__
#define LDBL128 "l$LDBL128"
#endif
#endif
#define DO_DEFINE_MATH_BUILTIN(code, name, argtype, tbase) \
gfc_define_builtin ("__builtin_" name "l", tbase##longdouble[argtype], \
BUILT_IN_ ## code ## L, name LDBL128, true); \
gfc_define_builtin ("__builtin_" name, tbase##double[argtype], \
BUILT_IN_ ## code, name, true); \
gfc_define_builtin ("__builtin_" name "f", tbase##float[argtype], \
BUILT_IN_ ## code ## F, name "f", true);
If I can find a way to add one more level of wrappers to test for
a target of darwin_macosx_version_min >= 10.3.9, we would have a
quick and dirty fix to this problem on Darwin PPC. Actually for
our fink gcc42 packages I can even skip that since we build gcc with
MACOSX_DEPLOYMENT_TARGET set to 10.4.
Jack
More information about the Fortran
mailing list