[DTrace-devel] [PATCH v2 0/9] improve build configurability

Nick Alcock nick.alcock at oracle.com
Mon Jan 15 19:34:30 UTC 2024


This series improves the build system, letting you override the results
of all Makeconfig tests, making it a tiny bit more likely that cross-
compilation will succeed (though since it is still untested, only a
*bit* more likely), and implementing a configure script so that you
can avoid having to specify Make variable assignments over and
over again.

A couple of possible configurable values are missing, mostly because they're
not in the top-level makefile and thus cannot be overridden by this
mechanism (notably KERNELDIRPREFIX and KERNELDIRSUFFIX): these have recently
changed name, and can be added to this machinery once that goes in.

We also fix a number of bugs related to needless reinvocation of configure
tests, re-execution of can-never-change commands, etc: these had no effect
but performance before, but now they can accidentally overwrite
configure-specified test results the bug has become observable.

This series is also pushed to
https://github.com/oracle/dtrace-utils nix/review/configury

The dtrace userspace this series applies atop is found at
https://github.com/oracle/dtrace-utils devel

DTrace should work against unmodified upstream kernels now, but some
features work better with a couple of patches and with natively-built CTF. A
kernel tree that does that is here (do a make ctf after building, and a
make ctf_install after make modules_install):
https://github.com/oracle/dtrace-linux-kernel devel/v2/6.6/dtrace

Changes since v1:
 - errors in configure, configure --help etc no longer delete
   options from a previous run
 - some HAVE_LIB* options relating to external libs are now available
   as --with-lib*...
 - a bunch of causes of needless re-execution of configury tests
   and other expensive things are fixed (make help is ten times
   faster now)
 - a bunch of cases where make could have overwritten configure's
   generated output are fixed
 - drop some needless churn in a few commits

Nick Alcock (9):
  build: overridable configuration variables
  build: get the architecture from gcc -dumpmachine, not uname -m
  build: avoid building config.mk unnecessarily
  build: avoid needless re-executions
  build: only touch .dir.stamp if it doesn't already exist
  build: force regeneration of config.{h,mk} when configure options
    change
  build: support make help-overrides and make help-options
  build: support make help-overrides-option and help-overrides-header
  build: add configure script

 GNUmakefile |  95 ++++++++++++++++-----------
 Makeconfig  | 149 +++++++++++++++++++++++++++++++++---------
 Makeoptions |  19 +++---
 README.md   |  15 +++--
 configure   | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 378 insertions(+), 81 deletions(-)
 create mode 100755 configure


base-commit: 347ad8afa3a13135641ea2e6c73692d1743254be
-- 
2.43.0.272.gce700b77fd




More information about the DTrace-devel mailing list