From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: WINDRES Date: Mon, 01 Apr 2013 14:53:23 +0300 Message-ID: <83ip4631sc.fsf@gnu.org> References: <83mwti382v.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1364817196 22359 80.91.229.3 (1 Apr 2013 11:53:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 11:53:16 +0000 (UTC) Cc: dancol@dancol.org, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 01 13:53:40 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UMdIw-0001gF-Mh for ged-emacs-devel@m.gmane.org; Mon, 01 Apr 2013 13:53:38 +0200 Original-Received: from localhost ([::1]:50191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMdIY-00045B-34 for ged-emacs-devel@m.gmane.org; Mon, 01 Apr 2013 07:53:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMdIQ-00044o-5b for emacs-devel@gnu.org; Mon, 01 Apr 2013 07:53:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMdIL-00056B-BM for emacs-devel@gnu.org; Mon, 01 Apr 2013 07:53:06 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:64719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMdIL-000562-2q for emacs-devel@gnu.org; Mon, 01 Apr 2013 07:53:01 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MKK00I00RLWGA00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 01 Apr 2013 14:52:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKK00ISHRO6A7D0@a-mtaout22.012.net.il>; Mon, 01 Apr 2013 14:52:55 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158516 Archived-At: > From: Andreas Schwab > Cc: Daniel Colascione , emacs-devel@gnu.org > Date: Mon, 01 Apr 2013 12:30:33 +0200 > > Eli Zaretskii writes: > > > The windres tool is looked up by the configure.ac using > > AC_CHECK_TOOL. Shouldn't that be AC_CHECK_TARGET_TOOL instead, > > No, emacs is not a (cross-)compiler. There is no target, only a build > and a host. Then maybe I don't understand what is "host" in this context. See below. > > to better support cross-compilation? > > Why do you think AC_CHECK_TOOL doesn't support cross-compilation? I'm probably just confused. The issue is how to find 'windres', which is a Binutils substitute for the Windows resource compiler. Its output is a pe-i386 object file, which then gets linked into the Emacs binary that is being produced for running on MS-Windows. Autoconf.info says: -- Macro: AC_CHECK_TARGET_TOOL (VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a prefix of the target type as determined by `AC_CANONICAL_TARGET', followed by a dash (*note Canonicalizing::). If the tool cannot be found with a prefix, and if the build and target types are equal, then it is also searched for without a prefix. As noted in *note Specifying Target Triplets::, the target is rarely specified, because most of the time it is the same as the host: it is the type of system for which any compiler tool in the package produces code. What this macro looks for is, for example, _a tool (assembler, linker, etc.) that the compiler driver (`gcc' for the GNU C Compiler) uses to produce objects, archives or executables_. So, if an Emacs that targets Windows was being built on, say, GNU/Linux, wouldn't it mean we wanted the configure script to find 'i686-pc-mingw32-windres' rather than 'windres'? IOW, isn't 'windres' a kind of compiler or assembler? And if so, what is 'i686-pc-mingw32' here: "target" or "host"? TIA