We discussed the __FILE__ problem when U-Boot is built out of tree. https://www.mail-archive.com/u-boot@lists.denx.de/msg242852.html
The deeper your build directory is located, the larger your U-Boot image becomes. If your platform has memory footprint limit, this is a problem. Recently, I submitted the following patches to Kbuild ML. (no RFC, this time) https://patchwork.kernel.org/patch/10001419/ https://patchwork.kernel.org/patch/10001409/ I consider them for Linux 4.15 unless there is a strong objection or a problem report. This series is a port for U-Boot. If Tom wants to pick this up earlier, it is OK. If not in hurry, you can wait for the activity in Linux. Either will do. Changes in v2: - Rephrase comments for clarification - Fix a typo 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 Michal Marek (1): kbuild: Get rid of KBUILD_STR Makefile | 9 +++++++++ scripts/Kbuild.include | 4 ++++ scripts/Makefile.lib | 8 ++++---- 3 files changed, 17 insertions(+), 4 deletions(-) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot