One of my upcoming patches is going to be a bit controversial (or maybe I'm just missing something). In either case, I'm going to go ahead and start the discussion early.
First a bit of vocabulary. I'm not including this because I think people here don't know these terms. It's because *I* am probably using them wrong. But by defining how I am using them, hopefully you will at least understand what I am trying to convey. * SourceDir - The directory that contains the git repository of all the mingw-w64 source files * BuildDir - The directory into which you will be building the output of the files in the SourceDir. * OutputDir - The directory into which the useful output files (libraries, headers, etc) will be installed when running "make install". Its location can be specified by using --prefix on the configure command. * BinutilsDir - A loose term that encompasses the system build utilities (gcc, clang, etc) and their support files (includes, libs, etc). With that in mind, here's my question: When I am building mingw-w64, which of these directories should the compiler be searching for include files, and in which order? In my view, the correct answer (in order) is SourceDir, BuildDir, and BinutilsDir. OutputDir should not be searched at all. However, that does not appear to be what is happening. The correct SourceDirs and BuildDirs frequently aren't searched at all, and OutputDir is. As a result, the Mingw-w64 headers you are modifying while working on the project aren't used during the build (IOW you end up using old copies) unless you explicitly copy them around before running make. While this is a hassle for people maintaining mingw-w64, it's got to be worse for users who "grab the latest" and don't understand what's required to build it. This just seems wrong. I believe that when building mingw-w64, the default should be to use the mingw-64 headers first (since that's where the newest files will be), then BuildDir (think: generated _mingw.h), then BinutilsDir (for things like ia32intrin.h, etc). OutputDir should not be used at all, since it is (at best) a copy of a previous (ie out-of-date) build. I have a patch for makefile.am that makes things "better" (ie adding the appropriate -I where needed), but I assume there's more to this issue than I currently understand. Since it will probably take several emails for even the best teachers to fix my misunderstanding here, I'm starting the discussion before sending the patch. Be gentle... dw ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public