Makefile.kern.inc revision 1.114       1 #	$NetBSD: Makefile.kern.inc,v 1.114 2008/08/29 00:02:24 gmcgarry Exp $
      2 #
      3 # This file contains common `MI' targets and definitions and it is included
      4 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
      5 #
      6 # Each target in this file should be protected with `if !target(target)'
      7 # or `if !commands(target)' and each variable should only be conditionally
      8 # assigned `VAR ?= VALUE', so that everything can be overriden.
      9 #
     10 # DEBUG is set to -g if debugging.
     11 # PROF is set to -pg if profiling.
     12 #
     13 # To specify debugging, add the config line: makeoptions DEBUG="-g"
     14 # A better way is to specify -g only for a few files.
     15 #
     16 #	makeoptions DEBUGLIST="uvm* trap if_*"
     17 #
     18 # all ports are expected to include bsd.own.mk for toolchain settings
     19 
     20 ##
     21 ## (0) toolchain settings for things that aren't part of the standard
     22 ## toolchain
     23 ##
     24 HOST_SH?=	sh
     25 DBSYM?=		dbsym
     26 MKDEP?=		mkdep
     27 STRIP?=		strip
     28 OBJCOPY?=	objcopy
     29 OBJDUMP?=	objdump
     30 CSCOPE?=	cscope
     31 MKID?=		mkid
     32 UUDECODE?=	${TOOL_UUDECODE:Uuudecode}
     33 HEXDUMP?=	${TOOL_HEXDUMP:Uhexdump}
     34 GENASSYM?=	${TOOL_GENASSYM:Ugenassym}
     35 .MAKEOVERRIDES+=USETOOLS	# make sure proper value is propagated
     36 
     37 _MKMSG?=		@\#
     38 _MKSHMSG?=		echo
     39 _MKSHECHO?=		echo
     40 _MKMSG_CREATE?=		:
     41 _MKTARGET_COMPILE?=	:
     42 _MKTARGET_CREATE?=	:
     43 
     44 ##
     45 ## (1) port independent source tree identification
     46 ##
     47 # source tree is located via $S relative to the compilation directory
     48 .ifndef S
     49 S!=	cd ../../../..; pwd
     50 .endif
     51 
     52 ##
     53 ## (2) compile settings
     54 ##
     55 ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
     56 ##
     57 INCLUDES?=	-I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
     58 		-I$S -nostdinc
     59 CPPFLAGS+=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
     60 DEFCOPTS?=	-O2
     61 COPTS?=		${DEFCOPTS}
     62 COPTS+=		-std=gnu99
     63 DBG=		# might contain unwanted -Ofoo
     64 DEFWARNINGS?=	yes
     65 .if (${DEFWARNINGS} == "yes")
     66 . if !defined(NOGCCERROR)
     67 CWARNFLAGS+=	-Werror
     68 . endif
     69 CWARNFLAGS+=	-Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
     70 CWARNFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes
     71 CWARNFLAGS+=	-Wswitch -Wshadow
     72 CWARNFLAGS+=	-Wcast-qual -Wwrite-strings
     73 CWARNFLAGS+=	-Wno-unreachable-code
     74 # Add -Wno-sign-compare.  -Wsign-compare is included in -Wall as of GCC 3.3,
     75 # but our sources aren't up for it yet.
     76 CWARNFLAGS+=	-Wno-sign-compare
     77 . if (defined(HAVE_GCC) && ${HAVE_GCC} > 3) || defined(HAVE_PCC)
     78 CWARNFLAGS+=	-Wno-pointer-sign -Wno-attributes
     79 .  if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
     80 CWARNFLAGS+=	-Wextra -Wno-unused-parameter
     81 .  endif
     82 . endif
     83 .endif
     84 
     85 CFLAGS+=	-ffreestanding -fno-zero-initialized-in-bss
     86 CFLAGS+=	${CPUFLAGS} ${DEBUG} ${COPTS} ${CWARNFLAGS}
     87 AFLAGS+=	${CPUFLAGS} -D_LOCORE -Wa,-fatal-warnings
     88 
     89 # XXX
     90 .if defined(HAVE_GCC) && ${HAVE_GCC} > 3
     91 CFLAGS+=	-fno-strict-aliasing
     92 .endif
     93 
     94 .if ${USE_SSP:Uno} == "yes"
     95 CFLAGS+=-fstack-protector -Wstack-protector --param ssp-buffer-size=1
     96 LDFLAGS+=-fstack-protector -Wstack-protector --param ssp-buffer-size=1
     97 .endif
     98 
     99 # If we want the bpendtsleep: label in kern_synch.c, we need to use
    100 # -fno-reorder-blocks.  Don't make this a config(1) defflag without
    101 # making sure this fragment remains valid.
    102 .if defined(HAVE_GCC) && ${HAVE_GCC} > 3 && \
    103 	!empty(${CFLAGS:M-DKERN_SYNCH_BPENDTSLEEP_LABEL})
    104 COPTS.kern_synch.c+=	-fno-reorder-blocks
    105 .endif
    106 
    107 # Use the per-source COPTS variables to add -g to just those
    108 # files that match the shell patterns given in ${DEBUGLIST}
    109 #
    110 .for i in ${DEBUGLIST}
    111 . for j in ${CFILES:T:M$i.c}
    112 COPTS.${j}+=-g
    113 . endfor
    114 .endfor
    115 
    116 # Always compile subr_debug_info.c with debug informations.
    117 # This allows gdb to use type informations.
    118 #
    119 COPTS.debugsyms.c+=	-g
    120 
    121 # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
    122 # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
    123 NORMAL_C?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"; \
    124 		${_MKSHECHO}\
    125 		${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
    126 		${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
    127 NOPROF_C?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"; \
    128 		${_MKSHECHO}\
    129 		${CC} ${CFLAGS} ${CPPFLAGS} -c $<; \
    130 		${CC} ${CFLAGS} ${CPPFLAGS} -c $<
    131 NORMAL_S?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"; \
    132 		${_MKSHECHO}\
    133 		${CC} ${AFLAGS} ${CPPFLAGS} -c $<; \
    134 		${CC} ${AFLAGS} ${CPPFLAGS} -c $<
    135 
    136 ##
    137 ## (3) libkern and compat
    138 ##
    139 ## Set KERN_AS in the port Makefile to "obj" or "library".  The
    140 ## default is "library", as documented in $S/lib/libkern/Makefile.inc.
    141 ##
    142 
    143 ### find out what to use for libkern
    144 .include "$S/lib/libkern/Makefile.inc"
    145 .ifndef PROF
    146 LIBKERN?=	${KERNLIB}
    147 .else
    148 LIBKERN?=	${KERNLIB_PROF}
    149 .endif
    150 
    151 LIBKERNLN?=	${KERNLIBLN}
    152 
    153 ### find out what to use for libcompat
    154 .include "$S/compat/common/Makefile.inc"
    155 .ifndef PROF
    156 SYSLIBCOMPAT?=	${COMPATLIB}
    157 .else
    158 SYSLIBCOMPAT?=	${COMPATLIB_PROF}
    159 .endif
    160 
    161 SYSLIBCOMPATLN?=	${COMPATLIBLN}
    162 
    163 ##
    164 ## (4) local objects, compile rules, and dependencies
    165 ##
    166 ## Each port should have a corresponding section with settings for
    167 ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same.
    168 ##
    169 MI_CFILES=devsw.c ioconf.c param.c
    170 # the need for a MI_SFILES variable is dubitable at best
    171 MI_OBJS=${MI_CFILES:S/.c/.o/}
    172 
    173 param.c: $S/conf/param.c
    174 	${_MKTARGET_CREATE}
    175 	rm -f param.c
    176 	cp $S/conf/param.c .
    177 
    178 param.o: Makefile
    179 
    180 .for _cfile in ${MI_CFILES}
    181 ${_cfile:T:R}.o: ${_cfile}
    182 	${NORMAL_C}
    183 .endfor
    184 
    185 ##
    186 ## (5) link settings
    187 ##
    188 ## TEXTADDR (or LOADADDRESS), LINKFORMAT, and any EXTRA_LINKFLAGS must
    189 ## be set in the port's Makefile.  The port specific definitions for
    190 ## LINKFLAGS_NORMAL and LINKFLAGS_DEBUG will added to the LINKFLAGS
    191 ## depending on the value of DEBUG.
    192 ##
    193 # load lines for config "xxx" will be emitted as:
    194 # xxx: ${SYSTEM_DEP} swapxxx.o
    195 #	${SYSTEM_LD_HEAD}
    196 #	${SYSTEM_LD} swapxxx.o
    197 #	${SYSTEM_LD_TAIL}
    198 SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN}
    199 SYSTEM_DEP?=	Makefile ${SYSTEM_OBJ:O} .gdbinit
    200 SYSTEM_LD_HEAD?=@rm -f $@
    201 SYSTEM_LD?=	@${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
    202 		${_MKSHECHO}\
    203 		${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \
    204 		${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
    205 SYSTEM_LD_TAIL?=@sed '/const char sccs/!d;s/.*@(.)//;s/\\.*//' vers.c; \
    206 		${SIZE} $@; chmod 755 $@
    207 
    208 TEXTADDR?=	${LOADADDRESS}			# backwards compatibility
    209 LINKTEXT?=	${TEXTADDR:C/.+/-Ttext &/}
    210 LINKDATA?=	${DATAADDR:C/.+/-Tdata &/}
    211 ENTRYPOINT?=	start
    212 LINKENTRY?=	${ENTRYPOINT:C/.+/-e &/}
    213 LINKFLAGS?=	${LINKFORMAT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
    214 		${EXTRA_LINKFLAGS}
    215 
    216 LINKFLAGS_DEBUG?=	-X
    217 SYSTEM_LD_TAIL_DEBUG?=; \
    218 		echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
    219 		echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
    220 		${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
    221 LINKFLAGS_NORMAL?=	-S
    222 STRIPFLAGS?=	-g
    223 
    224 DEBUG?=
    225 .if !empty(DEBUG:M-g*)
    226 SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
    227 LINKFLAGS+=	${LINKFLAGS_DEBUG}
    228 EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
    229 .elifndef PROF
    230 LINKFLAGS+=	${LINKFLAGS_NORMAL}
    231 .endif
    232 
    233 SYSTEM_LD_TAIL+=; \
    234 	if grep -q '^\#define.*SYMTAB_SPACE' opt_ddbparam.h; then \
    235 		echo "${DBSYM} $@"; \
    236 		${DBSYM} $@; \
    237 	fi
    238 
    239 SYSTEM_LD_HEAD+=${SYSTEM_LD_HEAD_EXTRA}
    240 SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_EXTRA}
    241 
    242 ##
    243 ## (6) port independent targets and dependencies: assym.h, vers.o
    244 ##
    245 .if !target(assym.h)
    246 assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS}
    247 	${_MKTARGET_CREATE}
    248 	cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
    249 	    ${GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
    250 	    > assym.h.tmp && \
    251 	mv -f assym.h.tmp assym.h
    252 ${MD_SFILES:C/\.[Ss]/.o/} ${SFILES:C/\.[Ss]/.o/}: assym.h
    253 .endif
    254 
    255 .if !target(vers.o)
    256 newvers: vers.o
    257 vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} $S/conf/newvers.sh $S/conf/osrelease.sh
    258 	${_MKMSG_CREATE} vers.c
    259 	${HOST_SH} $S/conf/newvers.sh
    260 	${_MKTARGET_COMPILE}
    261 	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
    262 .endif
    263 
    264 .if !target(config_time.h)
    265 BUILDSYMLINKS+=	config_time.src config_time.h
    266 .endif
    267 
    268 .if defined(MEMORY_DISK_IMAGE)
    269 md_root_image.h: ${MEMORY_DISK_IMAGE}
    270 	${_MKTARGET_CREATE}
    271 	${TOOL_HEXDUMP} -v -e '"\t" 8/1 "0x%02x, " "\n"' ${.ALLSRC} > ${.TARGET}
    272 
    273 # XXX This is only needed when building md_root.o
    274 CPPFLAGS+=	-DMEMORY_DISK_IMAGE
    275 md_root.o: md_root_image.h
    276 .endif
    277 
    278 # depend on MEMORY_DISK_IMAGE configuration
    279 md_root.o: Makefile
    280 
    281 # depend on root or device configuration
    282 autoconf.o conf.o: Makefile
    283 
    284 # depend on network or filesystem configuration
    285 uipc_proto.o vfs_conf.o: Makefile
    286 
    287 # depend on maxusers and CPU configuration
    288 assym.h machdep.o: Makefile
    289 
    290 ##
    291 ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
    292 ##                   cscope, mkid
    293 ##
    294 ## Any ports that have other stuff to be cleaned up should fill in
    295 ## EXTRA_CLEAN.  Some ports may want different settings for
    296 ## KERNLINTFLAGS, MKDEP_CFLAGS, or MKDEP_AFLAGS.
    297 ##
    298 .if !target(__CLEANKERNEL)
    299 __CLEANKERNEL: .USE
    300 	${_MKMSG} "${.TARGET}ing the kernel objects"
    301 	rm -f ${KERNELS} eddep tags *.[io] *.ln [a-z]*.s vers.c \
    302 	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
    303 	    ${EXTRA_KERNELS} ${EXTRA_CLEAN}
    304 .endif
    305 
    306 .if !target(kernelnames)
    307 kernelnames:
    308 	@echo "${KERNELS} ${EXTRA_KERNELS}"
    309 .endif
    310 
    311 .if !target(__CLEANDEPEND)
    312 __CLEANDEPEND: .USE
    313 	echo .depend ${DEPS} | xargs rm -f --
    314 .endif
    315 
    316 # do not !target these, the kern and compat Makefiles augment them
    317 cleandir distclean: __CLEANKERNEL __CLEANDEPEND
    318 clean: __CLEANKERNEL
    319 depend: .depend
    320 dependall: depend .WAIT all
    321 
    322 .if !target(.depend)
    323 MKDEP_AFLAGS?=	${AFLAGS}
    324 MKDEP_CFLAGS?=	${CFLAGS}
    325 SSRCS=${MD_SFILES} ${SFILES}
    326 CSRCS=${MD_CFILES} ${MI_CFILES} ${CFILES}
    327 SRCS=${SSRCS} ${CSRCS}
    328 DEPS=	${SRCS:T:O:u:R:S/$/.d/g}
    329 
    330 .for _s in ${SSRCS}
    331 ${_s:T:R}.d: ${_s} assym.h
    332 	${_MKTARGET_CREATE}
    333 	${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \
    334 	    ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
    335 .endfor
    336 .for _s in ${CSRCS}
    337 ${_s:T:R}.d: ${_s}
    338 	${_MKTARGET_CREATE}
    339 	${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \
    340 	    ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
    341 .endfor
    342 
    343 assym.d: assym.h
    344 	${_MKTARGET_CREATE}
    345 	cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
    346 	    ${GENASSYM} -- ${MKDEP} -f assym.dep -- \
    347 	    ${CFLAGS} ${CPPFLAGS}
    348 	sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >${.TARGET}
    349 	rm -f assym.dep
    350 
    351 DEPS+=	assym.d
    352 
    353 .depend: ${DEPS}
    354 	${_MKTARGET_CREATE}
    355 	echo "${.ALLSRC}" | ${MKDEP} -D
    356 .endif
    357 
    358 .if !target(lint)
    359 ALLSFILES?=	${MD_SFILES} ${SFILES}
    360 LINTSTUBS?=	${ALLSFILES:T:R:C/^.*$/LintStub_&.c/g}
    361 KERNLINTFLAGS?=	-bcehnxzFS
    362 NORMAL_LN?=	${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i $<
    363 
    364 _lsrc=${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
    365 LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${SYSLIBCOMPATLN}
    366 
    367 .for _sfile in ${ALLSFILES}
    368 LintStub_${_sfile:T:R}.c: ${_sfile} assym.h
    369 	${_MKTARGET_COMPILE}
    370 	${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \
    371 	      awk -f $S/kern/genlintstub.awk >${.TARGET}
    372 .endfor
    373 
    374 .for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
    375 ${_cfile:T:R}.ln: ${_cfile}
    376 	${_MKTARGET_COMPILE}
    377 	${NORMAL_LN}
    378 .endfor
    379 
    380 lint: ${LOBJS}
    381 	${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${LOBJS}
    382 .endif
    383 
    384 # Attempt to do a syntax-only compile of the entire kernel as one entity.
    385 # Alas, bugs in the GCC C frontend prevent this from completely effective
    386 # but information can be gleaned from the output.
    387 syntax-only: ${CFILES} ${MD_CFILES}
    388 	${CC} -fsyntax-only -combine ${CFLAGS} ${CPPFLAGS} \
    389 		${CFILES} ${MD_CFILES}
    390 
    391 # List of kernel images that will be installed into the root file system.
    392 # Some platforms may need to install more than one (e.g. a netbsd.aout file
    393 # to be loaded directly by the firmware), so this can be overriden by them.
    394 KERNIMAGES?=	netbsd
    395 
    396 .if !target(install)
    397 # The install target can be redefined by putting a
    398 # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
    399 MACHINE_NAME!=  uname -n
    400 install: install-kernel-${MACHINE_NAME}
    401 .if !target(install-kernel-${MACHINE_NAME})
    402 install-kernel-${MACHINE_NAME}:
    403 .for _K in ${KERNIMAGES}
    404 	rm -f ${DESTDIR}/o${_K}
    405 	ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K}
    406 	cp ${_K} ${DESTDIR}/n${_K}
    407 	mv ${DESTDIR}/n${_K} ${DESTDIR}/${_K}
    408 .endfor
    409 .endif
    410 .endif
    411 
    412 .if !target(tags)
    413 tags:
    414 	@echo "see $S/kern/Makefile for tags"
    415 .endif
    416 
    417 EXTRA_CLEAN+= cscope.out cscope.tmp
    418 .if !target(cscope.out)
    419 cscope.out: Makefile depend
    420 	${_MKTARGET_CREATE}
    421 	@sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/kern/.depend | \
    422 	tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/kern/\1|;s|^../../||;' > \
    423 	cscope.tmp
    424 	@sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/compat/.depend | \
    425 	tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/compat/\1|;s|^../../||;' >> \
    426 	cscope.tmp
    427 	@echo ${SRCS} | cat - cscope.tmp | tr -s ' ' '\n' | sort -u | \
    428 	${CSCOPE} -k -i - -b `echo ${INCLUDES} | sed s/-nostdinc//`
    429 #	cscope doesn't write cscope.out if it's uptodate, so ensure
    430 #	make doesn't keep calling cscope when not needed.
    431 	@rm -f cscope.tmp; touch cscope.out
    432 .endif
    433 
    434 .if !target(cscope)
    435 cscope: cscope.out
    436 	@${CSCOPE} -d
    437 .endif
    438 
    439 EXTRA_CLEAN+= ID
    440 .if !target(mkid)
    441 .PHONY: mkid
    442 mkid: ID
    443 
    444 ID: Makefile depend
    445 	${_MKTARGET_CREATE}
    446 	@${MKID} `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' lib/kern/.depend \
    447 	lib/compat/.depend | tr ' ' '\n' | sed "s|^../../||" | sort -u` \
    448 	`sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' .depend | tr ' ' '\n' \
    449 	| sort -u`
    450 
    451 .endif
    452 
    453 .include "${S}/gdbscripts/Makefile.inc"
    454 
    455 EXTRA_CLEAN+= .gdbinit
    456 .gdbinit: Makefile ${S}/gdbscripts/Makefile.inc
    457 	${_MKTARGET_CREATE}
    458 	rm -f .gdbinit
    459 .for __gdbinit in ${SYS_GDBINIT}
    460 	echo "source ${S}/gdbscripts/${__gdbinit}" >> .gdbinit
    461 .endfor
    462 .if defined(GDBINIT) && !empty(GDBINIT)
    463 .for __gdbinit in ${GDBINIT}
    464 	echo "source ${__gdbinit}" >> .gdbinit
    465 .endfor
    466 .endif
    467 
    468 # The following files use alloca(3) or variable array allocations.
    469 # Their full name is noted as documentation.
    470 VARSTACK=dev/cgd.c kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
    471     nfs/nfs_bio.c uvm/uvm_bio.c \
    472     uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \
    473     dev/ofw/ofw_subr.c
    474 
    475 . if (defined(HAVE_GCC) && ${HAVE_GCC} > 3) || defined(HAVE_PCC)
    476 .for __varstack in ${VARSTACK}
    477 COPTS.${__varstack:T} += -Wno-stack-protector
    478 .endfor
    479 .endif
    480 
    481 AFLAGS+=	${AOPTS.${.IMPSRC:T}}
    482 CFLAGS+=	${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}}
    483 CPPFLAGS+=	${CPPFLAGS.${.IMPSRC:T}}
    484 CWARNFLAGS+=	${CWARNFLAGS.${.IMPSRC:T}}
    485 
    486 .include <bsd.files.mk>
    487 
    488 ##
    489 ## the end
    490 ##
    491