On Wed, Mar 04, 2026 at 01:33:10AM +0100, Bruno Haible wrote:
> See also the ticket <https://savannah.gnu.org/support/?111055>.
> There, two facts were mentioned:
> 
> * While libtool (version 2.5.3) does not support "-Xpreprocessor -fopenmp",
>   it does support "-Wp,-fopenmp".
> 
> * On macOS 26.2, with cc being "Apple clang version 17.0.0 
> (clang-1700.6.3.2)",
>   "cc -help" reports that the option '-fopenmp' exists.
>   Therefore it looks like trying "-Wp,-fopenmp" is only needed for older
>   versions of Apple clang (which ones?).

Apple lies to us here!
I have "Apple clang version 17.0.0 (clang-1700.6.3.2)" on the latest version of 
Intel macOS 

  % uname -a
  Darwin OUCL13243.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 
22:00:10 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_X86_64 x86_64

  % cc -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

and "cc -help" reports that "-fopenmp" is an option,

   % cc --help | grep "fopenmp "
  -fopenmp                Parse OpenMP pragmas and generate parallel code.


yet it does not work:

% cat foo.c
#include <stdio.h>

% cc -c foo.c -fopenmp
clang: error: unsupported option '-fopenmp'

% cc -c foo.c -Xclang -fopenmp # this is OK
% cc -c foo.c -Xpreprocessor -fopenmp # OK too

And I do have reports from people running the latest macOS 26 and clang
17.0.0, who say the same, that "-fopenmp" doesn't work with the extra
prefix of "-Xpreprocessor".


By the way, does anyone here knows the difference between "-Xpreprocessor" and 
"-Xclang" ?

Dima


> 
> Bruno
> 
> 
> 

Attachment: signature.asc
Description: PGP signature

            • ... Dima Pasechnik
              • ... Andrew W. Nosenko
              • ... Andrew W. Nosenko
              • ... Dima Pasechnik
      • Re... Andrew W. Nosenko
        • ... Ben Boeckel
          • ... Dima Pasechnik
  • Re: fixing ... Bruno Haible via Discussion list for the autoconf build system
    • Re: fi... Dima Pasechnik
      • Re... Bruno Haible via Discussion list for the autoconf build system
    • Re: fi... Dima Pasechnik
      • Re... Bruno Haible via Discussion list for the autoconf build system
        • ... Dima Pasechnik

Reply via email to