Add a CPUFLAGS variable which can be set by the user's mk.conf or in

the environment:

CPUFLAGS        Additional flags to the compiler/assembler to select
                CPU instruction set options, CPU tuning options, etc.

Since CPUFLAGS is not implicitly set by any part of the make infrastructure,
it is safe to set in mk.conf, unlike COPTS or DBG.
This commit is contained in:
thorpej 2003-05-30 18:43:23 +00:00
parent 6955d47610
commit 22791b9867
3 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.111 2003/04/11 22:40:31 thorpej Exp $
# $NetBSD: bsd.README,v 1.112 2003/05/30 18:43:24 thorpej Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the new make "include" files for the BSD
@ -472,6 +472,9 @@ CLEANFILES Additional files to remove for the clean and cleandir targets.
COPTS Additional flags to the compiler when creating C objects.
CPUFLAGS Additional flags to the compiler/assembler to select
CPU instruction set options, CPU tuning options, etc.
CPPFLAGS Additional flags to the C pre-processor
GDBINIT List of GDB initialization files to add to "source"

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.sys.mk,v 1.86 2003/05/18 08:09:25 lukem Exp $
# $NetBSD: bsd.sys.mk,v 1.87 2003/05/30 18:43:24 thorpej Exp $
#
# Build definitions used for NetBSD source tree builds.
@ -50,6 +50,8 @@ FFLAGS+= -mieee
CFLAGS+= -Wa,-Av8plus
.endif
CFLAGS+= ${CPUFLAGS}
# Helpers for cross-compiling
HOST_CC?= cc
HOST_CFLAGS?= -O

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.33 2003/03/07 01:26:12 thorpej Exp $
# $NetBSD: Makefile.kern.inc,v 1.34 2003/05/30 18:43:23 thorpej Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@ -59,8 +59,8 @@ CWARNFLAGS+= -Wno-sign-compare
# XXX always get it right. --thorpej
CWARNFLAGS+= -Wno-uninitialized
.endif
CFLAGS+= -ffreestanding ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS+= -D_LOCORE
CFLAGS+= ${CPUFLAGS} -ffreestanding ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS+= ${CPUFLAGS} -D_LOCORE
# Define a set of xxx_G variables that will add -g to just those
# files that match the shell patterns given in ${DEBUGLIST}