Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E422C433E0 for ; Mon, 8 Jun 2020 07:16:56 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F176B2076A for ; Mon, 8 Jun 2020 07:16:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UcLYGP+7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F176B2076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jiC1P-0001BZ-Ei; Mon, 08 Jun 2020 07:16:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jiC1N-0001BU-LI for xen-devel@lists.xenproject.org; Mon, 08 Jun 2020 07:16:37 +0000 X-Inumbo-ID: fd31beca-a957-11ea-ba62-bc764e2007e4 Received: from mail-wr1-x436.google.com (unknown [2a00:1450:4864:20::436]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fd31beca-a957-11ea-ba62-bc764e2007e4; Mon, 08 Jun 2020 07:16:36 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id c3so16137285wru.12 for ; Mon, 08 Jun 2020 00:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=Lb5RKUus1nw/vCNQmPl6ydLOwk5yInAAPsiNBgTIcks=; b=UcLYGP+7UQY9J5GHvrXobHNzFqATzO6Y8O5Lxi0WZBiKT7QJ2auIxeFvU0Zwg0Fl5L NyEwf1nz3jOPhvkBztumLEbbTSO5pG3VJVo52AcZk8ik5WVxsOPtF+mkVJJuW5Dtba28 UPPx2jsVQ0wZdX5eoUfLmCTRE/MiuV93o6sYh+iCc/hh5+vhNg81yj2+zM1h4mCnWtcC XhaVErY5GNGjXlcKH0pKFqUKVZvx3dG6Teyqrh6ggBeQ2CiZcEIMaOv/PuFV47L8EXnn Xk+fWL97IosFE7JiKSxMuDiRp8DITQLM0wy6KICRY6PK/ZjWoISc0bh86mBWSkM8qDgN DR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :content-language:thread-index; bh=Lb5RKUus1nw/vCNQmPl6ydLOwk5yInAAPsiNBgTIcks=; b=GVthxn9NclleSLw0mrHHxnKO67t0+w/wiRvU5wOpvXBwW10BiMNSUjYUXMrnD8D7V/ nSMDAMvVc5xvTKb+DBy+xNHX/ChNVOvYAxtXgLl4dPsGsgN0yIPCTj6VGmO4CVVNLXe7 PR8HSoD/rIXiEmqo6GLjpHO9UMVE4y/FieJAT+9AkZYh7eftwVX6PbTflBAdr3kguezt EGhTHJ0Y/cXI/WhvdJNKsnKJyTKUkf99TMyJrum5JTjQmQ9SFv8y71mq/s5V6FdUzN8o PQn9uXwmsFQttlEYtQqH3LV8qGyy+FlkgIWNhfgBdRS3vjgHqVtCXuF+6Rvd3+vrWsxe NOEg== X-Gm-Message-State: AOAM5323M8t2ftLCSeP3roPYEGiyOmrrAcT8ohBDnH8Kh8TszNNtvrmV 05VAtbOhaKKtVX4969Lc7aA= X-Google-Smtp-Source: ABdhPJz+zJr9dXsemaLNBpxq3KOnuu4rehyDFS8hdMpW0iCYk5UkFQQhctHl0jhaedq2O7KmHf3Uvw== X-Received: by 2002:a5d:628c:: with SMTP id k12mr21865179wru.211.1591600595974; Mon, 08 Jun 2020 00:16:35 -0700 (PDT) Received: from CBGR90WXYV0 ([54.239.6.186]) by smtp.gmail.com with ESMTPSA id g19sm1059860wmh.29.2020.06.08.00.16.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2020 00:16:35 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Jan Beulich'" , References: In-Reply-To: Subject: RE: [PATCH v2] build: fix dependency tracking for preprocessed files Date: Mon, 8 Jun 2020 08:16:33 +0100 Message-ID: <001901d63d64$be475c60$3ad61520$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQKkJ/Oy2eqdW+EjW3qdCJH7l2wxc6cyeTUg X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: paul@xen.org Cc: 'Stefano Stabellini' , 'Julien Grall' , 'Wei Liu' , 'Andrew Cooper' , 'Ian Jackson' , 'George Dunlap' Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" > -----Original Message----- > From: Jan Beulich > Sent: 05 June 2020 15:23 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; George Dunlap ; Ian Jackson > ; Julien Grall ; Stefano Stabellini > ; Wei Liu ; Paul Durrant > Subject: [PATCH v2] build: fix dependency tracking for preprocessed files > > While the issue is more general, I noticed that asm-macros.i not getting > re-generated as needed. This was due to its .*.d file mentioning > asm-macros.o instead of asm-macros.i. Use -MQ here as well, and while at > it also use -MQ to avoid the somewhat fragile sed-ary on the *.lds > dependency tracking files. While there, further avoid open-coding $(CPP) > and drop the bogus (Arm) / stale (x86) -Ui386. > > Signed-off-by: Jan Beulich > --- > v2: Move -MQ ahead on command lines. Looks like this is a fairly low risk fix to pull into 4.14 and it looks like it would be worth it... Release-acked-by: Paul Durrant > > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -201,13 +201,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) > $(call if_changed,obj_init_o) > > quiet_cmd_cpp_i_c = CPP $@ > -cmd_cpp_i_c = $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) $< -o $@ > +cmd_cpp_i_c = $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ $< > > quiet_cmd_cc_s_c = CC $@ > cmd_cc_s_c = $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ > > quiet_cmd_s_S = CPP $@ > -cmd_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) $< -o $@ > +cmd_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< > > %.i: %.c FORCE > $(call if_changed,cpp_i_c) > --- a/xen/arch/arm/Makefile > +++ b/xen/arch/arm/Makefile > @@ -123,9 +123,7 @@ asm-offsets.s: $(TARGET_SUBARCH)/asm-off > $(CC) $(filter-out -flto,$(c_flags)) -S -o $@ $< > > xen.lds: xen.lds.S > - $(CC) -P -E -Ui386 $(a_flags) -o $@ $< > - sed -e 's/xen\.lds\.o:/xen\.lds:/g' <.xen.lds.d >.xen.lds.d.new > - mv -f .xen.lds.d.new .xen.lds.d > + $(CPP) -P $(a_flags) -MQ $@ -o $@ $< > > dtb.o: $(CONFIG_DTB_FILE) > > --- a/xen/arch/x86/Makefile > +++ b/xen/arch/x86/Makefile > @@ -244,9 +244,7 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: > > efi.lds: AFLAGS-y += -DEFI > xen.lds efi.lds: xen.lds.S > - $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $< > - sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new > - mv -f .$(@F).d.new .$(@F).d > + $(CPP) -P $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< > > boot/mkelf32: boot/mkelf32.c > $(HOSTCC) $(HOSTCFLAGS) -o $@ $<