Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Changes to existing files to enable building AARCH64 userland.
details: https://anonhg.NetBSD.org/src/rev/8737262a3eb9
branches: trunk
changeset: 331375:8737262a3eb9
user: matt <matt%NetBSD.org@localhost>
date: Sun Aug 10 05:56:36 2014 +0000
description:
Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only. While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
diffstat:
build.sh | 6 +-
distrib/common/Makefile.makedev | 12 +-
etc/Makefile | 12 +-
external/gpl3/binutils/dist/bfd/config.bfd | 10 +
external/gpl3/binutils/dist/gas/configure.tgt | 1 +
external/gpl3/binutils/dist/ld/Makefile.am | 10 +
external/gpl3/binutils/dist/ld/Makefile.in | 12 +
external/gpl3/binutils/dist/ld/configure.tgt | 4 +
external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd.sh | 2 +-
external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabi.sh | 2 +-
external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabihf.sh | 2 +-
external/gpl3/gdb/dist/bfd/config.bfd | 10 +
external/gpl3/gdb/dist/gdb/configure.tgt | 6 +
include/fenv.h | 4 +-
lib/libc/compiler_rt/Makefile.inc | 67 +++++--
lib/libc/rpc/xdr_float.c | 7 +-
lib/libc/softfloat/softfloat-specialize | 14 +-
lib/libc/stdlib/jemalloc.c | 9 +-
lib/libm/Makefile | 12 +-
libexec/ld.elf_so/Makefile | 5 +-
sbin/disklabel/main.c | 7 +-
share/mk/bsd.endian.mk | 5 +-
share/mk/bsd.klinks.mk | 8 +-
share/mk/bsd.own.mk | 19 +-
share/mk/bsd.sys.mk | 11 +-
share/mk/sys.mk | 4 +-
sys/arch/Makefile | 11 +-
sys/lib/libkern/Makefile.compiler-rt | 72 +++++---
sys/lib/libunwind/Registers.hpp | 81 ++++++++++
sys/lib/libunwind/unwind_registers.S | 69 ++++++++
sys/modules/Makefile | 7 +-
sys/sys/aout_mids.h | 3 +-
tests/lib/libc/gen/Makefile | 12 +-
tools/Makefile | 6 +-
tools/headerlist | 6 +-
35 files changed, 428 insertions(+), 100 deletions(-)
diffs (truncated from 1246 to 300 lines):
diff -r da40b96f6142 -r 8737262a3eb9 build.sh
--- a/build.sh Sun Aug 10 05:47:35 2014 +0000
+++ b/build.sh Sun Aug 10 05:56:36 2014 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.293 2014/08/07 18:10:20 apb Exp $
+# $NetBSD: build.sh,v 1.294 2014/08/10 05:56:36 matt Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -650,6 +650,8 @@
MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb
MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el
MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb
+MACHINE=evbarm64 MACHINE_ARCH=aarch64 ALIAS=evbarm64-el
+MACHINE=evbarm64 MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb
MACHINE=evbcf MACHINE_ARCH=coldfire
MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT
MACHINE=evbmips MACHINE_ARCH=mips64eb ALIAS=evbmips64-eb
@@ -1862,7 +1864,7 @@
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.293 2014/08/07 18:10:20 apb Exp $
+# Generated from: \$NetBSD: build.sh,v 1.294 2014/08/10 05:56:36 matt Exp $
# with these arguments: ${_args}
#
diff -r da40b96f6142 -r 8737262a3eb9 distrib/common/Makefile.makedev
--- a/distrib/common/Makefile.makedev Sun Aug 10 05:47:35 2014 +0000
+++ b/distrib/common/Makefile.makedev Sun Aug 10 05:56:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.makedev,v 1.18 2012/08/10 05:22:22 matt Exp $
+# $NetBSD: Makefile.makedev,v 1.19 2014/08/10 05:56:36 matt Exp $
#
# Makefile snippet to add ${MAKEDEVTARGETS} devices to the mtree list
# (if set), otherwise copy .OBJDIR-of-etc/MAKEDEV to ./dev
@@ -41,12 +41,18 @@
#
MTREECONF+= ${MAKEDEVSPEC}
+.if exists(${NETBSDSRCDIR}/etc/etc.${MACHINE_CPU}/MAKEDEV.conf)
+MAKEDEV_MACHINE=${MACHINE_CPU}
+.else
+MAKEDEV_MACHINE=${MACHINE}
+.endif
+
${MAKEDEVSPEC}: ${MAKEDEVSCRIPT} Makefile \
- ${NETBSDSRCDIR}/etc/etc.${MACHINE}/MAKEDEV.conf
+ ${NETBSDSRCDIR}/etc/etc.${MAKEDEV_MACHINE}/MAKEDEV.conf
${_MKTARGET_CREATE}
rm -f ${.TARGET} ${.TARGET}.tmp
- MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
+ MACHINE=${MAKEDEV_MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \
> ${.TARGET}.tmp
${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${.TARGET}.tmp \
diff -r da40b96f6142 -r 8737262a3eb9 etc/Makefile
--- a/etc/Makefile Sun Aug 10 05:47:35 2014 +0000
+++ b/etc/Makefile Sun Aug 10 05:56:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.420 2014/08/06 11:41:18 apb Exp $
+# $NetBSD: Makefile,v 1.421 2014/08/10 05:56:36 matt Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@@ -179,10 +179,11 @@
${HOST_INSTALL_FILE} ${.CURDIR}/${MOTD_SOURCE} ${.TARGET}
CLEANFILES+= MAKEDEV
+MAKEDEV_MACHINE=${"${MACHINE_CPU}" == "aarch64":?${MACHINE_CPU}:${MACHINE}}
MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
- ${.CURDIR}/etc.${MACHINE}/MAKEDEV.conf
+ ${.CURDIR}/etc.${MAKEDEV_MACHINE}/MAKEDEV.conf
${_MKTARGET_CREATE}
- MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
+ MACHINE=${MAKEDEV_MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
${TOOL_AWK} -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
> ${.TARGET}
@@ -280,8 +281,13 @@
) | ${METALOG.add}
.endif # MKUNPRIVED != no
${_MKMSG_INSTALL} ${DESTDIR}/etc/ttys
+.if exists(${.CURDIR}/etc.${MACHINE}/ttys)
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
${.CURDIR}/etc.${MACHINE}/ttys ${DESTDIR}/etc
+.else
+ ${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${.CURDIR}/etc.${MACHINE_CPU}/ttys ${DESTDIR}/etc
+.endif
.if exists(etc.${MACHINE}/boot.cfg)
${_MKMSG_INSTALL} ${DESTDIR}/boot.cfg
${ETC_INSTALL_OBJ_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/bfd/config.bfd
--- a/external/gpl3/binutils/dist/bfd/config.bfd Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/bfd/config.bfd Sun Aug 10 05:56:36 2014 +0000
@@ -165,6 +165,16 @@
targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
want64=true
;;
+ aarch64-*-netbsd*)
+ targ_defvec=bfd_elf64_littleaarch64_vec
+ targ_selvecs="bfd_elf64_bigaarch64_vec bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
+ want64=true
+ ;;
+ aarch64_be-*-netbsd*)
+ targ_defvec=bfd_elf64_bigaarch64_vec
+ targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
+ want64=true
+ ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_alpha_freebsd_vec
targ_selvecs="bfd_elf64_alpha_vec ecoffalpha_little_vec"
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/gas/configure.tgt
--- a/external/gpl3/binutils/dist/gas/configure.tgt Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/gas/configure.tgt Sun Aug 10 05:56:36 2014 +0000
@@ -100,6 +100,7 @@
case ${generic_target} in
aarch64*-*-elf) fmt=elf;;
aarch64*-*-linux*) fmt=elf em=linux ;;
+ aarch64*-*-netbsd*) fmt=elf em=nbsd ;;
alpha-*-*vms*) fmt=evax ;;
alpha-*-osf*) fmt=ecoff ;;
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/Makefile.am
--- a/external/gpl3/binutils/dist/ld/Makefile.am Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/Makefile.am Sun Aug 10 05:56:36 2014 +0000
@@ -474,6 +474,8 @@
eaarch64elfb.c \
eaarch64linux.c \
eaarch64linuxb.c \
+ eaarch64nbsd.c \
+ eaarch64nbsdb.c \
eelf32_x86_64.c \
eelf32_x86_64_nacl.c \
eelf64_aix.c \
@@ -1777,6 +1779,14 @@
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} aarch64linuxb "$(tdir_aarch64linuxb)"
+eaarch64nbsd.c: $(srcdir)/emulparams/aarch64nbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aarch64nbsd "$(tdir_aarch64nbsd)"
+eaarch64nbsdb.c: $(srcdir)/emulparams/aarch64nbsdb.sh $(srcdir)/emulparams/aarch64nbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aarch64nbsdb "$(tdir_aarch64nbsdb)"
eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/Makefile.in
--- a/external/gpl3/binutils/dist/ld/Makefile.in Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/Makefile.in Sun Aug 10 05:56:36 2014 +0000
@@ -780,6 +780,8 @@
eaarch64elfb.c \
eaarch64linux.c \
eaarch64linuxb.c \
+ eaarch64nbsd.c \
+ eaarch64nbsdb.c \
eelf32_x86_64.c \
eelf32_x86_64_nacl.c \
eelf64_aix.c \
@@ -1065,6 +1067,8 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elfb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nbsdb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Po@am__quote@
@@ -3255,6 +3259,14 @@
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} aarch64linuxb "$(tdir_aarch64linuxb)"
+eaarch64nbsd.c: $(srcdir)/emulparams/aarch64nbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aarch64nbsd "$(tdir_aarch64nbsd)"
+eaarch64nbsdb.c: $(srcdir)/emulparams/aarch64nbsdb.sh $(srcdir)/emulparams/aarch64nbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} aarch64nbsdb "$(tdir_aarch64nbsdb)"
eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/configure.tgt
--- a/external/gpl3/binutils/dist/ld/configure.tgt Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/configure.tgt Sun Aug 10 05:56:36 2014 +0000
@@ -35,6 +35,10 @@
targ_extra_emuls="aarch64linux aarch64elfb aarch64elf armelfb_linux_eabi armelf_linux_eabi armelfb armelf" ;;
aarch64-*-linux*) targ_emul=aarch64linux
targ_extra_emuls="aarch64linuxb aarch64elf aarch64elfb armelf_linux_eabi armelfb_linux_eabi armelf armelfb" ;;
+aarch64_be-*-netbsd*) targ_emul=aarch64nbsdb
+ targ_extra_emuls="aarch64nbsd aarch64elfb aarch64elf armelfb_nbsd_eabihf armelf_nbsd_eabihf armelfb_nbsd_eabi armelf_nbsd_eabi armelfb_nbsd armelf_nbsd armelf armelfb" ;;
+aarch64-*-netbsd*) targ_emul=aarch64nbsd
+ targ_extra_emuls="aarch64nbsdb aarch64elf aarch64elfb armelf_nbsd_eabihf armelfb_nbsd_eabihf armelf_nbsd_eabi armelfb_nbsd_eabi armelf_nbsd armelfb_nbsd armelf armelfb" ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_emul=elf64alpha_fbsd
targ_extra_emuls="elf64alpha alpha"
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd.sh Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd.sh Sun Aug 10 05:56:36 2014 +0000
@@ -8,7 +8,7 @@
unset EMBEDDED
case "$target" in
- arm*-*-netbsdelf*-*eabi*)
+ aarch64*-*-netbsd* | arm*-*-netbsdelf*-*eabi*)
LIB_PATH='=/usr/lib/oabi'
;;
esac
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabi.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabi.sh Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabi.sh Sun Aug 10 05:56:36 2014 +0000
@@ -14,7 +14,7 @@
arm*-*-netbsdelf*-*eabi*)
LIB_PATH='=/usr/lib'
;;
- arm*-*-netbsdelf*)
+ aarch64*-*-netbsd* | arm*-*-netbsdelf*)
LIB_PATH='=/usr/lib/eabi'
;;
esac
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabihf.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabihf.sh Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/armelf_nbsd_eabihf.sh Sun Aug 10 05:56:36 2014 +0000
@@ -11,7 +11,7 @@
arm*-*-netbsdelf*-*eabihf*)
LIB_PATH='=/usr/lib'
;;
- arm*-*-netbsdelf*)
+ aarch64*-*-netbsd* | arm*-*-netbsdelf*)
LIB_PATH='=/usr/lib/eabihf'
;;
esac
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/gdb/dist/bfd/config.bfd
--- a/external/gpl3/gdb/dist/bfd/config.bfd Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/gdb/dist/bfd/config.bfd Sun Aug 10 05:56:36 2014 +0000
@@ -184,6 +184,16 @@
targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_littleaarch64_vec bfd_elf32_bigaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
want64=true
;;
+ aarch64-*-netbsd*)
+ targ_defvec=bfd_elf64_littleaarch64_vec
+ targ_selvecs="bfd_elf64_bigaarch64_vec bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
+ want64=true
+ ;;
+ aarch64_be-*-netbsd*)
+ targ_defvec=bfd_elf64_bigaarch64_vec
+ targ_selvecs="bfd_elf64_littleaarch64_vec bfd_elf32_bigarm_vec bfd_elf32_littlearm_vec"
+ want64=true
+ ;;
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_alpha_freebsd_vec
targ_selvecs="bfd_elf64_alpha_vec ecoffalpha_little_vec"
diff -r da40b96f6142 -r 8737262a3eb9 external/gpl3/gdb/dist/gdb/configure.tgt
--- a/external/gpl3/gdb/dist/gdb/configure.tgt Sun Aug 10 05:47:35 2014 +0000
+++ b/external/gpl3/gdb/dist/gdb/configure.tgt Sun Aug 10 05:56:36 2014 +0000
@@ -45,6 +45,12 @@
build_gdbserver=yes
;;
+aarch64*-*-netbsd*)
+ # Target: AArch64 NetBSD
+ #gdb_target_obs="aarch64-tdep.o aarch64-netbsd-tdep.o"
+ gdb_target_obs="aarch64-tdep.o"
+ ;;
+
alpha*-*-osf*)
# Target: Little-endian Alpha running OSF/1
gdb_target_obs="alpha-tdep.o alpha-osf1-tdep.o alpha-mdebug-tdep.o"
diff -r da40b96f6142 -r 8737262a3eb9 include/fenv.h
--- a/include/fenv.h Sun Aug 10 05:47:35 2014 +0000
+++ b/include/fenv.h Sun Aug 10 05:56:36 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.h,v 1.9 2013/04/28 21:07:36 matt Exp $ */
+/* $NetBSD: fenv.h,v 1.10 2014/08/10 05:57:30 matt Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#if !defined(__arm__) && !defined(__i386__) \
+#if !defined(__aarch64__) && !defined(__arm__) && !defined(__i386__) \
&& !defined(__sparc__) && !defined(__x86_64__)
#error "fenv.h is currently not supported for this architecture"
#endif
diff -r da40b96f6142 -r 8737262a3eb9 lib/libc/compiler_rt/Makefile.inc
--- a/lib/libc/compiler_rt/Makefile.inc Sun Aug 10 05:47:35 2014 +0000
+++ b/lib/libc/compiler_rt/Makefile.inc Sun Aug 10 05:56:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.21 2014/07/14 07:55:26 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.22 2014/08/10 05:57:31 matt Exp $
Home |
Main Index |
Thread Index |
Old Index