summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@anciens.enib.fr>2011-01-09 01:45:09 +0100
committerKhem Raj <raj.khem@gmail.com>2011-06-11 00:12:22 -0700
commit7a246fda8e3bd2067d44e01c30c8ce761dad39a8 (patch)
treedfff27e27af92783d8f81176ad24717e4fbdf0d2 /libc
parent3862c65a05983b2b18cb7884a124a905828f7a18 (diff)
ARM: detect BX availibility at build time
The "use BX" option is now a suggestion that BX be used if available. Use a macro to detect if BX is available at build time. If so, and the user requested it be used, then use it. Otherwise, error out. Macro courtesy Khem RAJ: http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Cc: Khem Raj <raj.khem@gmail.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arm/bits/arm_asm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h
index 1d87df6eb..921c9a3c9 100644
--- a/libc/sysdeps/linux/arm/bits/arm_asm.h
+++ b/libc/sysdeps/linux/arm/bits/arm_asm.h
@@ -24,5 +24,12 @@
#define THUMB1_ONLY 1
#endif
-#endif /* _ARM_ASM_H */
+#if defined(__USE_BX__)
+# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
+ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
+ )
+# error Use of BX was requested, but is not available on the target processor.
+# endif /* ARCH level */
+#endif /* __USE_BX__ */
+#endif /* _ARM_ASM_H */