File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
1
env :
2
2
# ## compiler options
3
3
HOST :
4
+ WRAPPER_CMD :
4
5
# Specific warnings can be disabled with -Wno-error=foo.
5
6
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
6
7
WERROR_CFLAGS : -Werror -pedantic-errors
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- set -e
4
- set -x
3
+ set -eux
5
4
6
5
export LC_ALL=C
7
6
@@ -11,14 +10,20 @@ print_environment() {
11
10
set +x
12
11
# There are many ways to print variable names and their content. This one
13
12
# does not rely on bash.
14
- for i in WERROR_CFLAGS MAKEFLAGS BUILD \
13
+ for var in WERROR_CFLAGS MAKEFLAGS BUILD \
15
14
ECMULTWINDOW ECMULTGENPRECISION ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
16
15
EXPERIMENTAL ECDH RECOVERY SCHNORRSIG \
17
16
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETEST\
18
17
EXAMPLES \
19
- WRAPPER_CMD CC AR NM HOST
18
+ HOST WRAPPER_CMD \
19
+ CC AR NM
20
20
do
21
- eval ' printf "%s %s " "$i=\"${' " $i " ' }\""'
21
+ eval " isset=\$ {$var +x}"
22
+ if [ -n " $isset " ]; then
23
+ eval " val=\$ {$var }"
24
+ # shellcheck disable=SC2154
25
+ printf ' %s="%s" ' " $var " " $val "
26
+ fi
22
27
done
23
28
echo " $0 "
24
29
set -x
36
41
37
42
env >> test_env.log
38
43
39
- if [ -n " $CC " ]; then
44
+ if [ -n " ${CC+x} " ]; then
40
45
# The MSVC compiler "cl" doesn't understand "-v"
41
46
$CC -v || true
42
47
fi
You can’t perform that action at this time.
0 commit comments