[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v7 42/51] build: grab common EFI source files in arch specific dir


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 21 Oct 2021 14:54:52 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 21 Oct 2021 13:55:20 +0000
  • Ironport-data: A9a23:qIo8w6IsYEBwJsTwFE+RcJIlxSXFcZb7ZxGr2PjKsXjdYENSgjNVy WsXCz2GOvqJNjH8e9BxYYi3oE0OuMfUn4BnTgJlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Eo5wrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2ExPlb1 I9HmqfzdlZzPv3Mt95FSjdhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Gpt2ZoRRq6OD yYfQSNpbxDGPSxxBnQoNcIzhcyEoSj2cyIN/Tp5ooJoujOOnW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qlgt0lQ0SPc2CUnf7sMOVdtFBEkg2O TvF1qPNioNVylfGb3duR2PG2vBQhMhWtR1HpLPYy49lRjYRaicL4SBs
  • Ironport-hdrordr: A9a23:ZrDgRa4COcMbFFQ6UwPXwDLXdLJyesId70hD6qkQc3FomwKj9/ xG/c5rsSMc7Qx6ZJhOo7+90cW7L080lqQFhLX5X43SPzUO0VHARO1fBOPZqAEIcBeOlNK1u5 0AT0B/YueAcGSTj6zBkXWF+wBL+qj5zEiq792usUuEVWtRGsZdB58SMHfhLqVxLjM2Y6YRJd 6nyedsgSGvQngTZtTTPAh+YwCSz+e77a4PeHQ9dmYa1DU=
  • Ironport-sdr: wSm5rzul3gcQiQU6He+bUZQsx9NbquwdC62KML4PUjZgav/Z003d8zp+sob2HWRiOxmSHojPNz IvkDHay8ZgJCW5FH/+9tRGmhMOQ42LEM+ryrO4ccS1kFMYy+9AqgtabAKkmARXznAHsTJyvxoU GNFkBBa72pf3bhOb5BwNWsFkdlu4Cha7kLU/rV1coO9ATomFmgp6YZg554wHQ0gqvV3+u5+iYg JUvg8/gO284UzyqRBCI9mC3WdxwrCOjr6npO4wcGF8+Kj8JRqVVkogc08Eaqma22DtyyFmS2PI 8n4CFJwkC/QQSmzp/lid4Tea
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Oct 21, 2021 at 01:24:27PM +0200, Jan Beulich wrote:
> On 21.10.2021 13:03, Anthony PERARD wrote:
> > On Mon, Oct 18, 2021 at 10:48:26AM +0200, Jan Beulich wrote:
> >> On 15.10.2021 18:29, Anthony PERARD wrote:
> >>> On Thu, Oct 14, 2021 at 10:51:44AM +0200, Jan Beulich wrote:
> >>>> On 24.08.2021 12:50, Anthony PERARD wrote:
> >>>>>  obj-y += boot.init.o pe.init.o ebmalloc.o runtime.o
> >>>>>  obj-$(CONFIG_ACPI) +=  efi-dom0.init.o
> >>>>> +
> >>>>> +$(obj)/%.c: common/efi/%.c
> >>>>> +       $(Q)cp -f $< $@
> >>>>
> >>>> In case both trees are on the same file system, trying to hardlink first
> >>>> would seem desirable. When copying, I think you should also pass -p.
> >>>
> >>> I don't know if doing an hardlink is a good thing to do, I'm not sure of
> >>> the kind of issue this could bring. As for -p, I don't think it's a good
> >>> idea to copy the mode, ownership, and timestamps of the source file, I'd
> >>> rather have the timestamps that Make expect, e.i. "now".
> >>
> >> Why would "now" be correct (or expected) in any way? The cloned file is no
> >> different from the original. Nevertheless I agree that -p is not ideal;
> >> it's just that the more fine grained option to preserve just the timestamp
> >> is non-standard afaik. You could try that first and fall back to -p ...
> >> Otherwise, failing hard linking and using "cp -p", I'm afraid I'd prefer
> >> symlinking despite the arguments against it that you name in the
> >> description.
> > 
> > I guess I'm missing something, is there a reason to keep/copy the
> > timestamps of the original files?
> 
> Avoidance of confusion is my main aim here. I certainly would be puzzled
> to see what looks like a source file to have a time stamp much newer than
> expected.

So, there isn't really anything to do with the timestamps :-). I guess
we could keep using symbolic links, but force update the link at every
build.

I've tried that:
    $(obj)/%.c: $(abs_srctree)/common/efi/%.c FORCE
        $(Q)ln -nsf $< $@

and make seems happy. The link command run every time (due to adding
FORCE), but the `CC` command isn't, so that seems good. The recipe that
would run the `CC` command check if the prerequisite are newer than the
target using $? so it doesn't matter if the rule that update the source
file as run or not.

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.