diff mbox series

[v2,08/11] Fix asm-offsets generation

Message ID 20180504021036.17027-9-joel@jms.id.au
State Accepted
Headers show
Series Support building with clang | expand

Commit Message

Joel Stanley May 4, 2018, 2:10 a.m. UTC
There is a difference between the asm-offsets.s generated by clang and GCC:

--- asm/asm-offsets.s_clang
+++ asm/asm-offsets.s_gcc

-#define CPUTHREAD_PIR 8 /* offsetof(struct cpu_thread, pir) */
- # 0 "" 2
-       .loc 1 38 0
- # 38 "asm/asm-offsets.c" 1
+       #define CPUTHREAD_PIR 8 /* offsetof(struct cpu_thread, pir) */
+       #NO_APP
+       .loc    1 38 2                  # asm/asm-offsets.c:38:2
+       #APP

This breaks make_offests.sh, which looks for #define at the start
of the line. This is unnecessary, as the only #defines that appear in the
file are "good" ones we want. So drop the start of line requirement.

Signed-off-by: Joel Stanley <joel@jms.id.au>

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 make_offsets.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/make_offsets.sh b/make_offsets.sh
index c4eb1c5010aa..34ba5f667b18 100755
--- a/make_offsets.sh
+++ b/make_offsets.sh
@@ -5,6 +5,6 @@  cat <<EOF
 #define ASM_OFFSETS_H
 /* Derived from $1 by make_offsets.sh */
 
-`grep '^#define' $1`
+`grep '#define' $1`
 #endif /* ASM_OFFSETS_H */
 EOF