[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Texinfo 7.1.0.91 pretest results, mingw
From: |
Gavin Smith |
Subject: |
Re: Texinfo 7.1.0.91 pretest results, mingw |
Date: |
Tue, 3 Sep 2024 18:55:00 +0100 |
On Mon, Sep 02, 2024 at 09:58:06PM +0200, Bruno Haible wrote:
> * 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.
It is almost more confusing to have such similar systems (cygwin and mingw,
the latter being synonymous with native MS-Windows) running together than
to be cross-compiling for a completely different platform. When the two
platforms are incorrectly mixed up, it appears to work most of the time,
except when it doesn't due to subtle differences.
> * "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.
>
A similar error would come if aarch64-linux-gnu programs ran most of the time
on x86_64-linux-gnu with no apparent problems, giving a false sense of
security.
distribution of texi2any_internals.info, Gavin Smith, 2024/09/03
Re: distribution of texi2any_internals.info, Patrice Dumas, 2024/09/03
Re: distribution of texi2any_internals.info, Gavin Smith, 2024/09/03