blob: 817e50cf365d3ae0a3a6528c9d3f6d0686c195f3 [file] [log] [blame]
Dmitry V. Levinb2272932016-01-13 12:12:33 +00001#!/bin/sh -ex
Dmitry V. Levin690235a2015-11-26 16:07:57 +00002
Dmitry V. Levinb2272932016-01-13 12:12:33 +00003case "$CC" in
4 gcc)
5 ENABLE_GCC_WERROR=--enable-gcc-Werror
6 ;;
7 clang-*)
8 sudo apt-get -qq update
9 sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
10 "$CC"
11 # clang -mx32 fails with the following error:
12 # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
13 export st_cv_mx32_runtime=no
14 ;;
15 musl-gcc)
16 sudo add-apt-repository ppa:bortis/musl -y
17 sudo apt-get -qq update
18 sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
19 musl-tools linux-musl-dev
20 ;;
21esac
22
Dmitry V. Levinc9d25012015-11-30 22:18:16 +000023case "${TARGET-}" in
24 x32)
25 CC="$CC -mx32"
26 ;;
27 x86)
28 export DISTCHECK_CONFIGURE_FLAGS='--build=i686-pc-linux-gnu'
29 CC="$CC -m32"
30 ;;
31esac
32export CC_FOR_BUILD="$CC"
Dmitry V. Levinb2272932016-01-13 12:12:33 +000033
34$CC --version
35
36git fetch --unshallow
37./git-set-file-times
Dmitry V. Levin690235a2015-11-26 16:07:57 +000038./bootstrap
Dmitry V. Levinc9d25012015-11-30 22:18:16 +000039./configure --enable-maintainer-mode ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-}
Dmitry V. Levinb2272932016-01-13 12:12:33 +000040j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
Dmitry V. Levinc9d25012015-11-30 22:18:16 +000041make -k $j distcheck VERBOSE=${VERBOSE-}
Dmitry V. Levin5be488c2016-02-04 00:16:11 +000042
43if [ "$CC:${TARGET-}" = 'gcc:x86_64' ]; then
44 set -- strace-*.tar.xz
45 tar -xf "$1"
46 dir="${1%.tar.xz}"
47 cd "$dir"
48 ./configure --enable-code-coverage ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-}
49 make -k $j
50 make -k $j check VERBOSE=${VERBOSE-}
Dmitry V. Levin0acd8d02016-02-07 22:47:40 +000051 codecov --gcov-args=-abcp ||:
Dmitry V. Levin5be488c2016-02-04 00:16:11 +000052fi