mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-28 00:35:21 +00:00
2078725feb
rev and rev16 are only supported from v6 (all profiles) and up. arm-none-eabi-gcc picks a lower architecture version by default, which means before this commit it would fail to build (assembler error) unless you manually specified -march=armv6-m -mthumb or similar, which broke all.sh. Source for version-checking macros: - GCC/Clang: use the -E -dM - </dev/null trick - armcc5: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472k/chr1359125007083.html - armclang 6: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0774g/chr1383660321827.html Tested with the following script: #!/bin/sh set -eu ARMCLANG="env ARM_TOOL_VARIANT=ult $ARMC6_BIN_DIR/armclang" build() { echo "$@" "$@" -Iinclude -c library/aria.c } build arm-none-eabi-gcc build arm-none-eabi-gcc -march=armv5 build clang --target=arm-none-eabi build clang --target=arm-none-eabi -march=armv5 build armcc build armcc --gnu build armcc --cpu=5T build armcc --cpu=5T --gnu build $ARMCLANG --target=arm-arm-none-eabi check_asm() { rm -f aria.o build "$@" arm-none-eabi-objdump -d aria.o | grep rev16 } check_asm arm-none-eabi-gcc -march=armv6-m -mthumb check_asm arm-none-eabi-gcc -march=armv7-m -mthumb check_asm arm-none-eabi-gcc -march=armv8-m.base -mthumb check_asm arm-none-eabi-gcc -march=armv7-a -mthumb check_asm arm-none-eabi-gcc -march=armv8-a -mthumb check_asm arm-none-eabi-gcc -march=armv7-a -marm check_asm arm-none-eabi-gcc -march=armv8-a -marm check_asm clang --target=arm-none-eabi -march=armv6-m check_asm clang --target=arm-none-eabi -march=armv7-a check_asm clang --target=arm-none-eabi -march=armv7-m check_asm clang --target=arm-none-eabi -march=armv7-r check_asm clang --target=arm-none-eabi -march=armv8-a check_asm armcc -O0 --cpu=6-M check_asm armcc -O0 --cpu=7-M check_asm armcc -O0 --cpu=6 check_asm armcc -O0 --cpu=7-A check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv6-m check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv7-a check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv7-m check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv7-r check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv8-a check_asm $ARMCLANG --target=arm-arm-none-eabi -march=armv8-m.base