aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kbuild.h6
-rw-r--r--scripts/Makefile.lib8
2 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h
index 22a72198c14b..4e80f3a9ad58 100644
--- a/include/linux/kbuild.h
+++ b/include/linux/kbuild.h
@@ -2,14 +2,14 @@
2#define __LINUX_KBUILD_H 2#define __LINUX_KBUILD_H
3 3
4#define DEFINE(sym, val) \ 4#define DEFINE(sym, val) \
5 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 5 asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
6 6
7#define BLANK() asm volatile("\n->" : : ) 7#define BLANK() asm volatile("\n.ascii \"->\"" : : )
8 8
9#define OFFSET(sym, str, mem) \ 9#define OFFSET(sym, str, mem) \
10 DEFINE(sym, offsetof(struct str, mem)) 10 DEFINE(sym, offsetof(struct str, mem))
11 11
12#define COMMENT(x) \ 12#define COMMENT(x) \
13 asm volatile("\n->#" x) 13 asm volatile("\n.ascii \"->#" x "\"")
14 14
15#endif 15#endif
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 8109c133887d..2209ed696fb4 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -413,10 +413,14 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
413# --------------------------------------------------------------------------- 413# ---------------------------------------------------------------------------
414 414
415# Default sed regexp - multiline due to syntax constraints 415# Default sed regexp - multiline due to syntax constraints
416#
417# Use [:space:] because LLVM's integrated assembler inserts <tab> around
418# the .ascii directive whereas GCC keeps the <space> as-is.
416define sed-offsets 419define sed-offsets
417 "/^->/{s:->#\(.*\):/* \1 */:; \ 420 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \
421 /^->/{s:->#\(.*\):/* \1 */:; \
418 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ 422 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
419 s:->::; p;}" 423 s:->::; p;}'
420endef 424endef
421 425
422# Use filechk to avoid rebuilds when a header changes, but the resulting file 426# Use filechk to avoid rebuilds when a header changes, but the resulting file