Gcc-3.0 bootstrap on HPUX 11.00
Richard Begg
Richard.Begg@colesmyer.com.au
Fri Jul 6 00:13:00 GMT 2001
Damn,
I got it wrong... here's the revised diff...
Sorry,
Richard.
<<inclhack.def.diffs>>
> -----Original Message-----
> From: Richard Begg
> Sent: Friday, 6 July 2001 16:40
> To: 'gcc-bugs@gcc.gnu.org'; 'gcc-patches@gcc.gnu.org'; 'bkorb@gnu.org'
> Subject: RE: Gcc-3.0 bootstrap on HPUX 11.00
>
> Just in case no-one has provided a fix, here's my attempt at one:
>
> << File: inclhack.def.diffs >>
> Cheers,
> Richard.
>
>
> -----Original Message-----
> From: Richard Begg
> Sent: Friday, 6 July 2001 11:30
> To: 'gcc-bugs@gcc.gnu.org'; 'gcc-patches@gcc.gnu.org';
> 'bkorb@gnu.org'
> Subject: Gcc-3.0 bootstrap on HPUX 11.00
>
> There seems to be a header file problem with gcc-3.0 on HPUX 11.00
> above a certain patch level (PHSS_21070) which causes the g++ bootstrap to
> fail. This patch introduces a conflicting inline definition for pow()
> into math.h. Looking at gcc/fixinc/inclhack.def, it appears that this
> problem used to occur at HPUX 10.20 (refer hpux10_cpp_pow_inline).
>
> This is the relevant bit of /usr/include/math.h:
>
> #if defined(__cplusplus) && (__cplusplus < 199707)
> inline int sqr(int x) {return(x*x);}
> inline double sqr(double x) {return(x*x);}
>
> # ifndef _STDLIB_INCLUDED
> inline int abs(int d) { return (d>0)?d:-d; }
> # endif /* _STDLIB_INCLUDED */
>
> inline double abs(double d) { return fabs(d); }
> inline double pow(double d,int expon) {
> return pow(d, (double)expon);
> }
> #endif
>
> Now, before I bother updating fixinc, has anyone else already done
> it?
>
> Cheers,
> Richard.
>
> Richard Begg
> Unix Production Manager
> ITS Open Systems Group
> Coles Myer Limited
> Phone : 03-9483-7398
> Mobile : 0418 386 436
> Fax : 03-9483-7381
> E-mail : Richard.Begg@colesmyer.com.au
>
-------------- next part --------------
1148a1149,1177
> * Delete C++ double pow (double, int) inline function from HP-UX 11.00 (PHSS_21070)
> * math.h to prevent clash with define in c_std/bits/std_cmath.h.
> */
> fix = {
> hackname = hpux11_cpp_pow_inline;
> files = fixinc-test-limits.h, math.h;
> select = "^ +inline +double +pow\\(double d,int expon\\) +{\n"
> " +return +pow\\(d, \\(double\\)expon\\);\n +}\n" ;
> c_fix = format;
> c_fix_arg = "";
>
> test_text =
> "#if defined(__cplusplus) && (__cplusplus < 199707)\n"
> " inline int sqr(int x) {return(x*x);}\n"
> " inline double sqr(double x) {return(x*x);}\n"
> "\n"
> "# ifndef _STDLIB_INCLUDED\n"
> " inline int abs(int d) { return (d>0)?d:-d; }\n"
> "# endif /* _STDLIB_INCLUDED */\n"
> "\n"
> " inline double abs(double d) { return fabs(d); }\n"
> " inline double pow(double d,int expon) {\n"
> " return pow(d, (double)expon);\n"
> " }\n"
> "#endif" ;
> };
>
>
> /*
More information about the Gcc-bugs
mailing list