Re: Annoying warning, a.k.a. how to add to CFLAGS
Andrew Jeffery <[email protected]> Tue, 05 Sep 2017 11:15:14 +1000
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <[email protected]> |
--===============8465397306215679931== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+toGRFTJfu2+8LjHvIlb" --=-+toGRFTJfu2+8LjHvIlb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2017-09-04 at 10:27 +0930, Rusty Russell wrote: > > Ian Zimmerman <[email protected]> writes: > > When I checkout current master, run ./tools/configurator/configurator > > > config.h and then make, I get exactly 1 warning for the whole thing: > >=20 > > ccan/strgrp/strgrp.c: In function =E2=80=98grp_for=E2=80=99: > > ccan/strgrp/strgrp.c:296:0: warning: ignoring #pragma omp parallel [-Wu= nknown-pragmas] > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#pragma omp parallel for schedule(dynamic= ) > >=20 > > I figured out that I can silence that by adding -fopenmp to my CFLAGS. > > But how to do that permanently?=C2=A0=C2=A0I 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 ;-) >=20 > Hmm, well, if you're compiling strgrp, you should be adding CFLAGS > from _info, which sets this correctly. >=20 > 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 --=-+toGRFTJfu2+8LjHvIlb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJZrfqiAAoJEJ0dnzgO5LT509YQAJIl4Nl/X8w7D823DfjmAh1E KvTU63c4hiIZHrMjrZMInIyYkojxx/9zqbo+USqIUc0E/ph6BQqW12TJAlOOfabr 3gYs5N8roRhL516MwTTKkDhf8AYV8BfHLnQdZBXbGUmicyxENU7gWV60gIZuwpgr WeQpDgO5Gh7LIr8IxARvyOkkQ4NEi2llsYuG2Ndbr7J3kYd4vQ+jZce8ptoqWfzZ 8uLqSrpPlq4mmSO7G3WgrR+Nmz8Dk5y12lU6IHrWk/QHNq8vyhfr7VayrbS0kBhx /ABgpKLGh2N2C3AWxKCAhVhY0TF6i0N7hZQbPSpTLLVMKdEDIpSyU2KR19HPK750 6+SAYOs8inDzx5uC8cvpvqSSeQy2Ctqj/85LKYu107ka10DMVgE/yjDe1LyXCr60 kjGhtvf80PL+lU76C5bDk/lcaLYD0BoBmZfR6ORThSoowJVHxYLabjf8/Q8ZB69E rYkU9Tl4IK5PhcU48I2EGCLSI1tyei1GSqpLLlo2haKSkk1khdGUSIhzgVFMKfhp BPPykr0JsNxP9o/yPiHAWUnaNI8HKyvQprTMZy3Di4Sjplw32ZfBjznv3l8329OH kQSucEYgO03FEgisQLQMUPbsb/JN8EPNzDsD+oKiFPFtIsswxQqbOAoL2kUCmQ/T HvPb+uCxyqWXubpardXF =Y2os -----END PGP SIGNATURE----- --=-+toGRFTJfu2+8LjHvIlb-- --===============8465397306215679931== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KY2NhbiBtYWls aW5nIGxpc3QKY2NhbkBsaXN0cy5vemxhYnMub3JnCmh0dHBzOi8vbGlzdHMub3psYWJzLm9yZy9s aXN0aW5mby9jY2FuCg== --===============8465397306215679931==--