On 08/06/2018 09:33 AM, Uros Bizjak wrote:
> On Mon, Aug 6, 2018 at 5:23 PM, Jeff Law <l...@redhat.com> wrote:
>> On 08/06/2018 09:10 AM, Uros Bizjak wrote:
>>> 2018-08-06  Uros Bizjak  <ubiz...@gmail.com>
>>>
>>>     * g++.dg/torture/pr86763.C (dg-additional-options): Add -lrt.
>>>
>>> Tested on CentOS 5.10 and Fedora 28.
>>>
>>> OK for mainline?
>> But what about systems without librt?  I'm thinking primarily of the
>> embedded *-elf targets.
> 
> Perhaps the following patch is better:
> 
> --cut here--
> Index: g++.dg/torture/pr86763.C
> ===================================================================
> --- g++.dg/torture/pr86763.C    (revision 263317)
> +++ g++.dg/torture/pr86763.C    (working copy)
> @@ -1,5 +1,6 @@
>  // { dg-do run }
>  // { dg-additional-options "-fschedule-insns2 -fstrict-aliasing" }
> +// { dg-additional-options "-lrt" { target *-*-linux-gnu } }
That's be fine with me.

If someone wants the test to be run on solaris or some other target with
librt, they can extend the selector to include the proper target/versions.

Jeff

Reply via email to