Still pending: libgomp-Testsuite patch https://gcc.gnu.org/ml/gcc-patches/2020-02/msg00207.html This is the same fix – but for gcc/testsuite/. To illustrate the problem again. Using remote testing (here: modified target_compile, but DejaGNU's default_target_compile is likewise), and using check_gc_sections_available, I get the following result without the fix: call_remote download -print-prog-name=ld -print-prog-name=ld Invoking the compiler as powerpc64le-none-linux-gnu-gcc … /scratch/…/default/gcc.d/-print-prog-name=ld … UNSUPPORTED: gcc.dg/special/gcsec-1.c Which obvious fails both for uploading the flag as file and for compiling the flag as filename. WITH the patch, I get the expected: Invoking the compiler as powerpc64le-none-linux-gnu-gcc … -fdiagnostics-urls=never -print-prog-name=ld -I . … PASS: gcc.dg/special/gcsec-1.c (test for excess errors) PASS: gcc.dg/special/gcsec-1.c execution test I tested the attached patch for check_gc_sections_available thoroughly – esp. via RUNTESTFLAGS="-v -v -v -v -v special.exp=gcsec-1.c" w/ and w/o remote but also using, intermittently, some debugging "puts". I also fixed check_effective_target_gld, check_effective_target_gas, check_runtime, check_multi_dir, but tested them only lightly. (The first two are unused, the others are only used by mips and arm.) Regarding the '{ }' see below – or in the linked other patch. Without, only one argument is actually passed. OK for the trunk? Tobias On 2/4/20 4:49 PM, Tobias Burnus wrote: > DejaGNU uses in lib/target.exp's >    proc default_target_compile {source destfile type options} > uses the following. > > When running locally, $source is simply used > as argument. However, when run remotely, it is tried to be uploaded > on the remote host – and otherwise skipped. That's fine if the > argument is an actual file – but not if it is a flag. > > Hence, flags should be passed as $options not as $source. > Quoting now from DejaGNU's default_target_compile#: > >     set sources "" >     if {[isremote host]} { >         foreach x $source { >             set file [remote_download host $x] >             if { $file eq "" } { >                 warning "Unable to download $x to host." >                 return "Unable to download $x to host." >             } else { >                 append sources " $file" >             } >         } >     } else { >         set sources $source >     } > >  * * * > > FIRST, I think that affects the following calls, but I have not > checked. — I assume that moving it from the first to the last > argument should work and fix the "isremote" issue. > > gcc/testsuite/gcc.target/arm/multilib.exp:    set gcc_output > [${tool}_target_compile "--print-multi-directory $gcc_opts" "" "none" ""] > gcc/testsuite/lib/target-supports.exp:    set gcc_output > [${tool}_target_compile "-v" "" "none" ""] > gcc/testsuite/lib/target-supports.exp:  set gcc_ld [lindex > [${tool}_target_compile "-print-prog-name=ld" "" "none" ""] 0] > gcc/testsuite/lib/target-supports.exp:  set gcc_as [lindex > [${tool}_target_compile "-print-prog-name=as" "" "none" ""] 0] > gcc/testsuite/lib/target-supports.exp:  set gcc_ld [lindex > [${tool}_target_compile "-print-prog-name=ld" "" "none" ""] 0] > > TODO: One should probably change this. > > > SECONDLY: I hit a very similar issue in libgomp, which I actually did > debug. > > In check_effective_target_offload_target_nvptx, one has something > similar, namely: >   set gcc_output [libgomp_target_compile "-v $options" "" "none" ""] > This currently tries (w/o success) to upload the flags to the remote > host and then > fails as the required "-v" flag fails (i.e. no input). > > However, using "-v" as options argument does not work as seemingly > only additional_flags= > arguments are passed on. Additionally, if one does not only want to > pass on the first > argument, curly braces are needed. > > PATCH: The attached patch does this – and have successfully tested it > both with local > runs and with remote runs. (RUNTESTFLAGS="-v -v -v" did help a lot for > studying the > behavior in both cases.) > > OK for the trunk? > > Cheers, > > Tobias