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

[XEN PATCH v2 0/5] build: reduce number of $(shell) execution on make 4.4


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 22 Jun 2023 16:30:00 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, "Alistair Francis" <alistair.francis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>
  • Delivery-date: Thu, 22 Jun 2023 15:31:18 +0000
  • Ironport-data: A9a23:GTC336PKJfgNP8jvrR1Xl8FynXyQoLVcMsEvi/4bfWQNrUp0hGEHz zYfDzqPOPmMZTCkeIgkbdu2oBtTusTWz9BqSQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/vrRC9H5qyo42tG5AZmOZingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0t9zJWt3/ /IYEh8ibjuyn760muu8W9A506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUoXTGZwKzxbH/ woq+UykJyNZO8S+9wDc9yLzqajkgQLVB5wrQejQGvlC3wTImz175ActfUu2p7y1h1CzX/pbK lcI4Ww+oK4q7kupQ9LhGRqirxastRkaXd1SH+Qk6Rqlxa/d4gLfDW8BJhZIbN09qMY3X3okz FaPlNLyLSNju/ueTnf13rWJqTK/PwAFIGlEYjULJSMH6dT+pIA4jjrUU81uVqWyi7XdBjXY0 z2M6i8kiN07ltUX3q+2+VTGhTOEpZXTSAMxoALNUQqN5ARzbp+ofIys5F3S695PKY+YSh+Ku 31spiSFxLlQV9fXznXLGbhTWujzvJ5pLQEwn3ZWG70rzj6j+0SMUoB70SkiJh0wNdc9LGqBj FDohe9B2HNCFCL0PfAsPdLvV5RCIbvIToq8CK2NBjZaSt0oLVLconkzDaKF9zq1+HXAh53TL ntynSyEKX8BQZpqwzOtLwv2+e96n3turY8/qH2S8vhG7VZ9TCTPIVv9GAHSBt3VFYvdyOkvz /5RNtGR1zJUW/Dkby/c/OY7dA5aciNkX8qm85EMJ4ZvxzaK/kl7UJc9Jpt7IeRYc1l9zL+Ur hlRpGcGoLYAuZE3AVrTMS0yAF8edZ1+sWg6LUQR0aWAghAejXKUxP5HLfMfJOB3nNGPONYoF 5Hpje3cWKUQItkGkhxBBaTAQHtKLU/12VnQYHr5OVDSvfdIHmT0xzMtRSO3nAFmM8Z9nZJWT 2GIvu8Dfac+eg==
  • Ironport-hdrordr: A9a23:DkhWyKBmpSi+wovlHemT55DYdb4zR+YMi2TDGXoBMCC9E/bo7/ xG+c5w6faaskd1ZJhNo6HjBEDEewK+yXcX2+gs1NWZLW3bUQKTRekI0WKh+V3d8kbFh4lgPM lbAs5D4R7LYWSST/yW3OB1KbkdKRC8npyVuQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git 
br.build-exported-shell-command-value-v2

v2:
- new patches removing TARGET_SUBARCH and TARGET_ARCH.
- style change in first patch

With GNU make 4.4, the number of execution of the command present in $(shell )
in exported variables increased greatly. This is probably because as of make
4.4, exported variable are also added to the environment of $(shell )
construct.

>From the annoncement:

    https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html
    > * WARNING: Backward-incompatibility!
    >   Previously makefile variables marked as export were not exported to 
commands
    >   started by the $(shell ...) function.  Now, all exported variables are
    >   exported to $(shell ...).  If this leads to recursion during expansion, 
then
    >   for backward-compatibility the value from the original environment is 
used.
    >   To detect this change search for 'shell-export' in the .FEATURES 
variable.

Also, there's a new paragraph in the GNU make manual, but it's a warning about
exporting all variable, still it might be relevant to the new observed
behavior:

    https://www.gnu.org/software/make/manual/make.html#Variables_002fRecursion
    > Adding a variable’s value to the environment requires it to be expanded. 
If
    > expanding a variable has side-effects (such as the info or eval or similar
    > functions) then these side-effects will be seen every time a command is
    > invoked.

The issue was reported on IRC by jandryuk.

So, I've locate a few obvious candidate to fix, maybe there's more $(shell) to
change?

Anthony PERARD (5):
  build: define ARCH and SRCARCH later
  build: remove TARGET_SUBARCH, a duplicate of ARCH
  build: remove TARGET_ARCH, a duplicates of SRCARCH
  build: evaluate XEN_BUILD_* and XEN_DOMAIN on first use
  Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS on first use

 Config.mk              |  6 +++---
 xen/Makefile           | 40 ++++++++++++++++++----------------------
 xen/Rules.mk           |  2 +-
 xen/arch/riscv/arch.mk |  2 +-
 xen/build.mk           |  6 +++---
 5 files changed, 26 insertions(+), 30 deletions(-)

-- 
Anthony PERARD




 


Rackspace

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