https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121963
Bug ID: 121963 Summary: Make it possible to change the location of gcm.cache dir Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jussi.pakkanen at mailbox dot org Target Milestone: --- A longer version of this issue can be found in this blog post: https://nibblestew.blogspot.com/2025/09/trying-out-import-std.html Assume you have a project A and project B. The two are created by different people and A uses B by compiling it as part of its own build (as a "subproject" basically). The build is done with Ninja (probably the most common backend). Ninja has the property that it never recurses into subdirs, instead all command invocations are done from the same directory, typically the root of the build tree. This means that both of these projects output their modules in the same directory. If they both have a module with the same name (e.g. "utils"), they will clash. Even more annoyingly, if both of them use "import std", but have different flags for it (e.g. the C++ language version), they will clash. The only real ways of changing this that I can see are either to officially state that multiple modules of the same name within a single build tree are forbidden or have some sort of a way to specify the gcm.cache directory and have an include flag for it (I think Fortran uses -J for this).