Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk - since we are using regex already, shorten by merg...
details: https://anonhg.NetBSD.org/src/rev/cd5291cc502c
branches: trunk
changeset: 378738:cd5291cc502c
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 25 14:32:20 2021 +0000
description:
- since we are using regex already, shorten by merging arm and mips entries
- add a MACHINE_MIPS64 macro shorthand
- pass -m{soft,hard}-float to the assembler when we are passing it to the
compiler
diffstat:
share/mk/bsd.own.mk | 15 ++++++++++-----
share/mk/bsd.sys.mk | 9 +++++----
2 files changed, 15 insertions(+), 9 deletions(-)
diffs (91 lines):
diff -r 51d2c8af6a28 -r cd5291cc502c share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Sun Apr 25 13:33:27 2021 +0000
+++ b/share/mk/bsd.own.mk Sun Apr 25 14:32:20 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.1243 2021/04/25 08:01:54 mrg Exp $
+# $NetBSD: bsd.own.mk,v 1.1244 2021/04/25 14:32:20 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -14,7 +14,12 @@ MAKECONF?= /etc/mk.conf
#
# 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/:C/riscv../riscv/}
+MACHINE_CPU= ${MACHINE_ARCH:C/mips.*e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/e?arm.*/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/}
+
+MACHINE_MIPS64= (${MACHINE_ARCH} == "mips64el" || \
+ ${MACHINE_ARCH} == "mips64eb" || \
+ ${MACHINE_ARCH} == "mipsn64el" || \
+ ${MACHINE_ARCH} == "mipsn64eb")
#
# Subdirectory used below ${RELEASEDIR} when building a release
@@ -1039,7 +1044,7 @@ MK${var}:= yes
# aarch64eb is not yet supported.
#
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \
- || ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
+ || ${MACHINE_MIPS64}
|| ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "aarch64" \
|| ${MACHINE_ARCH} == "riscv64" || !empty(MACHINE_ARCH:Mearm*)
MKCOMPAT?= yes
@@ -1053,7 +1058,7 @@ MKCOMPATTESTS:= no
MKCOMPATX11:= no
.endif
-.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
+.if ${MACHINE_MIPS64} \
|| (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
MKCOMPATMODULES?= yes
.else
@@ -1063,7 +1068,7 @@ MKCOMPATMODULES:= no
#
# These platforms use softfloat by default.
#
-.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
+.if ${MACHINE_MIPS64}
MKSOFTFLOAT?= yes
.endif
diff -r 51d2c8af6a28 -r cd5291cc502c share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Sun Apr 25 13:33:27 2021 +0000
+++ b/share/mk/bsd.sys.mk Sun Apr 25 14:32:20 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.304 2020/11/09 16:15:05 christos Exp $
+# $NetBSD: bsd.sys.mk,v 1.305 2021/04/25 14:32:20 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -197,10 +197,12 @@ COPTS+= ${${ACTIVE_CC} == "gcc":? --para
.if ${MACHINE_CPU} != "sh3"
COPTS+= ${${ACTIVE_CC} == "gcc":? -msoft-float :}
FOPTS+= -msoft-float
+AFLAGS+= -msoft-float
.endif
.elif ${MACHINE_ARCH} == "coldfire"
COPTS+= -mhard-float
FOPTS+= -mhard-float
+AFLAGS+= -mhard-float
.endif
#.if !empty(MACHINE_ARCH:Mearmv7*)
@@ -220,7 +222,7 @@ CFLAGS+= -Wa,-Av8plus
.endif
.if !defined(NOGCCERROR)
-.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+.if ${MACHINE_MIPS64}
CPUFLAGS+= -Wa,--fatal-warnings
.endif
.endif
@@ -229,8 +231,7 @@ CPUFLAGS+= -Wa,--fatal-warnings
#CFLAGS+= -mips64 -mtune=sb1
#.endif
-#.if (${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
-# (defined(MKPIC) && ${MKPIC} == "no")
+#.if ${MACHINE_MIPS64} && defined(MKPIC) && ${MKPIC} == "no"
#CPUFLAGS+= -mno-abicalls -fno-PIC
#.endif
CFLAGS+= ${CPUFLAGS}
Home |
Main Index |
Thread Index |
Old Index