File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
tools/testing/selftests/nolibc Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ download_location="${cache_dir}/crosstools/"
15
15
build_location=" $( realpath " ${cache_dir} " /nolibc-tests/) "
16
16
perform_download=0
17
17
test_mode=system
18
- CFLAGS_EXTRA= " -Werror "
18
+ werror=1
19
19
archs=" i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv s390 loongarch"
20
20
21
21
TEMP=$( getopt -o ' j:d:c:b:a:m:peh' -n " $0 " -- " $@ " )
@@ -69,7 +69,7 @@ while true; do
69
69
test_mode=" $2 "
70
70
shift 2; continue ;;
71
71
' -e' )
72
- CFLAGS_EXTRA= " "
72
+ werror=0
73
73
shift ; continue ;;
74
74
' -h' )
75
75
print_usage
@@ -140,6 +140,9 @@ test_arch() {
140
140
ct_abi=$( crosstool_abi " $1 " )
141
141
cross_compile=$( realpath " ${download_location} gcc-${crosstool_version} -nolibc/${ct_arch} -${ct_abi} /bin/${ct_arch} -${ct_abi} -" )
142
142
build_dir=" ${build_location} /${arch} "
143
+ if [ " $werror " -ne 0 ]; then
144
+ CFLAGS_EXTRA=" $CFLAGS_EXTRA -Werror"
145
+ fi
143
146
MAKE=(make -j" ${nproc} " XARCH=" ${arch} " CROSS_COMPILE=" ${cross_compile} " O=" ${build_dir} " )
144
147
145
148
mkdir -p " $build_dir "
You can’t perform that action at this time.
0 commit comments