jmeubank / tdm-gcc

TDM-GCC is a cleverly disguised GCC compiler for Windows!
https://jmeubank.github.io/tdm-gcc/
572 stars 49 forks source link

Documentation Remarks #17

Closed RoyiAvital closed 4 years ago

RoyiAvital commented 4 years ago

Hello, First it is great to see TDM-GCC is back to life!

I read https://github.com/jmeubank/tdm-distrib/blob/master/tdm64/core/README-gcc-tdm64.md and I'd be happy to understand few things:

  1. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L169 Is there a way to compile 64 Bit with 32 Bit Pointers?
  2. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L251 Could you give example for the case you mention?
  3. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L419 Could you give an example how to link to the local CRT? How does it effect the GCC libraries? What are the interations?

Thank You!

jmeubank commented 4 years ago

Hello, First it is great to see TDM-GCC is back to life!

Cheers mate, it's limping along for now, so I'm glad to see it can still be relevant!

  1. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L169 Is there a way to compile 64 Bit with 32 Bit Pointers?

I don't think so? Probably you need to elaborate on your use case for this, but in general an EXE operating in the 64-bit address space will receive addresses that are more than 2^31 bits apart. If you have code that relies on 32-bit types to hold pointers, it must be ported in order to run in the 64-bit space.

  1. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L251 Could you give example for the case you mention?

I've never seen a great use case for static libgcc linkage and shared language-specific DLL linkage (e.g. libstdc++-6.dll). TDM-GCC aims to minimize DLL linkage, but if you need DLLs, you're better off using versioned DLL files to model dependencies.

  1. https://github.com/jmeubank/tdm-distrib/blame/master/tdm64/core/README-gcc-tdm64.md#L419 Could you give an example how to link to the local CRT? How does it effect the GCC libraries? What are the interations?

When you link different versions of the Microsoft CRT, you are generally accessing the different versions documented here: https://docs.microsoft.com/en-us/cpp/c-runtime-library/c-run-time-library-reference?view=vs-2019. As far as I know, it has little effect on the GCC libraries, which are precompiled to rely on CRT functions with predictable, backwards-compatible behavior where possible. I don't know of any documentation indicating that changing the MSVCRT version breaks things. You might just have to try it and find out! However, you are relying on behavior in the MinGW-w64 libraries, which includes preprocessor guards for things like __MSVCRT_VERSION__ -- so please refer to the headers for further information. Some projects do rely on this functionality to provide backwards-to-forwards compatibility across multiple versions of Windows.

RoyiAvital commented 4 years ago

By the way, 2 requests with your permission:

  1. Could you distribute the files in ZIP file as well so they won't require Admin Rights?
  2. Any chance to have GFORTRAN for Windows?
jmeubank commented 4 years ago
  1. Could you distribute the files in ZIP file as well so they won't require Admin Rights?

ZIP archives of the individual packages that make up a distribution are available in the Github releases section for each repo. You have to download the set of packages and unzip them yourself. A good starting point is here: https://jmeubank.github.io/tdm-gcc/download/ - the Binaries links will take you to the latest releases for a given package. The MinGW.org WSL mingw-runtime package needs some additional work to create the include/features.h file.

I might look into making a ZIP file corresponding to a standard TDM and TDM64 distribution available in the future.

  1. Any chance to have GFORTRAN for Windows?

Yes, it's one of the options you can select in the installer or by downloading individual packages.

RoyiAvital commented 3 years ago

@jmeubank ,

A question, by default, which System Environment variables do you define? Or only update the %PATH% variable?

RoyiAvital commented 3 years ago

@jmeubank , Any updates on this? By the way, any plan to update to later versions of GCC?

I also don't see Fortran on the full packages options:

image