Re: fixing AC_OPENMP for Apple clang
Dima Pasechnik <[email protected]> Mon, 02 Mar 2026 03:52:58 -0600
| Newsgroups | gmane.comp.sysutils.autoconf.general |
|---|---|
| Message-ID | <[email protected]> |
On March 2, 2026 2:49:53 AM CST, Florian Weimer <fweimer@redhat=2Ecom> wrot= e: >* Dima Pasechnik: > >> Since a while, Apple clang allows OpenMP (from llvm project, GNU OpenMP >> doesn't work) if one supplies an option "-Xpreprocessor -fopenmp"=2E >> The (unprefixed) option "-fopenmp" is not understood, and leads to an >> error=2E > >Is this actually documented as supported by Apple? I don't think so; >this doesn't show any results: <https://developer=2Eapple=2Ecom/search/?q= =3Dopenmp> > >I'm not sure it's a good idea to automatically enable compiler flags >just because they do not immediately cause compilation to fail=2E >Presumably there's a reason why this feature is somewhat hidden in the >Apple compiler=2E It is not unusual for commercial vendors to leave features undocumented=2E= They say that one of the reasons behind is that Apple wants developers to= use their own parallelism tool called Grand Unified Dispatch=2E The use of this flag is documented by a number of opensource projects, e= =2Eg=2E by R Project=2E Meson supports this out of the box, in the sense that you can specify OpenMP support in their meson=2Ebuild co= nfig files, and it will enable OpenMP for your build with Apple Clang=2E Ho= mebrew supports this=2E Etc etc=2E Hope this explains=2E Dima > >Thanks, >Florian >