* [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8.
@ 2011-09-05 18:51 Iain Sandoe
2011-09-05 19:05 ` Arnaud Charlet
0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2011-09-05 18:51 UTC (permalink / raw)
To: GCC Patches; +Cc: Mike Stump, Arnaud Charlet
[-- Attachment #1: Type: text/plain, Size: 767 bytes --]
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 #2: 178554-darwin8-ada-boot-diff.txt --]
[-- Type: text/plain, Size: 685 bytes --]
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 #3: Type: text/plain, Size: 3 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8.
2011-09-05 18:51 [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8 Iain Sandoe
@ 2011-09-05 19:05 ` Arnaud Charlet
2011-09-05 19:27 ` Iain Sandoe
0 siblings, 1 reply; 4+ messages in thread
From: Arnaud Charlet @ 2011-09-05 19:05 UTC (permalink / raw)
To: Iain Sandoe; +Cc: GCC Patches, Mike Stump
> Darwin8 does not have _SC_NPROCESSORS_ONLN defined.
Is Darwin8 still active/supported?
> OK for trunk & 4.6?
Not as submitted, you haven't provided a suitable changelog for review.
Also, when you repost your patch, can you please send a single version of
the patch (either inline or as an attachment)? TIA.
Arno
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8.
2011-09-05 19:05 ` Arnaud Charlet
@ 2011-09-05 19:27 ` Iain Sandoe
2011-09-05 20:38 ` Jack Howarth
0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2011-09-05 19:27 UTC (permalink / raw)
To: Arnaud Charlet; +Cc: GCC Patches, Mike Stump
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
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
[-- Attachment #2: 178554-darwin8-ada-boot-diff.txt --]
[-- Type: text/plain, Size: 685 bytes --]
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 #3: Type: text/plain, Size: 3 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8.
2011-09-05 19:27 ` Iain Sandoe
@ 2011-09-05 20:38 ` Jack Howarth
0 siblings, 0 replies; 4+ messages in thread
From: Jack Howarth @ 2011-09-05 20:38 UTC (permalink / raw)
To: Iain Sandoe; +Cc: Arnaud Charlet, GCC Patches, Mike Stump
On Mon, Sep 05, 2011 at 08:26:49PM +0100, Iain Sandoe wrote:
> 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.
FYI, fink has moved darwin8 package support into a 10.4-EOL tree and developers
are no longer obligated to insure that fink packages build under darwin8.
Basically almost all of the fink developers just wish darwin8 would go away.
Jack
>
> 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))
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-05 20:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 18:51 [Patch, Ada, Darwin] Fix bootstrap issue on Darwin8 Iain Sandoe
2011-09-05 19:05 ` Arnaud Charlet
2011-09-05 19:27 ` Iain Sandoe
2011-09-05 20:38 ` Jack Howarth
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).