在 2018/11/26 上午6:19, Edward Diener 写道: > On 11/24/2018 5:17 PM, Mateusz Mikuła wrote: >> Changelog for release and git version differ a lot and it won't apply >> cleanly. >> Your should get rid of Changelog part and it will work. > > Thanks ! After getting rid of the Changelog part and adding a few more > needed packages, I finally got binutils built with the fix successfully. > It did indeed fix the bug I had encountered with using clang-7.0 with a > mingw-w64/gcc backend. >
Congrats. :> > I still do not understand the practical reason(s) for using the MSYS2 > MSYS environment versus either the MSYS2 MingW 32-bit or MSYS2 MingW > 64-bit environments, but I was able to succeed using the MSYS2 MSYS > environment and a new binutils was produce both for mingw-w64 32-bit and > mingw-w64 64-bit. It's because building Binutils (and GCC, GDB, etc. which all use automake) requires a POSIX-compliant shell, which is not available without an emulation layer, which native environments (MINGW32 and MINGW64) would be short of. It is not possible to run the `configure` script without Cygwin/MSYS/MSYS2 etc. > I copied the files in this new binutils to my > wingw-w64/gcc-8.1 32-bit and 64-bit installations respectively, and > everything is working properly with both gcc-8.1 and clang-7.0. I do > understand that each MSYS2 environment uses a different implementation > of gcc when building software, as others explained to me, but I do not > understand why some implementation of gcc should be preferred over > another in MSYS2. > It is because the GCC in the package simply named 'gcc' is not a cross compiler and does not generate code for native environments. To install the toolchain for cross compilation from MSYS2 to MinGW, run the following command: ``` pacman -S mingw-w64-cross ``` This GCC would produce executables that run natively, but the compilers, linkers, etc. are MSYS2 programs. Hence if you would like to distribute them to others you have to copy all the MSYS2 runtime. > Among my conclusions about working within MSYS2 are: > > 1) An environment variable, such as my initial VERSION_CONTROL, should > not cause problems in the build process. Maybe only a very small subset > of the user's Windows environment variables should be brought over to > the MSYS2 environment to avoid such a problem. > Let me guess. MSYS2 is designed to be able to invoke native programs. It even translate POSIX-ish paths (/c/Windows/explorer.exe) to Windows paths (C:\Windows\explorer.exe), where environment variables are passed around transparently. It can hardly be defined which and when some variables will be 'seen' or not by a specific environment. > 2) I do not understand how gpg checking, which I turned off with > '--skippgpcheck', works when building a package. Maybe I just needed an > MSYS2 package to use gpg checking and did not have it during my attempt > to build binutils. > I was told on IRC that the private key is only used by some non-MSYS2 developers. I can't recall it for now but the answer is simply 'no we can't verify it at all because we don't have the private key.' > 3) Some packages with which I needed to build binutils, such as 'make' > and 'texinfo', were not installed by default when I issued the > 'makepkg-mingw' command. Maybe there should be some MSYS2 package which > automatically installs all the software I need to build any mingw package. > There is a package called `base-devel`. (Personally I will remove GDB after installing all packages listed in it, which otherwise would interfere with the native GDB.) > Thanks to all the people who helped me to get this done correctly, > especially Liu Hao. I do appreciate your patient answers to my questions > about the process of building a mingw package. > My pleasure. :> -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
