]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: fix asm-offset generation to work with clang
authorJeroen Hofstee <jeroen@myspectrum.nl>
Fri, 21 Apr 2017 06:21:11 +0000 (15:21 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 23 Apr 2017 06:51:26 +0000 (15:51 +0900)
commita86ab6936956e689aa41dd02043f95cb34054ca6
tree7645f9967cf133854eefd270ee84264cc3d614da
parent57450d79779c561164142f4a9659d701936a1c7c
kbuild: fix asm-offset generation to work with clang

KBuild abuses the asm statement to write to a file and
clang chokes about these invalid asm statements. Hack it
even more by fooling this is actual valid asm code.

[masahiro:
 Import Jeroen's work for U-Boot:
 http://patchwork.ozlabs.org/patch/375026/
 Tweak sed script a little to avoid garbage '#' for GCC case, like
 #define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS       # */ ]

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
include/linux/kbuild.h
scripts/Makefile.lib