Fix GMP cross-compilation when Wine installed (#8645)
authorAndres Noetzli <andres.noetzli@gmail.com>
Tue, 26 Apr 2022 02:06:19 +0000 (19:06 -0700)
committerGitHub <noreply@github.com>
Tue, 26 Apr 2022 02:06:19 +0000 (02:06 +0000)
commitb0500dd28ec42d6a1bada80d34b74ce8aea896cc
treedba8a5b8174f659a48ad497fafa9bd7f43afdb93
parent7f445f50998e787915052e125c85077c69fd8a0f
Fix GMP cross-compilation when Wine installed (#8645)

When Wine is installed on the system, our current invocation of GMP's
`configure` fails. To fix the issue, we pass `CC_FOR_BUILD` that is used
to compile build-time programs. When compiling GMP with `--enable-cxx`,
it also seems to be necessary to pass `--build` to make `configure`
pass. Passing `--build` for cross-compilation builds is also recommended
by the [GMP documentation](https://gmplib.org/manual/Build-Options).
cmake/FindGMP.cmake