diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-01-15 03:02:06 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-15 18:54:55 +0100 |
commit | 3ef12b9df72efd53156ba362e4ccafc2e9fbb6d6 (patch) | |
tree | 2f3b743839b6189863ea492b495a44afa64a7adf | |
parent | 1391c319354b09cb2979cccb447355f61bf2e62c (diff) | |
download | cpufrequtils-3ef12b9df72efd53156ba362e4ccafc2e9fbb6d6.tar.gz |
use existing cc-supports func to detect -Os
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | Makefile | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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) |