Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Add RISCV-V support.
details: https://anonhg.NetBSD.org/src/rev/fcc16086b8e7
branches: trunk
changeset: 332409:fcc16086b8e7
user: matt <matt%NetBSD.org@localhost>
date: Fri Sep 19 17:45:42 2014 +0000
description:
Add RISCV-V support.
diffstat:
share/mk/bsd.endian.mk | 4 +++-
share/mk/bsd.kmodule.mk | 4 +++-
share/mk/bsd.own.mk | 15 ++++++++++++---
3 files changed, 18 insertions(+), 5 deletions(-)
diffs (94 lines):
diff -r ac4bc8e5ae2b -r fcc16086b8e7 share/mk/bsd.endian.mk
--- a/share/mk/bsd.endian.mk Fri Sep 19 17:45:03 2014 +0000
+++ b/share/mk/bsd.endian.mk Fri Sep 19 17:45:42 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.endian.mk,v 1.21 2014/09/03 19:22:53 matt Exp $
+# $NetBSD: bsd.endian.mk,v 1.22 2014/09/19 17:45:42 matt Exp $
.if !defined(_BSD_ENDIAN_MK_)
_BSD_ENDIAN_MK_=1
@@ -12,6 +12,8 @@
${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "ia64" || \
${MACHINE_ARCH} == "vax" || \
+ ${MACHINE_ARCH} == "riscv32" || \
+ ${MACHINE_ARCH} == "riscv64" || \
${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH:C/^.*el$/el/} == "el"
TARGET_ENDIANNESS= 1234
diff -r ac4bc8e5ae2b -r fcc16086b8e7 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk Fri Sep 19 17:45:03 2014 +0000
+++ b/share/mk/bsd.kmodule.mk Fri Sep 19 17:45:42 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.kmodule.mk,v 1.44 2014/08/10 17:44:26 joerg Exp $
+# $NetBSD: bsd.kmodule.mk,v 1.45 2014/09/19 17:45:42 matt Exp $
# We are not building this with PIE
MKPIE=no
@@ -34,6 +34,8 @@
CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mlongcall :}
.elif ${MACHINE_CPU} == "vax"
CFLAGS+= -fno-pic
+.elif ${MACHINE_CPU} == "riscv"
+CFLAGS+= -fPIC -Wa,-fno-pic
.endif
.if ${MACHINE_CPU} == "sparc64"
diff -r ac4bc8e5ae2b -r fcc16086b8e7 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Fri Sep 19 17:45:03 2014 +0000
+++ b/share/mk/bsd.own.mk Fri Sep 19 17:45:42 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.834 2014/09/03 19:22:53 matt Exp $
+# $NetBSD: bsd.own.mk,v 1.835 2014/09/19 17:45:42 matt Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -14,7 +14,7 @@
#
# CPU model, derived from MACHINE_ARCH
#
-MACHINE_CPU=
${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/arm.*/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/}
+MACHINE_CPU=
${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/arm.*/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/}
#
# Subdirectory used below ${RELEASEDIR} when building a release
@@ -537,8 +537,10 @@
news68k next68k sun3 x68k
MACHINES.mips= arc cobalt algor cobalt emips evbmips ews4800mips \
hpcmips mipsco newsmips pmax sbmips sgimips
+MACHINES.or1k= or1k
MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \
ofppc prep rs6000 sandpoint
+MACHINES.riscv= riscv
MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye
MACHINES.sparc= sparc sparc64
MACHINES.sparc64= sparc64
@@ -712,12 +714,18 @@
# No GDB support for aarch64
MKGDB.aarch64= no
MKGDB.or1k= no
+MKGDB.riscv32= no
+MKGDB.riscv64= no
# No kernel modules for or1k (yet)
MKKMOD.or1k= no
+MKKMOD.riscv32= no
+MKKMOD.riscv64= no
# No profiling for or1k (yet)
MKPROFILE.or1k= no
+MKPROFILE.riscv32=no
+MKPROFILE.riscv64=no
#
# The m68000 port is incomplete.
@@ -887,7 +895,8 @@
#
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \
|| ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
- || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_CPU} == "aarch64"
+ || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_CPU} == "aarch64" \
+ || ${MACHINE_ARCH} == "riscv64"
MKCOMPAT?= yes
.elif !empty(MACHINE_ARCH:Mearm*)
MKCOMPAT?= no
Home |
Main Index |
Thread Index |
Old Index