lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] kbuild: use relative path from $(srctree) instead of __FILE__
Date

Kbuild works in objtree, not in srctree. So, __FILE__ is prefixed
with $(srctree)/ for out-of-tree build.

For example, WARN_ON() will look as follows if you built your kernel
out of source tree:

WARNING: CPU: 1 PID: 1 at /path/to/build/directory/arch/arm64/kernel/foo.c:...

With this series, it will always look like follows regardless of O= option.

WARNING: CPU: 1 PID: 1 at arch/arm64/kernel/foo.c:...

If GCC does not support -Wno-builtin-macro-redefined (i.e. gcc version < 4.4),
the output is prefixed with absolute path.



Masahiro Yamada (2):
kbuild: add stringify helper to quote a string passed to C files
kbuild: redefine __FILE__ as relative path from $(srctree) if possible

Makefile | 9 +++++++++
scripts/Kbuild.include | 4 ++++
scripts/Makefile.lib | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)

--
2.7.4

\
 
 \ /
  Last update: 2017-10-12 11:58    [W:0.050 / U:0.136 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site