This is only active if GCC is 'configure'd with '--with-hsa-runtime=[...]' or
'--with-hsa-runtime-include=[...]', '--with-hsa-runtime-lib=[...]' -- which
nobody really is doing, as far as I can tell.
Originally changed for the libgomp HSA plugin in
commit
b8d89b03db5f212919e4571671ebb4f5f8b1e19d (r242749)
"Remove build dependence on HSA run-time", and later propagated into the GCN
plugin, these are no longer built against system-provided HSA Runtime library.
Instead, unconditionally built against the GCC-shipped 'include/hsa*.h' header
files, and at run time does 'dlopen("libhsa-runtime64.so.1")'. It thus doesn't
make sense to consider references to system-provided HSA Runtime library during
libgomp GCN plugin build.
libgomp/
* plugin/configfrag.ac (HSA_RUNTIME_CPPFLAGS)
(HSA_RUNTIME_LDFLAGS): Remove.
* configure: Regenerate.
HSA_RUNTIME_LIB=
-HSA_RUNTIME_CPPFLAGS=
-HSA_RUNTIME_LDFLAGS=
# Check whether --with-hsa-runtime was given.
if test "x$with_hsa_runtime_lib" != x; then
HSA_RUNTIME_LIB=$with_hsa_runtime_lib
fi
-if test "x$HSA_RUNTIME_INCLUDE" != x; then
- HSA_RUNTIME_CPPFLAGS=-I$HSA_RUNTIME_INCLUDE
-fi
-if test "x$HSA_RUNTIME_LIB" != x; then
- HSA_RUNTIME_LDFLAGS=-L$HSA_RUNTIME_LIB
-fi
PLUGIN_GCN=0
PLUGIN_GCN_CPPFLAGS=
*)
tgt_plugin=gcn
PLUGIN_GCN=$tgt
- PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
- PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
PLUGIN_GCN_LIBS="-ldl"
PLUGIN_GCN=1
;;
HSA_RUNTIME_LIB=
AC_SUBST(HSA_RUNTIME_INCLUDE)
AC_SUBST(HSA_RUNTIME_LIB)
-HSA_RUNTIME_CPPFLAGS=
-HSA_RUNTIME_LDFLAGS=
AC_ARG_WITH(hsa-runtime,
[AS_HELP_STRING([--with-hsa-runtime=PATH],
if test "x$with_hsa_runtime_lib" != x; then
HSA_RUNTIME_LIB=$with_hsa_runtime_lib
fi
-if test "x$HSA_RUNTIME_INCLUDE" != x; then
- HSA_RUNTIME_CPPFLAGS=-I$HSA_RUNTIME_INCLUDE
-fi
-if test "x$HSA_RUNTIME_LIB" != x; then
- HSA_RUNTIME_LDFLAGS=-L$HSA_RUNTIME_LIB
-fi
PLUGIN_GCN=0
PLUGIN_GCN_CPPFLAGS=
*)
tgt_plugin=gcn
PLUGIN_GCN=$tgt
- PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
- PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
PLUGIN_GCN_LIBS="-ldl"
PLUGIN_GCN=1
;;