diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-07 01:27:46 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-07 12:21:48 -0500 |
commit | a39487c6685ff8d2459f59eccc21acdda0517c84 (patch) | |
tree | f92f2bdb7b66e49edf91e070883809ef11637d1c | |
parent | bfc7d04afbeb56a3dc3caa71322a71fbb084d5dd (diff) | |
download | gdb-a39487c6685ff8d2459f59eccc21acdda0517c84.zip gdb-a39487c6685ff8d2459f59eccc21acdda0517c84.tar.gz gdb-a39487c6685ff8d2459f59eccc21acdda0517c84.tar.bz2 |
sim: cris: use -sim with C tests for cris-elf targets
Building the C tests with a cris-elf toolchain (gcc-10.2 &
newlib-4.1.0) currently fail due to warnings it emits:
cris-elf-ld: libc.a(lib_a-closer.o): in function `_close_r':
newlib/libc/reent/closer.c:47: warning: _close is not implemented and will always fail
This is because the default target for cris-elf is bare metal, not
the simulator. For that, we need -sim. So add it for elf targets.
We don't add it for all targets as the simulator (and testsuite)
run both libgloss programs as well as Linux userspace programs.
-rw-r--r-- | sim/testsuite/sim/cris/ChangeLog | 4 | ||||
-rw-r--r-- | sim/testsuite/sim/cris/c/c.exp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sim/testsuite/sim/cris/ChangeLog b/sim/testsuite/sim/cris/ChangeLog index 62ac790..5ff077c 100644 --- a/sim/testsuite/sim/cris/ChangeLog +++ b/sim/testsuite/sim/cris/ChangeLog @@ -1,5 +1,9 @@ 2021-01-07 Mike Frysinger <vapier@gentoo.org> + * c/c.exp [cris*-*-elf] (CFLAGS_FOR_TARGET): Add -sim. + +2021-01-07 Mike Frysinger <vapier@gentoo.org> + * c/kill2.c: Include unistd.h. * c/pipe1.c, c/sched1.c, c/sched2.c, c/sched3.c, c/sched4.c, c/sig5.c, c/sig8.c: Likewise. diff --git a/sim/testsuite/sim/cris/c/c.exp b/sim/testsuite/sim/cris/c/c.exp index c9df983..034c4bf 100644 --- a/sim/testsuite/sim/cris/c/c.exp +++ b/sim/testsuite/sim/cris/c/c.exp @@ -26,6 +26,10 @@ if [istarget cris-*-*] { set mach "crisv32" } +if [istarget cris*-*-elf] { + append CFLAGS_FOR_TARGET " -sim" +} + # Using target_compile, since it is less noisy, if { [target_compile $srcdir/$subdir/hello.c compilercheck.x \ "executable" "" ] == "" } { |