Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> --- Makefile | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ed7a9df..69ce0ef 100644 --- a/Makefile +++ b/Makefile @@ -102,13 +102,12 @@ PWD = $(shell pwd) export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS -# use '-Os' optimization if available, else use -O2 -OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ - then echo "-Os"; else echo "-O2" ; fi} - # check if compiler option is supported cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;} +# use '-Os' optimization if available, else use -O2 +OPTIMIZATION := $(call cc-supports,-Os,-O2) + WARNINGS := -Wall -Wchar-subscripts -Wpointer-arith -Wsign-compare WARNINGS += $(call cc-supports,-Wno-pointer-sign) WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) -- 1.6.6 -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html