aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtarget/xtensa/import_core.sh4
-rw-r--r--target/xtensa/meson.build13
2 files changed, 5 insertions, 12 deletions
diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh
index c8626a8c02..396b264be9 100755
--- a/target/xtensa/import_core.sh
+++ b/target/xtensa/import_core.sh
@@ -35,6 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
-e '/^#include "ansidecl.h"/d' \
-e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^ return 0;$/ return XTENSA_UNDEFINED;/' \
-e 's/#include <xtensa-isa.h>/#include "xtensa-isa.h"/' \
+ -e 's/^\(xtensa_isa_internal xtensa_modules\)/static \1/' \
> "$TARGET"/xtensa-modules.c.inc
cat <<EOF > "${TARGET}.c"
@@ -65,6 +66,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
diff --git a/target/xtensa/meson.build b/target/xtensa/meson.build
index dd750a977e..7c4efa6c62 100644
--- a/target/xtensa/meson.build
+++ b/target/xtensa/meson.build
@@ -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',