Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1524102704-8973-2-git-send-email-armccurdy@gmail.com>
Date: Wed, 18 Apr 2018 18:51:43 -0700
From: Andre McCurdy <armccurdy@...il.com>
To: musl@...ts.openwall.com
Cc: Andre McCurdy <armccurdy@...il.com>
Subject: [PATCH 1/2] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros

__ARM_ARCH_6ZK__ is a gcc specific historical typo which may not be
defined by other compilers.

  https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02237.html

To avoid unexpected results when building for ARMv6KZ with clang, the
correct form of the macro (ie 6KZ) needs to be tested. The incorrect
form of the macro (ie 6ZK) still needs to be tested for compatibility
with pre-2015 versions of gcc.
---
 arch/arm/atomic_arch.h  | 2 +-
 arch/arm/pthread_arch.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index 72fcddb..5ff1be1 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -7,7 +7,7 @@
 extern uintptr_t __attribute__((__visibility__("hidden")))
 	__a_cas_ptr, __a_barrier_ptr;
 
-#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
+#if ((__ARM_ARCH_6__ || __ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
  || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ ||  __ARM_ARCH >= 7
 
 #define a_ll a_ll
diff --git a/arch/arm/pthread_arch.h b/arch/arm/pthread_arch.h
index 197752e..6657e19 100644
--- a/arch/arm/pthread_arch.h
+++ b/arch/arm/pthread_arch.h
@@ -1,4 +1,4 @@
-#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) \
+#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \
  || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
 
 static inline pthread_t __pthread_self()
-- 
1.9.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.