kumquat-buildroot/package/uclibc/0002-arm-remove-USE_BX-option.patch
Thomas Petazzoni 15a2901d36 uclibc: add patches to simplify Thumb handling
This commit adds a number of patches to uClibc that radically
simplifies the Thumb handling. uClibc currently has three options that
you need to toggle on Thumb configurations depending on the specific
ARM CPU being targeted.

However, it turns out that none of those options are necessary:

 - USE_BX can simply be guessed by looking at the ARM core being
   used. The bx instruction is available for all ARM cores >=
   ARMv4T. This is exactly what glibc is doing.

 - USE_LDREXSTREX can also be guessed by looking at the ARM core being
   used: whenever you have Thumb2, ldrex/strex is available.

 - COMPILE_IN_THUMB becomes useless, since all it does is passing
   -mthumb. But just like the uClibc config options to set
   --march=<foo> have been removed a long time ago, there's no need to
   -have an option to pass -mthumb.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-30 00:14:48 +02:00

41 lines
1.2 KiB
Diff

From b18d26fe870cbe95bb9c9fe43767d8688bad9596 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 17 Mar 2016 22:41:44 +0100
Subject: [PATCH] arm: remove USE_BX option
Now that __USE_BX__ is no longer used anywhere, we can get rid of the
configuration option.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
extra/Configs/Config.arm | 8 --------
1 file changed, 8 deletions(-)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 00cf982..6090ead 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -27,19 +27,11 @@ config CONFIG_ARM_EABI
config COMPILE_IN_THUMB_MODE
bool "Build using Thumb mode"
- select USE_BX
select USE_LDREXSTREX
help
Say 'y' here to force building uClibc in thumb mode.
Say 'n' to use your compiler's default mode.
-config USE_BX
- bool "Use BX in function return"
- help
- Say 'y' to use BX to return from functions on your thumb-aware
- processor. Say 'y' if you need to use interworking. Say 'n' if not.
- It is safe to say 'y' even if you're not doing interworking.
-
config USE_LDREXSTREX
bool "Use load-store exclusive ASM ops (not supported in SmartFusion)"
depends on COMPILE_IN_THUMB_MODE
--
2.6.4