On 11/22/2018 10:25 PM, Greg Jung wrote:
The recipe from Liu Hao is correct for what it describes and now the
nomenclature
needs to be discussed so that you can explain what you need.  You have
called something
"mingw-64" which is none of the options.

When I wrote mingw-64 I meant mingw-w64.

The MINGW group that MSYS2 uses employs the preamble, "mingw-w64" for the
native software
  (i.e.. gcc.) so  the 32-bit versions are called "mingw-w64-i686-<name> and
the 64-bit versions
are called "mingw-w64-x86_64-"<name>.  MSYS2 is a posix system, a subset of
CYGWIN.
In MSYS2, the directory tree /mingw64 holds native programs produced by/for
mingw-w64-x86_64,
and /mingw32 does the same, for the i686 mode.  The name, "mingw32" is also
used as a generic identifier
(as for the make program, "mingw32-make" found in both /mingw64/bin and in
/mingw32/bin)

For binutils, you may have up to three versions of them. I do:

$ pacman -Ss binutils
mingw32/mingw-w64-i686-binutils 2.29.1-1 (mingw-w64-i686-toolchain)
[installed: 2.25.1-1]
     A set of programs to assemble and manipulate binary and object files
(mingw-w64)
mingw64/mingw-w64-x86_64-binutils 2.29.1-1 (mingw-w64-x86_64-toolchain)
[installed: 2.25.1-1]
     A set of programs to assemble and manipulate binary and object files
(mingw-w64)
msys/binutils 2.28-1 (msys2-devel) [installed: 2.25-2]
     A set of programs to assemble and manipulate binary and object files

OK, the pacman -Ss binutils command gives me:

mingw32/mingw-w64-i686-binutils 2.30-5 (mingw-w64-i686-toolchain)
A set of programs to assemble and manipulate binary and object files (mingw-w64)
mingw64/mingw-w64-x86_64-binutils 2.30-5 (mingw-w64-x86_64-toolchain)
A set of programs to assemble and manipulate binary and object files (mingw-w64)
msys/binutils 2.30-1 (msys2-devel)
    A set of programs to assemble and manipulate binary and object files
msys/mingw-w64-cross-binutils 2.30-1 (mingw-w64-cross-toolchain mingw-w64-cross)
    A set of programs to assemble and manipulate binary and object files

but the paths do not correspond to anything I can see so I assume it is some package nomenclature.

I have installed mingw-w64 distributions under Windows and need to update the ld.exe of one of those distributions, for gcc-8.1, so that clang 7.0 might work. So the original answer, as I gather it, was to build the latest mingw-w64, with the necessary patch which fixes my problem, under MSYS2, since it appears I need a posix-like environment to build a mingw-w64 distribution from source. My initial confusion is whether I use the MSYS2 MSYS subsystem or one of the MSYS2 MingW subsystems to do this, or if it even matters, so I will try the MSYS2 MSYS subsystem.

Once I do this I assume that I have produced Windows executables and libraries and can copy the ld.exe I produce to the mingw-w64 distribution I have previously installed.


On Thu, Nov 22, 2018 at 6:49 PM Edward Diener <
eldlistmaili...@tropicsoft.com> wrote:

On 11/22/2018 9:07 PM, Liu Hao wrote:
在 2018/11/23 上午7:50, Edward Diener 写道:
There is a bug which in binutils which causes clang targeting
mingw-64/gcc on Windows to create a bad windows executable. The bug is



If you already have MSYS2 then upgrading its packages is easy:

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
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 ? 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.


1. Clone 'https://github.com/Alexpux/MINGW-packages.git'.
2. CD into 'mingw-w64-binutils', where there are a series of patches and
     a file named 'PKGBUILD'.
3. Save the commit in question as a patch file.
4. Add that patch into 'PKGBUILD'. Note that there are two places where
     it is expected. The checksum need not be updated.
5. Run `updpkgsums` in an MSYS2 shell to update the checksum for the new
     patch.
6. Run `makepkg-mingw` in an MSYS2 shell. This builds both mingw32 and
     mingw64 packages for you.
7. Wait for the build process to finish. There should be sort of
     'mingw-w64-{i686,x86_64}-binutils*.tar.xz' in the current directory
     after the packages are built successfully.
8. Run `pacman -U <SOME.TAR.XZ>' to install these packages. Remember to
     replace <SOME.TAR.XZ> with the real names of your packages. Wildcards
     are allowed.



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to