Date: Wed, 18 May 2016 06:01:18 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300119 - in head: . gnu/usr.bin/binutils gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/clang lib/libc lib/libc/arm lib/libc/arm/aeabi lib/libc/arm/gen lib/libcompiler_rt li... Message-ID: <201605180601.u4I61IaZ050231@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed May 18 06:01:18 2016 New Revision: 300119 URL: https://svnweb.freebsd.org/changeset/base/300119 Log: Make armv6 hard float abi by default. Kill armv6hf. Allow CPUTYPE=soft to build the current soft-float abi libraries. Add UPDATING entry to announce this. Approved by: re@ (gjb) Modified: head/Makefile head/Makefile.inc1 head/UPDATING 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/Makefile.inc head/lib/libc/arm/aeabi/Makefile.inc head/lib/libc/arm/gen/Makefile.inc head/lib/libcompiler_rt/Makefile head/lib/msun/arm/Makefile.inc head/lib/msun/arm/fenv-vfp.c head/share/mk/bsd.cpu.mk head/share/mk/local.meta.sys.mk head/share/mk/sys.mk Modified: head/Makefile ============================================================================== --- head/Makefile Wed May 18 06:00:32 2016 (r300118) +++ head/Makefile Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed May 18 06:00:32 2016 (r300118) +++ head/Makefile.inc1 Wed May 18 06:01:18 2016 (r300119) @@ -219,7 +219,6 @@ KNOWN_ARCHES?= aarch64/arm64 \ arm \ armeb/arm \ armv6/arm \ - armv6hf/arm \ i386 \ i386/pc98 \ mips \ Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed May 18 06:00:32 2016 (r300118) +++ head/UPDATING Wed May 18 06:01:18 2016 (r300119) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 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 Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Wed May 18 06:00:32 2016 (r300118) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt Wed May 18 06:00:32 2016 (r300118) +++ head/gnu/usr.bin/cc/Makefile.tgt Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Wed May 18 06:00:32 2016 (r300118) +++ head/gnu/usr.bin/gdb/Makefile.inc Wed May 18 06:01:18 2016 (r300119) @@ -23,7 +23,7 @@ OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/r # 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 Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Wed May 18 06:00:32 2016 (r300118) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed May 18 06:00:32 2016 (r300118) +++ head/lib/clang/clang.build.mk Wed May 18 06:01:18 2016 (r300119) @@ -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}\" Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed May 18 06:00:32 2016 (r300118) +++ head/lib/libc/Makefile Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Wed May 18 06:00:32 2016 (r300118) +++ head/lib/libc/arm/Makefile.inc Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Wed May 18 06:00:32 2016 (r300118) +++ head/lib/libc/arm/aeabi/Makefile.inc Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Wed May 18 06:00:32 2016 (r300118) +++ head/lib/libc/arm/gen/Makefile.inc Wed May 18 06:01:18 2016 (r300119) @@ -7,7 +7,7 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.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 Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Wed May 18 06:00:32 2016 (r300118) +++ head/lib/libcompiler_rt/Makefile Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/msun/arm/Makefile.inc ============================================================================== --- head/lib/msun/arm/Makefile.inc Wed May 18 06:00:32 2016 (r300118) +++ head/lib/msun/arm/Makefile.inc Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/lib/msun/arm/fenv-vfp.c ============================================================================== --- head/lib/msun/arm/fenv-vfp.c Wed May 18 06:00:32 2016 (r300118) +++ head/lib/msun/arm/fenv-vfp.c Wed May 18 06:01:18 2016 (r300119) @@ -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" Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Wed May 18 06:00:32 2016 (r300118) +++ head/share/mk/bsd.cpu.mk Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed May 18 06:00:32 2016 (r300118) +++ head/share/mk/local.meta.sys.mk Wed May 18 06:01:18 2016 (r300119) @@ -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 Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed May 18 06:00:32 2016 (r300118) +++ head/share/mk/sys.mk Wed May 18 06:01:18 2016 (r300119) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605180601.u4I61IaZ050231>