summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.cpu.mk
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-08-25 17:11:49 +0000
committerimp <imp@FreeBSD.org>2015-08-25 17:11:49 +0000
commit9dfd4b4113cdfe6327e7d1b2e730ba6fe47b4d72 (patch)
tree4ef1f304090631d98e3323288c0b4e73961a78f5 /share/mk/bsd.cpu.mk
parent7f8498f3b5f4d3e9a382f24219fcb8fdc2436dd4 (diff)
downloadFreeBSD-src-9dfd4b4113cdfe6327e7d1b2e730ba6fe47b4d72.zip
FreeBSD-src-9dfd4b4113cdfe6327e7d1b2e730ba6fe47b4d72.tar.gz
Add softfp to MACHINE_CPU more often when we're compiling for soft
float targets. It is added for booke on powerpc and all arm with hf in the string. Also add arm to all arm builds and armv6 to armv6 and newer builds. PR: 202641
Diffstat (limited to 'share/mk/bsd.cpu.mk')
-rw-r--r--share/mk/bsd.cpu.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index 60f775f..f971043 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -150,6 +150,7 @@ _CPUCFLAGS = -mcpu=ultrasparc3
# unordered list to make it easy for client makefiles to test for the
# presence of a CPU feature.
+########## i386
. if ${MACHINE_CPUARCH} == "i386"
. if ${CPUTYPE} == "bdver4"
MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586
@@ -218,6 +219,7 @@ MACHINE_CPU = 3dnow mmx
MACHINE_CPU = mmx
. endif
MACHINE_CPU += i486
+########## amd64
. elif ${MACHINE_CPUARCH} == "amd64"
. if ${CPUTYPE} == "bdver4"
MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3
@@ -253,10 +255,12 @@ MACHINE_CPU = ssse3 sse3
MACHINE_CPU = sse3
. endif
MACHINE_CPU += amd64 sse2 sse mmx
+########## powerpc
. elif ${MACHINE_ARCH} == "powerpc"
. if ${CPUTYPE} == "e500"
-MACHINE_CPU = booke
+MACHINE_CPU = booke softfp
. endif
+########## sparc64
. elif ${MACHINE_ARCH} == "sparc64"
. if ${CPUTYPE} == "v9"
MACHINE_CPU = v9
@@ -272,11 +276,21 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3
CFLAGS += -G0
.endif
+########## arm
+.if ${MACHINE_CPUARCH} == "arm"
+MACHINE_CPU += arm
+. if ${MACHINE_ARCH:Marmv6*} != ""
+MACHINE_CPU += armv6
+. endif
+. if ${MACHINE_ARCH:M*hf} == ""
+MACHINE_CPU += softfp
+. endif
.if ${MACHINE_ARCH} == "armv6"
# Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI
# not a nice optimization.
CFLAGS += -mfloat-abi=softfp
.endif
+.endif
# NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk
OpenPOWER on IntegriCloud