aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolchain/helpers.mk16
1 files changed, 4 insertions, 12 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index ef60120713..81e02b7132 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -297,18 +297,10 @@ 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 \
- EXT_TOOLCHAIN_ABI="eabihf" ; \
- else \
- EXT_TOOLCHAIN_ABI="eabi" ; \
- fi ; \
- if [ "$(BR2_ARM_EABI)" = "y" -a "$${EXT_TOOLCHAIN_ABI}" = "eabihf" ] ; then \
- echo "Incorrect ABI setting: EABI selected, but toolchain uses EABIhf" ; \
- exit 1 ; \
- fi ; \
- if [ "$(BR2_ARM_EABIHF)" = "y" -a "$${EXT_TOOLCHAIN_ABI}" = "eabi" ] ; then \
- echo "Incorrect ABI setting: EABIhf selected, but toolchain uses EABI" ; \
+ if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - 2>/dev/null; then \
+ abistr_$(BR2_ARM_EABI)='EABI'; \
+ abistr_$(BR2_ARM_EABIHF)='EABIhf'; \
+ echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \
exit 1 ; \
fi