print_usage() { cat <<EOF
Run nolibc testsuite for multiple architectures with crosstools
Usage:
$0 [options] <architectures>
Known architectures:
${archs}
Options:
-j [N] Allow N jobs at once (default: ${nproc})
-p Allow download of toolchains
-d [DIR] Download location for toolchains (default: ${download_location})
-c [VERSION] Version of toolchains to use (default: ${crosstool_version})
-a [ARCH] Host architecture of toolchains to use (default: ${hostarch})
-b [DIR] Build location (default: ${build_location})
-m [MODE] Test mode user/system (default: ${test_mode})
-e Disable -Werror
-l Build with LLVM/clang
EOF
}
# capture command output, print it on failure # mimics chronic(1) from moreutils function swallow_output() { if ! OUTPUT="$("$@" 2>&1)"; then echo"$OUTPUT"
return 1 fi
return 0
}
if [ ! -d "${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}/bin/." ]; then echo"No toolchain found in ${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}." echo"Did you install the toolchains or set the correct arch ? Rerun with -h for help."
return 1 fi
cross_compile=$(realpath "${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}/bin/${ct_arch}-${ct_abi}-")
build_dir="${build_location}/${arch}" if [ "$werror" -ne 0 ]; then
CFLAGS_EXTRA="$CFLAGS_EXTRA -Werror" fi MAKE=(make -f Makefile.nolibc -j"${nproc}" XARCH="${arch}" CROSS_COMPILE="${cross_compile}" LLVM="${llvm}" O="${build_dir}")
case "$test_mode" in 'system')
test_target=run
;; 'user')
test_target=run-user
;;
*) echo"Unknown mode $test_mode"
exit 1
esac
printf '%-15s'"$arch:" if [ "$arch" = "s390" ] && ([ "$llvm" = "1" ] || [ "$test_mode" = "user" ]); then echo"Unsupported configuration"
return fi if [ "$arch" = "m68k" -o "$arch" = "sh4" ] && [ "$llvm" = "1" ]; then echo"Unsupported configuration"
return fi if [ "$arch" = "x32" ] && [ "$test_mode" = "user" ]; then echo"Unsupported configuration"
return fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.