Hi Gavin,

> I don't know if this is a silly question but why does build say
> "Build in cygwin" if it is the mingw32 build?  mingw32 is not the same
> platform as cygwin.  Is this cross-compiling?

Oh, you got deep into philosophers' arguments. Too many simplifications
and words for concepts that don't match reality, resulting in an inability
to reach valid conclusions.

Need to clarify some things.

  * mingw is not a platform. It is a toolchain (set of runtime libraries,
    together with a customized GCC).

  * There are several development environments that people use for creating
    binaries for it. There are at least
      - Cygwin with installed mingw-* packages,
      - MSYS2,
      - Debian/Ubuntu with cross tools, using WINE as intermediate layer
        for executing Windows binaries.

  * "Cross-compiling" is a term that is better avoided, because different
    people have different definitions for it. Even the GNU Autoconf manual
    employs this term to mean different things in different places.

    As an example, suppose you have, on x86_64-linux-gnu, an aarch64-linux-gnu
    environment (binutils, gcc, glibc, include files). When you pass
    --host=aarch64-linux-gnu to './configure', is this cross-compilation?
    It depends! By default it is cross-compilation, yes. But once you have
    executed the commands
      $ sudo update-binfmts --install qemu-aarch64 /usr/bin/qemu-aarch64 
--magic 
'\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00'
 --mask 
'\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
 --offset 0 --credential no
      $ export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
    aarch64 binaries run on your system, and the configuration is thus
    behaving nearly exactly like x86_64 compilation.

  * Building mingw binaries in a Cygwin environment is similar: These binaries
    run just like Cygwin binaries. The main differences are file names and
    the interpretation of some environment variables (like PATH).

> Since the texi2any program is used in the build there could be a problem
> with cross-compiling if the program is built for "host" but is run on
> the "build" system.

Of course, the definition of the configure options --host and --build is that
the compiler generates binaries for --host, but the current system _identifies_
as --build. That is how it's meant to work.

File names and PATH variables are the tricky things here. You may need to insert
file name conversion ('cygpath -w' invocations) in some places. The question
here is, where and why.

Bruno




Reply via email to