Bug 46592 - -ftree-parallelize-loops attempts to link pthreads on non-posix systems
Summary: -ftree-parallelize-loops attempts to link pthreads on non-posix systems
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgomp (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-21 13:33 UTC by Anthony Green
Modified: 2015-12-14 19:37 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Green 2010-11-21 13:33:49 UTC
*-elf toolchains are failing the -ftree-parallelize-loops test pr46111 because using that option unconditionally attempts to link pthreads.  I suppose I could define GOMP_SELF_SPECS to "" for my target, but why isn't pthreads only linked in with libgomp is linked?
Comment 1 Jakub Jelinek 2010-11-21 14:34:51 UTC
Testing -ftree-parallelize-loops on targets which don't have threads doesn't make any sense, for C -ftree-parallelize-loops=N tests are all in gcc.dg/autopar/ which is guarded by
if ![check_effective_target_pthread] {
  return
}
perhaps just the test needs
// { dg-require-effective-target pthread }
or we need g++.dg/autopar/
which will be guarded similarly.
Comment 2 Tom de Vries 2015-12-14 19:37:25 UTC
https://gcc.gnu.org/ml/gcc-cvs/2011-01/msg00063.html :
...
Author: uweigand
Date: Mon Jan  3 23:16:17 2011
New Revision: 168446

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168446
Log:
	* g++.dg/torture/pr46111.C: Add dg-require-effective-target pthread.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/torture/pr46111.C
...

Corresponding gcc-patches post: https://gcc.gnu.org/ml/gcc-patches/2011-01/msg00093.html .

Marking resolved-fixed.