summaryrefslogtreecommitdiff
path: root/app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch')
-rw-r--r--app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch b/app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch
new file mode 100644
index 000000000000..c2c834f712e6
--- /dev/null
+++ b/app-crypt/hashcat/files/hashcat-6.2.4-pocl-quoting-include.patch
@@ -0,0 +1,34 @@
+Fixes POCL include error.
+
+https://github.com/hashcat/hashcat/commit/8c14fd85eaf98f4cda3acf8f917edae696a3bb71
+https://github.com/hashcat/hashcat/issues/2950
+
+From: Jens Steube <jens.steube@gmail.com>
+Date: Sun, 5 Sep 2021 10:55:59 +0200
+Subject: [PATCH] POCL: Added a workaround for an issue in POCL that uses a
+ quote character as part of the path itself given to a path for the -I option
+
+--- a/src/backend.c
++++ b/src/backend.c
+@@ -11365,7 +11365,19 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
+ }
+ else
+ {
+- build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D KERNEL_STATIC -I OpenCL -I \"%s\" ", folder_config->cpath_real);
++ if (device_param->opencl_platform_vendor_id == VENDOR_ID_POCL)
++ {
++ // POCL doesn't like quotes in the include path, see:
++ // https://github.com/hashcat/hashcat/issues/2950
++ // Maybe related:
++ // https://github.com/pocl/pocl/issues/962
++
++ build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D KERNEL_STATIC -I OpenCL -I %s ", folder_config->cpath_real);
++ }
++ else
++ {
++ build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D KERNEL_STATIC -I OpenCL -I \"%s\" ", folder_config->cpath_real);
++ }
+ }
+
+ /* currently disabled, hangs NEO drivers since 20.09.
+