[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] build: Rename as-insn-check to as-insn-add
as-insn-check mutates the passed-in flags. Rename it to as-insn-add, in line with cc-option-add. Update all callers. Signed-off-by: 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> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Config.mk | 10 +++++----- xen/arch/x86/Rules.mk | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Config.mk b/Config.mk index c6f0df9..41683c7 100644 --- a/Config.mk +++ b/Config.mk @@ -163,11 +163,11 @@ as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ | $(filter-out -M% %.d -include %/include/xen/config.h,$(1)) \ -c -x c -o /dev/null - 2>&1),$(4),$(3)) -# as-insn-check: Add an option to compilation flags, but only if insn is -# supported by assembler. -# Usage: $(call as-insn-check,CFLAGS,CC,"nop",-DHAVE_GAS_NOP) -as-insn-check = $(eval $(call as-insn-check-closure,$(1),$(2),$(3),$(4))) -define as-insn-check-closure +# as-insn-add: Add an option to compilation flags, but only if insn is +# supported by assembler. +# Usage: $(call as-insn-add,CFLAGS,CC,"insn",option-yes) +as-insn-add = $(eval $(call as-insn-add-closure,$(1),$(2),$(3),$(4))) +define as-insn-add-closure ifeq ($$(call as-insn,$$($(2)) $$($(1)),$(3),y,n),y) $(1) += $(4) endif diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 1dc5c37..4775336 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -14,13 +14,13 @@ CFLAGS += -msoft-float $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) -$(call as-insn-check,CFLAGS,CC,"vmcall",-DHAVE_GAS_VMX) -$(call as-insn-check,CFLAGS,CC,"crc32 %eax$$(comma)%eax",-DHAVE_GAS_SSE4_2) -$(call as-insn-check,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_GAS_EPT) -$(call as-insn-check,CFLAGS,CC,"rdrand %eax",-DHAVE_GAS_RDRAND) -$(call as-insn-check,CFLAGS,CC,"rdfsbase %rax",-DHAVE_GAS_FSGSBASE) -$(call as-insn-check,CFLAGS,CC,"rdseed %eax",-DHAVE_GAS_RDSEED) -$(call as-insn-check,CFLAGS,CC,".equ \"x\"$$(comma)1", \ +$(call as-insn-add,CFLAGS,CC,"vmcall",-DHAVE_GAS_VMX) +$(call as-insn-add,CFLAGS,CC,"crc32 %eax$$(comma)%eax",-DHAVE_GAS_SSE4_2) +$(call as-insn-add,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_GAS_EPT) +$(call as-insn-add,CFLAGS,CC,"rdrand %eax",-DHAVE_GAS_RDRAND) +$(call as-insn-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_GAS_FSGSBASE) +$(call as-insn-add,CFLAGS,CC,"rdseed %eax",-DHAVE_GAS_RDSEED) +$(call as-insn-add,CFLAGS,CC,".equ \"x\"$$(comma)1", \ -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM \ '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$$@') -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |