Skip to content

Commit dfb121a

Browse files
committed
scripts: Change lm32 scripts to use binutils simulator for testing
Signed-off-by: Keith Packard <[email protected]>
1 parent 0e8828b commit dfb121a

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

scripts/cross-lm32-unknown-elf.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ ar = 'lm32-unknown-elf-ar'
99
as = 'lm32-unknown-elf-as'
1010
nm = 'lm32-unknown-elf-nm'
1111
strip = 'lm32-unknown-elf-strip'
12+
# only needed to run tests
13+
exe_wrapper = ['sh', '-c', 'test -z "$PICOLIBC_TEST" || run-lm32 "$@"', 'run-lm32']
1214

1315
[host_machine]
14-
system = 'none'
16+
system = 'unknown'
1517
cpu_family = 'lm32'
1618
cpu = 'lm32'
1719
endian = 'little'
1820

1921
[properties]
2022
skip_sanity_check = true
21-
default_flash_addr = '0x00460000'
22-
default_flash_size = '0x00450000'
23-
default_ram_addr = '0x40000000'
23+
default_flash_addr = '0x00000000'
24+
default_flash_size = '0x00400000'
25+
default_ram_addr = '0x00400000'
2426
default_ram_size = '0x00400000'
27+
stack_symbol = '_fstack'

scripts/do-lm32-unknown-elf-configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#
3636
exec "$(dirname "$0")"/do-configure lm32-unknown-elf \
3737
-Dtests-enable-stack-protector=false \
38-
-Dfake-semihost=true \
38+
-Dfortify-source=none \
39+
-Dposix-console=true \
3940
-Dtests=true \
4041
"$@"

scripts/run-lm32

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
lm32-unknown-elf-run "$@"
3+
ret=$?
4+
case "$1" in
5+
*printf*-tests*)
6+
case $ret in
7+
2)
8+
echo 'printf-tests failed in the usual way, skipping'
9+
ret=77
10+
;;
11+
esac
12+
esac
13+
exit $ret

0 commit comments

Comments
 (0)