https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119154
--- Comment #14 from Igor Machado Coelho <igor.machado at gmail dot com> --- > Worth noting that mixing flags between consumers and producers of modules is > likely to cause havoc in general... this isn't well tested at all yet. > I will note though that really the safest way is still to build modules with > exactly the same flags they are consumed by; any other combination is either > known to definitely not work (and ideally we error) or completely untested > currently. Sorry for that, I really did not do it on purpose :) hahahha What happened is that I was trying to provide some experimental support of Bazel Build for GCC, then I manually built the std.gcm in the simplest way (with no flags at all), and then, Bazel automatically puts many flags (including U_FORTIFY_SOURCE), and I didn't really that my "clean of flags" already included -D_FORTIFY_SOURCE, because of how Ubuntu packages gcc... so it broke the compiler, in a apparently innocent build :) But really thanks for fixing it! P.S.: If I can quickly hijack this issue for another question, I really need to understand something about module map file on -fmodule-mapper on GCC, for this same Bazel experiment, and couldn't find this information anywhere... maybe it's another bug, I don't know (if it is, I will open it too). If I have two gcm modules stored in a folder gcm.cache/ differently from where I'm running the gcc command, example, ./myproject/bla/bla/gcm.cache/module1.gcm (and module2.gcm) and then I try to build in the following way: g++-15 -fmodules -std=c++23 -c ./myproject/bla/bla/module3.cppm -fmodule-mapper=myproject/bla/bla/mapper.txt And mapper.txt is: module1 gcm.cache/module1.gcm module2 gcm.cache/module2.gcm Is it supposed to work or the mapper.txt format is supposed to be much more complicated than just module_name and module_path, one per line? I could not make it work on g++-15. Thanks again!
