Re: fixing AC_OPENMP for Apple clang

Dima Pasechnik <[email protected]> Mon, 2 Mar 2026 13:23:35 -0600
Newsgroups gmane.comp.sysutils.autoconf.general
Message-ID <aaXjtxb3OEOUPbBD@tarski>
--szGh50M6B+yiJwle
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 02, 2026 at 05:48:40PM +0100, Florian Weimer wrote:
> > I think this is an overwhelming evidence in favour of Autoconf
> > supporting this feature, documented, or not, by the upstream (i.e. Appl=
e).
> > The community knows how to use it, and uses it, there is no need to be
> > patronising here. By not supporting it Autotools shoot themselves in the
> > foot, forcing users/developers of multi-platform OpenMP-using applicati=
ons
> > to look elsewhere for a build system supporting this
> > feature out of the box.
> > As I said, Meson supports it out of the box. Cmake supports it too.
>=20
> Okay, then it's a bit weird that it's not mentioned at all in the Apple
> documentation.

I can only speculate that once you bought enough support from them,
they'd tell you. After all, "-Xpreprocessor -fopenmp" somehow has leaked out
as a working option.

Apparently instead of "-Xpreprocessing" one can use "-Xclang", although
it appears to be less popular. I don't know the difference between these
two - perhaps AC_OPENMP (and libtool?) should also test for "-Xclang -fopen=
mp"?

"-Xclang" is briefly mentioned in clang docs: https://clang.llvm.org/docs/U=
sersManual.html


Best,
Dima


--szGh50M6B+yiJwle
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQFPBAABCAA5FiEEJVdDnfI7raAa4RJxoksLHjfJBTEFAmml47cbFIAAAAAABAAO
bWFudTIsMi41KzEuMTEsMiwyAAoJEKJLCx43yQUxBDIH/jEPCVkXlPNGHh/kZOgZ
IxNdIqi0TM1aJPWq8ChA2f62z39vjfCkBm8SVtnD1IFqN0zkMmXmux2fQywpeaYC
X8Cvvvul9bOlpmhixvAQfzqM36pKYmQg9QAsFTmUDeuYg7xjtsA4Aa0sgYuPErFQ
kB5+ZUUB7qkxRsrmlgSqCAOvDh1dxl+XHBCN13q87IpzzmXRWB780XQKlt/4BuxB
5KXFmEb42eMikkNrrTr2SiDeeqLjLc0edXfp8GWT97yRuARcIM3za1P1ER4dAHc6
sgJsMRZAckOHRVikKq38/iBvEkoqZKJZxAUDlqneS847J3N2NwK7TreLwgBOEPz5
bJ8=
=re8K
-----END PGP SIGNATURE-----

--szGh50M6B+yiJwle--