From 6ed35891f615dcc8d7ee3ea5a75fdc91749497bf Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Wed, 25 May 2016 23:15:53 +0200 Subject: [PATCH] Trying to find a workaround for Issue https://github.com/hashcat/oclHashcat/issues/335 --- src/hashcat.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hashcat.c b/src/hashcat.c index 417b60d0a..162b649f4 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -14556,14 +14556,23 @@ int main (int argc, char **argv) // we don't have sm_* on vendors not NV but it doesn't matter - snprintf (build_opts, sizeof (build_opts) - 1, "-cl-std=CL1.1 -I\"%s/OpenCL\" -DVENDOR_ID=%u -DCUDA_ARCH=%d -DVECT_SIZE=%u -DDEVICE_TYPE=%u -DKERN_TYPE=%u -D_unroll", shared_dir, device_param->vendor_id, (device_param->sm_major * 100) + device_param->sm_minor, device_param->vector_width, (u32) device_param->device_type, kern_type); + #if _WIN + snprintf (build_opts, sizeof (build_opts) - 1, "-I \"%s\\OpenCL\\\" -I '%s\\OpenCL\\' -I %s\\OpenCL\\", shared_dir, shared_dir, shared_dir); + #else + snprintf (build_opts, sizeof (build_opts) - 1, "-I \"%s/OpenCL/\" -I '%s/OpenCL/' -I %s/OpenCL/", shared_dir, shared_dir, shared_dir); + #endif + + char build_opts_new[1024] = { 0 }; + + snprintf (build_opts_new, sizeof (build_opts_new) - 1, "%s -DVENDOR_ID=%u -DCUDA_ARCH=%d -DVECT_SIZE=%u -DDEVICE_TYPE=%u -DKERN_TYPE=%u -D_unroll -cl-std=CL1.1", build_opts, device_param->vendor_id, (device_param->sm_major * 100) + device_param->sm_minor, device_param->vector_width, (u32) device_param->device_type, kern_type); + + strncpy (build_opts, build_opts_new, sizeof (build_opts) - 1); + if (device_param->vendor_id == VENDOR_ID_INTEL_SDK) { // we do vectorizing much better than the auto-vectorizer - char build_opts_new[1024] = { 0 }; - snprintf (build_opts_new, sizeof (build_opts_new) - 1, "%s -cl-opt-disable", build_opts); strncpy (build_opts, build_opts_new, sizeof (build_opts) - 1);