[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name
f.hollerer at gmx dot net
gcc-bugzilla@gcc.gnu.org
Tue Oct 29 19:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176
--- Comment #11 from f.hollerer at gmx dot net ---
(In reply to joseph@codesourcery.com from comment #9)
> On Tue, 29 Oct 2019, f.hollerer at gmx dot net wrote:
>
> > This would:
> >
> > - shorten the output of assert()
> > - minimize the image size due to shorter strings
> > - make the build reproduceable as the output does not depend on the current
> > working directory.
>
> Note that we have the -ffile-prefix-map / -fmacro-prefix-map /
> -fdebug-prefix-map options you can use to specify a mapping from the
> actual directory names used in the build to the names you want to appear
> in the output.
Thank you for pointing me to this options. I have to get a more recent compiler
to try them, but according the documentation they should solve my problem.
More information about the Gcc-bugs
mailing list