Add a --enable-pthread option to activate experimental threading code

* NEWS, README, doc/org/compile.org: Mention the option and
its effect on compilation requirements.
* configure.ac: Add the --enable-pthread option, and ENABLE_PTHREAD
macro.
* doc/org/g++wrap.in, spot/Makefile.am, spot/libspot.pc.in: Compile
with -pthread conditionally.
* spot/graph/graph.hh, spot/twa/twagraph.cc: Adjust the code to not
use thread-local variables, and let the pthread code be optional.
* .gitlab-ci.yml: Activate --enable-pthread in two configurations.
This commit is contained in:
Alexandre Duret-Lutz 2022-06-16 23:43:50 +02:00
parent 721d5695ec
commit 23908f3d2f
10 changed files with 79 additions and 32 deletions

View file

@ -22,9 +22,9 @@ debian-stable-gcc:
image: gitlab-registry.lrde.epita.fr/spot/buildenv/debian:stable
script:
- autoreconf -vfi
- ./configure --enable-max-accsets=256
- ./configure --enable-max-accsets=256 --enable-pthread
- make
- make distcheck
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-max-accsets=256 --enable-pthread'
artifacts:
when: always
paths:
@ -89,7 +89,7 @@ debian-gcc-snapshot:
- autoreconf -vfi
- ./configure --with-included-ltdl CXX='g++'
- make
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--with-included-ltdl'
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--with-included-ltdl'
allow_failure: true
artifacts:
when: always
@ -111,7 +111,7 @@ alpine-gcc:
- autoreconf -vfi
- ./configure
- make
- make distcheck || { chmod -R u+w ./spot-*; false; }
- make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-pthread' || { chmod -R u+w ./spot-*; false; }
artifacts:
when: always
paths: