arm: simplify handling of Thumb related options
commitfeb9f08cfe8ddd1fd4fb62265e17ee35147ab268
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 20 Mar 2016 16:58:35 +0000 (20 17:58 +0100)
committerWaldemar Brodkorb <wbx@openadk.org>
Thu, 31 Mar 2016 17:35:13 +0000 (31 19:35 +0200)
treeda452e5e8aa09cd6ef0c9d9d83033a8d4f3d623c
parent4ab024d22980cf493dc95a089353df6ebc743f46
arm: simplify handling of Thumb related options

Currently, the Thumb support on ARM has three related Config.in
options, which are not trivial for users to understand, and are in
fact not needed:

 - The USE_BX option is not needed: knowing whether BX is available or
   not is easy. If you have an ARM > v4 or ARMv4T, then BX is
   available, otherwise it's not. This is the logic used in glibc.

 - The USE_LDREXSTREX option is not needed: whenever Thumb2 is
   available, ldrex/strex are available, so we can simply rely on
   __thumb2__ to determine whether ldrex/strex should be used, without
   requiring a Config.in option.

 - Once USE_BX and USE_LDREXSTREX are removed, the only thing left
   that COMPILE_IN_THUMB does is to set -mthumb. This makes the option
   unnecessary, as on ARM at least, the user is already supposed to
   pass -march=<foo> or other compiler options tuning the library for
   a specific ARM variant. There is no reason to do otherwise for
   Thumb, which allows to get rid of the COMPILE_IN_THUMB option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Rules.mak
extra/Configs/Config.arm
libc/sysdeps/linux/arm/bits/arm_bx.h
libc/sysdeps/linux/arm/clone.S
libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h