From nobody Mon Feb 9 23:17:54 2026 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=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1606144879; cv=none; d=zohomail.com; s=zohoarc; b=at4LCv2WogX+IMbgz96SnZ7lBZPR3egIeWtwYgHjJucVz0/cLFHt0oiyt0P8K7lMBNS9EEv+y1HZkGSGupNy4CynDyOAsHrn2ZhVnsL7Icrri/ghy0ZpYlJYUjT+18j+exKnUYHNuMRQiHQWxvvollrh19kaW97+6JsOILZG+lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606144879; 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=jLxsRc45eh7UkRXObTXpepNvE2qyML0sy1x3+LOrMrU=; b=Y/sMb667ZAbQRbnR9piSqaQlkpeqJ2Lr/Y/8hrBxzhZ8Zoh8d/7THoPfuFOob5zT9vZweAAfCaUDvG0lHniGLte8Fcl3Nmk8zZHxy61F14Ev2rU9HAWuXEyA583cfgFXR926TREQkjOtfO8NODggBo7ZbBFGkA4BCX6KJR9nCEs= 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=quarantine dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1606144878992444.40825529528297; Mon, 23 Nov 2020 07:21:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.34634.65783 (Exim 4.92) (envelope-from ) id 1khDeC-0006YU-Gf; Mon, 23 Nov 2020 15:20:56 +0000 Received: by outflank-mailman (output) from mailman id 34634.65783; Mon, 23 Nov 2020 15:20:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khDeC-0006YN-Dh; Mon, 23 Nov 2020 15:20:56 +0000 Received: by outflank-mailman (input) for mailman id 34634; Mon, 23 Nov 2020 15:20:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khDeB-0006YI-0G for xen-devel@lists.xenproject.org; Mon, 23 Nov 2020 15:20:55 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 00327f36-3284-496e-a046-bd44e03cc72f; Mon, 23 Nov 2020 15:20:53 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0EE9BAFC1; Mon, 23 Nov 2020 15:20:53 +0000 (UTC) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khDeB-0006YI-0G for xen-devel@lists.xenproject.org; Mon, 23 Nov 2020 15:20:55 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 00327f36-3284-496e-a046-bd44e03cc72f; Mon, 23 Nov 2020 15:20:53 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0EE9BAFC1; Mon, 23 Nov 2020 15:20:53 +0000 (UTC) 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: 00327f36-3284-496e-a046-bd44e03cc72f X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1606144853; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jLxsRc45eh7UkRXObTXpepNvE2qyML0sy1x3+LOrMrU=; b=k16gwm0wi2qK6YZWAoiu+PkDnP8FvHs/UO62GKE0xjxPSoa5xAIb1+r0jCUN9MbAZeXnM2 SxIq98z5NlP0LHrWdMs2WpMMTawp2zydAc8MY9kgDT6ubqqQEJB0apGraDjRGXbqu4b4kW ZaV8ZFz49CFhcc5hLEx8mVjtvejZfck= Subject: [PATCH v3 1/8] xen: fix build when $(obj-y) consists of just blanks From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Wei Liu , Stefano Stabellini , Anthony Perard References: <1a6bac6a-7d83-f5b6-c5b9-8b3b39824d40@suse.com> Message-ID: <511be84d-9a13-17ae-f3d9-d6daf9c02711@suse.com> Date: Mon, 23 Nov 2020 16:20:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <1a6bac6a-7d83-f5b6-c5b9-8b3b39824d40@suse.com> Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" This case can occur when combining empty lists obj-y :=3D ... obj-y +=3D $(empty) or obj-y :=3D $(empty) $(empty) where (only) blanks would accumulate. This was only a latent issue until now, but would become an active issue for Arm once lib/ gets populated with all respective objects going into the to be introduced lib.a. Also address a related issue at this occasion: When an empty built_in.o gets created, .built_in.o.d will have its dependencies recorded. If, on a subsequent incremental build, an actual constituent of built_in.o appeared, the $(filter-out ) would leave these recorded dependencies in place. But of course the linker won't know what to do with C header files. (The apparent alternative of avoiding to pass $(c_flags) or $(a_flags) would not be reliable afaict, as among these flags there may be some affecting information conveyed via the object file to the linker. The linker, finding inconsistent flags across object files, may then error out.) Using just $(obj-y) won't work either: It breaks when the same object file is listed more than once. Reported-by: Julien Grall Signed-off-by: Jan Beulich Reviewed-by: Anthony PERARD Reviewed-by: Bertrand Marquis --- xen/Rules.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 333e19bec343..d5e5eb33de39 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -130,13 +130,13 @@ c_flags +=3D $(CFLAGS-y) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 built_in.o: $(obj-y) $(extra-y) -ifeq ($(obj-y),) +ifeq ($(strip $(obj-y)),) $(CC) $(c_flags) -c -x c /dev/null -o $@ else ifeq ($(CONFIG_LTO),y) - $(LD_LTO) -r -o $@ $(filter-out $(extra-y),$^) + $(LD_LTO) -r -o $@ $(filter $(obj-y),$^) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$^) endif endif =20 @@ -145,10 +145,10 @@ targets +=3D $(filter-out $(subdir-obj-y), $(obj-y)) = $(extra-y) targets +=3D $(MAKECMDGOALS) =20 built_in_bin.o: $(obj-bin-y) $(extra-y) -ifeq ($(obj-bin-y),) +ifeq ($(strip $(obj-bin-y)),) $(CC) $(a_flags) -c -x assembler /dev/null -o $@ else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out $(extra-y),$^) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-bin-y),$^) endif =20 # Force execution of pattern rules (for which PHONY cannot be directly use= d). --=20 2.22.0