One of the test cases failed to link because of missing paths to
libatomic. Reuse procedures in lib/atomic-dg.exp to gather these paths.
gcc/testsuite/ChangeLog:
2021-01-15 Marius Hillenbrand <mhillen@linux.ibm.com>
* gcc.target/s390/s390.exp: Call lib atomic-dg.exp to link
libatomic into testcases in gcc.target/s390/md.
* gcc.target/s390/md/atomic_exchange-1.c: Remove no unnecessary
-latomic.
/* Machine description pattern tests. */
/* { dg-do compile } */
-/* { dg-options "-lpthread -latomic" } */
+/* { dg-options "-lpthread" } */
/* { dg-do run { target { s390_useable_hw } } } */
/**/
load_lib gcc-dg.exp
load_lib target-supports.exp
load_lib gfortran-dg.exp
+load_lib atomic-dg.exp
# Return 1 if the the assembler understands .machine and .machinemode. The
# target attribute needs that feature to work.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vxe/*.{c,S}]] \
"" "-O3 -march=arch12 -mzarch"
+# Some md tests require libatomic
+atomic_init
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/md/*.{c,S}]] \
"" $DEFAULT_CFLAGS
}
# All done.
+atomic_finish
dg-finish