sgminer-kl
sgminer-kl copied to clipboard
Support for machines without AMD drivers.
AMD drivers are not available for Mac, and reliance on those drivers prevents running on other OpenCL devices (such as Intel graphics) so I was wondering whether you'd mind supporting machines that lack the drivers?
I can compile for Mac after making a few changes:
use
#if defined(APPLE) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
when including cl
remove these two lines of code from sgminer.c which I note have caused issues for some other users too:
FILE _iob[] = { *stdin, *stdout, *stderr };
extern "C" FILE * __cdecl __iob_func(void) { return _iob; }
in util.c replace
#ifdef CLOCK_MONOTONIC /* Essentially just linux */
with
#ifdef CLOCK_MONOTONIC && !defined(__APPLE__) /* Essentially just linux */
in x17.c replace
inline void x17hash(void *state, const void *input)
with
static inline void x17hash(void *state, const void *input)
But running results in the error warning: unknown OpenCL extension 'cl_amd_media_ops2' - ignoring failed to init GPU
due to missing the drivers.