Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.arch Subject: Re: is Vax addressing sane today Date: Mon, 30 Sep 2024 14:07:47 +0200 Organization: A noiseless patient Spider Lines: 55 Message-ID: References: <2024Sep10.094353@mips.complang.tuwien.ac.at> <8f031f2b5082d97582b1231a060f2b9f@www.novabbs.org> <8DgJO.171468$1m96.17060@fx15.iad> <86msjr2bec.fsf@linuxsc.com> <86ikue2zlr.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 30 Sep 2024 14:07:47 +0200 (CEST) Injection-Info: dont-email.me; posting-host="431bab09004aa83519704625a7d1958c"; logging-data="2319764"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DTuK1nHoropHo3kH553dfovvhmYDzb4w=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:Zjbq4cI11EvJdT7FRpxv/51UXcg= In-Reply-To: Content-Language: en-GB Bytes: 3778 On 29/09/2024 21:30, Thomas Koenig wrote: > Tim Rentsch schrieb: >> Thomas Koenig writes: >> >>> Tim Rentsch schrieb: >> [...] >>>> I am currently in the position of needing to take some code >>>> written for Linux/Unix and get it running in MS Windows. >>>> >>>> My attempts to use MSVC have been frustrating, because of some >>>> limitations of that environment. The two most prominent are >>>> these: long double is only 64 bits, and there are no integer >>>> types of 128 bits that I could find. >>> >>> Depending on what you need to to, you can give MinGW-w64 a try. >>> It works either as a cross-compiler from Linux or on Windows using >>> msys2 or Cygwin. >> >> Thank you for these suggestions. I have started to explore >> mingw but not yet the others. Is there a difference between >> mingw and mingw-w64, do you know? > > One is a fork of the other, I believe. > mingw-w64 was started as a fork of mingw, initially created to support generating 64-bit binaries and because of disagreements with the pace of development in mingw. >> Also do you know if mingw >> is compatible with MSVC, as long as long double is not used? > > I believe that Mingw-w64 uses the Windows ABI, but that is a > belief, not something I know first-hand; I haven't looked > at the assembly. There is a reasonably defined ABI for 64-bit Windows, so I think there will be compatibility for most things in C. C++ is more complicated and much more likely to have incompatibilities. There are approximately a hundred and one different C ABI's and calling conventions for 32-bit Windows, since MS never actually defined one, so things are a bit of a mess there. (DLL calling conventions are clearer.) I believe the two most popular ways of running "Linux-like" software and gcc on Windows are using WSL (which is more of a virtualisation layer), and mingw-64 for the compiler target (with either gcc or clang) and msys2 as an environment and source of *nix utilities and libraries. mingw/msys is considered old and limited (32-bit only), while Cygwin is considered slow and clunky by many. At least, that is my understanding.