From patchwork Thu Nov 25 13:40:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12639197 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 D09AEC433F5 for ; Thu, 25 Nov 2021 13:48:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.231329.400443 (Exim 4.92) (envelope-from ) id 1mqF6q-0006wi-2Z; Thu, 25 Nov 2021 13:48:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 231329.400443; Thu, 25 Nov 2021 13:48:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqF6p-0006ur-Gg; Thu, 25 Nov 2021 13:48:19 +0000 Received: by outflank-mailman (input) for mailman id 231329; Thu, 25 Nov 2021 13:48:17 +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 1mqF0s-00076i-H2 for xen-devel@lists.xenproject.org; Thu, 25 Nov 2021 13:42:10 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7b739584-4df5-11ec-a9d2-d9f7a1cc8784; Thu, 25 Nov 2021 14:42:09 +0100 (CET) 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: 7b739584-4df5-11ec-a9d2-d9f7a1cc8784 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637847729; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o70thL8LZfXVGN0BO7FVeJVHlQxVD96SJrfgO735CIw=; b=Z75/qpFCXf+PG1EyVL2smPIxEojmFvfSdIiDMGQ2WvHHGke+AUt4hM9F WK54DRos6L+MBntxPeEP1RCEx5LdPgTI8h8HqMZTNtcF8EQszUy09QDbi MRHwzXaAQV/5uUUQz098CkNZKPKV4VdsAWFWPJu09cbSuGd4e3V6tIBpA Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NuhfKlMtoiYjL7hI3xnhJJk2ng5kkY1GC7m9UKJeO4kPabWG7I1YbRETyTtAskKQ4MZDvrYky6 Nl6n7cFbwssCn3yCfIKOtiDxXil1ZCM4WBWAnCKWUotJV8KK+yuoyOXjBwcxWJ00qGSDeXQo3I Re4C4Vx8yuzYMgwPJDe/3CxpAwuHKWsEj2P2tMRS+Hvw4Vw4SVTN3rIKjziTwesxPdFkaUo2Yq f23HL+eMlXWaWNmT99Zk3pcRkPrmajvA47S7TcAHuGrhgV3zqXm9ln4MeWCfqqQBs91nzcVVRe 7O7dgnCq6BEMZNNlGNhOuBBy X-SBRS: 5.1 X-MesageID: 58576724 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:yTl/Xa6GhV+/DuOF8XzF1gxRtMXAchMFZxGqfqrLsTDasY5as4F+v jQfUD3Xbq3bYTH1L9wjaY6/pxtQvJbXmoRmHgJr/ykyHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NMw27BVPivW0 T/Mi5yHULOa82Yc3l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zWHMgYTAN4AceINP/2lwGtvWIQkf5ZVlfTJoUBY13l9YVncnSjjvI+L8wWBw/Ewz+Wi 1SfDRsC/LGfqI4p6tjZw6uDqt7xQed5G0NbGUjd7Kq3anaGrjbyn9cYXb/RLz7HVW7y9KGzX slvzqnxYK8dgVJHk4tgCLI3n6gw0MTi+u1BxQN+EXSVM1nyUuF8ImOL1NVkv7FWwuMLohO/X 0+C94UIObiNP8+5QlcdKBB8M7aG3PAQ3DLT8e40MAPx4youpOiLVkBbPh+tji1BLeQqbNN5k Ll54MNGuRaijhcKM8qdinEG/muBGXUMTqE7u8xIG4TskAcqlglPbJG05vUaO31ThwGg6nUXH wI= IronPort-HdrOrdr: A9a23:HjttuqPPh/mKFMBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-IronPort-AV: E=Sophos;i="5.87,263,1631592000"; d="scan'208";a="58576724" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v8 43/47] WIP, no-VPATH: build object from generated assembly source file Date: Thu, 25 Nov 2021 13:40:02 +0000 Message-ID: <20211125134006.1076646-44-anthony.perard@citrix.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211125134006.1076646-1-anthony.perard@citrix.com> References: <20211125134006.1076646-1-anthony.perard@citrix.com> MIME-Version: 1.0 gen-objs-c and gen-objs-S can't have the list of targets. Alternative, merge both list and use $(filter ). Signed-off-by: Anthony PERARD --- xen/Rules.mk | 6 ++++++ xen/build.mk | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/xen/Rules.mk b/xen/Rules.mk index 44af005fd57e..2d8d32f5fd72 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -26,6 +26,7 @@ lib-y := targets := ## targets made from generated sources gen-objs-c := +gen-objs-S := subdir-y := CFLAGS-y := AFLAGS-y := @@ -99,6 +100,7 @@ lib-y := $(addprefix $(obj)/,$(lib-y)) obj-y := $(addprefix $(obj)/,$(obj-y)) obj-bin-y := $(addprefix $(obj)/,$(obj-bin-y)) gen-objs-c := $(addprefix $(obj)/,$(gen-objs-c)) +gen-objs-S := $(addprefix $(obj)/,$(gen-objs-S)) subdir-y := $(addprefix $(obj)/,$(subdir-y)) nocov-y := $(addprefix $(obj)/,$(nocov-y)) noubsan-y := $(addprefix $(obj)/,$(noubsan-y)) @@ -255,6 +257,10 @@ $(obj)/%.o: $(srctree)/$(src)/%.c FORCE quiet_cmd_cc_o_S = CC $@ cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@ +ifdef building_out_of_srctree +$(gen-objs-S): $(obj)/%.o: $(obj)/%.S FORCE + $(call if_changed_dep,cc_o_S) +endif $(obj)/%.o: $(src)/%.S FORCE $(call if_changed_dep,cc_o_S) diff --git a/xen/build.mk b/xen/build.mk index 7b48b7eb1404..2f2cbbbeabf8 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -83,6 +83,13 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE $(call if_changed,ld) endif +# Source generated in arch/*/Makefile to build $(TARGET)-syms +gen-objs-S += .$(TARGET)-syms.0.o +gen-objs-S += .$(TARGET)-syms.1.o +# Source generated in arch/*/Makefile to build $(TARGET).efi +gen-objs-S += .$(TARGET).efi.0r.o .$(TARGET).efi.0s.o +gen-objs-S += .$(TARGET).efi.1r.o .$(TARGET).efi.1s.o + targets += prelink.o $(TARGET): prelink.o FORCE