]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/xtensa: fix meson.build rule for xtensa cores
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 30 Mar 2021 07:25:24 +0000 (00:25 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 3 Apr 2021 15:52:18 +0000 (08:52 -0700)
import_core.sh tries to change Makefile.objs when importing new xtensa
core, but that file no longer exists. Rewrite meson.build rule to pick
up all source files that match core-*.c pattern and drop commands that
change Makefile.objs.

Cc: qemu-stable@nongnu.org # v5.2.0
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/xtensa/import_core.sh
target/xtensa/meson.build

index c8626a8c02ebb41e2ab9aab3648f1311e329b85e..1120a4a2a5e1ca6568d27a8eb06e44ab49f10738 100755 (executable)
@@ -65,6 +65,3 @@ 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
index dd750a977ef9c046a12e16415b587e85d77e6e76..7c4efa6c6290d68abb68d9fc9016f424102719d8 100644 (file)
@@ -1,14 +1,9 @@
 xtensa_ss = ss.source_set()
+
+xtensa_cores = run_command('sh', '-c', 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR ; ls -1 core-*.c')
+xtensa_ss.add(files(xtensa_cores.stdout().strip().split('\n')))
+
 xtensa_ss.add(files(
-  'core-dc232b.c',
-  'core-dc233c.c',
-  'core-de212.c',
-  'core-de233_fpu.c',
-  'core-dsp3400.c',
-  'core-fsf.c',
-  'core-sample_controller.c',
-  'core-test_kc705_be.c',
-  'core-test_mmuhifi_c3.c',
   'cpu.c',
   'exc_helper.c',
   'fpu_helper.c',