Hi Partick, hi Salvatore, hi all,
Patrick Begou wrote:
Linking with gfortran -fuse-ld=mold.... works fine for me too.
I have mold 2.40.4 (provided by Almalinux 8) and gfortran 15.2.0
(built from the Git repository) and I'm using OpenMP for offloading.
Thanks for confirming that 'mold' works – that's much nicer than working
around the issue in your source code.
* * *
On the LD side: H.J.'s patch landed in LD mainline (for 2.46) - and he
asked for approval for backporting it to the release branches.
Cf. https://sourceware.org/bugzilla/show_bug.cgi?id=33584 for the link
to the email thread + current commits.
* * *
If possible, please confirm that his patch also also fixes the issue for
you, but I am almost certain that it does →
https://sourceware.org/binutils/ → Obtaining binutils (the git checkout)
(Build, e.g., with "../configure --prefix=... --disable-gdb
--disable-gold --disable-gprofng --disable-gprof --disable-readline
--disable-gas" which disables most unneeded parts – and add <prefix>/bin
to the beginning of your PATH variable to ensure it gets used. When
compiling with '-Wl,-v' you can see the line that invokes 'ld' and it
shouldn't show /usr/bin/ld but the one with your prefix.)
[Both the 'mold' and the Binutils + PATH thing should work likewise with
self-build or a vendor GCC (such as Alma Linux' or Fedora's).]
Tobias
PS: I am happy that this is now solved :-)
PPS: I asked doko (Ubuntu) and Michael (SUSE) to pick up H.J.'s patch.
As Nick is responsible for approving the backports, he might pick them
up automatically for the Fedora packages, I hope. And rawhide builds are
already tracking mainline.