From 93acfa0bb3c347acccdf172c12a0cd790c2416fb Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 24 May 2016 20:34:07 +0200 Subject: [PATCH] qa.sh: Add ncc/nccnav support --- expat/qa.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/expat/qa.sh b/expat/qa.sh index a2e15c40..0dce8716 100755 --- a/expat/qa.sh +++ b/expat/qa.sh @@ -9,8 +9,10 @@ set -o nounset : ${CLANG_CC:=clang} : ${CLANG_CXX:=clang++} +: ${AR:=ar} : ${CC:="${CLANG_CC}"} : ${CXX:="${CLANG_CXX}"} +: ${LD:=ld} : ${MAKE:=make} : ${BASE_FLAGS:="-pipe -Wall -Wextra -pedantic -Wno-overlength-strings"} @@ -49,6 +51,13 @@ main() { # http://clang.llvm.org/docs/MemorySanitizer.html BASE_FLAGS+=" -fsanitize=memory -fno-omit-frame-pointer -g -O2" ;; + ncc) + # http://students.ceid.upatras.gr/~sxanth/ncc/ + local CC="ncc -ncgcc -ncld -ncfabs" + local AR=nccar + local LD=nccld + BASE_FLAGS+=" -fPIC" + ;; undefined) # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html BASE_FLAGS+=" -fsanitize=undefined" @@ -56,7 +65,7 @@ main() { ;; *) echo "Usage:" 1>&2 - echo " ${0##*/} (address|coverage|memory|undefined)" 1>&2 + echo " ${0##*/} (address|coverage|memory|ncc|undefined)" 1>&2 exit 1 ;; esac @@ -69,16 +78,28 @@ main() { RUN CC="${CC}" CFLAGS="${CFLAGS}" \ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ + AR="${AR}" \ + LD="${LD}" \ ./configure "$@" RUN "${MAKE}" clean all - RUN "${MAKE}" check run-xmltest + + case "${mode}" in + ncc) + ;; + *) + RUN "${MAKE}" check run-xmltest + ;; + esac ) || exit 1 case "${mode}" in coverage) find -name '*.gcda' | sort | xargs gcov ;; + ncc) + RUN nccnav ./.libs/libexpat.a.nccout + ;; esac }