On Wed, Feb 11, 2026 at 04:56:23PM -0800, Jerry D wrote:
> 
> I will send you a fresh patch after I finish incorporating
> comments revievd so far.

I got it to work after playing around 'patch -p X' with
a few different variants of X.

Unfortunately, there are still a large number of failures.

% tail gcc/testsuite/gfortran/gfortran.sum

                === gfortran Summary ===

# of expected passes            74831
# of unexpected failures        116
# of expected failures          343
# of unresolved testcases       78
# of unsupported tests          95
/home/kargl/gcc/obj/gcc/gfortran  version 16.0.1 20260204 (experimental) (GCC) 



This is due to not linking in libpthread.  On FreeBSD, to
include pthread, one needs to add the -pthread option or
have a spec file that magically includes or do whatever
gomp does.  With -fopenmp, -pthread is included.  Here's
an example:

FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib
  -O2  -lcaf_shmem (test for excess errors)
Excess errors:
/home/kargl/gcc/obj/x86_64-unknown-freebsd16.0/libgfortran/../../../gcc/libgfortran/caf/shmem/thread_support.c:52:(.text.initialize_shared_mutex+0x25):
 undefined reference to `pthread_mutexattr_setpshared'
/home/kargl/gcc/obj/x86_64-unknown-freebsd16.0/libgfortran/../../../gcc/libgfortran/caf/shmem/thread_support.c:66:(.text.initialize_shared_errorcheck_mutex+0x39):
 undefined reference to `pthread_mutexattr_setpshared'
/home/kargl/gcc/obj/x86_64-unknown-freebsd16.0/libgfortran/../../../gcc/libgfortran/caf/shmem/thread_support.c:78:(.text.initialize_shared_condition+0x13):
 undefined reference to `pthread_condattr_init'
/usr/local/bin/ld: 
/home/kargl/gcc/obj/x86_64-unknown-freebsd16.0/libgfortran/../../../gcc/libgfortran/caf/shmem/thread_support.c:79:(.text.initialize_shared_condition+0x25):
 undefined reference to `pthread_condattr_setpshared'
/usr/local/bin/ld: 
/home/kargl/gcc/obj/x86_64-unknown-freebsd16.0/libgfortran/../../../gcc/libgfortran/caf/shmem/thread_support.c:81:(.text.initialize_shared_condition+0x46):
 undefined reference to `pthread_condattr_destroy'

-- 
Steve

Reply via email to