From: Michael Jeanson Date: Tue, 23 Jul 2024 17:42:25 +0000 (-0400) Subject: jjb: liburcu: workaround a TLS issue on Cygwin X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=fe7cc0c9c5fc17ece0c5729f0631947ce098534d;p=lttng-ci.git jjb: liburcu: workaround a TLS issue on Cygwin The TLS emulation layer provided by GCC on Cygwin has a deadlock issue with the 'test_perthreadlock'. Use our internal TLS implementation on Cygwin to work around this. Change-Id: Id9e8c6623715e529ba01fcb128d75e922766098f Signed-off-by: Michael Jeanson --- diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 2831c88..40f3469 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -133,6 +133,8 @@ PREFIX="/build" LIBDIR="lib" LIBDIR_ARCH="$LIBDIR" +CONF_OPTS=() + # RHEL and SLES both use lib64 but don't bother shipping a default autoconf # site config that matches this. if [[ ( -f /etc/redhat-release || -f /etc/products.d/SLES.prod || -f /etc/yocto-release ) ]]; then @@ -206,6 +208,16 @@ freebsd*) export PYTHON_CONFIG="python3-config" ;; +cygwin*) + export MAKE=make + export TAR=tar + export NPROC=nproc + + # Work around a bug in GCC's emutls on cygwin which results in a deadlock + # in test_perthreadlock + CONF_OPTS+=("--disable-compiler-tls") + ;; + *) export MAKE=make export TAR=tar @@ -234,7 +246,7 @@ PACKAGE_VERSION=${PACKAGE_VERSION//\-pre*/} # Set configure options and environment variables for each build # configuration. -CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH" "--disable-maintainer-mode") +CONF_OPTS+=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH" "--disable-maintainer-mode") case "$conf" in static) print_header "Conf: Static lib only"