public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* sparc-rtems defines unix and ada/sysdep.c
@ 2004-03-10 13:16 Joel Sherrill
  2004-03-10 13:25 ` Ralf Corsepius
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill @ 2004-03-10 13:16 UTC (permalink / raw)
  To: gcc


Hi,

In trying to get gcc 3.4 to build Ada for *-rtems, I have noticed that 
sysdep.c seems
to now be dependent on termios.h for sparc-rtems.  In tracking this 
down, it seems
as though unix is a predefine for sparc-rtems.    This causes gnat to 
think that we
should have termios installed when the run-time is built. 

So I am left with two issues:

  + why is sparc-rtems defining unix?  Can we safely turn it off?  How?
  + does gnat lose functionality if termios is not available at run-time 
build time.

--joel sherrill


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

* Re: sparc-rtems defines unix and ada/sysdep.c
  2004-03-10 13:16 sparc-rtems defines unix and ada/sysdep.c Joel Sherrill
@ 2004-03-10 13:25 ` Ralf Corsepius
  2004-03-10 14:14   ` Joel Sherrill <joel@OARcorp.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Corsepius @ 2004-03-10 13:25 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: GCC List

On Wed, 2004-03-10 at 14:16, Joel Sherrill wrote:
> Hi,
> 
> In trying to get gcc 3.4 to build Ada for *-rtems, I have noticed that 
> sysdep.c seems
> to now be dependent on termios.h for sparc-rtems.  In tracking this 
> down, it seems
> as though unix is a predefine for sparc-rtems.    This causes gnat to 
> think that we
> should have termios installed when the run-time is built. 
> 
> So I am left with two issues:
> 
>   + why is sparc-rtems defining unix?
Because sparc-rtems-gcc is broken. It bogusly applies config-files from
sparc-solaris.

>   Can we safely turn it off?  How?
My attempts to fix this can be found in:
http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS&cmd=view&pr=517

Ralf


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

* Re: sparc-rtems defines unix and ada/sysdep.c
  2004-03-10 13:25 ` Ralf Corsepius
@ 2004-03-10 14:14   ` Joel Sherrill <joel@OARcorp.com>
  2004-03-10 15:11     ` Ralf Corsepius
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill <joel@OARcorp.com> @ 2004-03-10 14:14 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: GCC List

Ralf Corsepius wrote:
> On Wed, 2004-03-10 at 14:16, Joel Sherrill wrote:
> 
>>Hi,
>>
>>In trying to get gcc 3.4 to build Ada for *-rtems, I have noticed that 
>>sysdep.c seems
>>to now be dependent on termios.h for sparc-rtems.  In tracking this 
>>down, it seems
>>as though unix is a predefine for sparc-rtems.    This causes gnat to 
>>think that we
>>should have termios installed when the run-time is built. 
>>
>>So I am left with two issues:
>>
>>  + why is sparc-rtems defining unix?
> 
> Because sparc-rtems-gcc is broken. It bogusly applies config-files from
> sparc-solaris.

As does sparc-elf which sparc-rtems is closely modeled upon.

>>  Can we safely turn it off?  How?
> 
> My attempts to fix this can be found in:
> http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS&cmd=view&pr=517

It looks like you just inlined the solaris files and marked sections
as unused.  Is that right?

Would config/sparc/linux.h be closer to use as a starting point for
a new config/sparc/rtemself.h?

> Ralf
> 
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

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

