diff options
author | Jim Wilson <jimw@sifive.com> | 2017-11-13 13:02:42 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-12-14 14:16:46 -0800 |
commit | d45cd89caa7f87a31794347793f945ca6f7c906c (patch) | |
tree | 53d9b685d7ba36edf314865dbaafef2983052433 /test | |
parent | bf5697a1a6509705b50dcc1f67b8c620a7b21ec4 (diff) | |
download | riscv-gnu-toolchain-d45cd89caa7f87a31794347793f945ca6f7c906c.zip riscv-gnu-toolchain-d45cd89caa7f87a31794347793f945ca6f7c906c.tar.gz riscv-gnu-toolchain-d45cd89caa7f87a31794347793f945ca6f7c906c.tar.bz2 |
Add newlib nano support.
* Makefile.in (NEWLIB_NANO_TARGET_BOARDS): New.
(build-libc): Change build-newlib to stamps/build-newlib. Add
stamps/build-newlib-nano.
(check-newlib-nano, check-gcc-newlib-nano, check-binutils-newlib-nano)
(check-gdb-newlib-nano, report-newlib-nano): New.
(check-dhrystone-linux, check-dhrystone-newlib): Delete first version
of these rules.
(build-gcc-newlib-stage1): Use --with-sysroot.
(build-newlib-nano, merge-newlib-nano): New.
(build-gcc-newlib-stage2): Depend on merge-newlib-nano. Use
--with-sysroot instead of --with-headers. Also use
--with-native-system-header-dir.
(build-dejagnu): Install it.
(check-gcc-newlib, check-gcc-linux, check-dhrystone-newlib-%)
(check-dhrystone-linux-%, check-binutils-newlib, check-binutils-linux)
(check-gdb-newlib, check-gdb-linux): Drop
DEJAGNULIBS environment variable set.
(check-gcc-newlib-nano, check-dhrystone-newlib-nano)
(check-dhrystone-newlib-nano-%, check-binutils-newlib-nano)
(check-gdb-newlib-nano, report-gcc-newlib-nano)
(report-dhrystone-newlib-nano, report-binutils-newlib-nano)
(report-gdb-newlib-nano): New.
(Makefile): Add rule to rebuild when Makefile.in changes.
(test/benchmarks/dhrystone/check): Add -specs= option. Use it in
$cc commands.
Diffstat (limited to 'test')
-rwxr-xr-x | test/benchmarks/dhrystone/check | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/benchmarks/dhrystone/check b/test/benchmarks/dhrystone/check index 0c9d2ae..3da1bc1 100755 --- a/test/benchmarks/dhrystone/check +++ b/test/benchmarks/dhrystone/check @@ -6,6 +6,7 @@ unset cc unset objdump unset march unset mabi +unset specs unset sim unset out c=() @@ -16,6 +17,7 @@ do -objdump=*) objdump="$(echo "$1" | cut -d= -f2-)";; -march=*) march="$(echo "$1" | cut -d= -f2-)";; -mabi=*) mabi="$(echo "$1" | cut -d= -f2-)";; + -specs=*) specs=("$1");; -sim=*) sim="$(echo "$1" | cut -d= -f2-)";; -out=*) out="$(echo "$1" | cut -d= -f2-)";; *.c) c+=("$1");; @@ -30,9 +32,9 @@ tempdir=$(mktemp -d) trap "rm -rf $tempdir" EXIT for f in ${c[@]} do - $cc -c $f -march=$march -mabi=$mabi -O3 -fno-common -fno-inline -o $tempdir/$(basename $f).o -static -Wno-all + $cc -c $f -march=$march -mabi=$mabi $specs -O3 -fno-common -fno-inline -o $tempdir/$(basename $f).o -static -Wno-all done -$cc -march=$march -mabi=$mabi $tempdir/*.o -o $tempdir/dhrystone +$cc -march=$march -mabi=$mabi $specs $tempdir/*.o -o $tempdir/dhrystone $objdump -d $tempdir/dhrystone > ~/dump begin_pc=$($objdump -d $tempdir/dhrystone | grep 'Begin_Time' | grep -e 'sd' -e 'sw' | cut -d: -f1 | xargs echo) |