From 1d2c1366bfbed3599a134c76ed5d3cbdd7f47811 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Mon, 19 Jan 2015 04:56:17 +0000 Subject: [PATCH] For armv6 builds, add -mfloat-abi=softfp. This tells the compiler it can use floating point hardware instructions (because all armv6/7 systems we support have fp hardware), but it passes args using a soft-float compatible ABI. This should give noticible performance improvement (but not as much as using the armv6hf arch). --- share/mk/bsd.cpu.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index a3b9c1fd016d..da5f5f2d38e0 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -251,6 +251,10 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 CFLAGS += -G0 .endif +.if ${MACHINE_ARCH} == "armv6" +_CPUCFLAGS += -mfloat-abi=softfp +.endif + # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS)