Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142182568
D12010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
14 KB
Referenced Files
None
Subscribers
None
D12010.diff
View Options
Index: head/Makefile
===================================================================
--- head/Makefile
+++ head/Makefile
@@ -435,7 +435,7 @@
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64
_UNIVERSE_TARGETS= ${TARGETS}
-TARGET_ARCHES_arm?= arm armeb armv6
+TARGET_ARCHES_arm?= arm armeb armv6 armv7
TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe
Index: head/Makefile.inc1
===================================================================
--- head/Makefile.inc1
+++ head/Makefile.inc1
@@ -398,6 +398,7 @@
arm \
armeb/arm \
armv6/arm \
+ armv7/arm \
i386 \
mips \
mipsel/mips \
@@ -614,7 +615,7 @@
BFLAGS+= -B${WORLDTMP}/usr/bin
.endif
.if ${TARGET} == "arm"
-.if ${TARGET_ARCH:Marmv6*} != "" && ${TARGET_CPUTYPE:M*soft*} == ""
+.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == ""
TARGET_ABI= gnueabihf
.else
TARGET_ABI= gnueabi
@@ -650,7 +651,7 @@
${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "")
LIBCOMPAT= 32
.include "Makefile.libcompat"
-.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6"
+.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != ""
LIBCOMPAT= SOFT
.include "Makefile.libcompat"
.endif
Index: head/Makefile.libcompat
===================================================================
--- head/Makefile.libcompat
+++ head/Makefile.libcompat
@@ -59,10 +59,10 @@
# -------------------------------------------------------------------
# soft-fp world
-.if ${TARGET_ARCH} == "armv6"
+.if ${TARGET_ARCH:Marmv[67]*} != ""
LIBSOFTCFLAGS= -DCOMPAT_SOFTFP
LIBSOFTCPUFLAGS= -mfloat-abi=softfp
-LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=armv6
+LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=${TARGET_ARCH}
LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP
.endif
Index: head/gnu/usr.bin/binutils/as/Makefile
===================================================================
--- head/gnu/usr.bin/binutils/as/Makefile
+++ head/gnu/usr.bin/binutils/as/Makefile
@@ -46,8 +46,11 @@
# DEO: why not used?
#SRCS+= itbl-ops.c
-.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb"
+.if ${TARGET_ARCH:Marmv6*} != ""
CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V6K
+.endif
+.if ${TARGET_ARCH:Marmv7*} != ""
+CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V7A
.endif
.if ${TARGET_CPUARCH} == "mips"
Index: head/gnu/usr.bin/cc/Makefile.inc
===================================================================
--- head/gnu/usr.bin/cc/Makefile.inc
+++ head/gnu/usr.bin/cc/Makefile.inc
@@ -34,8 +34,11 @@
.if ${TARGET_ARCH:Marm*eb} != ""
CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
.endif
-.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb"
+.if ${TARGET_ARCH:Marmv6*} != ""
CFLAGS += -DFREEBSD_ARCH_armv6
+.endif
+.if ${TARGET_ARCH:Marmv7*} != ""
+CFLAGS += -DFREEBSD_ARCH_armv7
.endif
.if ${TARGET_CPUARCH} == "mips"
Index: head/lib/clang/llvm.build.mk
===================================================================
--- head/lib/clang/llvm.build.mk
+++ head/lib/clang/llvm.build.mk
@@ -20,10 +20,10 @@
TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
-# Armv6 uses hard float abi, unless the CPUTYPE has soft in it.
+# Armv6 and armv7 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*} == "")
+.if ${TARGET_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
TARGET_ABI= -gnueabihf
.elif ${TARGET_ARCH:Marm*}
TARGET_ABI= -gnueabi
Index: head/lib/libc/Makefile
===================================================================
--- head/lib/libc/Makefile
+++ head/lib/libc/Makefile
@@ -110,7 +110,7 @@
.include "${LIBC_SRCTOP}/uuid/Makefile.inc"
.include "${LIBC_SRCTOP}/xdr/Makefile.inc"
.if (${LIBC_ARCH} == "arm" && \
- (${MACHINE_ARCH:Marmv6*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \
+ (${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \
(${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") || \
(${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "")
.include "${LIBC_SRCTOP}/softfloat/Makefile.inc"
Index: head/lib/libc/arm/Makefile.inc
===================================================================
--- head/lib/libc/arm/Makefile.inc
+++ head/lib/libc/arm/Makefile.inc
@@ -11,7 +11,7 @@
.include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc"
-.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
+.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map
.endif
Index: head/lib/libc/arm/aeabi/Makefile.inc
===================================================================
--- head/lib/libc/arm/aeabi/Makefile.inc
+++ head/lib/libc/arm/aeabi/Makefile.inc
@@ -5,14 +5,14 @@
SRCS+= aeabi_atexit.c \
aeabi_unwind_cpp.c \
aeabi_unwind_exidx.c
-.if (${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \
- ${MACHINE_ARCH:Marmv6*} == ""
+.if (${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \
+ ${MACHINE_ARCH:Marmv[67]*} == ""
SRCS+= aeabi_asm_double.S \
aeabi_asm_float.S \
aeabi_double.c \
aeabi_float.c
.endif
-.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
+.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
SRCS+= aeabi_vfp_double.S \
aeabi_vfp_float.S
.endif
Index: head/lib/libc/arm/gen/Makefile.inc
===================================================================
--- head/lib/libc/arm/gen/Makefile.inc
+++ head/lib/libc/arm/gen/Makefile.inc
@@ -7,7 +7,7 @@
arm_initfini.c \
trivial-getcontextx.c
-.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
+.if ${MACHINE_ARCH:Marmv[67]*} && (!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: head/lib/libc/sys/Makefile.inc
===================================================================
--- head/lib/libc/sys/Makefile.inc
+++ head/lib/libc/sys/Makefile.inc
@@ -124,7 +124,7 @@
CLEANFILES+= ${SASM} ${SPSEUDO}
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
- ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*}
+ ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv[67]*}
NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n'
.else
NOTE_GNU_STACK=''
Index: head/lib/libcompiler_rt/Makefile.inc
===================================================================
--- head/lib/libcompiler_rt/Makefile.inc
+++ head/lib/libcompiler_rt/Makefile.inc
@@ -204,7 +204,7 @@
.endif
.for file in ${SRCF}
-.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \
+.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \
&& exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
SRCS+= ${file}vfp.S
. elif exists(${CRTSRC}/${CRTARCH}/${file}.S)
Index: head/lib/msun/arm/Makefile.inc
===================================================================
--- head/lib/msun/arm/Makefile.inc
+++ head/lib/msun/arm/Makefile.inc
@@ -3,7 +3,7 @@
LDBL_PREC = 53
SYM_MAPS += ${.CURDIR}/arm/Symbol.map
-.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
+.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != ""
ARCH_SRCS = fenv-softfp.c fenv-vfp.c
.endif
Index: head/release/Makefile.mirrors
===================================================================
--- head/release/Makefile.mirrors
+++ head/release/Makefile.mirrors
@@ -57,7 +57,7 @@
.endif
.if defined(EMBEDDED) && !empty(EMBEDDED)
-. if ${TARGET:Marm*} != "" && (${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "aarch64")
+. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marmv[67]} != "" || ${TARGET_ARCH} == "aarch64")
. if !defined(BOARDNAME) && empty(BOARDNAME)
BOARDNAME:= ${KERNCONF}
. else
Index: head/share/mk/bsd.cpu.mk
===================================================================
--- head/share/mk/bsd.cpu.mk
+++ head/share/mk/bsd.cpu.mk
@@ -110,8 +110,6 @@
_CPUCFLAGS = -march=armv5te -D__XSCALE__
. elif ${CPUTYPE:M*soft*} != ""
_CPUCFLAGS = -mfloat-abi=softfp
-. elif ${CPUTYPE} == "armv6"
-_CPUCFLAGS = -march=${CPUTYPE}
. elif ${CPUTYPE} == "cortexa"
_CPUCFLAGS = -march=armv7 -mfpu=vfp
. elif ${CPUTYPE:Marmv[4567]*} != ""
@@ -339,18 +337,20 @@
. if ${MACHINE_ARCH:Marmv6*} != ""
MACHINE_CPU += armv6
. endif
-# 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*} == ""
+. if ${MACHINE_ARCH:Marmv7*} != ""
+MACHINE_CPU += armv7
+. endif
+# armv6 and armv7 are 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:Marmv[67]*} == ""
MACHINE_CPU += softfp
. endif
-# 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*} != ""
+# Normally armv6 and armv7 are 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:Marmv[67]*} && 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: head/share/mk/local.meta.sys.mk
===================================================================
--- head/share/mk/local.meta.sys.mk
+++ head/share/mk/local.meta.sys.mk
@@ -43,7 +43,7 @@
.endif
# from src/Makefile (for universe)
-TARGET_ARCHES_arm?= arm armeb armv6
+TARGET_ARCHES_arm?= arm armeb armv6 armv7
TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe
Index: head/share/mk/src.opts.mk
===================================================================
--- head/share/mk/src.opts.mk
+++ head/share/mk/src.opts.mk
@@ -273,7 +273,7 @@
__DEFAULT_YES_OPTIONS+=GDB_LIBEXEC
.endif
# Only doing soft float API stuff on armv6
-.if ${__T} != "armv6"
+.if ${__T} != "armv6" && ${__T} != "armv7"
BROKEN_OPTIONS+=LIBSOFT
.endif
.if ${__T:Mmips*}
Index: head/share/mk/sys.mk
===================================================================
--- head/share/mk/sys.mk
+++ head/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.
#
-__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
+__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}
.endif
Index: head/sys/conf/Makefile.arm
===================================================================
--- head/sys/conf/Makefile.arm
+++ head/sys/conf/Makefile.arm
@@ -75,7 +75,7 @@
$S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \
$S/$M/$M/cpufunc_asm_armv7.S
-.if ${MACHINE_ARCH} != "armv6" && defined(KERNPHYSADDR)
+.if ${MACHINE_ARCH:Marmv[67]*} == "" && defined(KERNPHYSADDR)
KERNEL_EXTRA=trampoline
KERNEL_EXTRA_INSTALL=kernel.gz.tramp
trampoline: ${KERNEL_KO}.tramp
Index: head/sys/conf/kern.mk
===================================================================
--- head/sys/conf/kern.mk
+++ head/sys/conf/kern.mk
@@ -259,6 +259,7 @@
LD_EMULATION_arm=armelf_fbsd
LD_EMULATION_armeb=armelfb_fbsd
LD_EMULATION_armv6=armelf_fbsd
+LD_EMULATION_armv7=armelf_fbsd
LD_EMULATION_i386=elf_i386_fbsd
LD_EMULATION_mips= elf32btsmip_fbsd
LD_EMULATION_mips64= elf64btsmip_fbsd
Index: head/sys/conf/kern.opts.mk
===================================================================
--- head/sys/conf/kern.opts.mk
+++ head/sys/conf/kern.opts.mk
@@ -62,7 +62,7 @@
# Things that don't work based on the CPU
.if ${MACHINE_CPUARCH} == "arm"
-. if ${MACHINE_ARCH:Marmv6*} == ""
+. if ${MACHINE_ARCH:Marmv[67]*} == ""
BROKEN_OPTIONS+= CDDL ZFS
. endif
.endif
Index: head/sys/conf/kern.pre.mk
===================================================================
--- head/sys/conf/kern.pre.mk
+++ head/sys/conf/kern.pre.mk
@@ -255,6 +255,7 @@
EMBEDFS_FORMAT.arm?= elf32-littlearm
EMBEDFS_FORMAT.armv6?= elf32-littlearm
+EMBEDFS_FORMAT.armv7?= elf32-littlearm
EMBEDFS_FORMAT.aarch64?= elf64-littleaarch64
EMBEDFS_FORMAT.mips?= elf32-tradbigmips
EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips
Index: head/sys/modules/Makefile
===================================================================
--- head/sys/modules/Makefile
+++ head/sys/modules/Makefile
@@ -426,7 +426,7 @@
.endif
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
+.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \
${MACHINE_CPUARCH} != "mips" && \
${MACHINE_CPUARCH} != "sparc64"
SUBDIR+= dtrace
@@ -800,7 +800,7 @@
_epic= epic
.endif
-.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \
+.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH:Marmv[67]*} != "" || \
${MACHINE_CPUARCH} == "i386")
_cloudabi32= cloudabi32
.endif
@@ -810,7 +810,7 @@
.endif
-.if ${MACHINE_ARCH} == "armv6"
+.if ${MACHINE_ARCH:Marmv[67]*} != ""
_ffec= ffec
.endif
Index: head/sys/modules/cloudabi32/Makefile
===================================================================
--- head/sys/modules/cloudabi32/Makefile
+++ head/sys/modules/cloudabi32/Makefile
@@ -18,7 +18,7 @@
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
OUTPUT_TARGET=elf64-x86-64-freebsd
BINARY_ARCHITECTURE=i386
-.elif ${MACHINE_ARCH} == "armv6"
+.elif ${MACHINE_ARCH:Marmv[67]*} != ""
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_armv6.S
OUTPUT_TARGET=elf32-littlearm
BINARY_ARCHITECTURE=arm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 10:26 PM (42 m, 4 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27700174
Default Alt Text
D12010.diff (14 KB)
Attached To
Mode
D12010: Support armv7 builds for userland
Attached
Detach File
Event Timeline
Log In to Comment