From 60833e5dbeb2869dc6ba144e281bc6b17a6d9930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 15 Aug 2024 19:54:58 +0200 Subject: [PATCH] For TSAN builds, use libraries from /opt/tsan The new TSAN images, the TSAN-enabled images install libraries to /opt/tsan, synchronize the configure options and CFLAGS between gcc:tsan and clang:tsan images and set the PKG_CONFIG_PATH to /opt/tsan/lib. (cherry picked from commit 2a46396f295146b3868d89c8d8136fd3574579e5) --- .gitlab-ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c64bcf7b7c..8c8d05598b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1204,9 +1204,11 @@ unit:clang:asan: gcc:tsan: variables: CC: gcc - CFLAGS: "${CFLAGS_COMMON} -Wno-stringop-overread -ggdb -O2 -fsanitize=thread -Wl,-rpath=/usr/local/lib -Wl,--enable-new-dtags" + CFLAGS: "${CFLAGS_COMMON} -Wno-stringop-overread -ggdb -O2 -fsanitize=thread" LDFLAGS: "-fsanitize=thread" - EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" + OPENSSL_CFLAGS: -I/opt/tsan/include + OPENSSL_LIBS: -L/opt/tsan/lib -lssl -lcrypto + EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/opt/tsan/lib/pkgconfig" <<: *tsan_fedora_40_amd64_image <<: *build_job @@ -1233,9 +1235,11 @@ clang:tsan: <<: *build_job variables: CC: "${CLANG}" - CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread" + CFLAGS: "${CFLAGS_COMMON} -ggdb -O2 -fsanitize=thread" LDFLAGS: "-fsanitize=thread" - EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc" + OPENSSL_CFLAGS: -I/opt/tsan/include + OPENSSL_LIBS: -L/opt/tsan/lib -lssl -lcrypto + EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/opt/tsan/lib/pkgconfig" system:clang:tsan: variables: @@ -1577,7 +1581,9 @@ respdiff:tsan: CC: gcc CFLAGS: "${CFLAGS_COMMON} -Og -fsanitize=thread" LDFLAGS: "-fsanitize=thread" - EXTRA_CONFIGURE: "--disable-dnsrps --enable-pthread-rwlock --without-jemalloc" + OPENSSL_CFLAGS: -I/opt/tsan/include + OPENSSL_LIBS: -L/opt/tsan/lib -lssl -lcrypto + EXTRA_CONFIGURE: "--disable-dnsrps --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/opt/tsan/lib/pkgconfig" MAX_DISAGREEMENTS_PERCENTAGE: "0.5" TSAN_OPTIONS: "${TSAN_OPTIONS_DEBIAN}" script: