Peter Trommler pushed to branch wip/T27135 at Glasgow Haskell Compiler / GHC Commits: 47204fc9 by Peter Trommler at 2026-04-10T22:56:45+02:00 Fix tests for clang - - - - - 1 changed file: - m4/fp_cc_supports__atomics.m4 Changes: ===================================== m4/fp_cc_supports__atomics.m4 ===================================== @@ -7,7 +7,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], AC_MSG_CHECKING([whether C compiler supports C11 atomics]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include <stdatomic.h> - int x;]], + _Atomic int x;]], [[atomic_load(&x); return x;]])], [ AC_MSG_RESULT(yes) @@ -16,7 +16,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], AC_MSG_CHECKING(whether -latomic is needed for sub-word-sized atomic operations) AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include <stdatomic.h> - unsigned char a;]], + _Atomic unsigned char a;]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])], [ AC_MSG_RESULT(no) @@ -26,7 +26,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], LIBS="-latomic" AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include <stdatomic.h> - unsigned char a;]], + _Atomic unsigned char a;]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])], [ AC_MSG_RESULT(yes) @@ -43,7 +43,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], [[ #include <inttypes.h> #include <stdatomic.h> - uint64_t a; + _Atomic uint64_t a; ]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])], [ AC_MSG_RESULT(no) @@ -55,7 +55,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], [[ #include <inttypes.h> #include <stdatomic.h> - uint64_t a; + _Atomic uint64_t a; ]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])], [ AC_MSG_RESULT(yes) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/47204fc91be2ad9937ebb62c695ed8a8... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/47204fc91be2ad9937ebb62c695ed8a8... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Peter Trommler (@trommler)