This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via feb9f08cfe8ddd1fd4fb62265e17ee35147ab268 (commit)
via 4ab024d22980cf493dc95a089353df6ebc743f46 (commit)
from adedda211de69fa0fa09af167aa327d4550f497e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit feb9f08cfe8ddd1fd4fb62265e17ee35147ab268
Author: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
Date: Sun Mar 20 17:58:35 2016 +0100
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(a)free-electrons.com>
commit 4ab024d22980cf493dc95a089353df6ebc743f46
Author: Max Filippov <jcmvbkbc(a)gmail.com>
Date: Tue Mar 22 02:13:05 2016 +0300
xtensa: fix __sigsetjmp call12 case
Register window saving loop in __sigsetjmp incorrectly calculates offset
in the jmp_buf in case it was called with call12. The bug was introduced
in commit f4b1b7ade7971141 "xtensa: fix setjmp that didn't save all
registers correctly".
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
-----------------------------------------------------------------------
Summary of changes:
Rules.mak | 1 -
extra/Configs/Config.arm | 22 ----------------------
libc/sysdeps/linux/arm/bits/arm_bx.h | 10 ++++------
libc/sysdeps/linux/arm/clone.S | 2 +-
libc/sysdeps/linux/xtensa/setjmp.S | 2 +-
.../linuxthreads.old/sysdeps/arm/pt-machine.h | 7 +++----
6 files changed, 9 insertions(+), 35 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index fc53ad1..dc1a02e 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -392,7 +392,6 @@ endif
ifeq ($(TARGET_ARCH),arm)
CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN)+=-mlittle-endian
CPU_CFLAGS-$(ARCH_BIG_ENDIAN)+=-mbig-endian
- CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
ifeq ($(TARGET_ARCH),metag)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 00cf982..0d02e3f 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -24,25 +24,3 @@ config CONFIG_ARM_EABI
If you say 'n' here, then the library will be built for the
old Linux ABI.
-
-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
- default n
- help
- Say 'y' to use LDREX/STREX ASM ops.
diff --git a/libc/sysdeps/linux/arm/bits/arm_bx.h b/libc/sysdeps/linux/arm/bits/arm_bx.h
index 2c29089..1c775b6 100644
--- a/libc/sysdeps/linux/arm/bits/arm_bx.h
+++ b/libc/sysdeps/linux/arm/bits/arm_bx.h
@@ -23,13 +23,11 @@
#error Please include features.h first
#endif /* features.h not yet included */
-#if defined(__USE_BX__)
-# if (__ARM_ARCH <= 4 && !defined __ARM_ARCH_4T__)
-# error Use of BX was requested, but is not available on the target processor.
-# endif /* ARCH level */
-#endif /* __USE_BX__ */
+#if __ARM_ARCH > 4 || defined (__ARM_ARCH_4T__)
+# define ARCH_HAS_BX
+#endif
-#if defined(__USE_BX__) && (__ARM_ARCH > 4 || (__ARM_ARCH == 4 &&
defined __ARM_ARCH_4T__))
+#if defined(ARCH_HAS_BX)
# define BX(reg) bx reg
# define BXC(cond, reg) bx##cond reg
#else
diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S
index b4c7d8a..fd7590d 100644
--- a/libc/sysdeps/linux/arm/clone.S
+++ b/libc/sysdeps/linux/arm/clone.S
@@ -69,7 +69,7 @@ __clone:
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
-#if defined(__USE_BX__)
+#if defined(ARCH_HAS_BX)
ldr r1, [sp]
bl 2f @ blx r1
#else
diff --git a/libc/sysdeps/linux/xtensa/setjmp.S b/libc/sysdeps/linux/xtensa/setjmp.S
index 862bf67..b8152fd 100644
--- a/libc/sysdeps/linux/xtensa/setjmp.S
+++ b/libc/sysdeps/linux/xtensa/setjmp.S
@@ -122,7 +122,7 @@ ENTRY (__sigsetjmp)
l32i a4, a6, 12
s32i a7, a5, 8
s32i a4, a5, 12
- addi a5, a6, 16
+ addi a5, a5, 16
addi a6, a6, 16
blt a6, a8, .Lsjloop
.Lendsj:
diff --git a/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
b/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
index 2b877f9..fc17e9b 100644
--- a/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
+++ b/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
@@ -28,8 +28,7 @@
# define PT_EI __extern_always_inline
#endif
-#if defined(__thumb__)
-#if defined(__USE_LDREXSTREX__)
+#if defined(__thumb2__)
PT_EI long int ldrex(int *spinlock)
{
long int ret;
@@ -63,7 +62,7 @@ testandset (int *spinlock)
return ret;
}
-#else /* __USE_LDREXSTREX__ */
+#elif defined(__thumb__)
/* This will not work on ARM1 or ARM2 because SWP is lacking on those
machines. Unfortunately we have no way to detect this at compile
@@ -88,7 +87,7 @@ PT_EI long int testandset (int *spinlock)
: "0"(1), "r"(spinlock));
return ret;
}
-#endif
+
#else /* __thumb__ */
PT_EI long int testandset (int *spinlock);
hooks/post-receive
--
uClibc-ng - small C library for embedded systems