binutils-gdb/sim
Hans-Peter Nilsson 4b0e74fd18 sim/testsuite/cris: Remove faulty use of basename in C tests
Calls to basename were added here as part of commit
e1e1ae6e9b "sim: testsuite: fix objdir handling", but that
commit missed adding "#include <libgen.h>" or the equivalent
GNU extension, see basename(3).  Fixing that shows a logical
error in the change to openpf1.c; the non-/-prefixed
code-path was changed instead of the "/"-prefixed code-path,
which is the one executed after that commit.

For "newlib" these tests failed linking after that commit.
Recent newlib has the (asm-renamed) GNU-extension-variant of
basename, but we're better off not using it at all.

Unfortunately, compilation failures for C tests run by the
machinery in c.exp are currently just marked "unresolved",
in contrast to C and assembler tests run by calling
run_sim_test.

The interaction of calling with the full program-path vs.
use of --sysroot exposes a consistency problem: when
--sysroot is used, argv[0] isn't the path by which the
program can find itself.  It's undecided whether argv[0] for
the program running in the simulator should be edited
(related to the naked argument to the simulator before
passing on to the simulated program) to remove a leading
--sysroot.  Either way, such a change would be out of scope
for this commit.

	* c/stat3.c (mybasename): New macro.  Use it instead of basename.
	* c/openpf1.c: Correct basename-related change and update related
	comment.
2022-02-14 23:53:13 +01:00
..
aarch64
arm
avr
bfin
bpf
common sim: Add sim_dump_memory for debugging 2022-02-14 23:51:15 +01:00
cr16
cris sim cris: Unbreak --disable-sim-hardware builds 2022-02-14 23:51:02 +01:00
d10v
erc32
example-synacor sim: synacor: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
frv
ft32
h8300
igen sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
iq2000 sim: iq2000: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
lm32
m4 sim: Fix use of out-of-tree assembler and linker when testing 2022-02-14 23:51:07 +01:00
m32c
m32r
m68hc11
mcore
microblaze
mips sim: mips: Add simulator support for mips32r6/mips64r6 2022-02-04 19:37:26 -05:00
mn10300
moxie
msp430 sim: msp430: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
or1k
ppc sim: ppc: migrate to standard uintXX_t types 2022-01-06 01:17:39 -05:00
pru
riscv
rl78
rx
sh
testsuite sim/testsuite/cris: Remove faulty use of basename in C tests 2022-02-14 23:53:13 +01:00
v850
.gitignore
aclocal.m4
arch-subdir.mk.in
ChangeLog-2021
config.h.in
configure sim: Fix use of out-of-tree assembler and linker when testing 2022-02-14 23:51:07 +01:00
configure.ac
COPYING
MAINTAINERS
Makefile.am
Makefile.in sim: Fix use of out-of-tree assembler and linker when testing 2022-02-14 23:51:07 +01:00
README-HACKING