| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.sys.mk,v 1.231 2013/12/16 21:34:16 matt Exp $ | | 1 | # $NetBSD: bsd.sys.mk,v 1.232 2014/01/07 02:16:41 joerg Exp $ |
2 | # | | 2 | # |
3 | # Build definitions used for NetBSD source tree builds. | | 3 | # Build definitions used for NetBSD source tree builds. |
4 | | | 4 | |
5 | .if !defined(_BSD_SYS_MK_) | | 5 | .if !defined(_BSD_SYS_MK_) |
6 | _BSD_SYS_MK_=1 | | 6 | _BSD_SYS_MK_=1 |
7 | | | 7 | |
8 | .if ${MKREPRO:Uno} == "yes" | | 8 | .if ${MKREPRO:Uno} == "yes" |
9 | CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src | | 9 | CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src |
10 | CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/ | | 10 | CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/ |
11 | CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc | | 11 | CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc |
12 | .endif | | 12 | .endif |
13 | | | 13 | |
14 | # Enable c99 mode by default. | | 14 | # Enable c99 mode by default. |
| @@ -58,27 +58,26 @@ CXXFLAGS+= -Wabi | | | @@ -58,27 +58,26 @@ CXXFLAGS+= -Wabi |
58 | CXXFLAGS+= -Wold-style-cast | | 58 | CXXFLAGS+= -Wold-style-cast |
59 | CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \ | | 59 | CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \ |
60 | -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth | | 60 | -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth |
61 | CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :} | | 61 | CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :} |
62 | .endif | | 62 | .endif |
63 | .if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM)) | | 63 | .if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM)) |
64 | .if ${WARNS} > 4 | | 64 | .if ${WARNS} > 4 |
65 | CFLAGS+= -Wold-style-definition | | 65 | CFLAGS+= -Wold-style-definition |
66 | .endif | | 66 | .endif |
67 | .if ${WARNS} > 5 && !(defined(HAVE_GCC) && ${HAVE_GCC} <= 45) | | 67 | .if ${WARNS} > 5 && !(defined(HAVE_GCC) && ${HAVE_GCC} <= 45) |
68 | CFLAGS+= -Wconversion | | 68 | CFLAGS+= -Wconversion |
69 | .endif | | 69 | .endif |
70 | CFLAGS+= -Wsign-compare -Wformat=2 | | 70 | CFLAGS+= -Wsign-compare -Wformat=2 |
71 | CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=format-nonliteral :} | | | |
72 | CFLAGS+= ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :} | | 71 | CFLAGS+= ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :} |
73 | .endif | | 72 | .endif |
74 | .if ${WARNS} > 3 && defined(HAVE_LLVM) | | 73 | .if ${WARNS} > 3 && defined(HAVE_LLVM) |
75 | CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :} | | 74 | CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :} |
76 | .endif | | 75 | .endif |
77 | .if (defined(HAVE_GCC) && ${HAVE_GCC} >= 45 \ | | 76 | .if (defined(HAVE_GCC) && ${HAVE_GCC} >= 45 \ |
78 | && (${MACHINE_ARCH} == "coldfire" || \ | | 77 | && (${MACHINE_ARCH} == "coldfire" || \ |
79 | ${MACHINE_ARCH} == "sh3eb" || \ | | 78 | ${MACHINE_ARCH} == "sh3eb" || \ |
80 | ${MACHINE_ARCH} == "sh3el" || \ | | 79 | ${MACHINE_ARCH} == "sh3el" || \ |
81 | ${MACHINE_ARCH} == "m68k" || \ | | 80 | ${MACHINE_ARCH} == "m68k" || \ |
82 | ${MACHINE_ARCH} == "m68000")) | | 81 | ${MACHINE_ARCH} == "m68000")) |
83 | # XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra noisy for | | 82 | # XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra noisy for |
84 | # cases it should be better with | | 83 | # cases it should be better with |