jjb: liburcu: workaround a TLS issue on Cygwin
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 Jul 2024 17:42:25 +0000 (13:42 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 9 Aug 2024 16:03:07 +0000 (12:03 -0400)
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 <mjeanson@efficios.com>
scripts/liburcu/build.sh

index 2831c8885552b437cb012a03f2ef57431a19f36e..40f3469457520d373ecc8108e154158f70c16ceb 100755 (executable)
@@ -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"
This page took 0.024349 seconds and 4 git commands to generate.