| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile.kern.inc,v 1.143 2011/07/28 13:42:16 uebayasi Exp $ | | 1 | # $NetBSD: Makefile.kern.inc,v 1.144 2011/08/09 13:02:53 joerg Exp $ |
2 | # | | 2 | # |
3 | # This file contains common `MI' targets and definitions and it is included | | 3 | # This file contains common `MI' targets and definitions and it is included |
4 | # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. | | 4 | # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. |
5 | # | | 5 | # |
6 | # Each target in this file should be protected with `if !target(target)' | | 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 | | 7 | # or `if !commands(target)' and each variable should only be conditionally |
8 | # assigned `VAR ?= VALUE', so that everything can be overriden. | | 8 | # assigned `VAR ?= VALUE', so that everything can be overriden. |
9 | # | | 9 | # |
10 | # DEBUG is set to -g if debugging. | | 10 | # DEBUG is set to -g if debugging. |
11 | # PROF is set to -pg if profiling. | | 11 | # PROF is set to -pg if profiling. |
12 | # | | 12 | # |
13 | # To specify debugging, add the config line: makeoptions DEBUG="-g" | | 13 | # To specify debugging, add the config line: makeoptions DEBUG="-g" |
14 | # A better way is to specify -g only for a few files. | | 14 | # A better way is to specify -g only for a few files. |
| @@ -71,27 +71,27 @@ CWARNFLAGS+= -Wno-unreachable-code | | | @@ -71,27 +71,27 @@ CWARNFLAGS+= -Wno-unreachable-code |
71 | . if defined(HAVE_GCC) || defined(HAVE_PCC) | | 71 | . if defined(HAVE_GCC) || defined(HAVE_PCC) |
72 | CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes | | 72 | CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes |
73 | . if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ | | 73 | . if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ |
74 | ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep" | | 74 | ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep" |
75 | CWARNFLAGS+= -Wextra -Wno-unused-parameter | | 75 | CWARNFLAGS+= -Wextra -Wno-unused-parameter |
76 | . endif | | 76 | . endif |
77 | . endif | | 77 | . endif |
78 | # Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3, | | 78 | # Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3, |
79 | # but our sources aren't up for it yet. | | 79 | # but our sources aren't up for it yet. |
80 | CWARNFLAGS+= -Wno-sign-compare | | 80 | CWARNFLAGS+= -Wno-sign-compare |
81 | .endif | | 81 | .endif |
82 | | | 82 | |
83 | CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \ | | 83 | CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \ |
84 | -Wno-self-assign -Wno-array-bounds | | 84 | -Wno-self-assign |
85 | | | 85 | |
86 | CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss | | 86 | CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss |
87 | CFLAGS+= ${DEBUG} ${COPTS} | | 87 | CFLAGS+= ${DEBUG} ${COPTS} |
88 | AFLAGS+= -D_LOCORE -Wa,--fatal-warnings | | 88 | AFLAGS+= -D_LOCORE -Wa,--fatal-warnings |
89 | | | 89 | |
90 | # XXX | | 90 | # XXX |
91 | .if defined(HAVE_GCC) | | 91 | .if defined(HAVE_GCC) |
92 | CFLAGS+= -fno-strict-aliasing | | 92 | CFLAGS+= -fno-strict-aliasing |
93 | .endif | | 93 | .endif |
94 | | | 94 | |
95 | .if ${USE_SSP:Uno} == "yes" | | 95 | .if ${USE_SSP:Uno} == "yes" |
96 | COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__ | | 96 | COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__ |
97 | .endif | | 97 | .endif |
| @@ -508,27 +508,27 @@ EXTRA_CLEAN+= .gdbinit | | | @@ -508,27 +508,27 @@ EXTRA_CLEAN+= .gdbinit |
508 | VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \ | | 508 | VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \ |
509 | nfs/nfs_bio.c uvm/uvm_bio.c \ | | 509 | nfs/nfs_bio.c uvm/uvm_bio.c \ |
510 | uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \ | | 510 | uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \ |
511 | dev/ofw/ofw_subr.c | | 511 | dev/ofw/ofw_subr.c |
512 | | | 512 | |
513 | .if defined(HAVE_GCC) || defined(HAVE_PCC) | | 513 | .if defined(HAVE_GCC) || defined(HAVE_PCC) |
514 | .for __varstack in ${VARSTACK} | | 514 | .for __varstack in ${VARSTACK} |
515 | COPTS.${__varstack:T} += -Wno-stack-protector | | 515 | COPTS.${__varstack:T} += -Wno-stack-protector |
516 | .endfor | | 516 | .endfor |
517 | .endif | | 517 | .endif |
518 | | | 518 | |
519 | # XXX ugly ugly to fix | | 519 | # XXX ugly ugly to fix |
520 | .if defined(HAVE_GCC) && ${HAVE_GCC} == 45 | | 520 | .if defined(HAVE_GCC) && ${HAVE_GCC} == 45 |
521 | CWARNFLAGS.tulip.c+= -Wno-array-bounds | | 521 | CWARNFLAGS.tulip.c+= ${${ACTIVE_CC} == "gcc":?-Wno-array-bounds:} |
522 | CWARNFLAGS.radeonfb.c+= -Wno-cast-qual | | 522 | CWARNFLAGS.radeonfb.c+= -Wno-cast-qual |
523 | CWARNFLAGS.dbcool.c+= -Wno-cast-qual | | 523 | CWARNFLAGS.dbcool.c+= -Wno-cast-qual |
524 | CWARNFLAGS.adb_kbd.c+= -Wno-cast-qual | | 524 | CWARNFLAGS.adb_kbd.c+= -Wno-cast-qual |
525 | CWARNFLAGS.adb_ms.c+= -Wno-cast-qual | | 525 | CWARNFLAGS.adb_ms.c+= -Wno-cast-qual |
526 | .endif | | 526 | .endif |
527 | | | 527 | |
528 | AFLAGS+= ${AOPTS.${.IMPSRC:T}} | | 528 | AFLAGS+= ${AOPTS.${.IMPSRC:T}} |
529 | CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} | | 529 | CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} |
530 | CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} | | 530 | CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} |
531 | CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} | | 531 | CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} |
532 | | | 532 | |
533 | .include <bsd.files.mk> | | 533 | .include <bsd.files.mk> |
534 | | | 534 | |