[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] build: move double-$ into as-option-add


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 9 Feb 2023 16:26:45 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+E8uy3EmUjVT0/Hgl1+aAmLi46INoWFLAroCorsyqrw=; b=aBZ5Rknwghj5IbJe4hwEdpgjqttZJNLuHDFxlzYIkxV/tNhCoX8o853wRSCY8i96tqc0IA8LhStR7KSLVviM6rczx2ixOQrHPdXhBGL3cUv+3+9MxEY08wZOSP9cm878sqHlQbVKh10yZnYC/LVP6Dxq3VIO72yMhhEsVgwbfFp6NWlGuDLACRuf5LsIdttUDGiKsGMdMuNlP4pcmekmGnlJyCYaM/zi86/5Ac/YkFqgy+FLyjqbZIRRQcJZcF6tbWHlAGmq9Lx9talbe7uTKhxlMf0JkZoOouQ3G38nXqbMEvEYH1aUhbfVIO3SATS9FrXnrpMJnNlHgKs4P/NZ4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fhfrt6BTgik3eOsKMdEGv1J9PhYzFlV2TOTbovHqBb++zTkIv0+/sKwXmh8efBjpY7t+esODK/7LP9ecB66Pxg/PnHdYBqAYWXZ1+lHyMD5Cxaf6hiB3Tal2Vo09cn//EBfrszYHpVc2IbQ99LGXkTDwnHL7b3xeVYv9CLYK44xghOoUCU28o1awyuNRG2vxvmXD71RoXe9jkrgx3NEPm8AKSD8UQMD5jpOPcLv0YRQ9PcoTDGZSlXnJmVsZ0QJnJP99AfiXEOC4Df6KR7dfVlcsO+b/qj/xx0GYjOWWYmKEnuWybl58iPtQKWDBOAOT8QSz8fpX92b6Fd0onZNmcQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 09 Feb 2023 15:27:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

It's imo helping readability as well as uses a little if properly
arranging for sufficiently late macro expansion is part of the macro
itself, rather than all (applicable) instances of its users.

No functional change intended.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -13,8 +13,8 @@ CFLAGS += -msoft-float
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 $(call cc-option-add,CFLAGS,CC,-Wnested-externs)
 $(call as-option-add,CFLAGS,CC,"vmcall",-DHAVE_AS_VMX)
-$(call as-option-add,CFLAGS,CC,"crc32 %eax$$(comma)%eax",-DHAVE_AS_SSE4_2)
-$(call as-option-add,CFLAGS,CC,"invept (%rax)$$(comma)%rax",-DHAVE_AS_EPT)
+$(call as-option-add,CFLAGS,CC,"crc32 %eax$(comma)%eax",-DHAVE_AS_SSE4_2)
+$(call as-option-add,CFLAGS,CC,"invept (%rax)$(comma)%rax",-DHAVE_AS_EPT)
 $(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND)
 $(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE)
 $(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT)
@@ -21,10 +21,10 @@ $(call as-option-add,CFLAGS,CC,"rdseed %
 $(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED)
 $(call as-option-add,CFLAGS,CC,"clac",-DHAVE_AS_CLAC_STAC)
 $(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB)
-$(call as-option-add,CFLAGS,CC,".equ \"x\"$$(comma)1",-DHAVE_AS_QUOTED_SYM)
-$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$$(comma)%rax",-DHAVE_AS_INVPCID)
-$(call as-option-add,CFLAGS,CC,"movdiri %rax$$(comma)(%rax)",-DHAVE_AS_MOVDIR)
-$(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$$(comma)%rax",-DHAVE_AS_ENQCMD)
+$(call as-option-add,CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_SYM)
+$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$(comma)%rax",-DHAVE_AS_INVPCID)
+$(call as-option-add,CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_MOVDIR)
+$(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_ENQCMD)
 
 # GAS's idea of true is -1.  Clang's idea is 1
 $(call as-option-add,CFLAGS,CC,\
@@ -32,7 +32,7 @@ $(call as-option-add,CFLAGS,CC,\
 
 # Check to see whether the assmbler supports the .nop directive.
 $(call as-option-add,CFLAGS,CC,\
-    ".L1: .L2: .nops (.L2 - .L1)$$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE)
+    ".L1: .L2: .nops (.L2 - .L1)$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE)
 
 CFLAGS += -mno-red-zone -fpic
 
--- a/xen/scripts/Kbuild.include
+++ b/xen/scripts/Kbuild.include
@@ -66,7 +66,7 @@ as-insn = $(if $(shell echo 'void _(void
 # Usage: $(call as-option-add,CFLAGS,CC,"insn",option-yes,option-no)
 as-option-add = $(eval $(call as-option-add-closure,$(1),$(2),$(3),$(4),$(5)))
 define as-option-add-closure
-    ifeq ($$(call as-insn,$$($(2)) $$($(1)),$(3),y,n),y)
+    ifeq ($$(call as-insn,$$($(2)) $$($(1)),$$(3),y,n),y)
         $(1) += $(4)
     else
         $(1) += $(5)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.