Ximin Luo <infini...@pwned.gg> writes: > Boris Kolpackov: > > > This does feel like we are trying to fix the issue in the wrong place. > > Also, won't such broken packages normally store all options (including > > -I) rather than just CFLAGS? And if the answer is no, then perhaps you > > could put -ffile-prefix-map into CPPFLAGS instead of CFLAGS? Kind of > > even feels right seeing that it affects the preprocessor. > > > > The broad issue affects -fdebug-prefix-map as well, not just __FILE__.
-ffile-prefix-map is the "common" option that (currently) takes care of both debug and macro remapping (and should we add any new -f*-prefix-map, those as well). > Such packages are not "broken"; GCC itself stores command-line > arguments in DW_AT_producer and as mentioned there was a bug to > special-case filtering -fdebug-prefix-map out of that. > > Now we'll have to add exceptions for -ffile-prefix-map and all > the other flags you added, and everything else that might be > added in future. -ffile-prefix-map and -fmacro-prefix-map are already excluded. And there is a note at the appropriate place in source code to exclude any new -f*-prefix-map should they be added. You also haven't answered my question about -I: don't the projects that embed CFLAGS also embed CPPFLAGS (and thus -I's with absolute/varying paths)? And if the answer is no, then can't you use the same approach to make -ffile-prefix-map a non-issue? Boris