6ba01f04a1
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.
56 lines
1.7 KiB
Makefile
56 lines
1.7 KiB
Makefile
# $NetBSD: Makefile.cmachflags,v 1.2 2010/07/12 02:45:31 mrg Exp $
|
|
|
|
# Set CMACHFLAGS best target the specific CPU combination, based on
|
|
# their "options" setting.
|
|
|
|
# This should typically be included iff the config file has not already set
|
|
# CMACHFLAGS, eg:
|
|
# .if !defined(CMACHFLAGS)
|
|
# .include "$S/arch/m68k/Makefile.cmachflags"
|
|
# CMACHFLAGS+= -Wa,-m68030 -Wa,-m68851
|
|
# .endif
|
|
|
|
# Table of CPUs targetted vs gcc flags. Note: -m68020 and -m68030 are
|
|
# ~identical, but they are both included for completeness.
|
|
|
|
# 020 030 040 060 -m68020-60
|
|
# 030 040 060 -m68020-60
|
|
# 020 040 060 -m68020-60
|
|
# 020 030 060 -m68020-60
|
|
# 040 060 -m68020-60 (Would have been nice to have a -m68040-60)
|
|
# 030 060 -m68020-60
|
|
# 020 060 -m68020-60
|
|
# 060 -m68060
|
|
#
|
|
# 020 030 040 -m68020-40
|
|
# 030 040 -m68020-40
|
|
# 020 040 -m68020-40
|
|
# 040 -m68040
|
|
#
|
|
# 020 030 -m68020
|
|
# 030 -m68030
|
|
# 020 -m68020
|
|
|
|
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
|
|
. else
|
|
CMACHFLAGS= -m68060
|
|
. endif
|
|
.elif ${HAVE_M68040} != "no"
|
|
. if ${HAVE_M68020} != "no" || ${HAVE_M68030} != "no"
|
|
CMACHFLAGS= -m68020-40
|
|
. else /* !-DM68060 */
|
|
CMACHFLAGS= -m68040
|
|
. endif
|
|
.elif ${HAVE_M68020} != "no"
|
|
CMACHFLAGS= -m68020
|
|
.else
|
|
CMACHFLAGS= -m68030
|
|
.endif /* !-DM68060 */
|