diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-07-16 10:03:22 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2013-07-16 15:28:03 +0200 |
commit | 85d0769ac5cb50527c5bbab4417262064971073f (patch) | |
tree | 06b04d5cd48397df61b840e78876b98263796a8b /package/gcc | |
parent | d2e3cc389d47f3f1f3aa5e92e2e00deb9f2f27ba (diff) | |
download | buildroot-85d0769ac5cb50527c5bbab4417262064971073f.tar.gz buildroot-85d0769ac5cb50527c5bbab4417262064971073f.zip |
arch/arm: add support for Thumb2
Until now, we were using the default ARM instruction set, as used by
the toolchain: the 32 bits ARM instruction set for the internal
backend, and for external toolchain, whatever default was chosen when
the toolchain was generated.
This commit adds support for the Thumb2 instruction set. To do so, it:
* provides a menuconfig choice between ARM and Thumb2. The choice is
only shown when Thumb2 is supported, i.e on ARMv7-A CPUs.
* passes the --with-mode={arm,thumb} option when building gcc in the
internal backend. This tells the compiler which type of
instructions it should generate.
* passes the m{arm,thumb} option in the external toolchain
wrapper. ARM and Thumb2 code can freely be mixed together, so the
fact that the C library has been built either ARM or Thumb2 and
that the rest of the code is built Thumb2 or ARM is not a problem.
[Peter: fix empty BR2_GCC_TARGET_MODE check]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/gcc')
-rw-r--r-- | package/gcc/gcc.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index bfc41a4c6e..ae2a363510 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -177,6 +177,11 @@ ifneq ($(GCC_TARGET_FLOAT_ABI),) HOST_GCC_COMMON_CONF_OPT += --with-float=$(GCC_TARGET_FLOAT_ABI) endif +GCC_TARGET_MODE = $(call qstrip,$(BR2_GCC_TARGET_MODE)) +ifneq ($(GCC_TARGET_MODE),) +HOST_GCC_COMMON_CONF_OPT += --with-mode=$(GCC_TARGET_MODE) +endif + # Branding works on >= 4.3 ifneq ($(findstring x4.2.,x$(GCC_VERSION)),x4.2.) HOST_GCC_COMMON_CONF_OPT += \ |