Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143169959
D5550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D5550.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -183,7 +183,7 @@
_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}
@@ -360,7 +360,7 @@
.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
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -193,7 +193,6 @@
arm \
armeb/arm \
armv6/arm \
- armv6hf/arm \
i386 \
i386/pc98 \
mips \
Index: gnu/usr.bin/binutils/Makefile.inc0
===================================================================
--- gnu/usr.bin/binutils/Makefile.inc0
+++ 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
Index: gnu/usr.bin/cc/Makefile.tgt
===================================================================
--- gnu/usr.bin/cc/Makefile.tgt
+++ 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
Index: gnu/usr.bin/gdb/Makefile.inc
===================================================================
--- gnu/usr.bin/gdb/Makefile.inc
+++ gnu/usr.bin/gdb/Makefile.inc
@@ -21,7 +21,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
Index: gnu/usr.bin/gdb/libgdb/Makefile
===================================================================
--- gnu/usr.bin/gdb/libgdb/Makefile
+++ 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
Index: lib/clang/clang.build.mk
===================================================================
--- lib/clang/clang.build.mk
+++ lib/clang/clang.build.mk
@@ -21,16 +21,19 @@
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}\"
Index: lib/libc/Makefile
===================================================================
--- lib/libc/Makefile
+++ lib/libc/Makefile
@@ -101,7 +101,8 @@
.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
Index: lib/libc/arm/Makefile.inc
===================================================================
--- lib/libc/arm/Makefile.inc
+++ lib/libc/arm/Makefile.inc
@@ -11,7 +11,7 @@
.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
Index: lib/libc/arm/aeabi/Makefile.inc
===================================================================
--- lib/libc/arm/aeabi/Makefile.inc
+++ 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
Index: lib/libc/arm/gen/Makefile.inc
===================================================================
--- lib/libc/arm/gen/Makefile.inc
+++ lib/libc/arm/gen/Makefile.inc
@@ -7,7 +7,7 @@
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
Index: lib/libcompiler_rt/Makefile
===================================================================
--- lib/libcompiler_rt/Makefile
+++ lib/libcompiler_rt/Makefile
@@ -197,9 +197,10 @@
.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
Index: lib/msun/arm/Makefile.inc
===================================================================
--- lib/msun/arm/Makefile.inc
+++ 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
Index: lib/msun/arm/fenv-vfp.c
===================================================================
--- lib/msun/arm/fenv-vfp.c
+++ 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"
Index: share/mk/bsd.cpu.mk
===================================================================
--- share/mk/bsd.cpu.mk
+++ share/mk/bsd.cpu.mk
@@ -306,14 +306,18 @@
. 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
Index: share/mk/local.meta.sys.mk
===================================================================
--- share/mk/local.meta.sys.mk
+++ share/mk/local.meta.sys.mk
@@ -44,7 +44,7 @@
.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
Index: share/mk/sys.mk
===================================================================
--- share/mk/sys.mk
+++ share/mk/sys.mk
@@ -13,7 +13,7 @@
# 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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 27, 9:37 PM (1 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28060476
Default Alt Text
D5550.diff (9 KB)
Attached To
Mode
D5550: Kill armv6hf. Make that the default. Allow CPUTYPE=soft to build the current soft-float abi libraries.
Attached
Detach File
Event Timeline
Log In to Comment