[COMMITTED] ld: restore CC_FOR_TARGET if bailing out early for LTO tests

Sam James <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <a376c787f1417abedb3c51516942c0077892313c.1787909218.git.sam@gentoo.org>
Fixup c562e4ffa94c50ee974200a7457e435cec411a43 as we need to restore
CC_FOR_TARGET which may not be Clang if we return early because of missing
objects.

	PR ld/34576
	* testsuite/ld-plugin/lto.exp (llvm_lto_tests): Restore
	CC_FOR_TARGET on return.
---
Committed.

 ld/testsuite/ld-plugin/lto.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 41593efc253..faa7c68770d 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -1485,6 +1485,7 @@ proc llvm_lto_tests {} {
 
    if {![file exists tmpdir/pr34572a.o]
        || ![file exists tmpdir/pr34572b.o]} {
+	set CC_FOR_TARGET "$CC_FOR_TARGET_saved"
 	return
     }
 

base-commit: 1469a04f30917ef6a2bf4afc73e442b836574563
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.