]> granicus.if.org Git - strace/blob - travis-build.sh
Make tprint_iov function a static inline wrapper
[strace] / travis-build.sh
1 #!/bin/sh -ex
2
3 case "$CC" in
4         gcc)
5                 ENABLE_GCC_WERROR=--enable-gcc-Werror
6                 ;;
7         clang-*)
8                 # clang -mx32 fails with the following error:
9                 # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
10                 export st_cv_mx32_runtime=no
11                 ;;
12 esac
13
14 case "${TARGET-}" in
15         x32)
16                 CC="$CC -mx32"
17                 ;;
18         x86)
19                 CC="$CC -m32"
20                 DISTCHECK_CONFIGURE_FLAGS='--build=i686-pc-linux-gnu --target=i686-pc-linux-gnu'
21                 export DISTCHECK_CONFIGURE_FLAGS
22                 ;;
23 esac
24
25 case "${CHECK-}" in
26         coverage)
27                 CHECK_CONFIGURE_FLAGS=--enable-code-coverage
28                 CFLAGS='-g -O0'
29                 CFLAGS_FOR_BUILD="$CFLAGS"
30                 export CFLAGS CFLAGS_FOR_BUILD
31                 ;;
32 esac
33
34 $CC --version
35 export CC_FOR_BUILD="$CC"
36
37 ./git-set-file-times
38 ./bootstrap
39 ./configure --enable-maintainer-mode \
40         ${ENABLE_GCC_WERROR-} \
41         ${DISTCHECK_CONFIGURE_FLAGS-} \
42         ${CHECK_CONFIGURE_FLAGS-} \
43         #
44
45 j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
46
47 case "${CHECK-}" in
48         coverage)
49                 make -k $j all VERBOSE=${VERBOSE-}
50                 make -k $j check VERBOSE=${VERBOSE-}
51                 codecov --gcov-args=-abcp ||:
52                 ;;
53         *)
54                 make -k $j distcheck VERBOSE=${VERBOSE-}
55                 ;;
56 esac