summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2016-09-15 10:28:23 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2016-09-15 10:28:23 +1000
commit1f4106776e07016af71969a7ed82181a2fcba90b (patch)
treefcdee2b6b8cb6c80c71b9136dd2ff1f5f36a3e93 /Kbuild
parent22e9cf146d3b6beccec42b0c8c32b1fcc04732f0 (diff)
kbuild: simpler generation of assembly constants
gcc doesn't really look inside "asm" statements and more or less directly emits it into assembly. So pretend "#define" is CPU instruction. C++ comment can't be used because sparc assembler doesn't understand it. Link: http://lkml.kernel.org/r/20160713173646.GA1910@p183.telecom.by Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Michal Marek <mmarek@suse.cz> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild12
1 files changed, 1 insertions, 11 deletions
diff --git a/Kbuild b/Kbuild
index 3d0ae152af7c..63fc0e132bdc 100644
--- a/Kbuild
+++ b/Kbuild
@@ -7,14 +7,6 @@
# 4) Check for missing system calls
# 5) Generate constants.py (may need bounds.h)
-# Default sed regexp - multiline due to syntax constraints
-define sed-y
- "/^->/{s:->#\(.*\):/* \1 */:; \
- s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
- s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
- s:->::; p;}"
-endef
-
# Use filechk to avoid rebuilds when a header changes, but the resulting file
# does not
define filechk_offsets
@@ -26,9 +18,7 @@ define filechk_offsets
echo " *"; \
echo " * This file was generated by Kbuild"; \
echo " */"; \
- echo ""; \
- sed -ne $(sed-y); \
- echo ""; \
+ sed -ne '/#define/{s/\$$//;s/#//2;s/$$/*\//;p;}'; \
echo "#endif" )
endef