From 8f3b60c5f1235c8f76d17b48cbcc5bcdf7eefc29 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 7 Nov 2017 09:47:05 +0000 Subject: Correct the detection of hard float arm * Don't test MACHINE, it's irrelevant to userland and should never be used in userland Makefiles. * If we match armv[67] and CPUTYPE is undefined OR it doesn't have 'soft' in it, choose armhf. * Add a note that the soft float on armv[67] may be broken. Sponsored by: Netflix --- lib/libclang_rt/Makefile.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 2db3d6ff03f1..0f08d8054505 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -2,12 +2,12 @@ .include -.if ${MACHINE} == "arm" +# armv[67] is a bit special since we allow a soft-floating version via +# CPUTYPE matching *soft*. This variant is may not actually work though. .if ${MACHINE_ARCH:Marmv[67]*} != "" && \ - (defined(CPUTYPE) && ${CPUTYPE:M*soft*} == "") + (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") CRTARCH= armhf .endif -.endif CRTARCH?= ${MACHINE_CPUARCH:C/amd64/x86_64/} CRTSRC= ${SRCTOP}/contrib/compiler-rt -- cgit v1.3