mirror of https://git.wownero.com/dsc/mxe.git
Merge 1dd6026783
into 49ff74142b
This commit is contained in:
commit
dc44fe9047
|
@ -0,0 +1,40 @@
|
|||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
PKG := opencl-amd
|
||||
$(PKG)_WEBSITE := https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK
|
||||
$(PKG)_DESCR := AMD OpenCL SDK Light
|
||||
$(PKG)_IGNORE := %
|
||||
$(PKG)_VERSION := 1.0
|
||||
$(PKG)_CHECKSUM := d1775637fc4b2531a4fd593bea1d8a6c70604bf410e8c9faa0b5d841b9ad9ff4
|
||||
$(PKG)_GH_CONF := GPUOpen-LibrariesAndSDKs/OCL-SDK
|
||||
$(PKG)_SUBDIR := app
|
||||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).inno.exe
|
||||
$(PKG)_URL := https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK/releases/download/1.0/OCL_SDK_Light_AMD.exe
|
||||
$(PKG)_DEPS := gcc
|
||||
|
||||
define $(PKG)_BUILD
|
||||
rm -rfv '$(PREFIX)/$(TARGET)/include/CL'
|
||||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include/CL'
|
||||
$(INSTALL) -m644 '$(SOURCE_DIR)/include/CL/'*.h '$(PREFIX)/$(TARGET)/include/CL/'
|
||||
|
||||
rm -fv '$(PREFIX)/$(TARGET)/lib/'*OpenCL*
|
||||
$(INSTALL) -m644 '$(SOURCE_DIR)/lib/x86$(if $(findstring x86_64,$(TARGET)),_64)/opencl.lib' \
|
||||
'$(PREFIX)/$(TARGET)/lib/OpenCL.lib'
|
||||
endef
|
||||
|
||||
# requires innoextract, see website for installation:
|
||||
# https://constexpr.org/innoextract/
|
||||
UNPACK_ARCHIVE = \
|
||||
$(if $(filter %.tgz, $(1)),tar xzf '$(1)', \
|
||||
$(if $(filter %.tar.gz, $(1)),tar xzf '$(1)', \
|
||||
$(if $(filter %.tar.Z, $(1)),tar xzf '$(1)', \
|
||||
$(if $(filter %.tbz2, $(1)),tar xjf '$(1)', \
|
||||
$(if $(filter %.tar.bz2, $(1)),tar xjf '$(1)', \
|
||||
$(if $(filter %.tar.lzma,$(1)),xz -dc -F lzma '$(1)' | tar xf -, \
|
||||
$(if $(filter %.txz, $(1)),xz -dc '$(1)' | tar xf -, \
|
||||
$(if $(filter %.tar.xz, $(1)),xz -dc '$(1)' | tar xf -, \
|
||||
$(if $(filter %.7z, $(1)),7za x '$(1)', \
|
||||
$(if $(filter %.zip, $(1)),unzip -q '$(1)', \
|
||||
$(if $(filter %.deb, $(1)),ar x '$(1)' && tar xf data.tar*, \
|
||||
$(if $(filter %.inno.exe,$(1)),innoextract '$(1)', \
|
||||
$(error Unknown archive format: $(1))))))))))))))
|
|
@ -0,0 +1,24 @@
|
|||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
PKG := opencl-clhpp
|
||||
$(PKG)_WEBSITE := https://www.khronos.org/registry/OpenCL/
|
||||
$(PKG)_DESCR := Khronos OpenCL C++ bindings
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := 8b6a312
|
||||
$(PKG)_CHECKSUM := aa74ee135520092bf54845bdfaf783961ad1e18d436167547baf7ef982189778
|
||||
$(PKG)_GH_CONF := KhronosGroup/OpenCL-CLHPP/master
|
||||
$(PKG)_DEPS := gcc opencl-headers opencl-icd
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
|
||||
-DBUILD_DOCS=OFF \
|
||||
-DBUILD_EXAMPLES=ON \
|
||||
-DBUILD_TESTS=OFF
|
||||
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' generate_cl2hpp generate_clhpp
|
||||
$(INSTALL) -m644 '$(BUILD_DIR)/include/CL/'*.hpp '$(PREFIX)/$(TARGET)/include/CL/'
|
||||
|
||||
# only one of the examples works and needs posix features
|
||||
$(if $(findstring posix,$(TARGET)),
|
||||
$(MAKE) -C '$(BUILD_DIR)' trivialCL2SizeTCompat -j '$(JOBS)'
|
||||
$(INSTALL) -m755 '$(BUILD_DIR)/examples/src/trivialCL2SizeTCompat.exe' '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe')
|
||||
endef
|
|
@ -0,0 +1,18 @@
|
|||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
PKG := opencl-headers
|
||||
$(PKG)_WEBSITE := https://www.khronos.org/registry/OpenCL/
|
||||
$(PKG)_DESCR := Khronos OpenCL-Headers
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := f039db6
|
||||
# master branch has subdirectories for the latest version of each spec
|
||||
$(PKG)_API := 22
|
||||
$(PKG)_CHECKSUM := 545efc0af7033ad01657c39812a074f33eb21a49bc84f23f07e5f0bc0a1e121e
|
||||
$(PKG)_GH_CONF := KhronosGroup/OpenCL-Headers/master
|
||||
$(PKG)_DEPS := gcc
|
||||
|
||||
define $(PKG)_BUILD
|
||||
rm -rf '$(PREFIX)/$(TARGET)/include/CL'
|
||||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include/CL'
|
||||
$(INSTALL) -m644 '$(SOURCE_DIR)/opencl$($(PKG)_API)/CL/'*.h '$(PREFIX)/$(TARGET)/include/CL/'
|
||||
endef
|
|
@ -0,0 +1,64 @@
|
|||
This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Theodore <tonyt@logyst.com>
|
||||
Date: Sun, 22 Oct 2017 16:10:34 +1100
|
||||
Subject: [PATCH] build icd library using import lib
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1111111..2222222 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,7 +10,7 @@ set (OPENCL_ICD_LOADER_SOURCES icd.c icd_dispatch.c)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
list (APPEND OPENCL_ICD_LOADER_SOURCES icd_linux.c icd_exports.map)
|
||||
else ()
|
||||
- list (APPEND OPENCL_ICD_LOADER_SOURCES icd_windows.c OpenCL.def)
|
||||
+ list (APPEND OPENCL_ICD_LOADER_SOURCES icd_windows.c)
|
||||
include_directories ($ENV{DXSDK_DIR}/Include)
|
||||
endif ()
|
||||
|
||||
@@ -22,14 +22,14 @@ endif ()
|
||||
|
||||
include_directories (${OPENCL_INCLUDE_DIRS})
|
||||
|
||||
-add_library (OpenCL SHARED ${OPENCL_ICD_LOADER_SOURCES})
|
||||
-set_target_properties (OpenCL PROPERTIES VERSION "1.2" SOVERSION "1")
|
||||
+add_library (OpenCL_icd SHARED ${OPENCL_ICD_LOADER_SOURCES})
|
||||
+set_target_properties (OpenCL_icd PROPERTIES VERSION "1.2" SOVERSION "1")
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
set_target_properties (OpenCL PROPERTIES LINK_FLAGS "-pthread -Wl,--version-script -Wl,${CMAKE_CURRENT_SOURCE_DIR}/icd_exports.map")
|
||||
endif ()
|
||||
|
||||
-target_link_libraries (OpenCL ${CMAKE_DL_LIBS})
|
||||
+target_link_libraries (OpenCL_icd ${CMAKE_DL_LIBS} OpenCL)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory (test)
|
||||
diff --git a/OpenCL.def b/OpenCL.def
|
||||
index 1111111..2222222 100644
|
||||
--- a/OpenCL.def
|
||||
+++ b/OpenCL.def
|
||||
@@ -33,7 +33,7 @@
|
||||
; THE MATERIALS.
|
||||
;
|
||||
; OpenCL is a trademark of Apple Inc. used under license by Khronos.
|
||||
-
|
||||
+LIBRARY "OpenCL.dll"
|
||||
EXPORTS
|
||||
|
||||
;
|
||||
diff --git a/test/loader_test/CMakeLists.txt b/test/loader_test/CMakeLists.txt
|
||||
index 1111111..2222222 100644
|
||||
--- a/test/loader_test/CMakeLists.txt
|
||||
+++ b/test/loader_test/CMakeLists.txt
|
||||
@@ -12,4 +12,4 @@ add_executable (icd_loader_test
|
||||
test_clgl.c
|
||||
test_image_objects.c )
|
||||
|
||||
-target_link_libraries (icd_loader_test OpenCL IcdLog)
|
||||
+target_link_libraries (icd_loader_test OpenCL_icd OpenCL IcdLog)
|
|
@ -0,0 +1,42 @@
|
|||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
PKG := opencl-icd
|
||||
$(PKG)_WEBSITE := https://www.khronos.org/registry/OpenCL/
|
||||
$(PKG)_DESCR := Khronos OpenCL ICD Loader
|
||||
# disable updates since https://github.com/KhronosGroup/OpenCL-ICD-Loader/commit/188be60
|
||||
# uses apis not in mingw-w64 yet.
|
||||
$(PKG)_IGNORE := %
|
||||
$(PKG)_VERSION := 6849f61
|
||||
$(PKG)_CHECKSUM := e44fb2a74100e88866f768825a2d373dc532c21a131950d3ea0a59e5ec6fed8c
|
||||
$(PKG)_GH_CONF := KhronosGroup/OpenCL-ICD-Loader/master
|
||||
$(PKG)_DEPS := gcc opencl-headers
|
||||
|
||||
# i686 target seems to need stdcall @ annotated *.def file
|
||||
$(PKG)_DEF_FILE := $(dir $(lastword $(MAKEFILE_LIST)))/opencl32.def
|
||||
|
||||
define $(PKG)_BUILD
|
||||
# add *.def file to sources for linking
|
||||
#cp '$(SOURCE_DIR)/OpenCL.def' '$(SOURCE_DIR)/test/loader_test/'
|
||||
#$(SED) -i 's,main.c, main.c OpenCL.def,' '$(SOURCE_DIR)/test/loader_test/CMakeLists.txt'
|
||||
|
||||
# install *.def file in case downstream packages need it
|
||||
$(INSTALL) -m644 \
|
||||
$(if $(findstring i686,$(TARGET)), \
|
||||
$($(PKG)_DEF_FILE) \
|
||||
$(else), \
|
||||
'$(SOURCE_DIR)/OpenCL.def') '$(PREFIX)/$(TARGET)/include/CL/OpenCL.def'
|
||||
|
||||
# create import lib and patch build to use it instead of *.def
|
||||
'$(TARGET)-dlltool' \
|
||||
-l '$(PREFIX)/$(TARGET)/lib/libOpenCL.a' \
|
||||
-d '$(PREFIX)/$(TARGET)/include/CL/OpenCL.def'
|
||||
|
||||
# build loader test and install
|
||||
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
|
||||
-DOPENCL_INCLUDE_DIRS='$(PREFIX)/$(TARGET)/include/CL' \
|
||||
-DCMAKE_C_FLAGS='-D_WIN32_WINNT=0x0600 -Wl,--enable-stdcall-fixup'
|
||||
|
||||
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
|
||||
rm -rf '$(PREFIX)/$(TARGET)/bin/test-$(PKG)'
|
||||
cp -Rv '$(BUILD_DIR)/bin' '$(PREFIX)/$(TARGET)/bin/test-$(PKG)'
|
||||
endef
|
|
@ -0,0 +1,118 @@
|
|||
;
|
||||
; Definition file of OpenCL.dll
|
||||
; Automatic generated by gendef
|
||||
; written by Kai Tietz 2008
|
||||
;
|
||||
LIBRARY "OpenCL.dll"
|
||||
EXPORTS
|
||||
clBuildProgram@24
|
||||
clCompileProgram@36
|
||||
clCreateBuffer@24
|
||||
clCreateCommandQueue@20
|
||||
clCreateCommandQueueWithProperties@16
|
||||
clCreateContext@24
|
||||
clCreateContextFromType@24
|
||||
clCreateFromGLBuffer@20
|
||||
clCreateFromGLRenderbuffer@20
|
||||
clCreateFromGLTexture2D@28
|
||||
clCreateFromGLTexture3D@28
|
||||
clCreateFromGLTexture@28
|
||||
clCreateImage2D@36
|
||||
clCreateImage3D@44
|
||||
clCreateImage@28
|
||||
clCreateKernel@12
|
||||
clCreateKernelsInProgram@16
|
||||
clCreatePipe@28
|
||||
clCreateProgramWithBinary@28
|
||||
clCreateProgramWithBuiltInKernels@20
|
||||
clCreateProgramWithSource@20
|
||||
clCreateSampler@20
|
||||
clCreateSamplerWithProperties@12
|
||||
clCreateSubBuffer@24
|
||||
clCreateSubDevices@20
|
||||
clCreateUserEvent@8
|
||||
clEnqueueAcquireGLObjects@24
|
||||
clEnqueueBarrier@4
|
||||
clEnqueueBarrierWithWaitList@16
|
||||
clEnqueueCopyBuffer@36
|
||||
clEnqueueCopyBufferRect@52
|
||||
clEnqueueCopyBufferToImage@36
|
||||
clEnqueueCopyImage@36
|
||||
clEnqueueCopyImageToBuffer@36
|
||||
clEnqueueFillBuffer@36
|
||||
clEnqueueFillImage@32
|
||||
clEnqueueMapBuffer@44
|
||||
clEnqueueMapImage@52
|
||||
clEnqueueMarker@8
|
||||
clEnqueueMarkerWithWaitList@16
|
||||
clEnqueueMigrateMemObjects@32
|
||||
clEnqueueNDRangeKernel@36
|
||||
clEnqueueNativeKernel@40
|
||||
clEnqueueReadBuffer@36
|
||||
clEnqueueReadBufferRect@56
|
||||
clEnqueueReadImage@44
|
||||
clEnqueueReleaseGLObjects@24
|
||||
clEnqueueSVMFree@32
|
||||
clEnqueueSVMMap@36
|
||||
clEnqueueSVMMemFill@32
|
||||
clEnqueueSVMMemcpy@32
|
||||
clEnqueueSVMUnmap@20
|
||||
clEnqueueTask@20
|
||||
clEnqueueUnmapMemObject@24
|
||||
clEnqueueWaitForEvents@12
|
||||
clEnqueueWriteBuffer@36
|
||||
clEnqueueWriteBufferRect@56
|
||||
clEnqueueWriteImage@44
|
||||
clFinish@4
|
||||
clFlush@4
|
||||
clGetCommandQueueInfo@20
|
||||
clGetContextInfo@20
|
||||
clGetDeviceIDs@24
|
||||
clGetDeviceInfo@20
|
||||
clGetEventInfo@20
|
||||
clGetEventProfilingInfo@20
|
||||
clGetExtensionFunctionAddress@4
|
||||
clGetExtensionFunctionAddressForPlatform@8
|
||||
clGetGLObjectInfo@12
|
||||
clGetGLTextureInfo@20
|
||||
clGetImageInfo@20
|
||||
clGetKernelArgInfo@24
|
||||
clGetKernelInfo@20
|
||||
clGetKernelWorkGroupInfo@24
|
||||
clGetMemObjectInfo@20
|
||||
clGetPipeInfo@20
|
||||
clGetPlatformIDs@12
|
||||
clGetPlatformInfo@20
|
||||
clGetProgramBuildInfo@24
|
||||
clGetProgramInfo@20
|
||||
clGetSamplerInfo@20
|
||||
clGetSupportedImageFormats@28
|
||||
clLinkProgram@36
|
||||
clReleaseCommandQueue@4
|
||||
clReleaseContext@4
|
||||
clReleaseDevice@4
|
||||
clReleaseEvent@4
|
||||
clReleaseKernel@4
|
||||
clReleaseMemObject@4
|
||||
clReleaseProgram@4
|
||||
clReleaseSampler@4
|
||||
clRetainCommandQueue@4
|
||||
clRetainContext@4
|
||||
clRetainDevice@4
|
||||
clRetainEvent@4
|
||||
clRetainKernel@4
|
||||
clRetainMemObject@4
|
||||
clRetainProgram@4
|
||||
clRetainSampler@4
|
||||
clSVMAlloc@20
|
||||
clSVMFree@8
|
||||
clSetCommandQueueProperty@20
|
||||
clSetEventCallback@16
|
||||
clSetKernelArg@16
|
||||
clSetKernelArgSVMPointer@12
|
||||
clSetKernelExecInfo@16
|
||||
clSetMemObjectDestructorCallback@12
|
||||
clSetUserEventStatus@8
|
||||
clUnloadCompiler
|
||||
clUnloadPlatformCompiler@4
|
||||
clWaitForEvents@8
|
|
@ -0,0 +1,43 @@
|
|||
This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Theodore <tonyt@logyst.com>
|
||||
Date: Mon, 23 Oct 2017 00:14:05 +1100
|
||||
Subject: [PATCH] fix mingw build
|
||||
|
||||
|
||||
diff --git a/compat.h b/compat.h
|
||||
index 1111111..2222222 100644
|
||||
--- a/compat.h
|
||||
+++ b/compat.h
|
||||
@@ -47,6 +47,7 @@ static inline int nanosleep(const struct timespec *req, struct timespec *rem)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef _UNISTD_H
|
||||
static inline int sleep(unsigned int secs)
|
||||
{
|
||||
struct timespec req, rem;
|
||||
@@ -56,6 +57,7 @@ static inline int sleep(unsigned int secs)
|
||||
return 0;
|
||||
return rem.tv_sec + (rem.tv_nsec ? 1 : 0);
|
||||
}
|
||||
+#endif
|
||||
|
||||
enum {
|
||||
PRIO_PROCESS = 0,
|
||||
diff --git a/vertminer.c b/vertminer.c
|
||||
index 1111111..2222222 100644
|
||||
--- a/vertminer.c
|
||||
+++ b/vertminer.c
|
||||
@@ -3257,7 +3257,7 @@ static void kill_mining(void)
|
||||
if (thr && PTH(thr) != 0L)
|
||||
pth = &thr->pth;
|
||||
thr_info_cancel(thr);
|
||||
-#ifndef WIN32
|
||||
+#if !defined(WIN32) || defined(HAVE_LIBWINPTHREAD)
|
||||
if (pth && *pth)
|
||||
pthread_join(*pth, NULL);
|
||||
#else
|
|
@ -0,0 +1,24 @@
|
|||
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||
|
||||
PKG := vertminer-gpu
|
||||
$(PKG)_WEBSITE := https://github.com/Bufius/vertminer-gpu
|
||||
$(PKG)_DESCR := GPU miner for vertcoin
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := 6419989
|
||||
$(PKG)_CHECKSUM := 5552fc5bb41adcc2701196281c997b728f2653b065b961596e476bb16aaf36a1
|
||||
$(PKG)_GH_CONF := Bufius/vertminer-gpu/master
|
||||
$(PKG)_DEPS := gcc curl opencl-amd pthreads
|
||||
|
||||
define $(PKG)_BUILD
|
||||
# doesn't seem to support out-of-source builds
|
||||
cd '$(SOURCE_DIR)' && autoreconf -fi
|
||||
cd '$(SOURCE_DIR)' && ./configure \
|
||||
$(MXE_CONFIGURE_OPTS) \
|
||||
--enable-scrypt \
|
||||
--disable-adl \
|
||||
--without-curses \
|
||||
--enable-opencl \
|
||||
CFLAGS="`'$(TARGET)-pkg-config' libcurl --cflags`"
|
||||
$(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)'
|
||||
$(MAKE) -C '$(SOURCE_DIR)' -j 1 install
|
||||
endef
|
Loading…
Reference in New Issue