wafsamba: avoid pre-forking if cross-compilation is enabled
authorUri Simchoni <uri@samba.org>
Sun, 6 Oct 2019 21:37:31 +0000 (00:37 +0300)
committerUri Simchoni <uri@samba.org>
Sun, 20 Oct 2019 12:06:30 +0000 (12:06 +0000)
commit5a4ade953420a4122c80d291ac53310abd6a279c
tree45fe1ef95f6ddcd7c89d92a6b53283f14c39d820
parente00e93350288dc212fed3f1be2adf78dcb6e58e7
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>
buildtools/wafsamba/samba_cross.py