Sujet : Re: 32 bits time_t and Y2038 issue
De : HBBroeker (at) *nospam* gmail.com (Hans-Bernhard Bröker)
Groupes : comp.arch.embeddedDate : 18. Mar 2025, 23:31:04
Autres entêtes
Message-ID : <m3uah8F5prcU1@mid.dfncis.de>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
Am 18.03.2025 um 21:58 schrieb Grant Edwards:
On 2025-03-18, David Brown <david.brown@hesbynett.no> wrote:
msys2 is totally different. The binaries are all native Windows
binaries, and they all work within the same Windows environment as
[...]
Are the make recipes are run using a normal Unix shell (bash? ash?
bourne?) with exported environment variables as expected when running
'make' on Unix?
Pretty much, yes. There are some gotchas in handling of path names, and particularly their passing to less-than-accomodating, native Windows compilers etc.. And the quoting of command line arguments can become even dicier than native Windows already is.
There be dragons, but MSYS2 will keep the vast majority of them out of your sight.
The gnu make functions [e.g $(shell <whatever>)] all work as epected?
Yes, as long as you stay reasonable about the selection of things you try to run that way, and keep in mind you may have to massage command line arguments if <whatever> is a native Windows tool.
For reference, MSYS2 is also the foundation of Git Bash for MS Windows, which you might be familiar with already...
The underlying technology of MSYS2 is a fork of the Cygwin project, which is an environment that aims to provide the best emulation of a Unix environment they can, inside MS Windows. The key difference of the MSYS2 fork lies in a set of tweaks to resolve some of the corner cases more towards the Windows interpretation of things.
So, if your Makefiles are too Unix centric for even MSYS2 to handle, Cygwin can probably still manage. And it will do it for the small price of many of your relevant files needing to have LF-only line endings.
Here's a rough hierarchy of Unix-like-ness among Make implementations on a PC, assuming your actual compiler tool chain is a native Windows one:
0) your IDE's internal build system --- not even close
1) original DOS or Windows "make" tools
2) fully native ports of GNU make (predating MSYS)
3) GNU Make in MSYS2
4) GNU Make in Cygwin
5) WSL2 --- the full monty
I'll also second an earlier suggestion: for newcomers with little or no present skills in Makefile writing, CMake or Meson can be a much smoother entry into this world. Also, if you're going this route, I suggest to consider skipping Make and using Ninja instead.