Hi Rainer,

> On 19 Sep 2019, at 15:51, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote:
> 

>>> On 18 Sep 2019, at 09:39, Pierre-Marie de Rodat <dero...@adacore.com> wrote:
>>> 
>> 
>>> gcc/testsuite/
>>> 
>>>     * gnat.dg/system_info1.adb: New testcase.<patch.diff>
>> 
>> This new test fails everywhere on Darwin, which doesn’t have an 
>> implementation for
>> System.Task_Info.Number_Of_Processors
>> 
>> Given 
>> "pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU 
>> aspect”);”
>> 
>> is it worth me trying to implement the Task_Info stuff?
> 
> I'm seeing the same on Solaris (will be every non-Linux/MinGW target).
> I've implemented Number_Of_Processors using
> sysconf(__SC_NPROCESSORS_ONLN), which is also available on Darwin.  Will
> submit the patch tomorrow once testing has finished…

OK. it’s likely that the same (almost) patch will work for Darwin which also 
has that Posix call.

I’ll look at your patch and adapt it for Darwin then,

I don’t *think* we can make:

s-tasinf__posix.ad? 

using that since  I think __SC_NPROCESSORS_ONLN is an optional addition? 
(but ICBW about that)

>> or should I just skip this test on Darwin?
>> 
>> (if the latter, then I would plan to apply the patch below)
> [...]
>> diff --git a/gcc/testsuite/gnat.dg/system_info1.adb 
>> b/gcc/testsuite/gnat.dg/system_info1.adb
>> index 493a18e907..c1523a277f 100644
>> --- a/gcc/testsuite/gnat.dg/system_info1.adb
>> +++ b/gcc/testsuite/gnat.dg/system_info1.adb
>> @@ -1,4 +1,4 @@
>> ---  { dg-do run }
>> +--  { dg-do run { target { ! *-*-darwin* } } }
> 
> Given that the test cannot compile on anything but *-*-linux* and
> *-*-mingw*, I'd rather restrict the test to those two (or more targets
> that decide to implement the missing interface).

that makes sense, too (targets with support can opt in)

cheers
Iain

> 
>       Rainer
> 
> -- 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to