[Skiboot] [PATCH v2 08/11] Fix asm-offsets generation
Joel Stanley
joel at jms.id.au
Fri May 4 12:10:33 AEST 2018
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 at jms.id.au>
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
make_offsets.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.17.0
More information about the Skiboot
mailing list