-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Pkg | ||
using BinaryBuilder | ||
|
||
include("../common.jl") | ||
build_tarballs( | ||
ARGS, configure_build(v"5.5.1")...; | ||
preferred_gcc_version=v"7", preferred_llvm_version=v"9", julia_compat="1.9") |
46 changes: 46 additions & 0 deletions
46
H/hsakmt_roct/[email protected]/bundled/patches/0001-Build-correctly-on-musl.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
commit ce1a2a876dabb5de81d1dcce507dda73d73d8991 | ||
Author: Julian P Samaroo <[email protected]> | ||
Date: Sat Oct 3 15:27:40 2020 -0500 | ||
|
||
Build correctly on musl | ||
|
||
diff --git a/src/libhsakmt.h b/src/libhsakmt.h | ||
index 55fc5a4..470c4e6 100644 | ||
--- a/src/libhsakmt.h | ||
+++ b/src/libhsakmt.h | ||
@@ -31,6 +31,7 @@ | ||
#include <pthread.h> | ||
#include <stdint.h> | ||
#include <limits.h> | ||
+#include <sys/param.h> | ||
|
||
extern int kfd_fd; | ||
extern unsigned long kfd_open_count; | ||
@@ -56,6 +57,9 @@ extern HsaVersionInfo kfd_version_info; | ||
do { if ((minor) > kfd_version_info.KernelInterfaceMinorVersion)\ | ||
return HSAKMT_STATUS_NOT_SUPPORTED; } while (0) | ||
|
||
+#ifdef PAGE_SIZE | ||
+#undef PAGE_SIZE | ||
+#endif | ||
extern int PAGE_SIZE; | ||
extern int PAGE_SHIFT; | ||
|
||
@@ -206,13 +210,17 @@ extern int kmtIoctl(int fd, unsigned long request, void *arg); | ||
#define VOID_PTR_SUB(ptr,n) (void*)((uint8_t*)(ptr) - n)/*ptr - offset*/ | ||
#define VOID_PTRS_SUB(ptr1,ptr2) (uint64_t)((uint8_t*)(ptr1) - (uint8_t*)(ptr2)) /*ptr1 - ptr2*/ | ||
|
||
+#ifndef MIN | ||
#define MIN(a, b) ({ \ | ||
typeof(a) tmp1 = (a), tmp2 = (b); \ | ||
tmp1 < tmp2 ? tmp1 : tmp2; }) | ||
+#endif | ||
|
||
+#ifndef MIN | ||
#define MAX(a, b) ({ \ | ||
typeof(a) tmp1 = (a), tmp2 = (b); \ | ||
tmp1 > tmp2 ? tmp1 : tmp2; }) | ||
+#endif | ||
|
||
void clear_events_page(void); | ||
void fmm_clear_all_mem(void); |