Patchwork Cilk with -lcilkrts (was: Re: [wwwdocs] RFC - mention Cilk Plus in the GCC 4.9 release notes)

login
register
mail settings
Submitter Tobias Burnus
Date March 8, 2014, 8:22 p.m.
Message ID <531B7C1E.7040805@net-b.de>
Download mbox | patch
Permalink /patch/328243/
State New
Headers show

Comments

Tobias Burnus - March 8, 2014, 8:22 p.m.
Andi Kleen wrote:
> It would be also good if the documentation mentioned that you have to 
> specify -lcilkrts 

Wouldn't it make more sense to automatically add the option? For 
instance like the following? Or do we need to do the same as for libgomp 
and create a .spec file?

Tobias
Andi Kleen - March 8, 2014, 8:36 p.m.
On Sat, Mar 08, 2014 at 09:22:54PM +0100, Tobias Burnus wrote:
> Andi Kleen wrote:
> >It would be also good if the documentation mentioned that you have
> >to specify -lcilkrts
> 
> Wouldn't it make more sense to automatically add the option? For
> instance like the following? Or do we need to do the same as for
> libgomp and create a .spec file?

Yes something like this would be the right way. I don't understand spec
well enough to say if your patch is enough.

(but have to document then that -fcilkplus is also needed on the link
command)


-Andi

Patch

--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -768,2 +768,3 @@  proper position among the other output files. */
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+    %{fcilkplus:-lcilkrts}\
      %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\