Hi Thomas,

libgomp is supported on darwin,

> On 2 Jul 2026, at 22:57, Thomas Schwinge <[email protected]> wrote:
> 
> Hi GCC/Darwin maintainers (Iain, Mike), cfarm104 administrator (Zach)!
> 
> Short version: once cfarm104 is back online
> (<https://lists.tetaneutral.net/pipermail/cfarm-users/2026-June/001637.html>
> "cfarm104 updates and likely downtime"), can I assume that something to
> the effect of:
> 
>    $ [GCC]/configure --enable-languages=c,c++,fortran
>    $ make
>    $ make check-target-libgomp
> 
> ... just works on cfarm104?  <https://portal.cfarm.net/machines/list/>
> lists it as a "Mac mini (2020), arm64 Apple M1, MacOSX" system; the only
> "Darwin" system that we've got available for public access?

No, not quite, since the aarch64 port is not yet upstreamed (which is needed
for the Mx chips).

However, if that host has ROSETTA2 installed, it is possible to build 
x86_64-apple-darwinNN (NN depending on what OS version is installed).

If you decide to do that, I can provide a short set of instructions to avoid 
hassles.

====

Failing that, you can checkout the aarch64 development branch:

https://github.com/iains/gcc-darwin-arm64

which is usually within a few days of tip-of-trunk.

====

In either case : 

 * Since darwin no longer supports installing headers and library stubs into /
you also need to provide a sysroot to the configure:

—with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

should work if the command line tools are installed, which I believe they are
if the machine has a homebrew install (it did last time I looked).

 * you should configure for a specific darwin version
  —build=<arch>-apple-darwinNN 
 (since darwin GCC supports multiple OS versions)

I don’t know if that machine has an installation of GCC that would be suitable 
for 
bootstrap - but clang should work fine (unless you want to build Ada or D).

I recommend appending CC=clang  CXX=clang++ to the configure (since xcode
clang claims to be gcc but does not support modern gcc, it is safer to be 
explicit)

======= 

from the detailed section….

> Per 'libgomp/configure.ac':
> 
>    # Check for broken semaphore implementation on darwin.
>    # sem_init returns: sem_init error: Function not implemented.
>    case "$host" in
>      *-darwin*)
>        AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
>            Define if the POSIX Semaphores do not work on your system.)
>        ;;

I think one might want to check that this is really still true - pthreads 
behaviour
has improved in recent years.

=====

barring the configure extras and needing to use lldb for debugging, the
behaviour of gcc on darwin should be quite familiar.

=====

If you just need a branch testing .. you can also ask me and I can cover a wider
range of OS versions.  If you need to do development, then obviously it’s better
to use the cfarm machine.

Iain



Reply via email to