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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 21 Jun 2023 17:19:56 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 21 Jun 2023 16:20:37 +0000
  • Ironport-data: A9a23:ylT4CqmgGv0pTwvdwaZMufno5gyjJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJLUT+HOPvfM2X8f9onOYqz9khV6p/cx9IyTAE9/iFgHiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5KyaVA8w5ARkPqgV5gaGyxH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 d84FhoMRwievu2Jx4mQTPtHu+BkJ9a+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsWYAx/5JEWxY9EglH2dSFYr1SE47I6+WHJwCR60aT3McqTcduPLSlQth/B/ DOYrzmoUnn2MvSR5Cvc6Fn2vNbwkAPweNgTS+OxsfxT1Qj7Kms7V0RNCArTTeOCol6zXZdTJ lIZ/gIqrLMu7wq7Q9/lRRq6rXWY+BkGVLJ4CPYm4QuAzq7V5QexBWUeSDNFLts8u6ceRyEu1 1KPt8PkA3poqrL9YXCX+6qQrDiyETMINmJEbigBJSMa5/HzrYd1iQjAJuuPC4bs0IezQ2uph WnX8m5n3e57YdM3O7uT3nD5qTOFvoXwQTEy3S7RTEmYykRye9vwD2C30mQ3/cqsPa7AEAne5 ihbwpjEhAwdJcrTzXLQGY3hCJnsvq/Ya2OE3DaDCrF7r1yQF2ifkZe8Cd2UDGNgKY46dDDge yc/UisBtcYIbBNGgUKaCr9d6vjGLoC6T7wJrtiOMrJzjmFZLWdrBh1Ga0+KxHzKm0Mxi6w5M przWZ/yXSlAWfo/kWrsF711PVoXKscWnzm7eHwG507/jer2iIC9FN/pz2dinshmtfjZ8W05A v5UNteQygU3bQENSnC/zGLnFnhTdSJTLcmv+6RqmhurflIO9JcJV6WAntvMuuVNw8xoqws/1 iHhBhAAlAak3hUq62yiMxheVV8mZr4nxVpTAMDmFQ/0s5T/Se5DNJsiSqY=
  • Ironport-hdrordr: A9a23:b5c+QagL/320eO0Ez1ys07bX83BQXtAji2hC6mlwRA09TySZ// rAoB19726RtN9xYgBEpTnuAsi9qB/nmKKdgrNhX4tKPjOHhILAFugLhuHfKlXbakrDH4Vmu5 uIHZITNDSJNykYsfrH
  • 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-v1

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 (3):
  build: define ARCH and SRCARCH later
  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 | 21 +++++++++++----------
 2 files changed, 14 insertions(+), 13 deletions(-)

-- 
Anthony PERARD




 


Rackspace

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