Deleted Added
full compact
bsd.sys.mk (180731) bsd.sys.mk (189801)
1# $FreeBSD: head/share/mk/bsd.sys.mk 180731 2008-07-23 06:14:21Z imp $
1# $FreeBSD: head/share/mk/bsd.sys.mk 189801 2009-03-14 17:55:16Z rdivacky $
2#
3# This file contains common settings used for building FreeBSD
4# sources.
5
6# Enable various levels of compiler warning checks. These may be
7# overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS.
8
9# for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143
10
2#
3# This file contains common settings used for building FreeBSD
4# sources.
5
6# Enable various levels of compiler warning checks. These may be
7# overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS.
8
9# for GCC: http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143
10
11# the default is gnu99 for now
12CSTD ?= gnu99
13
11.if !defined(NO_WARNS) && ${CC} != "icc"
14.if !defined(NO_WARNS) && ${CC} != "icc"
12. if defined(CSTD)
13. if ${CSTD} == "k&r"
15. if ${CSTD} == "k&r"
14CFLAGS += -traditional
16CFLAGS += -traditional
15. elif ${CSTD} == "c89" || ${CSTD} == "c90"
17. elif ${CSTD} == "c89" || ${CSTD} == "c90"
16CFLAGS += -std=iso9899:1990
18CFLAGS += -std=iso9899:1990
17. elif ${CSTD} == "c94" || ${CSTD} == "c95"
19. elif ${CSTD} == "c94" || ${CSTD} == "c95"
18CFLAGS += -std=iso9899:199409
20CFLAGS += -std=iso9899:199409
19. elif ${CSTD} == "c99"
21. elif ${CSTD} == "c99"
20CFLAGS += -std=iso9899:1999
22CFLAGS += -std=iso9899:1999
21. else
23. else
22CFLAGS += -std=${CSTD}
24CFLAGS += -std=${CSTD}
23. endif
25. endif
24# -pedantic is problematic because it also imposes namespace restrictions
25#CFLAGS += -pedantic
26# -pedantic is problematic because it also imposes namespace restrictions
27#CFLAGS += -pedantic
26. endif
27. if defined(WARNS)
28. if ${WARNS} >= 1
29CWARNFLAGS += -Wsystem-headers
30. if !defined(NO_WERROR)
31CWARNFLAGS += -Werror
32. endif
33. endif
34. if ${WARNS} >= 2

--- 51 unchanged lines hidden ---
28. if defined(WARNS)
29. if ${WARNS} >= 1
30CWARNFLAGS += -Wsystem-headers
31. if !defined(NO_WERROR)
32CWARNFLAGS += -Werror
33. endif
34. endif
35. if ${WARNS} >= 2

--- 51 unchanged lines hidden ---