]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Use -pthread on target *-*-freebsd*
authorSteve Kargl <kargls@comcast.net>
Mon, 23 Feb 2026 18:18:00 +0000 (10:18 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Feb 2026 17:18:26 +0000 (09:18 -0800)
PR fortran/88076

gcc/testsuite/ChangeLog:

* gfortran.dg/coarray/caf.exp: If the target is a FreeBSD
system add -pthread when running tests.

gcc/testsuite/gfortran.dg/coarray/caf.exp

index 02c3591f377de4698834f32169e9a12d789bcd86..3db249a920f8b8bc6b86d0ea927aa6fc4d3a2a09 100644 (file)
@@ -120,7 +120,11 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]]
         foreach flags $option_list {
             verbose "Testing $nshort (libcaf_shmem), $flags" 1
             set gfortran_aux_module_flags "-fcoarray=lib $flags -lcaf_shmem"
-            dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+            if { [istarget *-*-freebsd*] } {
+                dg-test $test "-fcoarray=lib -pthread $flags -lcaf_shmem" {}
+            } else {
+                dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
+            }
             cleanup-modules ""
         }
     }