summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--Makefile.inc11
-rw-r--r--UPDATING8
-rw-r--r--gnu/usr.bin/binutils/Makefile.inc02
-rw-r--r--gnu/usr.bin/cc/Makefile.tgt2
-rw-r--r--gnu/usr.bin/gdb/Makefile.inc2
-rw-r--r--gnu/usr.bin/gdb/libgdb/Makefile2
-rw-r--r--lib/clang/clang.build.mk11
-rw-r--r--lib/libc/Makefile3
-rw-r--r--lib/libc/arm/Makefile.inc2
-rw-r--r--lib/libc/arm/aeabi/Makefile.inc5
-rw-r--r--lib/libc/arm/gen/Makefile.inc2
-rw-r--r--lib/libcompiler_rt/Makefile5
-rw-r--r--lib/msun/arm/Makefile.inc2
-rw-r--r--lib/msun/arm/fenv-vfp.c4
-rw-r--r--share/mk/bsd.cpu.mk8
-rw-r--r--share/mk/local.meta.sys.mk2
-rw-r--r--share/mk/sys.mk2
18 files changed, 43 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index bc84faaa569ce..f4142b24664db 100644
--- a/Makefile
+++ b/Makefile
@@ -197,7 +197,7 @@ _MAKE+= MK_META_MODE=no
_TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/}
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
${TARGET_ARCH} != ${MACHINE_ARCH}
-_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/}
+_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/}
.endif
.if defined(TARGET) && !defined(_TARGET)
_TARGET=${TARGET}
@@ -374,7 +374,7 @@ worlds:
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
TARGETS?=amd64 arm arm64 i386 mips pc98 powerpc sparc64
_UNIVERSE_TARGETS= ${TARGETS}
-TARGET_ARCHES_arm?= arm armeb armv6 armv6hf
+TARGET_ARCHES_arm?= arm armeb armv6
TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32
TARGET_ARCHES_powerpc?= powerpc powerpc64
diff --git a/Makefile.inc1 b/Makefile.inc1
index 3fa5537c2485b..28650bcab38d1 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -219,7 +219,6 @@ KNOWN_ARCHES?= aarch64/arm64 \
arm \
armeb/arm \
armv6/arm \
- armv6hf/arm \
i386 \
i386/pc98 \
mips \
diff --git a/UPDATING b/UPDATING
index bc996c5258299..7e95716dbe7c4 100644
--- a/UPDATING
+++ b/UPDATING
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20160517:
+ The armv6 port now defaults to hard float ABI. Limited support
+ for running both hardfloat and soft float on the same system
+ is available using the libraries installed with -DWITH_LIBSOFT.
+ This has only been tested as an upgrade path for installworld
+ and packages may fail or need manual intervention to run. New
+ packages will be needed.
+
20160510:
Kernel modules compiled outside of a kernel build now default to
installing to /boot/modules instead of /boot/kernel. Many kernel
diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0
index a053f5f2a08c4..28062d5873939 100644
--- a/gnu/usr.bin/binutils/Makefile.inc0
+++ b/gnu/usr.bin/binutils/Makefile.inc0
@@ -7,7 +7,7 @@
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
.if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt
index ee5a7946452cf..63be261ff48d1 100644
--- a/gnu/usr.bin/cc/Makefile.tgt
+++ b/gnu/usr.bin/cc/Makefile.tgt
@@ -4,7 +4,7 @@
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc
index a27051c3ca266..34dc90797d083 100644
--- a/gnu/usr.bin/gdb/Makefile.inc
+++ b/gnu/usr.bin/gdb/Makefile.inc
@@ -23,7 +23,7 @@ OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/readline
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
diff --git a/gnu/usr.bin/gdb/libgdb/Makefile b/gnu/usr.bin/gdb/libgdb/Makefile
index 0e28bda284b24..ed00525fad3ff 100644
--- a/gnu/usr.bin/gdb/libgdb/Makefile
+++ b/gnu/usr.bin/gdb/libgdb/Makefile
@@ -4,7 +4,7 @@
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index 6bc4cdff16b74..a2ee0a515b7c1 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -21,16 +21,19 @@ CFLAGS+= -fno-strict-aliasing
TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
-.if ${TARGET_ARCH:Marm*hf*} != ""
+# Armv6 uses hard float abi, unless the CPUTYPE has soft in it.
+# arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
+# For all other targets, we stick with 'unknown'.
+.if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
TARGET_ABI= gnueabihf
-.elif ${TARGET_ARCH:Marm*} != ""
+.elif ${TARGET_ARCH:Marm*}
TARGET_ABI= gnueabi
.else
TARGET_ABI= unknown
.endif
-TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0
-BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-unknown-freebsd11.0
+TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0
+BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-freebsd11.0
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \
-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 3b72a1bbf32fd..e511c9b48186f 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -105,7 +105,8 @@ NOASM=
.include "${LIBC_SRCTOP}/rpc/Makefile.inc"
.include "${LIBC_SRCTOP}/uuid/Makefile.inc"
.include "${LIBC_SRCTOP}/xdr/Makefile.inc"
-.if (${LIBC_ARCH} == "arm" && ${MACHINE_ARCH} != "armv6hf") ||\
+.if (${LIBC_ARCH} == "arm" && \
+ (${MACHINE_ARCH:Marmv6*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \
${LIBC_ARCH} == "mips"
.include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
.endif
diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc
index 418f54d1d51ad..c263ae715e294 100644
--- a/lib/libc/arm/Makefile.inc
+++ b/lib/libc/arm/Makefile.inc
@@ -11,7 +11,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map
.include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc"
-.if ${MACHINE_ARCH:Marm*hf*} != ""
+.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map
.endif
diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc
index 612e47fb9d3a0..b036db88dfa6b 100644
--- a/lib/libc/arm/aeabi/Makefile.inc
+++ b/lib/libc/arm/aeabi/Makefile.inc
@@ -5,13 +5,14 @@
SRCS+= aeabi_atexit.c \
aeabi_unwind_cpp.c \
aeabi_unwind_exidx.c
-.if ${MACHINE_ARCH:Marm*hf*} == ""
+.if (${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \
+ ${MACHINE_ARCH:Marmv6*} == ""
SRCS+= aeabi_asm_double.S \
aeabi_asm_float.S \
aeabi_double.c \
aeabi_float.c
.endif
-.if ${MACHINE_ARCH:Marmv6*}
+.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
SRCS+= aeabi_vfp_double.S \
aeabi_vfp_float.S
.endif
diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc
index c0f53927bc817..615ee17dc4494 100644
--- a/lib/libc/arm/gen/Makefile.inc
+++ b/lib/libc/arm/gen/Makefile.inc
@@ -7,7 +7,7 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \
arm_initfini.c \
trivial-getcontextx.c
-.if ${MACHINE_ARCH} == "armv6hf"
+.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \
fpsetround_vfp.c fpsetsticky_vfp.c
.endif
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index 8959225e409f2..011bead3995ff 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -199,9 +199,10 @@ SRCF+= stdatomic
.endif
.for file in ${SRCF}
-. if ${MACHINE_ARCH:Marm*hf*} != "" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
+.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") && \
+ exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
SRCS+= ${file}vfp.S
-. elif !(${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH:Marm*hf*} == "") && exists(${CRTSRC}/${CRTARCH}/${file}.S)
+. elif exists(${CRTSRC}/${CRTARCH}/${file}.S)
SRCS+= ${file}.S
. else
SRCS+= ${file}.c
diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc
index 535d5ea3f12f9..eb73e63b47cd9 100644
--- a/lib/msun/arm/Makefile.inc
+++ b/lib/msun/arm/Makefile.inc
@@ -3,7 +3,7 @@
LDBL_PREC = 53
SYM_MAPS += ${.CURDIR}/arm/Symbol.map
-.if ${TARGET_ARCH} == "armv6"
+.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
ARCH_SRCS = fenv-softfp.c fenv-vfp.c
.endif
diff --git a/lib/msun/arm/fenv-vfp.c b/lib/msun/arm/fenv-vfp.c
index fd615f3a96d5f..ee02ae8458ca0 100644
--- a/lib/msun/arm/fenv-vfp.c
+++ b/lib/msun/arm/fenv-vfp.c
@@ -28,6 +28,8 @@
#define FENV_MANGLE(x) __vfp_ ##x
#include "fenv-mangle.h"
-#define __ARM_PCS_VFP
+#ifndef __ARM_PCS_VFP
+#define __ARM_PCS_VFP 1
+#endif
#include "fenv.c"
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index 7081c9eb93902..ff64d7d309cf0 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -309,14 +309,18 @@ MACHINE_CPU += arm
. if ${MACHINE_ARCH:Marmv6*} != ""
MACHINE_CPU += armv6
. endif
-# armv6 is a hybrid. It uses the softfp ABI, but doesn't emulate
+# armv6 is a hybrid. It can use the softfp ABI, but doesn't emulate
# floating point in the general case, so don't define softfp for
# it at this time. arm and armeb are pure softfp, so define it
# for them.
. if ${MACHINE_ARCH:Marmv6*} == ""
MACHINE_CPU += softfp
. endif
-.if ${MACHINE_ARCH} == "armv6"
+# Normally armv6 is hard float ABI from FreeBSD 11 onwards. However
+# when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow
+# building of soft-float ABI libraries. In this case, we have to
+# add the -mfloat-abi=softfp to force that.
+.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
# Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI
# not a nice optimization.
CFLAGS += -mfloat-abi=softfp
diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk
index 6088c75e871b5..55febe012f784 100644
--- a/share/mk/local.meta.sys.mk
+++ b/share/mk/local.meta.sys.mk
@@ -43,7 +43,7 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T}
.endif
# from src/Makefile (for universe)
-TARGET_ARCHES_arm?= arm armeb armv6 armv6hf
+TARGET_ARCHES_arm?= arm armeb armv6
TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el
TARGET_ARCHES_powerpc?= powerpc powerpc64
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 3b2d472a23c5d..7aea72fc1acce 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -13,7 +13,7 @@ unix ?= We run FreeBSD, not UNIX.
# and/or endian. This is called MACHINE_CPU in NetBSD, but that's used
# for something different in FreeBSD.
#
-MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/}
+MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/}
.endif