target/xtensa: fix core import to meson.build
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.
Cc [email protected] # v5.2.0
Signed-off-by Max Filippov <[email protected]>
--- target/xtensa/import_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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
Signature · 1 line
2.20.1
Quoted 14 lines · Max Filippov
import_core.shwas not updated to change meson.build when new xtensa core is imported. Fix that.Cc [email protected] # v5.2.0Signed-off-by Max Filippov <[email protected]>--- target/xtensa/import_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/xtensa/import_core.sh +0
-0
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~
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.buildWe 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