From patchwork Tue May 23 16:38:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13252650 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48948C7EE2D for ; Tue, 23 May 2023 16:47:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.538601.838711 (Exim 4.92) (envelope-from ) id 1q1VAd-0006ft-3j; Tue, 23 May 2023 16:47:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 538601.838711; Tue, 23 May 2023 16:47:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q1VAc-0006de-Sg; Tue, 23 May 2023 16:47:34 +0000 Received: by outflank-mailman (input) for mailman id 538601; Tue, 23 May 2023 16:47:33 +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 1q1V2Q-0006Dr-EE for xen-devel@lists.xenproject.org; Tue, 23 May 2023 16:39:06 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5365c366-f988-11ed-8611-37d641c3527e; Tue, 23 May 2023 18:39:04 +0200 (CEST) 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: 5365c366-f988-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684859944; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CUr6Ia8hka4MDdYyEkCHkmCAcxvFP9VRnjNhVX7Kyj0=; b=QrX94MT2nLvMK7ov1dkRAEoc7v/E8vKdoyPHO/DszDViYpBAmSD6Jnx2 f8AzT8AZAVMeNCO73ZuztKU1D+10yFDHPwjlIOZRyuzDPY+JhihJ/tBbU roLvkU/BUpSneGTVrFzSHhEWn10AsxXKZYkt9nL0o+oSTXOQOflXiJa3c U=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 108859061 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:D/UT8aIYpTbgJanbFE+R4pUlxSXFcZb7ZxGr2PjKsXjdYENS1DMPm mZKCm7Qb62PZGXxfohyPNy2oUpX68fUy4JmSAtlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpKrfrbwP9TlK6q4mhA4wZlPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5HX2xi/ uEJFgscMEGmitOsm7uXds1V05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpNU6bC/FMEg5/5JYWleG0hn75YntApUicv6Yf6GnP1g1hlrPqNbI5f/TTHZUFwxfA+ DuuE2LREChKNMSNlyi86V2zrLXGnir0c78NLejtnhJtqALKnTFCYPEMbnOguuWwgEO6X9NZK mQX9zAooKx081akJvH/Qhm5rXisrhMaHd1KHIUS9wWl2qfSpQGDCQAsTDRMddgnv88eXiEx2 xmCmNaBLSxitviZRGyQ8p+QrCiuIm4FIGkafygGQAAZpd75r+kOYgnnF4g5VvTv15usRG+2m mrRxMQju1kNpf5V2omw4EH5uCPy973EfxRu7ynrelvwu2uVe7WZT4Cv7FHa69NJI4CYUkSNs RA4piSO0AwdJcrTzXLQGY3hCJnsvq/Ya2OE3TaDCrF7r1yQF2ifkZe8Cd2UDGNgKY46dDDge yc/UisBtcYIbBNGgUKaCr9d6vjGL4C6TbwJtdiONLKih6SdkyfZlByCnWbKgwjQfLEEyMnTw 6uzf8e2Fmo9Aq961jewTOp1+eZ1lnxhlTuPHsGil0jPPV+iiJm9EO1tDbdzRrphsPPsTPv9q L6zyPdmOz0ACbajM0E7AKYYLEwQLGhTOK0aX/d/L7bZSiI/QTFJNhMk6e95E2CTt/gPx7igE 7DUchMw9WcTclWccV/bNS87OOKzNXu9xFpiVRER0Z+T8yBLSe6SAG03J/PboZFPGDRf8MNJ IronPort-HdrOrdr: A9a23:xHAr66iFYpiKja7gCBVG0uA6YXBQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-Talos-CUID: 9a23:LWJsim4kRj7cSE9xI9ssxBAZNss4Y0Pm3SmBBkKJEz1gZIGxcArF X-Talos-MUID: 9a23:rxKyPgjR7Zoc9PX/l/qAdcMpJv4447y8VlI0iroZkZONNiV/EAqCtWHi X-IronPort-AV: E=Sophos;i="6.00,186,1681185600"; d="scan'208";a="108859061" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [XEN PATCH 10/15] build: rename $(AFLAGS) to $(XEN_AFLAGS) Date: Tue, 23 May 2023 17:38:06 +0100 Message-ID: <20230523163811.30792-11-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 We don't want the AFLAGS from the environment, they are usually meant to build user space application and not for the hypervisor. Config.mk doesn't provied any $(AFLAGS) so we can start a fresh $(XEN_AFLAGS). Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu Acked-by: Jan Beulich --- xen/Makefile | 10 ++++++---- xen/arch/x86/arch.mk | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 127c0e40b5..c4a83fca76 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -258,6 +258,8 @@ export KBUILD_DEFCONFIG := $(ARCH)_defconfig # reparsing Config.mk by e.g. arch/x86/boot/. export XEN_TREEWIDE_CFLAGS := $(CFLAGS) +XEN_AFLAGS = + # CLANG_FLAGS needs to be calculated before calling Kconfig ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS := @@ -412,9 +414,9 @@ ifneq ($(CONFIG_CC_IS_CLANG),y) CFLAGS += -Wa,--strip-local-absolute endif -AFLAGS += -D__ASSEMBLY__ +XEN_AFLAGS += -D__ASSEMBLY__ -$(call cc-option-add,AFLAGS,CC,-Wa$(comma)--noexecstack) +$(call cc-option-add,XEN_AFLAGS,CC,-Wa$(comma)--noexecstack) LDFLAGS-$(call ld-option,--warn-rwx-segments) += --no-warn-rwx-segments @@ -425,7 +427,7 @@ CFLAGS += $(EXTRA_CFLAGS_XEN_CORE) # Most CFLAGS are safe for assembly files: # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments # -flto makes no sense and annoys clang -AFLAGS += $(filter-out -std=gnu% -flto,$(CFLAGS)) $(AFLAGS-y) +XEN_AFLAGS += $(filter-out -std=gnu% -flto,$(CFLAGS)) $(AFLAGS-y) # LDFLAGS are only passed directly to $(LD) LDFLAGS += $(LDFLAGS_DIRECT) $(LDFLAGS-y) @@ -462,7 +464,7 @@ include $(srctree)/arch/$(TARGET_ARCH)/arch.mk # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS := $(CFLAGS) -export XEN_AFLAGS := $(AFLAGS) +export XEN_AFLAGS := $(XEN_AFLAGS) export XEN_LDFLAGS := $(LDFLAGS) export CFLAGS_UBSAN diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 7b5be9fe46..13ec88a628 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -80,7 +80,7 @@ ifeq ($(CONFIG_LD_IS_GNU),y) AFLAGS-$(call ld-option,--print-output-format) += -DHAVE_LD_SORT_BY_INIT_PRIORITY else # Assume all versions of LLD support this. -AFLAGS += -DHAVE_LD_SORT_BY_INIT_PRIORITY +XEN_AFLAGS += -DHAVE_LD_SORT_BY_INIT_PRIORITY endif ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)