From nobody Thu Nov 28 01:29:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1684859966; cv=none; d=zohomail.com; s=zohoarc; b=heTre2ElAoKV7oYDAuz/A9RbSmgD+vFsrhsEVW5+jtiJmuIDhTy1iAah00CtioKD08IrH8Jk+gMk47ijVxbbhEN+633D+6iE/ZeHhM8f45PNtoWWXm41Dvx3b2Seg9ZA9SYGK/xWKFp3kYHXovyvkIRFFPrhohSyt9LH2CouN/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684859966; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UQ24MA9Iz3Do6i9qK7DRH0Nw4x9qHLyU1u3mTa6N5Wc=; b=GlwRzzQhujkx6pjq8cTCdOftnmrFP9mjDZ19DSn7GweWmKzw3jji86E/12/xO3OIlZ5lFfB7rOoTf73vttnzSHPzfmF969q9V4uAlave5ZzGUx4K15CeHECbigwkV6x/hX0o8O6jY0lcPoHQ+NFH7cu5Krv84IbtK11gKDX6tJ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16848599661261000.9465229429619; Tue, 23 May 2023 09:39:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.538571.838670 (Exim 4.92) (envelope-from ) id 1q1V2J-00027G-Vx; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (output) from mailman id 538571.838670; Tue, 23 May 2023 16:38:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2J-000240-Pq; Tue, 23 May 2023 16:38:59 +0000 Received: by outflank-mailman (input) for mailman id 538571; Tue, 23 May 2023 16:38:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1V2I-0006Dr-Ua for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:38:59 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4eed198e-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:38:56 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4eed198e-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NQbxeavhneBRrc5N4TAMJ536RafB9YjyOc/ENwv/Ymk=; b=NGpLfxnujMQzESbFl3zoFl5z7trgZIOTN6hOAGjwMxY0S+rfik8Wmfoy Wa3N1jdv8NfpKDeiDMZcYr8sj0JHLWKwFLNeGWt2JZ3X4iHr3frqLHFL6 XAnUL2Hk9thB98XIaL88gNqazvt7U0FR28RrZDeX6CrT2MN3Hs4HUK9MZ c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 109985465 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:xTHf2qoAs4rTChhkO6Qj8ZBj5lFeBmKqZRIvgKrLsJaIsI4StFCzt garIBnSOfaLNGv2Ltojb9i08E9Tvp7Rm4VnSQJq+301FXkRo5uZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GtwUmAWP6gR5weDzSJNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXACAJYhTel/KH+uKEd6psvM0lIszVLIxK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVRrk6VoqwmpXDe1gVr3JDmMcbPe8zMTsJQ9qqdj juerjWpX01EabRzzxKp/3S+pMrGzBrdXYsLEKyH8/p3rn+Mkzl75Bo+CgLg/KjRZlSFc+xYL 0sY6y8/t58Y/UagTsT+dxCgqXvCtRkZM/JaHvcm8giLxuzR6hyAG2kfZjdbbZots8pebSMu/ k+EmZXuHzMHmLeSQ3iM+6yUqT63MC49ImoLZCtCRgwAi/Hop4c1iRDDR8hiC4a6i9T0HXf7x DXihCE6hq4PhM8Rkauh9FbMgimEuZTCCAUy423/Tm+jqw90eoOhT4ip8kTAq+ZNKp6DSVuMt 2RCnNKRhMgVFo2EniGJROQLHZmq6uyDPTmahkRgd7Ej6jCs9niLbY1WpjZkKy9BMMwJZDvoa 0/7oh5K6dlYO37CUENsS9vvUYJwl/GmTIm7EKmONbKif6SdaieX+C1qOF6A7lq9r3VvkZs2P 5meT9ajWCNy5btc8BK6QOIU0LkOzy84xH/OSZ2T8ylLwYZyd1bOF+5bbQLmgvQRqfrd/V6Lq 4o3296ikU03bQHoXsXAHWf/x3guJGNzO535otc/mgWrcls/QzFJ5xM8LNocl21Zc0Z9zL+gE pKVABUwJL/DaZrvd223hohLMu+HYHqGhStT0dYQFVipwWM/Ro2k8b0ScZA6FZF+qrw/kq4sE 6JUIp3cahiqdtgg021HBaQRUaQ4LEj77e5wF3HNjMcDk25IGFWSp46MkvrH/ygSFCun3fYDT 0mb/lqDG/IrHl0yZPs6ndrzlztdS1BBwrMtN6YJS/EPEHjRHH9CcHSr36Boe5FddX0uBFKyj m6rPPvRnsGVy6ddzTUDrfrUx2t1O4OSxnZnIlQ= IronPort-HdrOrdr: A9a23:Purub6ixrSIPgfr7MA8h30qkinBQXioji2hC6mlwRA09TyX5ra 2TdZUgpHvJYVMqMk3I9uruBEDtex3hHP1OkOws1NWZLWrbUQKTRekP0WKF+Vzd8kXFndK1vp 0QEZSWZueRMbEAt7ec3OG5eexQvOVu8sqT9JjjJ6EGd3AVV0lihT0JezpyCidNNW977QJSLu vn2iJAzQDQAEg/X4CAKVQuefPMnNHPnIKOW296O/Z2gDP+9Q9B8dTBYmOl4is= X-Talos-CUID: 9a23:zQciRGOW3sj4YO5DSC1r8BMECvEfIkLgj3fqKkm2DFh5R+jA X-Talos-MUID: 9a23:bvn3Dwk6E3u5H3vQ4n4bdnpOOcF6wYGnWXkrlJwfv9i7MChtFRWC2WE= X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="109985465" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Bertrand Marquis , Volodymyr Babchuk , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH 11/15] build: rename CFLAGS to XEN_CFLAGS in xen/Makefile Date: Tue, 23 May 2023 17:38:07 +0100 Message-ID: <20230523163811.30792-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com> References: <20230523163811.30792-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1684859968341100001 Content-Type: text/plain; charset="utf-8" This is a preparatory patch. A future patch will not even use $(CFLAGS) to seed $(XEN_CFLAGS). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- xen/Makefile | 41 ++++++++++++++--------------- xen/arch/arm/arch.mk | 4 +-- xen/arch/riscv/arch.mk | 4 +-- xen/arch/x86/arch.mk | 58 +++++++++++++++++++++--------------------- 4 files changed, 54 insertions(+), 53 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c4a83fca76..b3bffe8c6f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -259,6 +259,7 @@ export KBUILD_DEFCONFIG :=3D $(ARCH)_defconfig export XEN_TREEWIDE_CFLAGS :=3D $(CFLAGS) =20 XEN_AFLAGS =3D +XEN_CFLAGS =3D $(CFLAGS) =20 # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) @@ -284,7 +285,7 @@ CLANG_FLAGS +=3D $(call or,$(t1),$(t2),$(t3)) endif =20 CLANG_FLAGS +=3D -Werror=3Dunknown-warning-option -CFLAGS +=3D $(CLANG_FLAGS) +XEN_CFLAGS +=3D $(CLANG_FLAGS) export CLANG_FLAGS endif =20 @@ -293,7 +294,7 @@ ifeq ($(call ld-ver-build-id,$(LD)),n) XEN_LDFLAGS_BUILD_ID :=3D XEN_HAS_BUILD_ID :=3D n else -CFLAGS +=3D -DBUILD_ID +XEN_CFLAGS +=3D -DBUILD_ID XEN_TREEWIDE_CFLAGS +=3D -DBUILD_ID XEN_HAS_BUILD_ID :=3D y XEN_LDFLAGS_BUILD_ID :=3D --build-id=3Dsha1 @@ -388,30 +389,30 @@ include/config/%.conf include/config/%.conf.cmd: $(KC= ONFIG_CONFIG) $(Q)$(MAKE) $(build)=3Dtools/kconfig syncconfig =20 ifeq ($(CONFIG_DEBUG),y) -CFLAGS +=3D -O1 +XEN_CFLAGS +=3D -O1 else -CFLAGS +=3D -O2 +XEN_CFLAGS +=3D -O2 endif =20 ifeq ($(CONFIG_FRAME_POINTER),y) -CFLAGS +=3D -fno-omit-frame-pointer +XEN_CFLAGS +=3D -fno-omit-frame-pointer else -CFLAGS +=3D -fomit-frame-pointer +XEN_CFLAGS +=3D -fomit-frame-pointer endif =20 CFLAGS-$(CONFIG_CC_SPLIT_SECTIONS) +=3D -ffunction-sections -fdata-sections =20 -CFLAGS +=3D -nostdinc -fno-builtin -fno-common -CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith -$(call cc-option-add,CFLAGS,CC,-Wvla) -CFLAGS +=3D -pipe -D__XEN__ -include $(srctree)/include/xen/config.h +XEN_CFLAGS +=3D -nostdinc -fno-builtin -fno-common +XEN_CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith +$(call cc-option-add,XEN_CFLAGS,CC,-Wvla) +XEN_CFLAGS +=3D -pipe -D__XEN__ -include $(srctree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) +=3D -g =20 ifneq ($(CONFIG_CC_IS_CLANG),y) # Clang doesn't understand this command line argument, and doesn't appear = to # have a suitable alternative. The resulting compiled binary does functio= n, # but has an excessively large symbol table. -CFLAGS +=3D -Wa,--strip-local-absolute +XEN_CFLAGS +=3D -Wa,--strip-local-absolute endif =20 XEN_AFLAGS +=3D -D__ASSEMBLY__ @@ -420,14 +421,14 @@ $(call cc-option-add,XEN_AFLAGS,CC,-Wa$(comma)--noexe= cstack) =20 LDFLAGS-$(call ld-option,--warn-rwx-segments) +=3D --no-warn-rwx-segments =20 -CFLAGS +=3D $(CFLAGS-y) +XEN_CFLAGS +=3D $(CFLAGS-y) # allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE -CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) +XEN_CFLAGS +=3D $(EXTRA_CFLAGS_XEN_CORE) =20 # Most CFLAGS are safe for assembly files: # -std=3Dgnu{89,99} gets confused by #-prefixed end-of-line comments # -flto makes no sense and annoys clang -XEN_AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(CFLAGS)) $(AFLAGS-y) +XEN_AFLAGS +=3D $(filter-out -std=3Dgnu% -flto,$(XEN_CFLAGS)) $(AFLAGS-y) =20 # LDFLAGS are only passed directly to $(LD) LDFLAGS +=3D $(LDFLAGS_DIRECT) $(LDFLAGS-y) @@ -439,16 +440,16 @@ CFLAGS_UBSAN :=3D endif =20 ifeq ($(CONFIG_LTO),y) -CFLAGS +=3D -flto +XEN_CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =20 ifdef building_out_of_srctree - CFLAGS +=3D -I$(objtree)/include - CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include + XEN_CFLAGS +=3D -I$(objtree)/include + XEN_CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include endif -CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include +XEN_CFLAGS +=3D -I$(srctree)/include +XEN_CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include =20 # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o @@ -463,7 +464,7 @@ ALL_LIBS-y :=3D lib/lib.a include $(srctree)/arch/$(TARGET_ARCH)/arch.mk =20 # define new variables to avoid the ones defined in Config.mk -export XEN_CFLAGS :=3D $(CFLAGS) +export XEN_CFLAGS :=3D $(XEN_CFLAGS) export XEN_AFLAGS :=3D $(XEN_AFLAGS) export XEN_LDFLAGS :=3D $(LDFLAGS) export CFLAGS_UBSAN diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 58db76c4e1..300b8bf7ae 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,8 +1,8 @@ ######################################## # arm-specific definitions =20 -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) -$(call cc-option-add,CFLAGS,CC,-Wnested-externs) +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,XEN_CFLAGS,CC,-Wnested-externs) =20 # Prevent floating-point variables from creeping into Xen. CFLAGS-$(CONFIG_ARM_32) +=3D -msoft-float diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 7448f759b4..aadf373ce8 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -1,7 +1,7 @@ ######################################## # RISCV-specific definitions =20 -$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) =20 CFLAGS-$(CONFIG_RISCV_64) +=3D -mabi=3Dlp64 =20 @@ -12,7 +12,7 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # into the upper half _or_ the lower half of the address space. # -mcmodel=3Dmedlow would force Xen into the lower half. =20 -CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany +XEN_CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany =20 # TODO: Drop override when more of the build is working override ALL_OBJS-y =3D arch/$(TARGET_ARCH)/built_in.o diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 13ec88a628..5df3cf6bc3 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,42 +3,42 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic -CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default -CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) +XEN_CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic +XEN_CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default +XEN_CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. -CFLAGS +=3D -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,"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) -$(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_INVP= CID) -$(call as-option-add,CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_MOVD= IR) -$(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_ENQCM= D) +XEN_CFLAGS +=3D -msoft-float + +$(call cc-options-add,XEN_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) +$(call cc-option-add,XEN_CFLAGS,CC,-Wnested-externs) +$(call as-option-add,XEN_CFLAGS,CC,"vmcall",-DHAVE_AS_VMX) +$(call as-option-add,XEN_CFLAGS,CC,"crc32 %eax$(comma)%eax",-DHAVE_AS_SSE4= _2) +$(call as-option-add,XEN_CFLAGS,CC,"invept (%rax)$(comma)%rax",-DHAVE_AS_E= PT) +$(call as-option-add,XEN_CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) +$(call as-option-add,XEN_CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) +$(call as-option-add,XEN_CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) +$(call as-option-add,XEN_CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) +$(call as-option-add,XEN_CFLAGS,CC,"clac",-DHAVE_AS_CLAC_STAC) +$(call as-option-add,XEN_CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) +$(call as-option-add,XEN_CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_= SYM) +$(call as-option-add,XEN_CFLAGS,CC,"invpcid (%rax)$(comma)%rax",-DHAVE_AS_= INVPCID) +$(call as-option-add,XEN_CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_= MOVDIR) +$(call as-option-add,XEN_CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_E= NQCMD) =20 # GAS's idea of true is -1. Clang's idea is 1 -$(call as-option-add,CFLAGS,CC,\ +$(call as-option-add,XEN_CFLAGS,CC,\ ".if ((1 > 0) < 0); .error \"\";.endif",,-DHAVE_AS_NEGATIVE_TRUE) =20 # Check to see whether the assmbler supports the .nop directive. -$(call as-option-add,CFLAGS,CC,\ +$(call as-option-add,XEN_CFLAGS,CC,\ ".L1: .L2: .nops (.L2 - .L1)$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE) =20 -CFLAGS +=3D -mno-red-zone -fpic +XEN_CFLAGS +=3D -mno-red-zone -fpic =20 # Xen doesn't use MMX or SSE interally. If the compiler supports it, also= skip # the SSE setup for variadic function calls. -CFLAGS +=3D -mno-mmx -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) +XEN_CFLAGS +=3D -mno-mmx -mno-sse $(call cc-option,$(CC),-mskip-rax-setup) =20 ifeq ($(CONFIG_INDIRECT_THUNK),y) # Compile with gcc thunk-extern, indirect-branch-register if available. @@ -54,10 +54,10 @@ ifdef CONFIG_XEN_IBT # Force -fno-jump-tables to work around # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104816 # https://github.com/llvm/llvm-project/issues/54247 -CFLAGS +=3D -fcf-protection=3Dbranch -mmanual-endbr -fno-jump-tables -$(call cc-option-add,CFLAGS,CC,-fcf-check-attribute=3Dno) +XEN_CFLAGS +=3D -fcf-protection=3Dbranch -mmanual-endbr -fno-jump-tables +$(call cc-option-add,XEN_CFLAGS,CC,-fcf-check-attribute=3Dno) else -$(call cc-option-add,CFLAGS,CC,-fcf-protection=3Dnone) +$(call cc-option-add,XEN_CFLAGS,CC,-fcf-protection=3Dnone) endif =20 # If supported by the compiler, reduce stack alignment to 8 bytes. But all= ow @@ -91,7 +91,7 @@ efi-check :=3D arch/x86/efi/check $(shell mkdir -p $(dir $(efi-check))) =20 # Check if the compiler supports the MS ABI. -XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(CFLAGS) -c $(srctree)/$(efi-c= heck).c -o $(efi-check).o,y) +XEN_BUILD_EFI :=3D $(call if-success,$(CC) $(XEN_CFLAGS) -c $(srctree)/$(e= fi-check).c -o $(efi-check).o,y) =20 # Check if the linker supports PE. EFI_LDFLAGS :=3D $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=3D10 @@ -129,4 +129,4 @@ export EFI_LDFLAGS endif =20 # Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include +XEN_CFLAGS +=3D -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include --=20 Anthony PERARD