On Jun 9, 2020, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > this is wrong unfortunately: braces are the Tcl equivalent of single > quotes so you're setting skip_lto to the string inside.
Aah, thanks. So when $skip_lto is expanded in the ifs, the whole thing is evaluated, and that's why it works anyway? > While this worked for me on i386-pc-solaris2.11 (both with ld, thus > without the lto plugin, and with gld and the plugin), I wonder if > there's not a better way than just skipping the lto tests, My initial focus was on relieving the pain by removing the symptoms, so I can then work on the improvements with lower urgency. Here's what I'd like to check in for now: [PR95416] outputs.exp: skip lto tests when not using linker plugin From: Alexandre Oliva <ol...@adacore.com> When the linker plugin is not available, dump outputs in lto runs are different from those outputs.exp tests expect, so skip them for now. Regstrapped on x86_64-linux-gnu. Ok to install? for gcc/testsuite/ChangeLog * outputs.exp (skip_lto): Set when missing the linker plugin. --- testsuite/gcc.misc-tests/outputs.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git gcc/testsuite/gcc.misc-tests/outputs.exp gcc/testsuite/gcc.misc-tests/outputs.exp index 06a32db..8e05c92 100644 --- gcc/testsuite/gcc.misc-tests/outputs.exp +++ gcc/testsuite/gcc.misc-tests/outputs.exp @@ -43,6 +43,10 @@ if ![check_no_compiler_messages gsplitdwarf object { # Check for -flto support. We explicitly test the result to skip # tests that use -flto. set skip_lto ![check_effective_target_lto] +if !$skip_lto { + # LTO tests' expectations assume a linker plugin ATM. + set skip_lto ![check_linker_plugin_available] +} # Prepare additional options to be used for linking. # We do not compile to an executable, because that requires naming an output. -- Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically