@@ -20,7 +20,7 @@ static char *file_contents(const char *filename, int *length)
20
20
if (!f ) {
21
21
/* Then from `pwd`/kernel/ */
22
22
strcpy (fullpath , sgminer_path );
23
- strcat (fullpath , "kernel/" );
23
+ strcat (fullpath , "/ kernel/" );
24
24
strcat (fullpath , filename );
25
25
f = fopen (fullpath , "rb" );
26
26
}
@@ -49,7 +49,7 @@ static char *file_contents(const char *filename, int *length)
49
49
void set_base_compiler_options (build_kernel_data * data )
50
50
{
51
51
char buf [255 ];
52
- sprintf (data -> compiler_options , "-I \"%s\" -I \"%skernel \" -I \".\" -D WORKSIZE=%d" ,
52
+ sprintf (data -> compiler_options , "-I \"%s\" -I \"%s\\kernel \" -I \".\" -D WORKSIZE=%d" ,
53
53
data -> sgminer_path , data -> sgminer_path , (int )data -> work_size );
54
54
applog (LOG_DEBUG , "Setting worksize to %d" , (int )(data -> work_size ));
55
55
@@ -61,7 +61,7 @@ void set_base_compiler_options(build_kernel_data *data)
61
61
applog (LOG_DEBUG , "cl_amd_media_ops found, setting BITALIGN" );
62
62
} else
63
63
applog (LOG_DEBUG , "cl_amd_media_ops not found, will not set BITALIGN" );
64
-
64
+
65
65
if (data -> kernel_path ) {
66
66
strcat (data -> compiler_options , " -I \"" );
67
67
strcat (data -> compiler_options , data -> kernel_path );
@@ -126,10 +126,9 @@ cl_program build_opencl_kernel(build_kernel_data *data, const char *filename)
126
126
applog (LOG_ERR , "Error %d: Building Program (clBuildProgram)" , status );
127
127
status = clGetProgramBuildInfo (program , * data -> device , CL_PROGRAM_BUILD_LOG , 0 , NULL , & log_size );
128
128
129
- char * sz_log = (char * )malloc (log_size + 1 );
129
+ char * sz_log = (char * )malloc (log_size );
130
130
status = clGetProgramBuildInfo (program , * data -> device , CL_PROGRAM_BUILD_LOG , log_size , sz_log , NULL );
131
- sz_log [log_size ] = '\0' ;
132
- applog (LOG_ERR , "%s" , sz_log );
131
+ applogsiz (LOG_ERR , log_size , "%s" , sz_log );
133
132
free (sz_log );
134
133
goto out ;
135
134
}
0 commit comments