[binutils-gdb] Don't build libctf tests in source dir
Alan Modra
amodra@sourceware.org
Fri Oct 17 00:44:43 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9c9106213ab41185b0475cab3670f4055cc5901d
commit 9c9106213ab41185b0475cab3670f4055cc5901d
Author: Alan Modra <amodra@gmail.com>
Date: Fri Oct 17 11:04:40 2025 +1030
Don't build libctf tests in source dir
Running the libctf testsuite currently leaves big-struct-ctf.o in
libctf/testsuite/libctf-lookup/.
It ought to be possible to make the binutils source dir read-only,
and putting compiler output in the source dir leads to interesting
effects when testing multiple binutils targets in parallel.
* lib/ctf-lib.exp (run_lookup_test): For "link: objects" compile
objects in tmpdir.
Diff:
---
libctf/testsuite/lib/ctf-lib.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libctf/testsuite/lib/ctf-lib.exp b/libctf/testsuite/lib/ctf-lib.exp
index 7175e14c30a..da44396b162 100644
--- a/libctf/testsuite/lib/ctf-lib.exp
+++ b/libctf/testsuite/lib/ctf-lib.exp
@@ -298,7 +298,7 @@ proc run_lookup_test { name } {
}
if { $opts(link) == "objects" } {
- set obj "[file rootname $src].o"
+ set obj "tmpdir/[file rootname [file tail $src]].o"
set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET $lookup_flags $src -c -o $obj"]]
if { $comp_output != ""} {
More information about the Binutils-cvs
mailing list