Hi Arno,

On 5 Sep 2011, at 20:04, Arnaud Charlet wrote:

Darwin8 does not have _SC_NPROCESSORS_ONLN defined.

Is Darwin8 still active/supported?

it works - and I test from time to time.
.. feedback from fink in the form of bug reports suggests that it is still being used in the wild too.

In fact, the tortuous route I used to get to a working PPC ADA bootstrap was via a native-X darwin 8 compiler built on linux ;-) (Now I know the problem with the PPC bootstrap it's easier to do a native X from i686-darwin, but I was debugging).

----

The policy we have adopted is not to break earlier Darwin if possible -
(bearing in mind that Darwin is volunteer-supported these days and we have scant resources).

However, FWIW, It is possible to build 4.6 even on Darwin 7 with some fiddling (odcctools) ...

[ However, I'm not going to nail my colors to the mast over this one ;-) ]

Not as submitted, you haven't provided a suitable changelog for review.

oops... apologies (and for the long lines in the other change logs)
... shouldn't type them directly into the mailer I suppose.

ada:
        
        * adaint.c (__gnat_number_of_cpus): Don't try to check
        _SC_NPROCESSORS_ONLN for early versions of Darwin.

Also, when you repost your patch, can you please send a single version of
the patch (either inline or as an attachment)? TIA.

The reason for duplication was that some people prefer one and some the other ..
.. plus mailers sometimes mangle in-line patches;

OK for trunk/4.6?
Iain

Index: gcc/ada/adaint.c
===================================================================
--- gcc/ada/adaint.c    (revision 178554)
+++ gcc/ada/adaint.c    (working copy)
@@ -2460,7 +2460,10 @@ __gnat_number_of_cpus (void)
   int cores = 1;
 
 #if defined (linux) || defined (sun) || defined (AIX) \
-    || (defined (__alpha__)  && defined (_osf_)) || defined (__APPLE__)
+    || (defined (__alpha__)  && defined (_osf_)) \
+    || (defined (__APPLE__) \
+        && defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
+        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050)
   cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
 
 #elif (defined (__mips) && defined (__sgi))



Reply via email to