Message ID | 855cab27-5e33-dce0-3560-3b223b7e8b1a@codesourcery.com |
---|---|
State | New |
Headers | show |
Series | [Testsuite,libgomp] – Fix check_effective_target_offload_target_nvptx for remote execution | expand |
Tobias Burnus <tobias@codesourcery.com> writes: > diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp > index 7e94527c7ca..cb7757b6a91 100644 > --- a/libgomp/testsuite/lib/libgomp.exp > +++ b/libgomp/testsuite/lib/libgomp.exp > @@ -346,11 +346,11 @@ proc check_effective_target_offload_target_nvptx { } { > # files; in particular, '-foffload', 'libgomp.oacc-*/*.exp'), which don't > # get passed on to 'check_effective_target_*' functions. (Not caching the > # result due to that.) > - set options [current_compiler_flags] > + set options [concat "{additional_flags=-v" [current_compiler_flags] "}"] Using: set options [list "additional_flags=[concat "-v" [current_compiler_flags]]"] is maybe more obvious, and should get the { ... } quoting right for unusual cases. LGTM otherwise. Thanks, Richard
libgomp/ * testsuite/lib/libgomp.exp (check_effective_target_offload_target_nvptx): Pass flags as 'options' and not as 'source' argument to libgomp_target_compile. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 7e94527c7ca..cb7757b6a91 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -346,11 +346,11 @@ proc check_effective_target_offload_target_nvptx { } { # files; in particular, '-foffload', 'libgomp.oacc-*/*.exp'), which don't # get passed on to 'check_effective_target_*' functions. (Not caching the # result due to that.) - set options [current_compiler_flags] + set options [concat "{additional_flags=-v" [current_compiler_flags] "}"] # Instead of inspecting command-line options, look what the compiler driver # decides. This is somewhat modelled after # 'gcc/testsuite/lib/target-supports.exp:check_configured_with'. - set gcc_output [libgomp_target_compile "-v $options" "" "none" ""] + set gcc_output [libgomp_target_compile "" "" "none" $options] if [regexp "(?n)^OFFLOAD_TARGET_NAMES=(.*)" $gcc_output dummy offload_targets] { verbose "compiling for offload targets: $offload_targets" return [string match "*:nvptx*:*" ":$offload_targets:"]