Skip to contentSkip to conversation

target/xtensa: fix core import to meson.build

PATCH In review Max Filippov 2 participants 3 messages Mar 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/xtensa: fix core import to meson.build

import_core.sh was not updated to change meson.build when new xtensa core is imported. Fix that.

---
 target/xtensa/import_core.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/xtensa/import_core.sh +2 -2
index c8626a8c02eb..f3404039cc20 100755
@@ -66,5 +66,5 @@ static XtensaConfig $NAME __attribute__((unused)) = {
 REGISTER_CORE($NAME)
 EOF
 
-grep -q core-${NAME}.o "$BASE"/Makefile.objs || \
-    echo "obj-y += core-${NAME}.o" >> "$BASE"/Makefile.objs
+grep -q core-${NAME}.c "$BASE"/meson.build || \
+    echo "xtensa_ss.add(files('core-${NAME}.c'))" >> "$BASE"/meson.build
Signature · 1 line
2.20.1
#1 lore raw
Quoted 14 lines · Max Filippov

import_core.sh was not updated to change meson.build when new xtensa core is imported. Fix that.

---
  target/xtensa/import_core.sh | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
target/xtensa/import_core.sh +0 -0
index c8626a8c02eb..f3404039cc20 100755

target/xtensa/import_core.sh static XtensaConfig $NAME __attribute__((unused)) = { · line 70

Quoted 7 lines
target/xtensa/import_core.sh +2 -2
@@ -66,5 +66,5 @@ static XtensaConfig $NAME __attribute__((unused)) = {
  REGISTER_CORE($NAME)
  EOF
 
-grep -q core-${NAME}.o "$BASE"/Makefile.objs || \
-    echo "obj-y += core-${NAME}.o" >> "$BASE"/Makefile.objs
+grep -q core-${NAME}.c "$BASE"/meson.build || \
+    echo "xtensa_ss.add(files('core-${NAME}.c'))" >> "$BASE"/meson.build

We should be able to do this directly in meson.build, without having to modify the source file at all.

r~

#2 lore raw
Quoted 8 lines · Richard Henderson

target/xtensa/import_core.sh static XtensaConfig $NAME __attribute__((unused)) = { · line 70

Quoted 4 lines · Max Filippov
target/xtensa/import_core.sh +2 -2
-grep -q core-${NAME}.o "$BASE"/Makefile.objs || \
-    echo "obj-y += core-${NAME}.o" >> "$BASE"/Makefile.objs
+grep -q core-${NAME}.c "$BASE"/meson.build || \
+    echo "xtensa_ss.add(files('core-${NAME}.c'))" >> "$BASE"/meson.build

We should be able to do this directly in meson.build, without having to modify the source file at all.

Are there examples that I could follow?

Signature · 2 lines
Thanks.
-- Max