On Mon, Mar 02, 2026 at 12:55:43PM -0500, Ben Boeckel wrote: > On Mon, Mar 02, 2026 at 19:07:26 +0200, Andrew W. Nosenko wrote: > > On Mon, 2 Mar 2026 at 18:14, Dima Pasechnik <[email protected]> wrote: > > > Homebrew is the de-facto macOS package manager (supported by Apple, in > > > fact, albeit not > > > too publicly), see https://brew.sh/ > > > > Sorry, but I slightly confused now, what OS do you targeting? Because I > > use Clang (installed from MacPorts) + Autotools on macOS without any extra > > dances, just with regular AC_OPENMP, which results in plain -fopenmp, for > > years (just since Clang obtained OpenMP support) > > Xcode's Clang build uses its own versioning scheme. MacPorts' Clang is > upstream Clang and its versioning scheme.
Indeed, I am talking about the "native" Apple clang (which they aliased to gcc, to make it even more confusing), the one that comes with Apple's XCode suite. % gcc -v Apple clang version 17.0.0 (clang-1700.6.3.2) Target: x86_64-apple-darwin24.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin % clang -v Apple clang version 17.0.0 (clang-1700.6.3.2) Target: x86_64-apple-darwin24.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin It does need "-Xpreprocessor -fopenmp": % echo "#include <stdio.h>" > foo.c % clang -fopenmp -c foo.c # oops... clang: error: unsupported option '-fopenmp' % % clang -Xpreprocessor -fopenmp -c foo.c # is OK. % Homebrew, just as MacPorts, allows one to install the llvm (upstream) clang. % /usr/local/opt/llvm/bin/clang -v Homebrew clang version 22.1.0 Target: x86_64-apple-darwin24.6.0 Thread model: posix InstalledDir: /usr/local/Cellar/llvm/22.1.0/bin Configuration file: /usr/local/etc/clang/x86_64-apple-darwin24.cfg System configuration file directory: /usr/local/etc/clang User configuration file directory: /Users/dima/.config/clang And it doesn't mind the normal "-fopenmp" option: % /usr/local/opt/llvm/bin/clang -fopenmp -c foo.c # is OK. % HTH Dima
signature.asc
Description: PGP signature
