]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't build libctf tests in source dir
authorAlan Modra <amodra@gmail.com>
Fri, 17 Oct 2025 00:34:40 +0000 (11:04 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 17 Oct 2025 00:34:40 +0000 (11:04 +1030)
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.

libctf/testsuite/lib/ctf-lib.exp

index 7175e14c30a286b154b7970fa7982d7fa91feeb9..da44396b162f6403c80aec1ec0b8cbc02c78483c 100644 (file)
@@ -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 != ""} {