1 Improve the ARM detection to work on Thumb-only architecture
3 The ARM-specific assembly code doesn't build on Thumb-only
4 architectures such as ARMv7-M, but the configure script assumes that
5 if the host tuple is arm*, then it can build and use the ARM optimized
8 This patch improves the configure.ac detection logic, by building one
9 of the instruction of the optimized assembly code, and using this to
10 decide whether or not the optimizations should be enabled.
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15 ===================================================================
20 AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
23 - AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
24 + AC_TRY_LINK([], [asm(".syntax divided\nstmfd sp!,{r4-r11,lr}")],
25 + [AC_DEFINE([ARCH_ARM],,[ARM architecture])
26 + use_arm_optimization=yes],
27 + [use_arm_optimization=no])
29 elif test x"$CC" = x"tendracc"; then
30 dnl TenDRA portability checking compiler
35 -AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
36 +AM_CONDITIONAL(ARCH_ARM, test "${use_arm_optimization}" = "yes")
38 dnl Checks for libtool - this must be done after we set cflags