Skip to content

Commit 1db3418

Browse files
committed
Also use -mno-thumb for 32-bit ARM
1 parent 4ad01d6 commit 1db3418

3 files changed

Lines changed: 49 additions & 2 deletions

File tree

Doc/using/configure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ also be used to improve performance.
789789

790790
- ``-fno-omit-frame-pointer`` and/or ``-mno-omit-leaf-frame-pointer``
791791
are added when the compiler supports them,
792-
- ``-marm`` is added on 32-bit ARM when supported,
792+
- ``-marm`` and/or ``-mno-thumb`` is added on 32-bit ARM when supported,
793793
- on s390x platforms, when supported, ``-mbackchain`` is added *instead*
794794
of the above frame pointer flags
795795

configure

Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,9 +2549,13 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
25492549
frame_pointer_cflags="$frame_pointer_cflags -mno-omit-leaf-frame-pointer"
25502550
], [], [-Werror])
25512551
AS_CASE([$host_cpu], [arm|armv*], [
2552+
dnl GCC uses "-marm"; clang uses "-mno-thumb"
25522553
AX_CHECK_COMPILE_FLAG([-marm], [
25532554
frame_pointer_cflags="$frame_pointer_cflags -marm"
25542555
], [], [-Werror])
2556+
AX_CHECK_COMPILE_FLAG([-mno-thumb], [
2557+
frame_pointer_cflags="$frame_pointer_cflags -mno-thumb"
2558+
], [], [-Werror])
25552559
])
25562560
AS_CASE([$host_cpu], [s390*], [
25572561
AX_CHECK_COMPILE_FLAG([-mbackchain], [

0 commit comments

Comments
 (0)