diff options
author | des <des@FreeBSD.org> | 2003-06-14 11:57:44 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-06-14 11:57:44 +0000 |
commit | 5d547700c7e7b30e33408a56bae0fc1f1a22915d (patch) | |
tree | b016621f0c1449f074d8da0ea7f15ee4042fbf85 /share/mk | |
parent | d4b26c11420ce2faffd6f192bf2d6b1c5a68c490 (diff) | |
download | FreeBSD-src-5d547700c7e7b30e33408a56bae0fc1f1a22915d.zip FreeBSD-src-5d547700c7e7b30e33408a56bae0fc1f1a22915d.tar.gz |
Revert to a known-good state. Anyone desiring to experiment with stricter
global settings is free to do so in his or her own source tree.
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.sys.mk | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 10c28c4..f32f980 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -8,30 +8,21 @@ # for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143 -.if ${MACHINE_ARCH} == "i386" -CSTD ?= c99 -.elif ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "amd64" -# Can't use "c99" below due to lack of alloca.S for non-i386 platforms. -CSTD ?= gnu99 -.else -CSTD ?= -.endif -.if ${CSTD} != "" -. if ${CSTD} == "k&r" +.if !defined(NO_WARNS) +. if defined(CSTD) +. if ${CSTD} == "k&r" CFLAGS += -traditional -. elif ${CSTD} == "c89" || ${CSTD} == "c90" +. elif ${CSTD} == "c89" || ${CSTD} == "c90" CFLAGS += -std=iso9899:1990 -. elif ${CSTD} == "c94" || ${CSTD} == "c95" +. elif ${CSTD} == "c94" || ${CSTD} == "c95" CFLAGS += -std=iso9899:199409 -. elif ${CSTD} == "c99" +. elif ${CSTD} == "c99" CFLAGS += -std=iso9899:1999 -. else +. else CFLAGS += -std=${CSTD} +. endif +CFLAGS += -pedantic . endif -.endif - -.if !defined(NO_WARNS) . if defined(WARNS) . if ${WARNS} > 0 CFLAGS += -Wsystem-headers @@ -48,13 +39,8 @@ CFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith . if ${WARNS} > 3 CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align . endif -# XXX: the warning that was here became problematic. -#. if ${WARNS} > 4 # BDECFLAGS . if ${WARNS} > 5 -. if ${CSTD} != "" -CFLAGS += -pedantic -. endif CFLAGS += -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls . endif . if ${WARNS} > 1 && ${WARNS} < 5 |