This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Simplify dg-options for tests using pthreads
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Aug 2016 10:04:53 +0100
- Subject: Re: [PATCH] Simplify dg-options for tests using pthreads
- Authentication-results: sourceware.org; auth=none
- References: <20160818080613.GA25732@redhat.com> <yddk2f7ri04.fsf@CeBiTec.Uni-Bielefeld.DE>
On 23/08/16 10:45 +0200, Rainer Orth wrote:
Hi Jonathan,
It's been several years now that Solaris supported -pthread as well as
-pthreads, so there's no need to have separate dg-options directives
for Solaris.
This patch removes all the lines:
// { dg-options "... -pthreads" { target *-*-solaris* } }
And adds *-*-solaris* to the list of targets in:
// { dg-options "... -pthread" { target ... } }
Rainer, any objection to this change?
not at all. In fact, I'd always wondered about this difference. Maybe
it's time now to obsolete both -pthreads and -D_PTHREADS as I'd
suggested years ago.
Btw., there's one last -pthreads reference left in
libstdc++-v3/doc/xml/manual/using.xml. Perhaps this should go, too.
Ah thanks, I'll update that.
The next step would be to replace the explict target list with an
effective-target keyword ;-)
Yes, I've started doing that in a local branch, so we'd use something
like:
{ dg-do run { target libstdc++-threads-supported } }
{ dg-add-options libstdc++-threads-flags }
Where that would only run the test where supported, and would add
-pthread if the target needs it.