36aaa3951a568c5f71cde98f92e6ac1f0cefb8d5 / dev-libs/roct-thunk-interface/files/roct-thunk-interface-10.1-export-symbols.patch · 1504 bytes · raw
Export two things 10.1's libhsakmt drops, both needed by libhsa-runtime64
(so the rocminfo link fails with "undefined reference" against libhsa-runtime64):
* hsaKmtCreateQueueV2 is defined (visible) but absent from libhsakmt.ver, so
the "local: *;" version script hides it.
* The four hsaKmt*ExternalSemaphore helpers in src/extsem.c are the only
exported functions whose file includes the public hsakmt.h instead of the
internal libhsakmt.h; since HSAKMTAPI is empty in the public header and the
build uses -fvisibility=hidden, they are compiled hidden and never exported.
--- a/src/libhsakmt.ver
+++ b/src/libhsakmt.ver
@@ -20,6 +20,7 @@
hsaKmtWaitOnMultipleEvents;
hsaKmtCreateQueue;
hsaKmtUpdateQueue;
+hsaKmtCreateQueueV2;
hsaKmtDestroyQueue;
hsaKmtSetQueueCUMask;
hsaKmtSetMemoryPolicy;
--- a/src/extsem.c
+++ b/src/extsem.c
@@ -6,6 +6,13 @@
#include "hsakmt/hsakmt.h"
+/* HSAKMTAPI is empty in the public header while the library is built with
+ * -fvisibility=hidden, so these helpers (the only ones not including the
+ * internal libhsakmt.h) end up hidden and drop out of the version script. */
+#if defined(__GNUC__)
+#pragma GCC visibility push(default)
+#endif
+
HSAKMT_STATUS HSAKMTAPI hsaKmtImportExternalSemaphore(
HSAuint32 NodeId, void *NtHandle,
HSA_EXTERNAL_SEMAPHORE_HANDLE_TYPE Type,
@@ -33,3 +40,7 @@
(void)QueueId; (void)Handle; (void)Value;
return HSAKMT_STATUS_NOT_SUPPORTED;
}
+
+#if defined(__GNUC__)
+#pragma GCC visibility pop
+#endif