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
This commit is contained in:
Warner Losh 2017-11-07 09:47:05 +00:00
parent 06193f0be0
commit 8f3b60c5f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325508

View File

@ -2,12 +2,12 @@
.include <bsd.compiler.mk>
.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