mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 12:25:36 +01:00
all.sh: make the arm-gcc cross-compiler prefix configurable
Make it possible to use a compiler that isn't in $PATH, or that's installed with a different name, or even a compiler for a different target such as arm-linux-gnueabi. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
bfda033f3d
commit
cd7b0422ef
@ -131,6 +131,7 @@ pre_initialize_variables () {
|
|||||||
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
|
: ${OUT_OF_SOURCE_DIR:=./mbedtls_out_of_source_build}
|
||||||
: ${ARMC5_BIN_DIR:=/usr/bin}
|
: ${ARMC5_BIN_DIR:=/usr/bin}
|
||||||
: ${ARMC6_BIN_DIR:=/usr/bin}
|
: ${ARMC6_BIN_DIR:=/usr/bin}
|
||||||
|
: ${ARM_GCC_PREFIX:=arm-none-eabi-}
|
||||||
|
|
||||||
# if MAKEFLAGS is not set add the -j option to speed up invocations of make
|
# if MAKEFLAGS is not set add the -j option to speed up invocations of make
|
||||||
if [ -z "${MAKEFLAGS+set}" ]; then
|
if [ -z "${MAKEFLAGS+set}" ]; then
|
||||||
@ -192,6 +193,8 @@ General options:
|
|||||||
-f|--force Force the tests to overwrite any modified files.
|
-f|--force Force the tests to overwrite any modified files.
|
||||||
-k|--keep-going Run all tests and report errors at the end.
|
-k|--keep-going Run all tests and report errors at the end.
|
||||||
-m|--memory Additional optional memory tests.
|
-m|--memory Additional optional memory tests.
|
||||||
|
--arm-gcc-prefix=<string> Prefix for gcc as a cross-compiler for arm
|
||||||
|
(default: "${ARM_GCC_PREFIX}")
|
||||||
--armcc Run ARM Compiler builds (on by default).
|
--armcc Run ARM Compiler builds (on by default).
|
||||||
--except Exclude the COMPONENTs listed on the command line,
|
--except Exclude the COMPONENTs listed on the command line,
|
||||||
instead of running only those.
|
instead of running only those.
|
||||||
@ -305,6 +308,7 @@ pre_parse_command_line () {
|
|||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--arm-gcc-prefix) shift; ARM_GCC_PREFIX="$1";;
|
||||||
--armcc) no_armcc=;;
|
--armcc) no_armcc=;;
|
||||||
--armc5-bin-dir) shift; ARMC5_BIN_DIR="$1";;
|
--armc5-bin-dir) shift; ARMC5_BIN_DIR="$1";;
|
||||||
--armc6-bin-dir) shift; ARMC6_BIN_DIR="$1";;
|
--armc6-bin-dir) shift; ARMC6_BIN_DIR="$1";;
|
||||||
@ -517,7 +521,7 @@ pre_check_tools () {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case " $RUN_COMPONENTS " in
|
case " $RUN_COMPONENTS " in
|
||||||
*_arm_none_eabi_gcc[_\ ]*) check_tools "arm-none-eabi-gcc";;
|
*_arm_none_eabi_gcc[_\ ]*) check_tools "${ARM_GCC_PREFIX}gcc";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case " $RUN_COMPONENTS " in
|
case " $RUN_COMPONENTS " in
|
||||||
@ -1083,16 +1087,16 @@ component_test_have_int64 () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc () {
|
component_build_arm_none_eabi_gcc () {
|
||||||
msg "build: arm-none-eabi-gcc, make" # ~ 10s
|
msg "build: ${ARM_GCC_PREFIX}, make" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' lib
|
make CC="${ARM_GCC_PREFIX}gcc" AR="${ARM_GCC_PREFIX}ar" LD="${ARM_GCC_PREFIX}ld" CFLAGS='-Werror -Wall -Wextra' lib
|
||||||
}
|
}
|
||||||
|
|
||||||
component_build_arm_none_eabi_gcc_no_udbl_division () {
|
component_build_arm_none_eabi_gcc_no_udbl_division () {
|
||||||
msg "build: arm-none-eabi-gcc -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
|
msg "build: ${ARM_GCC_PREFIX} -DMBEDTLS_NO_UDBL_DIVISION, make" # ~ 10s
|
||||||
scripts/config.pl baremetal
|
scripts/config.pl baremetal
|
||||||
scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
|
scripts/config.pl set MBEDTLS_NO_UDBL_DIVISION
|
||||||
make CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS='-Werror -Wall -Wextra' lib
|
make CC="${ARM_GCC_PREFIX}gcc" AR="${ARM_GCC_PREFIX}ar" LD="${ARM_GCC_PREFIX}ld" CFLAGS='-Werror -Wall -Wextra' lib
|
||||||
echo "Checking that software 64-bit division is not required"
|
echo "Checking that software 64-bit division is not required"
|
||||||
if_build_succeeded not grep __aeabi_uldiv library/*.o
|
if_build_succeeded not grep __aeabi_uldiv library/*.o
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user