This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>
- Cc: brobecker at adacore dot com, yao at codesourcery dot com, gdb-patches at sourceware dot org, ktietz at redhat dot com
- Date: Wed, 17 Dec 2014 11:15:42 +0000
- Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/]
- Authentication-results: sourceware.org; auth=none
- References: <87egs2vcfu dot fsf at codesourcery dot com> <20141214182341 dot GA2908 at host2 dot jankratochvil dot net> <87a92pvc0w dot fsf at codesourcery dot com> <20141215124358 dot GU5457 at adacore dot com> <20141215171225 dot GA19674 at host2 dot jankratochvil dot net> <20141215181449 dot GA5457 at adacore dot com> <20141215182057 dot GA22226 at host2 dot jankratochvil dot net> <20141215183554 dot GB5457 at adacore dot com> <20141215184014 dot GA22610 at host2 dot jankratochvil dot net> <83y4q8wxk7 dot fsf at gnu dot org> <20141215222801 dot GA28138 at host2 dot jankratochvil dot net>
On 12/15/2014 10:28 PM, Jan Kratochvil wrote:
> On Mon, 15 Dec 2014 19:57:28 +0100, Eli Zaretskii wrote:
>>> On Mon, 15 Dec 2014 04:15:43 +0100, Yao Qi wrote:
>>> # or maybe we have to use win32 api, such as GetTempPath and GetRandomFileName.
>>
>> If you write it, I can test it.
>
> In the end I have managed to test it by Wine myself:
>
> $ wine build_win32/gdb/gdb.exe -q build_win32/gdb/gdb.exe -ex start -ex 'compile code 1' -ex 'set confirm no' -ex quit
> [...]
> Temporary breakpoint 1, main (argc=1, argv=0x241418) at ../../gdb/gdb.c:29
> 29 args.argc = argc;
> Could not load libcc1.so: Module not found.
>
> Even if it managed to load libcc1.so (it needs host-dependent name libcc1.dll)
> then it would soon end up at least on:
>
> default_infcall_mmap:
> error (_("This target does not support inferior memory allocation by mmap."));
>
> As currently there is only:
>
> linux-tdep.c:
> set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap);
>
> While one could debug Linux targets from MS-Windows host I find it somehow
> overcomplicated now when we are trying to get it running at least on native
> Linux x86*.
>
> The 'compile' project needs a larger port effort to run on MS-Windows.
>
> OK for check-in?
Can you send a version that does an autoconf check for mkdtemp instead?
> + error (_("mkdtemp needs to be implemented for MS-Windows hosts"));
I think the error text should be a bit more generic and not mention a
particular implementation detail, like "Command not supported on this host." or
some such -- I think the testsuite will need to be extended to handle this error,
presumably in skip_compile_feature_tests.
Thanks,
Pedro Alves