Skip to content

Commit

Permalink
target/xtensa: fix meson.build rule for xtensa cores
Browse files Browse the repository at this point in the history
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: [email protected] # v5.2.0
Signed-off-by: Max Filippov <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
  • Loading branch information
jcmvbkbc committed Apr 3, 2021
1 parent 6d40ce0 commit 84317d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
3 changes: 0 additions & 3 deletions target/xtensa/import_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 4 additions & 9 deletions target/xtensa/meson.build
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 84317d5

Please sign in to comment.