From: Roy Marples Date: Tue, 19 Feb 2008 17:35:31 +0000 (+0000) Subject: Linux-2.6.23 finally supports -std=c99 for asm/types.h, included by headers we include. X-Git-Tag: v3.2.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6038d23e4a5f29aa481632a9d3868089a541e5a;p=thirdparty%2Fdhcpcd.git Linux-2.6.23 finally supports -std=c99 for asm/types.h, included by headers we include. --- diff --git a/mk/cc.mk b/mk/cc.mk index 225b1104..4fcdcfcb 100644 --- a/mk/cc.mk +++ b/mk/cc.mk @@ -1,9 +1,14 @@ # Copyright 2008 Roy Marples # Setup some good default CFLAGS - CFLAGS?= -O2 -pipe +# Default to using the C99 standard +CSTD?= c99 +_CSTD_SH= if test -n "${CSTD}"; then echo "-std=${CSTD}"; else echo ""; fi +_CSTD!= ${_CSTD_SH} +CFLAGS+= ${_CSTD}$(shell _CSTD_SH) + # GNU Make way of detecting gcc flags we can use check_gcc=$(shell if ${CC} $(1) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ then echo "$(1)"; else echo "$(2)"; fi)