summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-07-30 21:54:54 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-09-09 13:51:54 +0200
commitfe5d1abcf47b2419f69d722deea902c0d44842e7 (patch)
tree34d63607468c4e1b72b1e43c2c70dacfd40c13c3 /include
parentf2cbb037a73bd91e99bbb2717e532a88929b2e12 (diff)
downloadtalos-obmc-uboot-fe5d1abcf47b2419f69d722deea902c0d44842e7.tar.gz
talos-obmc-uboot-fe5d1abcf47b2419f69d722deea902c0d44842e7.zip
clang: workaround for generated constants
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. cc: Masahiro Yamada <yamada.m@jp.panasonic.com> cc: Tom Rini <trini@ti.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kbuild.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h
index ab7805a3b4..8a9f645e42 100644
--- a/include/linux/kbuild.h
+++ b/include/linux/kbuild.h
@@ -7,14 +7,14 @@
#define __LINUX_KBUILD_H
#define DEFINE(sym, val) \
- asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+ asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
-#define BLANK() asm volatile("\n->" : : )
+#define BLANK() asm volatile("\n.ascii \"->\"" : : )
#define OFFSET(sym, str, mem) \
DEFINE(sym, offsetof(struct str, mem))
#define COMMENT(x) \
- asm volatile("\n->#" x)
+ asm volatile("\n.ascii \"->#" x "\"")
#endif
OpenPOWER on IntegriCloud