* Compaq Tru64 bootstrap problems
[not found] <20020526223841.A31867@redhat.com>
@ 2002-05-30 13:53 ` Roger Sayle
2002-05-30 15:15 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Roger Sayle @ 2002-05-30 13:53 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc, Neil Booth, Zack Weinberg
Richard Henderson wrote:
> Roger Sayle wrote:
> > Unfortunately, CVS isn't bootstrapping for me on alphaev67-dec-osf5.1
> > at the moment.
>
> Really? It built for me on linux on Friday...
I've taken the time to track down the cause of my bootstrap problems
on mainline CVS. I believe its caused by the recent reorganization of
CPP predefined macros, specifically those relating to current language
settings.
The bootstrap is failing because libgcc2.c includes <time.h> via
"tsystem.h". On OSF 5.1, <time.h> includes <sys/timers.h> which
fails to compile complaining of an incomplete type for "it_interval".
The cause is that it_interval is defined as "struct timespec" and
with the recent changes timespec is no longer being defined.
Normally, <sys/timers.h> gets its definition of "struct timespec"
from <sys/timemisc.h> where the definition is guarded by the CPP
directive:
#if defined(__LANGUAGE_C__) || defined(__cplusplus)
My guess is that with the recent predefines reorganization we are
no longer defining "__LANGUAGE_C__" on alpha*-dec-osf5.1. Hopefully,
the fix is trivial, but if not I can file a GNATS bootstrap PR.
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compaq Tru64 bootstrap problems
2002-05-30 13:53 ` Compaq Tru64 bootstrap problems Roger Sayle
@ 2002-05-30 15:15 ` Richard Henderson
2002-05-30 17:27 ` Neil Booth
0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2002-05-30 15:15 UTC (permalink / raw)
To: Roger Sayle; +Cc: gcc, Neil Booth, Zack Weinberg
On Thu, May 30, 2002 at 01:54:58PM -0600, Roger Sayle wrote:
> Normally, <sys/timers.h> gets its definition of "struct timespec"
> from <sys/timemisc.h> where the definition is guarded by the CPP
> directive:
>
> #if defined(__LANGUAGE_C__) || defined(__cplusplus)
>
> My guess is that with the recent predefines reorganization we are
> no longer defining "__LANGUAGE_C__" on alpha*-dec-osf5.1. Hopefully,
> the fix is trivial, but if not I can file a GNATS bootstrap PR.
Indeed that would appear to be the case.
The code in builtin_define_std doesn't look right.
Given LANGUAGE_C it defines
_LANGUAGE_C
_LANGUAGE_C__
not the expected
__LANGUAGE_C
__LANGUAGE_C__
Zack or Neil, can you comment?
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compaq Tru64 bootstrap problems
2002-05-30 15:15 ` Richard Henderson
@ 2002-05-30 17:27 ` Neil Booth
2002-05-30 19:07 ` Roger Sayle
0 siblings, 1 reply; 5+ messages in thread
From: Neil Booth @ 2002-05-30 17:27 UTC (permalink / raw)
To: Richard Henderson, Roger Sayle, gcc, Zack Weinberg
Richard Henderson wrote:-
> On Thu, May 30, 2002 at 01:54:58PM -0600, Roger Sayle wrote:
> > Normally, <sys/timers.h> gets its definition of "struct timespec"
> > from <sys/timemisc.h> where the definition is guarded by the CPP
> > directive:
> >
> > #if defined(__LANGUAGE_C__) || defined(__cplusplus)
> >
> > My guess is that with the recent predefines reorganization we are
> > no longer defining "__LANGUAGE_C__" on alpha*-dec-osf5.1. Hopefully,
> > the fix is trivial, but if not I can file a GNATS bootstrap PR.
>
> Indeed that would appear to be the case.
>
> The code in builtin_define_std doesn't look right.
> Given LANGUAGE_C it defines
>
> _LANGUAGE_C
> _LANGUAGE_C__
>
> not the expected
>
> __LANGUAGE_C
> __LANGUAGE_C__
>
> Zack or Neil, can you comment?
Silly me. Does this fix it? I've only checked it compiles;
I don't have time right now to check it DTRT.
Neil.
* c-common.c (builtin_define_std): Correct logic.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.338
diff -u -p -r1.338 c-common.c
--- c-common.c 30 May 2002 21:28:11 -0000 1.338
+++ c-common.c 30 May 2002 22:12:53 -0000
@@ -4440,10 +4440,13 @@ builtin_define_std (macro)
/* prepend __ (or maybe just _) if in user's namespace. */
memcpy (p, macro, len + 1);
- if (*p != '_')
- *--p = '_';
- if (p[1] != '_' && !ISUPPER (p[1]))
- *--p = '_';
+ if (!( *p == '_' && (p[1] == '_' || ISUPPER (p[1]))))
+ {
+ if (*p != '_')
+ *--p = '_';
+ if (p[1] != '_')
+ *--p = '_';
+ }
cpp_define (parse_in, p);
/* If it was in user's namespace... */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compaq Tru64 bootstrap problems
2002-05-30 17:27 ` Neil Booth
@ 2002-05-30 19:07 ` Roger Sayle
2002-05-31 1:15 ` Neil Booth
0 siblings, 1 reply; 5+ messages in thread
From: Roger Sayle @ 2002-05-30 19:07 UTC (permalink / raw)
To: Neil Booth; +Cc: Richard Henderson, gcc
Hi Neil,
> Silly me. Does this fix it? I've only checked it compiles;
> I don't have time right now to check it DTRT.
>
> * c-common.c (builtin_define_std): Correct logic.
>
Yep. That fixes this problem.
Unfortunately, bootstrap on alphaev67-dec-osf5.1 still fails to
build libgcc2.c only 23 "files" later, but your patch is definately
an improvement.
Roger
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compaq Tru64 bootstrap problems
2002-05-30 19:07 ` Roger Sayle
@ 2002-05-31 1:15 ` Neil Booth
0 siblings, 0 replies; 5+ messages in thread
From: Neil Booth @ 2002-05-31 1:15 UTC (permalink / raw)
To: Roger Sayle; +Cc: Richard Henderson, gcc
Roger Sayle wrote:-
> Yep. That fixes this problem.
>
> Unfortunately, bootstrap on alphaev67-dec-osf5.1 still fails to
> build libgcc2.c only 23 "files" later, but your patch is definately
> an improvement.
OK, I've applied it. Thanks,
Neil.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-31 6:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20020526223841.A31867@redhat.com>
2002-05-30 13:53 ` Compaq Tru64 bootstrap problems Roger Sayle
2002-05-30 15:15 ` Richard Henderson
2002-05-30 17:27 ` Neil Booth
2002-05-30 19:07 ` Roger Sayle
2002-05-31 1:15 ` Neil Booth
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).