blob: 2af16492250990866507ad0a95f38c6c5486e1f7 [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-}