All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] toolchain-external: Fix EABIhf check
@ 2014-01-14  8:21 Stefan Sørensen
  2014-01-14  8:21 ` [Buildroot] [PATCH 2/3] toolchain-external: Fix ld.so naming with uClibc and EABIhf Stefan Sørensen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefan Sørensen @ 2014-01-14  8:21 UTC (permalink / raw)
  To: buildroot

Currently the check for EABI/EABIhf toolchains looks for the
Tag_ABI_VFP_args attribute in the crt1.o file which gcc adds
in a EABIhw toolchain. The crt1.o is however often not compiled
from c but assembler, and will then always failt he EABIhf check.

Fix by compiling a temporary .c file and checking for the
attribute.

Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
---
 toolchain/helpers.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index faa9d90..0accb7b 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -284,12 +284,15 @@ check_arm_abi = \
 		echo "External toolchain uses the unsuported OABI" ; \
 		exit 1 ; \
 	fi ; \
-	EXT_TOOLCHAIN_CRT1=`LANG=C $${__CROSS_CC} -print-file-name=crt1.o` ; \
-	if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_CRT1} | grep -q "Tag_ABI_VFP_args:" ; then \
+	TEMP_C_FILE=`mktemp --tmpdir --suffix=.c`; \
+	touch $${TEMP_C_FILE}; \
+	$${__CROSS_CC} -c -o $${TEMP_C_FILE}.o $${TEMP_C_FILE}; \
+	if $${__CROSS_READELF} -A $${TEMP_C_FILE}.o | grep -q "Tag_ABI_VFP_args:" ; then \
 		EXT_TOOLCHAIN_ABI="eabihf" ; \
 	else \
 		EXT_TOOLCHAIN_ABI="eabi" ; \
 	fi ; \
+	rm -f $${TEMP_C_FILE} $${TEMP_C_FILE}.o; \
 	if [ "$(BR2_ARM_EABI)" = "y" -a "$${EXT_TOOLCHAIN_ABI}" = "eabihf" ] ; then \
 		echo "Incorrect ABI setting: EABI selected, but toolchain uses EABIhf" ; \
 		exit 1 ; \
-- 
1.8.4.2

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

end of thread, other threads:[~2014-01-28 21:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14  8:21 [Buildroot] [PATCH 1/3] toolchain-external: Fix EABIhf check Stefan Sørensen
2014-01-14  8:21 ` [Buildroot] [PATCH 2/3] toolchain-external: Fix ld.so naming with uClibc and EABIhf Stefan Sørensen
2014-01-15 21:52   ` Peter Korsgaard
2014-01-14  8:21 ` [Buildroot] [PATCH 3/3] protobuf-c: Don't require protobuf on target Stefan Sørensen
2014-01-15 21:24   ` Peter Korsgaard
2014-01-28 21:57 ` [Buildroot] [PATCH 1/3] toolchain-external: Fix EABIhf check Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.