mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: musl@lists.openwall.com
Cc: Andre McCurdy <armccurdy@gmail.com>
Subject: [PATCH 1/2] arm: respect both __ARM_ARCH_6KZ__ and __ARM_ARCH_6ZK__ macros
Date: Wed, 18 Apr 2018 18:51:43 -0700	[thread overview]
Message-ID: <1524102704-8973-2-git-send-email-armccurdy@gmail.com> (raw)
In-Reply-To: <1524102704-8973-1-git-send-email-armccurdy@gmail.com>

__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



  reply	other threads:[~2018-04-19  1:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  1:51 [PATCH 0/2] Improved feature testing for ARMv6 Andre McCurdy
2018-04-19  1:51 ` Andre McCurdy [this message]
2018-04-19  1:51 ` [PATCH 2/2] arm: enable a_ll and a_sc helper functions when building for ARMv6T2 Andre McCurdy
2018-04-19 16:38   ` Rich Felker
2018-04-19 19:14     ` Andre McCurdy
2018-04-19 19:25       ` Rich Felker
2018-04-19 20:38         ` Andre McCurdy
2018-04-19 21:32           ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524102704-8973-2-git-send-email-armccurdy@gmail.com \
    --to=armccurdy@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).