[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 7/9] Config.mk: expand cc-ver a bit
... so that we can do other comparisons as well. No functional change. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- v2: move dash into macro. Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- Config.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Config.mk b/Config.mk index 3c3ff68..af50137 100644 --- a/Config.mk +++ b/Config.mk @@ -112,17 +112,17 @@ endef cc-options-add = $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o))) -# cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'. -# Usage: ifeq ($(call cc-ver,$(CC),0x030400),y) +# cc-ver: Check compiler against the version requirement. Return boolean 'y'/'n'. +# Usage: ifeq ($(call cc-ver,$(CC),ge,0x030400),y) cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \ - '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \ + '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -$(2) $$(($(3))) ]; \ then echo y; else echo n; fi ;) # cc-ver-check: Check compiler is at least specified version, else fail. # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4") cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3))) define cc-ver-check-closure - ifeq ($$(call cc-ver,$$($(1)),$(2)),n) + ifeq ($$(call cc-ver,$$($(1)),ge,$(2)),n) override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1; cc-option := n endif -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |