From 699bc19bf5706791c64e20c0b378c5194430b9d6 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Wed, 19 Apr 2023 10:40:07 -0400 Subject: [PATCH] ci: disable __thread support for Windows msys2 build Our Windows msys2 build is now broken after AppVeyor's recent image update from clang/lld 15.0.7-3 to 16.0.0-1. Here is the error: CC unittests/oslib/strcasestr.o CC unittests/oslib/strsep.o LINK fio ld.lld: error: undefined symbol: static_tv_valid >>> referenced by gettime.o clang: error: linker command failed with exit code 1 (use -v to see invocation) Rishabh Shukla investigated and found that clang + ld builds successfully. So the problem seems to be with lld 16.0.0-1. Until we find the root cause let's just disable __thread support on AppVeyor msys2 builds. Link: https://github.com/axboe/fio/issues/1559 Suggested-by: Rishabh Shukla Signed-off-by: Vincent Fu --- .appveyor.yml | 4 +++- configure | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 92301ca9..a63cf24f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -6,9 +6,11 @@ image: environment: CYG_MIRROR: http://cygwin.mirror.constant.com matrix: +# --disable-tls for the msys2 build to work around +# breakage with clang/lld 16.0.0-1 - ARCHITECTURE: x64 CC: clang - CONFIGURE_OPTIONS: --enable-pdb + CONFIGURE_OPTIONS: --enable-pdb --disable-tls DISTRO: msys2 # Skip 32 bit clang build # - ARCHITECTURE: x86 diff --git a/configure b/configure index 45d10a31..abb6d016 100755 --- a/configure +++ b/configure @@ -264,6 +264,8 @@ for opt do ;; --seed-buckets=*) seed_buckets="$optarg" ;; + --disable-tls) tls_check="no" + ;; --help) show_help="yes" ;; @@ -313,6 +315,7 @@ if test "$show_help" = "yes" ; then echo "--disable-dfs Disable DAOS File System support even if found" echo "--enable-asan Enable address sanitizer" echo "--seed-buckets= Number of seed buckets for the refill-buffer" + echo "--disable-tls Disable __thread local storage" exit $exit_val fi @@ -1549,7 +1552,8 @@ print_config "socklen_t" "$socklen_t" if test "$tls_thread" != "yes" ; then tls_thread="no" fi -cat > $TMPC << EOF +if test "$tls_check" != "no"; then + cat > $TMPC << EOF #include static __thread int ret; int main(int argc, char **argv) @@ -1560,6 +1564,7 @@ EOF if compile_prog "" "" "__thread"; then tls_thread="yes" fi +fi print_config "__thread" "$tls_thread" ########################################## -- 2.25.1