diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2017-05-19 15:32:04 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2017-05-19 15:32:04 +0200 |
commit | 0da2f96af06ef8254e87cab0cc4395aa512928f5 (patch) | |
tree | 7f7042111d5fb51f8d47b1b1d8c30785108235cc /libgomp | |
parent | 01c712cb903689bd41733f098e8efbbe116511b0 (diff) | |
download | gcc-0da2f96af06ef8254e87cab0cc4395aa512928f5.zip gcc-0da2f96af06ef8254e87cab0cc4395aa512928f5.tar.gz gcc-0da2f96af06ef8254e87cab0cc4395aa512928f5.tar.bz2 |
libgomp hsa plugin: debug output for HSA runtime library loading failure
libgomp/
* plugin/plugin-hsa.c (DLSYM_FN, init_hsa_runtime_functions):
Debug output for failure.
From-SVN: r248277
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/plugin/plugin-hsa.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 083cb85..84d1c839 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2017-05-19 Thomas Schwinge <thomas@codesourcery.com> + + * plugin/plugin-hsa.c (DLSYM_FN, init_hsa_runtime_functions): + Debug output for failure. + 2017-05-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * testsuite/lib/libgomp.exp: Load scanlang.exp. diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index 9cc243d..90ca247 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -491,14 +491,14 @@ static struct hsa_context_info hsa_context; #define DLSYM_FN(function) \ hsa_fns.function##_fn = dlsym (handle, #function); \ if (hsa_fns.function##_fn == NULL) \ - return false; + goto dl_fail; static bool init_hsa_runtime_functions (void) { void *handle = dlopen (hsa_runtime_lib, RTLD_LAZY); if (handle == NULL) - return false; + goto dl_fail; DLSYM_FN (hsa_status_string) DLSYM_FN (hsa_agent_get_info) @@ -530,6 +530,10 @@ init_hsa_runtime_functions (void) DLSYM_FN (hsa_ext_program_destroy) DLSYM_FN (hsa_ext_program_finalize) return true; + + dl_fail: + HSA_DEBUG ("while loading %s: %s\n", hsa_runtime_lib, dlerror ()); + return false; } /* Find kernel for an AGENT by name provided in KERNEL_NAME. */ |