Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain: check ARM EABI vs. EABIhf for external toolchains
@ 2013-07-16 22:06 Thomas Petazzoni
  2013-07-16 22:39 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-07-16 22:06 UTC (permalink / raw)
  To: buildroot

Following the introduction of the support of EABIhf as a second ARM
ABI, it is important to check whether the external toolchain provided
by the user actually uses the ABI that has been selected in the
Buildroot configuration. This commit introduces such a check, using a
similar solution to the one that was used to check OABI vs. EABI in
the past.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/helpers.mk | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 95217e7..dc21f8a 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -280,8 +280,20 @@ check_uclibc = \
 check_arm_abi = \
 	__CROSS_CC=$(strip $1) ; \
 	EXT_TOOLCHAIN_TARGET=`LANG=C $${__CROSS_CC} -v 2>&1 | grep ^Target | cut -f2 -d ' '` ; \
-	if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \
-		echo "External toolchain uses the unsuported OABI" ; \
+	if echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi$$' ; then \
+		EXT_TOOLCHAIN_ABI="eabi" ; \
+	elif echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabihf$$' ; then \
+		EXT_TOOLCHAIN_ABI="eabihf" ; \
+	else \
+		echo "Unsupported ABI of the external toolchain" ; \
+		exit 1 ; \
+	fi ; \
+	if [ x$(BR2_ARM_EABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "eabihf" ] ; then \
+		echo "Incorrect ABI setting: EABI selected, but toolchain uses EABIhf" ; \
+		exit 1 ; \
+	fi ; \
+	if [ x$(BR2_ARM_EABIHF) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "eabi" ] ; then \
+		echo "Incorrect ABI setting: EABIhf selected, but toolchain uses EABI" ; \
 		exit 1 ; \
 	fi
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-17  7:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 22:06 [Buildroot] [PATCH] toolchain: check ARM EABI vs. EABIhf for external toolchains Thomas Petazzoni
2013-07-16 22:39 ` Yann E. MORIN
2013-07-17  5:27   ` Peter Korsgaard
2013-07-17  7:25   ` Thomas Petazzoni
2013-07-17  7:45     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox