So much confusion for something so simple ...
On 11/22/2018 10:30 PM, Liu Hao wrote:
在 2018/11/23 上午10:37, Edward Diener 写道
I do not believe I am trying to upgrade an MSYS2 package. Rather I am
trying to fix a mingw-64/gcc-8.1 installation in Windows itself so that
the binutils part of the installation can be replaced by the fixed
component(s). In particular I am trying to upgrade the ld.exe in the
installation so that it performs the link correctly even for clang. I
Then you can try extracting LD.EXE from the built package, without
installing it using `pacman -U`.
don't mind creating another completely separate mingw-64/gcc-8.1
installation under MSYS2 which works natively under Windows if
necessary, as long as it contains the fix. Does this make any difference
in your instructions ?
The installation directory seems hard-coded to `/mingw32` or `/mingw64`.
As mentioned above, you can always extract `.tar.xz` packages by hand
and I don't think there is any difference.
Caution --- If you copy a file into a MinGW/MSYS system directory then
you will eventually find trouble updating with pacman unless you give
explicit instruction to `--overwrite' the files.
Also when doing things within MSYS2 am I opening
the MSYS2 MSYS prompt or am I opening the MSYS2 MingW 32-bit or MSYS2
MingW 64-bit prompts ? I am on a 64-bit machine. From what I understand
about MSYS2 the MingW 32-bit and MingW 64-bit prompts allow me to create
native Windows applications, but I do not understand the difference
between using either of the two.
In the MSYS2 shell `gcc` refers to the GCC compiling for MSYS2, in the
MinGW32 shell `gcc` refers to the gcc compiling for i686-w64-mingw32,
and in the MinGW64 shell `gcc` refers to the gcc compiling for
x86_64-w64-mingw32. The system roots for these subsystems are '/usr',
'/mingw32' and '/mingw64' respectively.
To state what Liu said in different words.
If I start MSYS with the preferred icon and choose `Mingw-w64 64bit`
button then PATH has /mingw64/bin as its first member so that `which
gcc` finds /mingw64/bin/gcc. If I choose `Mingw-w64 32bit` then `which
gcc` finds /mingw32/bin/gcc. If I choose MSYS2 then `which gcc` finds
/usr/bin/gcc. In all cases the PATH is adjusted but in the Mingw-w64
{32,64}bit cases the /mingw{32,64}/bin directory is prepended.
Also the MSYSTEM environment variable is adjusted so that the effect of
`uname -s` changes. The values of MSYSTEM are one of MINGW64, MINGW32
or MSYS. It is this that will cause config.guess to determine the
native build system to be one or the other because of the result of
`uname -s`.
`makepkg-mingw` should be run in a MSYS2 shell to prevent unexpected
interference of 32 and 64 bit programs, but I haven't tried running it
in a MinGW32 or MinGW64 shell. Honestly I build packages mostly in CMD
(I only ever tried building something in the MSYS2 shell a couple of times).
You need MSYS to use makepkg, it is a shell script dependent on bash.
The makepkg-mingw script eventually passes the process to makepkg with
an option to use the /etc/makepkg-mingw{32,64}.conf file.
--
Earnie
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public