* Re: sparc-rtems defines unix and ada/sysdep.c
  2004-03-10 14:14   ` Joel Sherrill <joel@OARcorp.com>
@ 2004-03-10 15:11     ` Ralf Corsepius
  2004-03-10 17:29       ` Joel Sherrill <joel@OARcorp.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Corsepius @ 2004-03-10 15:11 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: GCC List

On Wed, 2004-03-10 at 15:14, Joel Sherrill  wrote:
> Ralf Corsepius wrote:
> > On Wed, 2004-03-10 at 14:16, Joel Sherrill wrote:
> > 
> >>Hi,
> >>
> >>In trying to get gcc 3.4 to build Ada for *-rtems, I have noticed that 
> >>sysdep.c seems
> >>to now be dependent on termios.h for sparc-rtems.  In tracking this 
> >>down, it seems
> >>as though unix is a predefine for sparc-rtems.    This causes gnat to 
> >>think that we
> >>should have termios installed when the run-time is built. 
> >>
> >>So I am left with two issues:
> >>
> >>  + why is sparc-rtems defining unix?
> > 
> > Because sparc-rtems-gcc is broken. It bogusly applies config-files from
> > sparc-solaris.
> 
> As does sparc-elf which sparc-rtems is closely modeled upon.
Yep, I recall other sparc platforms suffering from the same issue.

> >>  Can we safely turn it off?  How?
> > 
> > My attempts to fix this can be found in:
> > http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS&cmd=view&pr=517
> 
> It looks like you just inlined the solaris files and marked sections
> as unused.  Is that right?
More or less, yes.

What I actually did was to concat several solaris headers and started to
comment out everything that seemed solaris specific or unnecessary for
RTEMS. 

Unfortunately, I don't recall all details of hand and would have to look
into the patch again (this all happened several months ago and the
feedback on it wasn't necessarily encouraging enough to continue this
work :( ).

> Would config/sparc/linux.h be closer to use as a starting point for
> a new config/sparc/rtemself.h?

May-be, I'd have to check the details, but ... currently don't have the
time for checking it. I'd expect all sparc/ELF ports to share a common
(non-solaris/non-linux/elf-only specific) file. 

Ralf


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

* Re: sparc-rtems defines unix and ada/sysdep.c
  2004-03-10 15:11     ` Ralf Corsepius
@ 2004-03-10 17:29       ` Joel Sherrill <joel@OARcorp.com>
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Sherrill <joel@OARcorp.com> @ 2004-03-10 17:29 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: GCC List

Ralf Corsepius wrote:
> On Wed, 2004-03-10 at 15:14, Joel Sherrill  wrote:
> 
>>Ralf Corsepius wrote:
>>
>>>On Wed, 2004-03-10 at 14:16, Joel Sherrill wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>In trying to get gcc 3.4 to build Ada for *-rtems, I have noticed that 
>>>>sysdep.c seems
>>>>to now be dependent on termios.h for sparc-rtems.  In tracking this 
>>>>down, it seems
>>>>as though unix is a predefine for sparc-rtems.    This causes gnat to 
>>>>think that we
>>>>should have termios installed when the run-time is built. 
>>>>
>>>>So I am left with two issues:
>>>>
>>>> + why is sparc-rtems defining unix?
>>>
>>>Because sparc-rtems-gcc is broken. It bogusly applies config-files from
>>>sparc-solaris.
>>
>>As does sparc-elf which sparc-rtems is closely modeled upon.
> 
> Yep, I recall other sparc platforms suffering from the same issue.
> 
> 
>>>> Can we safely turn it off?  How?
>>>
>>>My attempts to fix this can be found in:
>>>http://www.rtems.com/cgi-bin/gnatsweb.pl?database=RTEMS&cmd=view&pr=517
>>
>>It looks like you just inlined the solaris files and marked sections
>>as unused.  Is that right?
> 
> More or less, yes.
> 
> What I actually did was to concat several solaris headers and started to
> comment out everything that seemed solaris specific or unnecessary for
> RTEMS. 
> 
> Unfortunately, I don't recall all details of hand and would have to look
> into the patch again (this all happened several months ago and the
> feedback on it wasn't necessarily encouraging enough to continue this
> work :( ).

I recall that you were way ahead of the curve in testing this
and no one revisited it.  Likely sparc-elf is lightly used and
no one noticed or cared if they did.

>>Would config/sparc/linux.h be closer to use as a starting point for
>>a new config/sparc/rtemself.h?
> 
> 
> May-be, I'd have to check the details, but ... currently don't have the
> time for checking it. I'd expect all sparc/ELF ports to share a common
> (non-solaris/non-linux/elf-only specific) file. 

But unfortunately, they don't seem to like the other ports.

I will add it to my list of things to attempt.  I would like
to get this fixed before 3.4.0 is cut.

I suppose I should test powerpc-rtems for gnat though to
see if that is in better shape since defining UNIX is a
sparc specific issue.

> Ralf
> 
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

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

end of thread, other threads:[~2004-03-10 17:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-10 13:16 sparc-rtems defines unix and ada/sysdep.c Joel Sherrill
2004-03-10 13:25 ` Ralf Corsepius
2004-03-10 14:14   ` Joel Sherrill <joel@OARcorp.com>
2004-03-10 15:11     ` Ralf Corsepius
2004-03-10 17:29       ` Joel Sherrill <joel@OARcorp.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).