[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARJ=aAf-iG7RVDp=bs7DTScJ1GBpEpkqtKDFDJYHEekUA@mail.gmail.com>
Date: Fri, 12 Jul 2019 10:49:18 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Brian Norris <briannorris@...omium.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Jason Baron <jbaron@...mai.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Kees Cook <keescook@...omium.org>,
Borislav Petkov <bp@...e.de>,
Michal Marek <michal.lkml@...kovi.net>
Subject: Re: [RFC PATCH] bug: always show source-tree-relative paths in WARN()/BUG()
On Fri, Jul 12, 2019 at 10:23 AM Brian Norris <briannorris@...omium.org> wrote:
>
> On Thu, Jul 11, 2019 at 6:14 PM Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
> > BTW, did you see this?
> >
> > commit a73619a845d5625079cc1b3b820f44c899618388
> > Author: Masahiro Yamada <yamada.masahiro@...ionext.com>
> > Date: Fri Mar 30 13:15:26 2018 +0900
> >
> > kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
>
> Oh, wow, no I did not. If my reading is correct, that's GCC only? I've
> been using various combinations of newer (5.2) and older (4.14.y --
> didn't have that patch) kernels, older GCC (doesn't have that feature
> AFAICT), and newer Clang (doesn't appear to have that feature). So I'm
> not totally sure if I ever actually tried a combo that *could* make
> use of that. But I may give it another shot.
>
> In the event that this is GCC-specific...I don't suppose I could
> convince anybody to expend any effort (e.g., taking a patch like mine)
> to solve it for the non-GCC world?
>
> Thanks for the tip,
> Brian
GCC 8 added this flag.
So, it will be eventually all solved in the GCC world.
Clang has not supported it yet...
Trimming absolute path at run-time
is no help for reducing the kernel image.
Turning __FILE__ into a relative path at compile-time is better.
I hope Clang people will consider to support it.
I guess implementing this feature should not be so hard.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists