Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k look for the m680[2346]0 options in the opt_m6...
details: https://anonhg.NetBSD.org/src/rev/94ad6771d564
branches: trunk
changeset: 756316:94ad6771d564
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Jul 12 02:45:31 2010 +0000
description:
look for the m680[2346]0 options in the opt_m68k_arch.h and set them
appropriately in the kernel config, if not already set.
restores the settings before the M680x0 options became _KERNEL_OPT
options. tested by myself and mhitch.
diffstat:
sys/arch/m68k/Makefile.cmachflags | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
diffs (49 lines):
diff -r 36b458a7bce8 -r 94ad6771d564 sys/arch/m68k/Makefile.cmachflags
--- a/sys/arch/m68k/Makefile.cmachflags Sun Jul 11 20:00:52 2010 +0000
+++ b/sys/arch/m68k/Makefile.cmachflags Mon Jul 12 02:45:31 2010 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.cmachflags,v 1.1 2009/01/25 22:25:08 abs Exp $
+# $NetBSD: Makefile.cmachflags,v 1.2 2010/07/12 02:45:31 mrg Exp $
# Set CMACHFLAGS best target the specific CPU combination, based on
-# -DM68020, -DM68030, -DM68040, and -DM68060
+# their "options" setting.
# This should typically be included iff the config file has not already set
# CMACHFLAGS, eg:
@@ -31,19 +31,24 @@
# 030 -m68030
# 020 -m68020
-.if !empty(IDENT:M-DM68060)
-.if empty(IDENT:M-DM68020) && empty(IDENT:M-DM68030) && empty(IDENT:M-DM68040)
-CMACHFLAGS= -m68060
-.else
+HAVE_M68020!= grep '\#define[ ]*M68020' opt_m68k_arch.h 2>/dev/null || echo no
+HAVE_M68030!= grep '\#define[ ]*M68030' opt_m68k_arch.h 2>/dev/null || echo no
+HAVE_M68040!= grep '\#define[ ]*M68040' opt_m68k_arch.h 2>/dev/null || echo no
+HAVE_M68060!= grep '\#define[ ]*M68060' opt_m68k_arch.h 2>/dev/null || echo no
+
+.if ${HAVE_M68060} != "no"
+. if ${HAVE_M68020} != "no" || ${HAVE_M68030} != "no" || ${HAVE_M68040} != "no"
CMACHFLAGS= -m68020-60
-.endif
-.elif !empty(IDENT:M-DM68040)
-.if empty(IDENT:M-DM68020) && empty(IDENT:M-DM68030)
+. else
+CMACHFLAGS= -m68060
+. endif
+.elif ${HAVE_M68040} != "no"
+. if ${HAVE_M68020} != "no" || ${HAVE_M68030} != "no"
+CMACHFLAGS= -m68020-40
+. else /* !-DM68060 */
CMACHFLAGS= -m68040
-.else /* !-DM68060 */
-CMACHFLAGS= -m68020-40
-.endif
-.elif !empty(IDENT:M-DM68020)
+. endif
+.elif ${HAVE_M68020} != "no"
CMACHFLAGS= -m68020
.else
CMACHFLAGS= -m68030
Home |
Main Index |
Thread Index |
Old Index