From cd9733d5f5f06aa52e82e8a266d450d78959c13a Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 23 Jan 2017 16:45:58 -0500 Subject: [PATCH] jjb: liburcu: Handle debug-rcu conf value When version is greater than 0.9 use "--enable-rcu-debug" else append -DDEBUG_RCU to CFLAGS. Signed-off-by: Jonathan Rajotte --- scripts/liburcu/build.sh | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index dfd1040..20187c4 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -124,7 +124,17 @@ macosx) ;; esac -# Set configure options for each build configuration +# Enter the source directory +cd "$SRCDIR" + +# Run bootstrap in the source directory prior to configure +./bootstrap + +# Get source version from configure script +eval "$(grep '^PACKAGE_VERSION=' ./configure)" + +# Set configure options and environment variables for each build +# configuration. CONF_OPTS="" case "$conf" in static) @@ -137,23 +147,21 @@ tls_fallback) CONF_OPTS="--disable-compiler-tls" ;; +debug-rcu) + echo "Enable RCU sanity checks for debugging" + if vergt "$PACKAGE_VERSION" "0.9"; then + CONF_OPTS="--enable-debug-rcu" + else + CFLAGS="$CFLAGS -DDEBUG_RCU" + fi + ;; + *) echo "Standard build" CONF_OPTS="" ;; esac - -# Enter the source directory -cd "$SRCDIR" - -# Run bootstrap in the source directory prior to configure -./bootstrap - -# Get source version from configure script -eval "$(grep '^PACKAGE_VERSION=' ./configure)" - - # Build type # oot : out-of-tree build # dist: build via make dist -- 2.34.1