https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121629
Gaius Mulley <gaius at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2025-08-21 Ever confirmed|0 |1 --- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> --- A followup proposal concludes in: https://lists.nongnu.org/archive/html/gm2/2025-04/msg00022.html To summarise: The m2 search path would include: $(includedir)/m2 in the case of: $ gm2 hello.mod and in the case of: $ gm2 -fpim hello.mod $(includedir)/m2/m2pim:$(includedir)/m2 it seems that gm2 needs to support local projects, installed projects and gcc version specific libraries. Current state of play ===================== Currently -fpim appends $(gm2 --print-file-name=)m2/m2pim to the m2 module search path. Also currently -flibs=foo appends $(gm2 --print-file-name=)m2/foo to the module search path. Note that the gm2 driver program will append $(gm2 --print-file-name=)m2/m2iso to the end of the m2 search path. Proposed change =============== The path $(includedir)/m2 is appended to the m2 search path. In the case for $ gm2 -fpim or $ gm2 -flibs=pim The path $(includedir)/m2/m2pim is appended to the m2 search path It is proposed to implement the option: -fm2-project-stem=bar which will prepend: bar/m2 to the search path and if the dialect or library selection is chosen after the project as in the case: -fm2-project-stem=bar -fiso this will result in prepending: bar/m2/m2iso:bar/m2 to the path. In summary the general cases are appended last and the dialect specific will appear first. The precedence will be: user -I paths, user project paths, global system wide paths, gcc versioned paths.