[U-Boot] kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
Tom Rini
trini at konsulko.com
Sat Apr 28 22:19:58 UTC 2018
On Mon, Apr 16, 2018 at 01:18:31PM +0900, Masahiro Yamada wrote:
> The __FILE__ macro is used everywhere in U-Boot to locate the file
> printing the log message, such as WARN_ON(), etc. If U-Boot is
> built out of tree, this can be a long absolute path.
>
> This is because Kbuild runs in the objtree instead of the srctree,
> then __FILE__ is expanded to a file path prefixed with $(srctree)/.
>
> A brand-new option from GCC, -fmacro-prefix-map, solves this problem.
> If your compiler supports it, __FILE__ is the relative path from the
> srctree regardless of O= option. This provides more readable log,
> more reproducible builds, and smaller image size.
>
> [ Linux commit: a73619a845d5625079cc1b3b820f44c899618388 ]
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180428/76e1ea21/attachment.sig>
More information about the U-Boot
mailing list