There is an updated pull request by repk against master on the void-packages repository https://github.com/repk/void-packages php-cross https://github.com/void-linux/void-packages/pull/20952 php: Add cross compilation support Support cross compilation by providing builddir path in configure and patching phar and pear makefiles to use host's php binary to install themselves. Therefore it also makes php a hostmakedepends when crosscompiling. A patch file from https://github.com/void-linux/void-packages/pull/20952.patch is attached