Skip to content

Commit

Permalink
s390x patch for datatype mismatch in valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
Surender Yadav committed Sep 24, 2024
1 parent d4d677d commit 0d888df
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions bazel/rules_foreign_cc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,34 @@ index 64cb677..9a8c62c 100644
additional_tools = depset(transitive = [make_data.target.files])

return built_tool_rule_impl(
diff --git a/toolchains/built_toolchains.bzl b/toolchains/built_toolchains.bzl
index 4f32252..1a9dc57 100644
--- a/toolchains/built_toolchains.bzl
+++ b/toolchains/built_toolchains.bzl
@@ -275,6 +275,9 @@ cc_import(

# This patch is required as rules_foreign_cc runs in MSYS2 on Windows and MSYS2's "mkdir" is used
Label("//toolchains:pkgconfig-makefile-vc.patch"),
+
+ # This patch is required to overcome type mismatch error
+ Label("//toolchains:pkgconfig-valgrind.patch"),
],
urls = [
"https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz",
diff --git a/toolchains/pkgconfig-valgrind.patch b/toolchains/pkgconfig-valgrind.patch
new file mode 100644
index 0000000..f6f4cc8
--- /dev/null
+++ b/toolchains/pkgconfig-valgrind.patch
@@ -0,0 +1,11 @@
+--- glib/glib/valgrind.h
++++ glib/glib/valgrind.h
+@@ -643,7 +643,7 @@
+ /* results = r3 */ \
+ "lgr %0, 3\n\t" \
+ : "=d" (_zzq_result) \
+- : "a" (&_zzq_args[0]), "0" (_zzq_default) \
++ : "a" (&_zzq_args[0]), "0" ((unsigned long long int)(_zzq_default)) \
+ : "cc", "2", "3", "memory" \
+ ); \
+ _zzq_result; \

0 comments on commit 0d888df

Please sign in to comment.