From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15642 invoked by alias); 15 Dec 2014 22:28:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15619 invoked by uid 89); 15 Dec 2014 22:28:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 15 Dec 2014 22:28:13 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBFMS6lB011440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Dec 2014 17:28:06 -0500 Received: from host2.jankratochvil.net (ovpn-116-142.ams2.redhat.com [10.36.116.142]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBFMS20b014230 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 15 Dec 2014 17:28:04 -0500 Date: Mon, 15 Dec 2014 22:28:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org, ktietz@redhat.com Subject: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/] Message-ID: <20141215222801.GA28138@host2.jankratochvil.net> References: <87egs2vcfu.fsf@codesourcery.com> <20141214182341.GA2908@host2.jankratochvil.net> <87a92pvc0w.fsf@codesourcery.com> <20141215124358.GU5457@adacore.com> <20141215171225.GA19674@host2.jankratochvil.net> <20141215181449.GA5457@adacore.com> <20141215182057.GA22226@host2.jankratochvil.net> <20141215183554.GB5457@adacore.com> <20141215184014.GA22610@host2.jankratochvil.net> <83y4q8wxk7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <83y4q8wxk7.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00429.txt.bz2 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1147 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? Thanks, Jan --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename=1 Content-length: 627 gdb/ChangeLog 2014-12-15 Jan Kratochvil Fix MinGW compilation. * compile/compile.c (get_compile_file_tempdir): Call error on _WIN32. --- ./gdb/compile/compile.c 2014-12-14 02:48:38.000000000 +0100 +++ ./gdb/compile/compile.c 2014-12-15 23:21:28.788716340 +0100 @@ -191,7 +191,11 @@ get_compile_file_tempdir (void) strcpy (tname, TEMPLATE); #undef TEMPLATE +#ifdef _WIN32 + error (_("mkdtemp needs to be implemented for MS-Windows hosts")); +#else tempdir_name = mkdtemp (tname); +#endif if (tempdir_name == NULL) perror_with_name (_("Could not make temporary directory")); --AhhlLboLdkugWU4S--