diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2022-02-14 23:53:13 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2022-02-14 23:53:13 +0100 |
commit | 4b0e74fd1813aeb302cd97024d9e82a29282fb8d (patch) | |
tree | 7b42bba72a72338976af1fb7e122768e2499cfb7 /gas/expr.c | |
parent | 81011383d94b2f630cd8fdad989f2e24d4889c1e (diff) | |
download | gdb-4b0e74fd1813aeb302cd97024d9e82a29282fb8d.zip gdb-4b0e74fd1813aeb302cd97024d9e82a29282fb8d.tar.gz gdb-4b0e74fd1813aeb302cd97024d9e82a29282fb8d.tar.bz2 |
sim/testsuite/cris: Remove faulty use of basename in C tests
Calls to basename were added here as part of commit
e1e1ae6e9b5e "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.
Diffstat (limited to 'gas/expr.c')
0 files changed, 0 insertions, 0 deletions