mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 19:25:28 +00:00
Merge remote-tracking branch 'public/pr/1184' into development
* public/pr/1184: Add --no-yotta option to all.sh Fix build without MBEDTLS_FS_IO
This commit is contained in:
commit
535553e7d8
|
@ -60,12 +60,15 @@
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_FS_IO)
|
#if defined(MBEDTLS_FS_IO) || \
|
||||||
|
defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C)
|
||||||
/* Implementation that should never be optimized out by the compiler */
|
/* Implementation that should never be optimized out by the compiler */
|
||||||
static void mbedtls_zeroize( void *v, size_t n ) {
|
static void mbedtls_zeroize( void *v, size_t n ) {
|
||||||
volatile unsigned char *p = v; while( n-- ) *p++ = 0;
|
volatile unsigned char *p = v; while( n-- ) *p++ = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_FS_IO)
|
||||||
/*
|
/*
|
||||||
* Load all data from a file into a given buffer.
|
* Load all data from a file into a given buffer.
|
||||||
*
|
*
|
||||||
|
|
|
@ -36,6 +36,7 @@ CONFIG_BAK="$CONFIG_H.bak"
|
||||||
MEMORY=0
|
MEMORY=0
|
||||||
FORCE=0
|
FORCE=0
|
||||||
RELEASE=0
|
RELEASE=0
|
||||||
|
YOTTA=1
|
||||||
|
|
||||||
# Default commands, can be overriden by the environment
|
# Default commands, can be overriden by the environment
|
||||||
: ${OPENSSL:="openssl"}
|
: ${OPENSSL:="openssl"}
|
||||||
|
@ -61,6 +62,7 @@ usage()
|
||||||
printf " -f|--force\t\tForce the tests to overwrite any modified files.\n"
|
printf " -f|--force\t\tForce the tests to overwrite any modified files.\n"
|
||||||
printf " -s|--seed\t\tInteger seed value to use for this test run.\n"
|
printf " -s|--seed\t\tInteger seed value to use for this test run.\n"
|
||||||
printf " -r|--release-test\t\tRun this script in release mode. This fixes the seed value to 1.\n"
|
printf " -r|--release-test\t\tRun this script in release mode. This fixes the seed value to 1.\n"
|
||||||
|
printf " --no-yotta\t\tSkip yotta build\n"
|
||||||
printf " --out-of-source-dir=<path>\t\tDirectory used for CMake out-of-source build tests."
|
printf " --out-of-source-dir=<path>\t\tDirectory used for CMake out-of-source build tests."
|
||||||
printf " --openssl=<OpenSSL_path>\t\tPath to OpenSSL executable to use for most tests.\n"
|
printf " --openssl=<OpenSSL_path>\t\tPath to OpenSSL executable to use for most tests.\n"
|
||||||
printf " --openssl-legacy=<OpenSSL_path>\t\tPath to OpenSSL executable to use for legacy tests e.g. SSLv3.\n"
|
printf " --openssl-legacy=<OpenSSL_path>\t\tPath to OpenSSL executable to use for legacy tests e.g. SSLv3.\n"
|
||||||
|
@ -138,6 +140,9 @@ while [ $# -gt 0 ]; do
|
||||||
--release-test|-r)
|
--release-test|-r)
|
||||||
RELEASE=1
|
RELEASE=1
|
||||||
;;
|
;;
|
||||||
|
--no-yotta)
|
||||||
|
YOTTA=0
|
||||||
|
;;
|
||||||
--out-of-source-dir)
|
--out-of-source-dir)
|
||||||
shift
|
shift
|
||||||
OUT_OF_SOURCE_DIR="$1"
|
OUT_OF_SOURCE_DIR="$1"
|
||||||
|
@ -183,12 +188,14 @@ while [ $# -gt 0 ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $FORCE -eq 1 ]; then
|
if [ $FORCE -eq 1 ]; then
|
||||||
|
if [ $YOTTA -eq 1 ]; then
|
||||||
rm -rf yotta/module "$OUT_OF_SOURCE_DIR"
|
rm -rf yotta/module "$OUT_OF_SOURCE_DIR"
|
||||||
|
fi
|
||||||
git checkout-index -f -q $CONFIG_H
|
git checkout-index -f -q $CONFIG_H
|
||||||
cleanup
|
cleanup
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ -d yotta/module ]; then
|
if [ $YOTTA -eq 1 ] && [ -d yotta/module ]; then
|
||||||
err_msg "Warning - there is an existing yotta module in the directory 'yotta/module'"
|
err_msg "Warning - there is an existing yotta module in the directory 'yotta/module'"
|
||||||
echo "You can either delete your work and retry, or force the test to overwrite the"
|
echo "You can either delete your work and retry, or force the test to overwrite the"
|
||||||
echo "test by rerunning the script as: $0 --force"
|
echo "test by rerunning the script as: $0 --force"
|
||||||
|
@ -283,11 +290,13 @@ msg "test: doxygen warnings" # ~ 3s
|
||||||
cleanup
|
cleanup
|
||||||
tests/scripts/doxygen.sh
|
tests/scripts/doxygen.sh
|
||||||
|
|
||||||
# Note - use of yotta is deprecated, and yotta also requires armcc to be on the
|
if [ $YOTTA -ne 0 ]; then
|
||||||
# path, and uses whatever version of armcc it finds there.
|
# Note - use of yotta is deprecated, and yotta also requires armcc to be
|
||||||
|
# on the path, and uses whatever version of armcc it finds there.
|
||||||
msg "build: create and build yotta module" # ~ 30s
|
msg "build: create and build yotta module" # ~ 30s
|
||||||
cleanup
|
cleanup
|
||||||
tests/scripts/yotta-build.sh
|
tests/scripts/yotta-build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
msg "build: cmake, gcc, ASan" # ~ 1 min 50s
|
msg "build: cmake, gcc, ASan" # ~ 1 min 50s
|
||||||
cleanup
|
cleanup
|
||||||
|
|
Loading…
Reference in a new issue