beignet: fix musl build

Use cl_uint instead of uint which is not a standard type w/ musl libc.
This commit is contained in:
Jürgen Buchmüller 2020-03-24 18:29:08 +01:00
parent 622acc6d6c
commit 208683cd3d
2 changed files with 22 additions and 4 deletions

View File

@ -0,0 +1,22 @@
--- src/cl_api_kernel.c 2017-09-22 10:05:22.000000000 +0200
+++ src/cl_api_kernel.c 2020-03-24 18:27:40.186485887 +0100
@@ -151,7 +151,7 @@
fixed_local_sz[0] = 16;
fixed_local_sz[1] = 1;
} else {
- uint j, maxDimSize = 64 /* from 64? */, maxGroupSize = 256; //MAX_WORK_GROUP_SIZE may too large
+ cl_uint j, maxDimSize = 64 /* from 64? */, maxGroupSize = 256; //MAX_WORK_GROUP_SIZE may too large
size_t realGroupSize = 1;
for (i = 0; i < work_dim; i++) {
for (j = maxDimSize; j > 1; j--) {
--- src/cl_enqueue.c 2017-09-22 10:05:22.000000000 +0200
+++ src/cl_enqueue.c 2020-03-24 18:30:12.031479833 +0100
@@ -494,7 +494,7 @@
cl_int cl_enqueue_svm_free(enqueue_data *data, cl_int status) {
int i;
void **pointers = data->pointers;
- uint num_svm_ptrs = data->size;
+ cl_uint num_svm_ptrs = data->size;
cl_int err = CL_SUCCESS;
if (status != CL_COMPLETE)

View File

@ -15,10 +15,6 @@ homepage="http://www.freedesktop.org/wiki/Software/Beignet/"
distfiles="https://01.org/sites/default/files/${pkgname}-${version}-source.tar.gz"
checksum=c555edba149de23243965a703f39f79fa06f15bcff5a3762b5544b0925010b43
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
broken="/builddir/Beignet-1.3.2-Source/src/cl_api_kernel.c:154:9: error: unknown type name 'uint'; did you mean 'int'?"
fi
post_install() {
# remove CL headers, we do use opencl-headers instead.
rm -r ${DESTDIR}/usr/include