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

David Gibson david at gibson.dropbear.id.au
Fri Sep 1 15:11:17 AEST 2017


On Thu, Aug 31, 2017 at 08:23:50PM -0700, Ian Zimmerman wrote:
> 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 ;-)
> 
> Is there a reason why this is not in the master Makefile?

Because working out how to make module specific CFLAGS additions in
the Makefile isn't entirely trivial.  Working out how to do so in a
reasonably portable fashion is even harder - I don't expect -fopenmp
will work for all compilers, so applying it there would change a
cosmetic warning into a compile failure.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20170901/c69c64ec/attachment.sig>


More information about the ccan mailing list