[ccan] Annoying warning, a.k.a. how to add to CFLAGS

Andrew Jeffery andrew at aj.id.au
Tue Sep 5 11:15:14 AEST 2017


On Mon, 2017-09-04 at 10:27 +0930, Rusty Russell wrote:
> > Ian Zimmerman <itz at very.loosely.org> writes:
> > When I checkout current master, run ./tools/configurator/configurator >
> > config.h and then make, I get exactly 1 warning for the whole thing:
> > 
> > ccan/strgrp/strgrp.c: In function ‘grp_for’:
> > ccan/strgrp/strgrp.c:296:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
> >      #pragma omp parallel for schedule(dynamic)
> > 
> > I figured out that I can silence that by adding -fopenmp to my CFLAGS.
> > But how to do that permanently?  I don't want to specify that on the
> > command line every time, and I also don't want to set it in the
> > environment because sometimes I compile other things than ccan ;-)
> 
> Hmm, well, if you're compiling strgrp, you should be adding CFLAGS
> from _info, which sets this correctly.
> 
> In this case, we could just test defined(_OPENMP) instead of
> HAVE_OPENMP, though, which would automagically work.

Yeah, I was never really happy with what I did with HAVE_OPENMP, and I
don't recall why I did it. I'd be happy with a patch implementing
Rusty's suggestion of #if defined(_OPENMP).

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20170905/886ea70a/attachment.sig>


More information about the ccan mailing list