libgomp testsuite: Don't amend 'LD_LIBRARY_PATH' for system-provided HSA Runtime...
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 6 Apr 2022 08:39:56 +0000 (10:39 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 11 May 2022 12:24:21 +0000 (14:24 +0200)
This is only active if GCC is 'configure'd with '--with-hsa-runtime=[...]' or
'--with-hsa-runtime-lib=[...]' -- which nobody really is doing, as far as I can
tell.

'libgomp/testsuite/lib/libgomp.exp:libgomp_init' states:

    # For build-tree testing, also consider the library paths used for builing.
    # For installed testing, we assume all that to be provided in the sysroot.
    if { $blddir != "" } {
        [...]
        global hsa_runtime_lib
        if { $hsa_runtime_lib != "" } {
            append always_ld_library_path ":$hsa_runtime_lib"
        }
    }

However, the libgomp GCN plugin is unconditionally built against the
GCC-shipped 'include/hsa*.h' header files, and at run time does
'dlopen("libhsa-runtime64.so.1")', so there is no system-provided HSA Runtime
library "used for builing".  It thus doesn't make sense to amend
'LD_LIBRARY_PATH' for system-provided HSA Runtime library.

libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Don't
'append always_ld_library_path ":$hsa_runtime_lib"'.
* testsuite/libgomp-test-support.exp.in (hsa_runtime_lib): Don't set.

libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp-test-support.exp.in

index 8c5ecff..0aaa58f 100644 (file)
@@ -202,10 +202,6 @@ proc libgomp_init { args } {
            lappend ALWAYS_CFLAGS "additional_flags=-L$cuda_driver_lib"
            append always_ld_library_path ":$cuda_driver_lib"
        }
-       global hsa_runtime_lib
-       if { $hsa_runtime_lib != "" } {
-           append always_ld_library_path ":$hsa_runtime_lib"
-       }
     }
 
     # We use atomic operations in the testcases to validate results.
index 98fb442..3c88d1d 100644 (file)
@@ -1,6 +1,5 @@
 set cuda_driver_include "@CUDA_DRIVER_INCLUDE@"
 set cuda_driver_lib "@CUDA_DRIVER_LIB@"
-set hsa_runtime_lib "@HSA_RUNTIME_LIB@"
 
 set offload_plugins "@offload_plugins@"
 set offload_targets "@offload_targets@"