This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/14538] *-rtems broken for gnat


------- Additional Comments From joel at oarcorp dot com  2004-03-12 14:43 -------
Subject: Re:  *-rtems broken for gnat

charlet at act-europe dot fr wrote:
> ------- Additional Comments From charlet at act-europe dot fr  2004-03-12 13:35 -------
> Subject: Re:  *-rtems broken for gnat
> 
> 
>>Actually it isn't a nop.  It puts the simple __rtems__ check ahead of  a 
> 
> 
> That's why ChangeLogs are so important :-) So we'll wait for your
> complete submision.

Yep.  And this one is pretty complicated to explain.  It makes me
wonder how many targets have questionable sets of cpp predefines
and no one has noticed or cares.  I know that rtems has tripped
across a number of these type of cases over the years.

>>check that
>>is something like the following that I believe indicates the cpp 
>>predefines for one of the
>>vxworks targets is broken:
>>
>>if (AIX or unix) and !vxworks
> 
> 
> That's wrong, vxworks does not define unix, you are misinterpreting the above.

I won't argue that it shouldn't define it but at least the embedded
sparc ports have historically been based upon solaris config files
with some tweaks so you end up unix predefined and weird checks
like this from ada/init.c

#elif defined (sun) && defined (__SVR4) && !defined (__vxworks)

That pretty clearly tells me that the sparc-vxworks target
suffered from the same problem at some point.  And this one
from the same file:

#elif defined(__alpha__) && defined(__osf__) && ! defined(__alpha_vxworks)

which tells me that osf was probably defined for the alpha-vxworks
target.

So the init.c is moving the check for rtems ahead of all these
cases where weirdness exists.  I suspect that if the vxworks
code were moved up, then you could simplify those conditionals.

--joel




-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]