[Bug fortran/86599] Problems building libgfortran from 7.2.0 on HP-UX 11.31/PA
bugzilla-gcc at thewrittenword dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 24 21:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86599
The Written Word <bugzilla-gcc at thewrittenword dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|7.2.0 |8.1.0
--- Comment #4 from The Written Word <bugzilla-gcc at thewrittenword dot com> ---
hppa2.0w-hp-hpux11.31/libgfortran/kinds.h has:
...
typedef long double GFC_REAL_16;
typedef complex long double GFC_COMPLEX_16;
#define HAVE_GFC_REAL_16
#define HAVE_GFC_COMPLEX_16
#define GFC_REAL_16_HUGE 1.18973149535723176508575932662800702e4932l
#define GFC_REAL_16_LITERAL_SUFFIX l
#define GFC_REAL_16_LITERAL(X) (X ## l)
#define GFC_REAL_16_DIGITS 113
#define GFC_REAL_16_RADIX 2
And gcc/include-fixed/stdlib.h has:
#ifdef _INCLUDE_STDC__SOURCE_199901
# if defined(__ia64)
/* pragmas needed to support -B protected */
# pragma extern strtold
# endif /* __ia64 */
# ifndef _LONG_DOUBLE
# define _LONG_DOUBLE
# if !defined(__ia64) || !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)
typedef struct {
uint32_t word1, word2, word3, word4;
} long_double;
extern long_double strtold __((const char * __restrict, char ** __restrict));
# else /* !__ia64 || !_PROTOTYPES || _LONG_DOUBLE_STRUCT */
# ifdef _INCLUDE_HPUX_SOURCE
typedef long double long_double;
# endif /* _INCLUDE_HPUX_SOURCE */
extern long double strtold __((const char * __restrict, char ** __restrict));
# endif /* !__ia64 ||!_PROTOTYPES ||_LONG_DOUBLE_STRUCT */
#endif /* _LONG_DOUBLE */
#endif /* _INCLUDE_STDC__SOURCE_199901 */
So, the strtold definition being used in io/read.c is:
extern long_double strtold __((const char * __restrict, char ** __restrict));
On HP-UX 11.23/PA, this isn't an issue because of the following in
fixincludes/inclhack.def:
/*
* HP-UX long_double
*/
fix = {
hackname = hpux_long_double;
mach = "*-*-hpux10*";
mach = "*-*-hpux11.[0123]*";
files = stdlib.h;
select = "extern[ \t]long_double[ \t]strtold";
bypass = "long_double_t";
sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D";
sed = "s/long_double/long double/g";
test_text = "# ifndef _LONG_DOUBLE\n"
"# define _LONG_DOUBLE\n"
" typedef struct {\n"
" unsigned int word1, word2, word3, word4;\n"
" } long_double;\n"
"# endif /* _LONG_DOUBLE */\n"
"extern long_double strtold(const char *, char **);\n";
};
We also have the following in the same file for HP-UX 11.31/PA:
/*
* We cannot use the above rule on 11.31 because it removes the strtold
* definition. ia64 is OK with no hack, PA needs some help.
*/
fix = {
hackname = hpux_long_double_2;
mach = "hppa*-*-hpux11.3*";
files = stdlib.h;
select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| "
"defined\\(_PROTOTYPES\\) \\|\\| "
"defined\\(_LONG_DOUBLE_STRUCT\\)";
c_fix = format;
c_fix_arg = "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)";
test_text = "# if !defined(__ia64) || "
"!defined(_PROTOTYPES) || "
"defined(_LONG_DOUBLE_STRUCT)\n";
};
Maybe the above is no longer working?
More information about the Gcc-bugs
mailing list