diff options
author | Uri Simchoni <uri@samba.org> | 2019-10-07 00:37:31 +0300 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-12-04 08:58:19 +0000 |
commit | 98dc227dce980307ec58bd326b773e41272d4c98 (patch) | |
tree | 0d6ce463e45b537b3f38aa3426240940cdb2c0f3 /buildtools | |
parent | e1a0813aa5c2f52648667863a082f9ebf82d0d88 (diff) | |
download | samba-98dc227dce980307ec58bd326b773e41272d4c98.tar.gz |
wafsamba: avoid pre-forking if cross-compilation is enabled
Waf supports pre-forking to run configuration tests, but this
doesn't play well with Samba's cross-compilation support, because
Samba monkey-patches the actual fork+exec, which doesn't happen
in a pre-forked process pool.
This patch emulates the impact of WAF_NO_PREFORK env var when
cross-compilation is enabled.
The blueprint for the solution has been suggested by Thomas Nagy
in https://bugzilla.samba.org/show_bug.cgi?id=13846#c7 (item #2)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 5a4ade953420a4122c80d291ac53310abd6a279c)
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_cross.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py index 60ddf967237..6fca470f2b7 100644 --- a/buildtools/wafsamba/samba_cross.py +++ b/buildtools/wafsamba/samba_cross.py @@ -147,6 +147,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None): if real_Popen is None: real_Popen = Utils.subprocess.Popen Utils.subprocess.Popen = cross_Popen + Utils.run_process = Utils.run_regular_process + Utils.get_process = Utils.alloc_process_pool = Utils.nada ret = [] |