public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/24688]  New: sco_math fixincl breaks math.h
@ 2005-11-06  0:23 bugzilla-gcc at thewrittenword dot com
  2005-11-06  0:24 ` [Bug bootstrap/24688] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2005-11-06  0:23 UTC (permalink / raw)
  To: gcc-bugs

I'm trying to bootstrap gcc-3.4.3 on HP-UX 11.23/IA-64. I'm bootstrapping with
the HP C compiler. The system has patch PHSS_33351 installed. The tail of
/usr/include/math.h:
   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

#endif /* _MATH_INCLUDED */

The tail of math.h after fixinc:
   inline double sqr(double __x) {return(__x*__x);}
#  ifndef _STDLIB_INCLUDED
     inline int abs(int __d) { return (__d>0)?__d:-__d; }
#  endif /* _STDLIB_INCLUDED */
#ifndef __GNUC__
   inline double abs(double __d) { return fabs(__d); }
   inline double pow(double __d,int __expon) { return pow(__d,(double)__expon);
}
#endif

#endif /* _MATH_INCLUDED */

Looking at inclhack.def, sco_math seems to be the cause of this. I replaced
'inline double abs' in select of sco_math with 'inline double _abs' and the
#ifndef __GNUC__ wasn't included in the new math.h.


-- 
           Summary: sco_math fixincl breaks math.h
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugzilla-gcc at thewrittenword dot com
 GCC build triplet: ia64-hp-hpux11.23
  GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
@ 2005-11-06  0:24 ` pinskia at gcc dot gnu dot org
  2005-11-06  0:45 ` bugzilla-gcc at thewrittenword dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06  0:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-06 00:24 -------
I thought this was fixed in 3.4.4.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
  2005-11-06  0:24 ` [Bug bootstrap/24688] " pinskia at gcc dot gnu dot org
@ 2005-11-06  0:45 ` bugzilla-gcc at thewrittenword dot com
  2005-11-07 18:26 ` sje at cup dot hp dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2005-11-06  0:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bugzilla-gcc at thewrittenword dot com  2005-11-06 00:45 -------
I'm using the version of inclhack.def from gcc-3_4-branch. I looked at the
changes in
http://gcc.gnu.org/viewcvs/branches/gcc-3_4-branch/gcc/fixinc/inclhack.def?rev=100333&view=log
and don't see anything relating to this.

Looking at the latest inclhack.def from gcc-3_4-branch, this sed line in
sco_math is causing the problem:
    sed      = "/extern \"C\\+\\+\"/N;"
               "/inline double abs/i\\\n"
               "#ifndef __GNUC__\n";

I have no idea what math.h looks like on SCO so I have no idea how to fix. Why
don't we restrict sco_math to some mach="*sco*"?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
  2005-11-06  0:24 ` [Bug bootstrap/24688] " pinskia at gcc dot gnu dot org
  2005-11-06  0:45 ` bugzilla-gcc at thewrittenword dot com
@ 2005-11-07 18:26 ` sje at cup dot hp dot com
  2005-11-07 18:27 ` [Bug bootstrap/24688] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sje at cup dot hp dot com @ 2005-11-07 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sje at cup dot hp dot com  2005-11-07 18:26 -------
It looks like this is fixed on the mainline and on the 4.0 branch by the
addition of

bypass   = "__GNUG__";

This patch was done in revision 90550 by jsm28.  We should do this for the 3.4
branch as well.


-- 

sje at cup dot hp dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-07 18:26:51
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] [3.4 Regression] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
                   ` (2 preceding siblings ...)
  2005-11-07 18:26 ` sje at cup dot hp dot com
@ 2005-11-07 18:27 ` pinskia at gcc dot gnu dot org
  2005-11-07 18:40 ` sje at cup dot hp dot com
  2005-11-08 22:29 ` sje at cup dot hp dot com
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-07 18:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sco_math fixincl breaks     |[3.4 Regression] sco_math
                   |math.h                      |fixincl breaks math.h
   Target Milestone|---                         |3.4.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] [3.4 Regression] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
                   ` (3 preceding siblings ...)
  2005-11-07 18:27 ` [Bug bootstrap/24688] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2005-11-07 18:40 ` sje at cup dot hp dot com
  2005-11-08 22:29 ` sje at cup dot hp dot com
  5 siblings, 0 replies; 7+ messages in thread
From: sje at cup dot hp dot com @ 2005-11-07 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sje at cup dot hp dot com  2005-11-07 18:40 -------
Original patch submittal is at

http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00985.html

I will apply this to the 3.4 branch and test it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/24688] [3.4 Regression] sco_math fixincl breaks math.h
  2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
                   ` (4 preceding siblings ...)
  2005-11-07 18:40 ` sje at cup dot hp dot com
@ 2005-11-08 22:29 ` sje at cup dot hp dot com
  5 siblings, 0 replies; 7+ messages in thread
From: sje at cup dot hp dot com @ 2005-11-08 22:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sje at cup dot hp dot com  2005-11-08 22:29 -------
I forgot to include the PR number in the ChangeLog, the fix has been checked in
on the 3.4 branch for 3.4.5.  It was already fixed on the 4.0 branch and on the
main line.  The patch was submitted with:

http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00474.html


-- 

sje at cup dot hp dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24688


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-08 22:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-06  0:23 [Bug bootstrap/24688] New: sco_math fixincl breaks math.h bugzilla-gcc at thewrittenword dot com
2005-11-06  0:24 ` [Bug bootstrap/24688] " pinskia at gcc dot gnu dot org
2005-11-06  0:45 ` bugzilla-gcc at thewrittenword dot com
2005-11-07 18:26 ` sje at cup dot hp dot com
2005-11-07 18:27 ` [Bug bootstrap/24688] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-11-07 18:40 ` sje at cup dot hp dot com
2005-11-08 22:29 ` sje at cup dot hp dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).