This is the mail archive of the gcc-patches@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]

[Patch, Ada, Darwin] Fix bootstrap issue on Darwin8.


Darwin8 does not have _SC_NPROCESSORS_ONLN defined.

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))

Attachment: 178554-darwin8-ada-boot-diff.txt
Description: Text document





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