Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Nov 2017 09:47:05 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325508 - head/lib/libclang_rt
Message-ID:  <201711070947.vA79l5Er003996@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Nov  7 09:47:05 2017
New Revision: 325508
URL: https://svnweb.freebsd.org/changeset/base/325508

Log:
  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

Modified:
  head/lib/libclang_rt/Makefile.inc

Modified: head/lib/libclang_rt/Makefile.inc
==============================================================================
--- head/lib/libclang_rt/Makefile.inc	Tue Nov  7 09:46:26 2017	(r325507)
+++ head/lib/libclang_rt/Makefile.inc	Tue Nov  7 09:47:05 2017	(r325508)
@@ -2,11 +2,11 @@
 
 .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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711070947.vA79l5Er003996>