[patch, libfortran] Restore bootstrap on FreeBSD (hopefully)
Thomas König
tk@tkoenig.net
Fri Jan 9 19:57:25 GMT 2026
As analyzed by Steve, on freebsd __gthread_t is a pointer type.
I thought it the cleanest solution to remove the #ifdef in gfc_unit,
make the "self" member a intptr_t and cast the return value of
__gthread_t to that type.
Sorry for breaking bootstrap... the ubiquity of Linux is really
striking here. There are a couple of
Regression-tested on Linux. FreeBSD should also work, but I'd
like confirmation, if possible. Steve, could you be so kind?
OK for trunk?
Best regards
Thomas
PR fortran/123512
libgfortran/ChangeLog:
* io/io.h: Change type of self to intptr_t.
* io/async.h (LOCK_UNIT): Cast __gthread_self () to intptr_t.
(TRYLOCK_UNIT): Likewise.
(OWN_THREAD_ID): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p5.diff
Type: text/x-patch
Size: 2398 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20260109/72a8cd0f/attachment.bin>
More information about the Gcc-patches
mailing list