Cross-compiling via MinGW with wine-binfmt: Cannot determine executable suffix
Marc Glisse
marc.glisse at inria.fr
Sat Jul 25 20:48:45 UTC 2020
On Sat, 25 Jul 2020, John Scott wrote:
> With Wine's binfmt support installed, which should enable running the checks
> among other things, it seems like ./configure gets confused regardless of
> whether I do a normal cross-compile, or fool configure to think
> host=build=mingw.
Note that the part causing trouble is building host tools (to generate
tables that get included in the library, in particular), not the
cross-compiling part.
> Other projects seem to handle this okay (tried with cURL), so I think GMP's
> script might be the problem. I've attached my config.log. At first it prints:
> configure:9176: checking for suffix of executables
> configure:9183: x86_64-w64-mingw32-gcc -o conftest.exe -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 conftest.c >&5
> configure:9187: $? = 0
> configure:9209: result: .exe
> configure:9231: checking whether we are cross compiling
> configure:9239: x86_64-w64-mingw32-gcc -o conftest.exe -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 conftest.c >&5
> configure:9243: $? = 0
> configure:9250: ./conftest.exe
> configure:9254: $? = 0
> configure:9242: result: no
>
> But later it keeps invoking gcc, with explicit output filenames, but only
> checks for ./conftest without an extension each time:
> configure:9955: checking build system compiler x86_64-w64-mingw32-gcc
> configure:9968: x86_64-w64-mingw32-gcc conftest.c
> configure:9971: $? = 0
> ./configure: line 9973: ./a.out: No such file or directory
> ./configure: line 9973: ./b.out: No such file or directory
> configure:9978: result: yes
> configure:9997: checking for build system preprocessor
> configure:10008: x86_64-w64-mingw32-gcc -E conftest.c
> # 1 "conftest.c"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "conftest.c"
> configure:10011: $? = 0
> configure:10026: result: x86_64-w64-mingw32-gcc -E
> configure:10033: checking for build system executable suffix
> configure:10047: x86_64-w64-mingw32-gcc conftest.c -o conftest.exe
> configure:10050: $? = 0
> ./configure: line 10052: ./conftest: No such file or directory
If you were really on windows, wouldn't that work, with windows adding an
implicit .exe at the end? Then the issue is with pretending to be on
windows.
./configure --host=x86_64-w64-mingw32
make
make check
seems to run the tests under wine here...
--
Marc Glisse
More information about the gmp-discuss
mailing list