Hello dw, 2016-08-17 4:22 GMT+02:00 David Wohlferd <d...@limegreensocks.com>: > 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).
Thanks for pointing out your nomenclature. These names are always a well of misunderstanding. (I use in common instead of binutilsDir the name ToolsDir ... and for OutputDir the name InstallDir) > 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. Why it shouldn't search in OutputDir? where do you install headers & co too? Anyway, as we have one generated headers (_mingw.h, sdks, ...), it is mandatory to (atleast) configure/build headers before trying to build crt. The include paths in SourceDir are in "mingw-w64-headers/crt/", and "mingw-w64-headers/include". Additional the build directory of the headers for the generated headers. In fact it is easier to install headers before, and just point to the include directory in OutputDir (<target>/include for gcc) > 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. See comment above. > 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 agree that using current headers is the thing to > 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 So having a way to use top-level make to build everything without need of pre-installing is something of interest IMO. Regards, Kai ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public