emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WINDRES


From: Eli Zaretskii
Subject: Re: WINDRES
Date: Mon, 01 Apr 2013 14:53:23 +0300

> From: Andreas Schwab <address@hidden>
> Cc: Daniel Colascione <address@hidden>,  address@hidden
> Date: Mon, 01 Apr 2013 12:30:33 +0200
> 
> Eli Zaretskii <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]