Date: Sun, 23 Mar 2014 12:49:26 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263660 - in head: . contrib/binutils/bfd gnu/usr.bin/binutils gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/clang lib/libc lib/libc/arm/aeabi lib/libcompiler_rt lib/libkvm ... Message-ID: <201403231249.s2NCnQqT091282@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Mar 23 12:49:25 2014 New Revision: 263660 URL: http://svnweb.freebsd.org/changeset/base/263660 Log: Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental. This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa. Modified: head/Makefile head/Makefile.inc1 head/contrib/binutils/bfd/config.bfd head/gnu/usr.bin/binutils/Makefile.inc0 head/gnu/usr.bin/cc/Makefile.tgt head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile head/lib/clang/clang.build.mk head/lib/libc/Makefile head/lib/libc/arm/aeabi/Makefile.inc head/lib/libcompiler_rt/Makefile head/lib/libkvm/Makefile head/share/mk/bsd.endian.mk head/share/mk/bsd.own.mk head/share/mk/sys.mk head/sys/sys/param.h head/usr.bin/xlint/Makefile.inc Modified: head/Makefile ============================================================================== --- head/Makefile Sun Mar 23 11:57:25 2014 (r263659) +++ head/Makefile Sun Mar 23 12:49:25 2014 (r263660) @@ -164,7 +164,7 @@ _MAKE= PATH=${PATH} ${SUB_MAKE} -f Makef _TARGET_ARCH= ${TARGET:S/pc98/i386/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/} .endif # Legacy names, for another transition period mips:mips(n32|64)?eb -> mips:mips\1 .if defined(TARGET) && defined(TARGET_ARCH) && \ @@ -374,7 +374,7 @@ kernel-toolchains: # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 -TARGET_ARCHES_arm?= arm armeb armv6 +TARGET_ARCHES_arm?= arm armeb armv6 armv6hf TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 23 11:57:25 2014 (r263659) +++ head/Makefile.inc1 Sun Mar 23 12:49:25 2014 (r263660) @@ -139,7 +139,7 @@ SRCRELDATE!= awk '/^\#define[[:space:]]* VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif -KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 +KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6hf/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else @@ -351,6 +351,8 @@ XFLAGS+= -B${WORLDTMP}/usr/bin .if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ ${MK_ARM_EABI} != "no" TARGET_ABI= gnueabi +.elif ${TARGET_ARCH} == "armv6hf" +TARGET_ABI= gnueabihf .else TARGET_ABI= unknown .endif Modified: head/contrib/binutils/bfd/config.bfd ============================================================================== --- head/contrib/binutils/bfd/config.bfd Sun Mar 23 11:57:25 2014 (r263659) +++ head/contrib/binutils/bfd/config.bfd Sun Mar 23 12:49:25 2014 (r263660) @@ -281,7 +281,7 @@ case "${targ}" in targ_defvec=bfd_elf32_bigarm_vec targ_selvecs=bfd_elf32_littlearm_vec ;; - armv6-*-freebsd*) + armv6-*-freebsd* | armv6hf-*-freebsd*) targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Sun Mar 23 11:57:25 2014 (r263659) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Sun Mar 23 12:49:25 2014 (r263660) @@ -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)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt Sun Mar 23 11:57:25 2014 (r263659) +++ head/gnu/usr.bin/cc/Makefile.tgt Sun Mar 23 12:49:25 2014 (r263660) @@ -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)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Mar 23 11:57:25 2014 (r263659) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Mar 23 12:49:25 2014 (r263660) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # 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)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Sun Mar 23 11:57:25 2014 (r263659) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Sun Mar 23 12:49:25 2014 (r263660) @@ -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)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sun Mar 23 11:57:25 2014 (r263659) +++ head/lib/clang/clang.build.mk Sun Mar 23 12:49:25 2014 (r263660) @@ -23,12 +23,14 @@ BUILD_ARCH?= ${MACHINE_ARCH} .if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \ ${MK_ARM_EABI} != "no" TARGET_ABI= gnueabi +.elif ${TARGET_ARCH} == "armv6hf" +TARGET_ABI= gnueabihf .else TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Sun Mar 23 11:57:25 2014 (r263659) +++ head/lib/libc/Makefile Sun Mar 23 12:49:25 2014 (r263660) @@ -98,7 +98,8 @@ NOASM= .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" -.if ${LIBC_ARCH} == "arm" || ${LIBC_ARCH} == "mips" +.if (${LIBC_ARCH} == "arm" && ${MACHINE_ARCH} != "armv6hf") ||\ + ${LIBC_ARCH} == "mips" .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif .if ${MK_NIS} != "no" Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Sun Mar 23 11:57:25 2014 (r263659) +++ head/lib/libc/arm/aeabi/Makefile.inc Sun Mar 23 12:49:25 2014 (r263660) @@ -3,9 +3,11 @@ .PATH: ${LIBC_SRCTOP}/arm/aeabi SRCS+= aeabi_atexit.c \ - aeabi_double.c \ - aeabi_float.c \ aeabi_unwind_cpp.c +.if ${MACHINE_ARCH} != "armv6hf" +SRCS+= aeabi_double.c \ + aeabi_float.c +.endif .if ${MACHINE_ARCH:Marmv6*} SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Sun Mar 23 11:57:25 2014 (r263659) +++ head/lib/libcompiler_rt/Makefile Sun Mar 23 12:49:25 2014 (r263660) @@ -165,7 +165,9 @@ SRCF+= stdatomic .endif .for file in ${SRCF} -. if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S) +. if ${MACHINE_ARCH} == "armv6hf" && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) +SRCS+= ${file}vfp.S +. elif (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH} == "armv6hf") && exists(${CRTSRC}/${CRTARCH}/${file}.S) SRCS+= ${file}.S . else SRCS+= ${file}.c Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Sun Mar 23 11:57:25 2014 (r263659) +++ head/lib/libkvm/Makefile Sun Mar 23 12:49:25 2014 (r263660) @@ -3,7 +3,7 @@ .if defined(TARGET_ARCH) && !defined(COMPAT_32BIT) KVM_XARCH=${TARGET_ARCH} -KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .else KVM_XARCH=${MACHINE_ARCH} KVM_XCPUARCH=${MACHINE_CPUARCH} Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Sun Mar 23 11:57:25 2014 (r263659) +++ head/share/mk/bsd.endian.mk Sun Mar 23 12:49:25 2014 (r263660) @@ -5,6 +5,7 @@ ${MACHINE_ARCH} == "ia64" || \ ${MACHINE_ARCH} == "arm" || \ ${MACHINE_ARCH} == "armv6" || \ + ${MACHINE_ARCH} == "armv6hf" || \ ${MACHINE_ARCH:Mmips*el} != "" TARGET_ENDIANNESS= 1234 .elif ${MACHINE_ARCH} == "powerpc" || \ Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun Mar 23 11:57:25 2014 (r263659) +++ head/share/mk/bsd.own.mk Sun Mar 23 12:49:25 2014 (r263660) @@ -400,7 +400,7 @@ __TT=${MACHINE} # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL -.elif ${__T} == "arm" || ${__T} == "armv6" +.elif ${__T} == "arm" || ${__T} == "armv6" || ${__T} == "armv6hf" __DEFAULT_YES_OPTIONS+=CLANG # GCC is unable to build the full clang on arm, disable it by default. __DEFAULT_NO_OPTIONS+=CLANG_FULL @@ -409,7 +409,7 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL .endif # Clang the default system compiler only on little-endian arm and x86. .if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ - ${__T} == "i386" + ${__T} == "armv6hf" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC # The pc98 bootloader requires gcc to build and so we must leave gcc enabled # for pc98 for now. Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sun Mar 23 11:57:25 2014 (r263659) +++ head/share/mk/sys.mk Sun Mar 23 12:49:25 2014 (r263660) @@ -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)?/arm/:C/powerpc64/powerpc/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} .endif # Set any local definitions first. Place this early, but it needs Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Mar 23 11:57:25 2014 (r263659) +++ head/sys/sys/param.h Sun Mar 23 12:49:25 2014 (r263660) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100015 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100016 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.bin/xlint/Makefile.inc ============================================================================== --- head/usr.bin/xlint/Makefile.inc Sun Mar 23 11:57:25 2014 (r263659) +++ head/usr.bin/xlint/Makefile.inc Sun Mar 23 12:49:25 2014 (r263660) @@ -8,7 +8,7 @@ WARNS?= 0 # These assignments duplicate much of the functionality of # 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)?/arm/} +TARGET_CPUARCH= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/} .else TARGET_CPUARCH= ${MACHINE_CPUARCH} TARGET_ARCH= ${MACHINE_ARCH}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403231249.s2NCnQqT091282>