From 7491c28dedf1644bd9d7e49f4dc2376871c96f53 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 22 Oct 2015 17:16:01 -0400 Subject: [PATCH] Add liburcu Solaris build jobs Signed-off-by: Michael Jeanson --- jobs/liburcu.yaml | 7 +++++++ scripts/liburcu/build.sh | 45 ++++++++++++++++++++++++++++++++-------- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/jobs/liburcu.yaml b/jobs/liburcu.yaml index 121ea52..97db8ed 100644 --- a/jobs/liburcu.yaml +++ b/jobs/liburcu.yaml @@ -189,6 +189,13 @@ buildtype: portbuild arch: !!python/tuple [armhf, powerpc, ppc64el] build: !!python/tuple [std] + - 'liburcu_{version}_{buildtype}': + buildtype: solarisbuild + arch: !!python/tuple [solaris10, solaris11] + build: !!python/tuple [std] + version: + - master + - stable-0.9 - 'liburcu_{version}_cppcheck' - 'liburcu_{version}_scan-build' - 'liburcu_{version}_coverity': diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 042cdf5..8e5a9c6 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -26,6 +26,28 @@ PREFIX="$WORKSPACE/build" CONF_OPTS="" +case "$arch" in +solaris10) + MAKE=gmake + TAR=gtar + NPROC=gnproc + CFLAGS="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1" + ;; +solaris11) + MAKE=gmake + TAR=gtar + NPROC=nproc + CFLAGS="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1" + export PATH="$PATH:/usr/perl5/bin" + ;; +*) + MAKE=make + TAR=tar + NPROC=nproc + CFLAGS="" + ;; +esac + case "$conf" in static) echo "Static build" @@ -56,35 +78,37 @@ case "$build" in BUILD_PATH=$WORKSPACE/oot mkdir -p $BUILD_PATH cd $BUILD_PATH - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS ;; dist) echo "Distribution out of tree build" BUILD_PATH=`mktemp -d` # Initial configure and generate tarball - ./configure - make dist + MAKE=$MAKE ./configure + $MAKE dist mkdir -p $BUILD_PATH cp *.tar.* $BUILD_PATH/ cd $BUILD_PATH # Ignore level 1 of tar - tar xvf *.tar.* --strip 1 + $TAR xvf *.tar.* --strip 1 - $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE CFLAGS="$CFLAGS" $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS ;; *) BUILD_PATH=$WORKSPACE echo "Standard tree build" - $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS + MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS ;; esac -make -make install -make clean +$MAKE -j `$NPROC` +$MAKE install +$MAKE check +$MAKE regtest +$MAKE clean # Cleanup rpath and libtool .la files find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; @@ -92,5 +116,8 @@ find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; # Cleanup temp directory of dist build if [ $build = "dist" ]; then + cd $WORKSPACE rm -rf $BUILD_PATH fi + +# EOF -- 2.34.1