diff mbox series

[2/2] cacao-native: patch to be buildable with gcc13

Message ID 20241118221532.2468927-2-stanley.stanton@taitcommunications.com
State New
Headers show
Series [1/2] java-library.bbclass: resolve do_deletebinaries race condition | expand

Commit Message

Stanley Stanton Nov. 18, 2024, 10:15 p.m. UTC
Added template class operator== and operator!= for DumpMemoryAllocator
in line with the Allocator example on cppreference, to avoid compilation
errors with gcc 13. Thanks to Ben Slattery for developing the solution.

Upstream-Status: Inactive-Upstream [lastcommit: 2020-06-06]

Suggested-by:  Ben Slattery <ben.slattery@taitcommunications.com>
Signed-off-by: Stanley Stanton <stanley.stanton@taitcommunications.com>
---
 .../0001-cacao-native-fix-gcc-13-build.patch      | 15 +++++++++++++++
 recipes-core/cacao/cacao_git.bb                   |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 recipes-core/cacao/cacao/0001-cacao-native-fix-gcc-13-build.patch
diff mbox series

Patch

diff --git a/recipes-core/cacao/cacao/0001-cacao-native-fix-gcc-13-build.patch b/recipes-core/cacao/cacao/0001-cacao-native-fix-gcc-13-build.patch
new file mode 100644
index 0000000..1af8a89
--- /dev/null
+++ b/recipes-core/cacao/cacao/0001-cacao-native-fix-gcc-13-build.patch
@@ -0,0 +1,15 @@ 
+diff -wur git.original/src/mm/dumpmemory.hpp git/src/mm/dumpmemory.hpp
+--- git.original/src/mm/dumpmemory.hpp	2024-09-24 11:25:39.769462195 +1200
++++ git/src/mm/dumpmemory.hpp	2024-09-24 11:26:26.429863119 +1200
+@@ -197,6 +197,11 @@
+ 	}
+ };
+ 
++template<class T>
++bool operator==(const DumpMemoryAllocator <T>&, const DumpMemoryAllocator <T>&) { return true; }
++ 
++template<class T>
++bool operator!=(const DumpMemoryAllocator <T>&, const DumpMemoryAllocator <T>&) { return false; }
+ 
+ /**
+  * Dump memory allocation, used for for ENABLE_MEMCHECK.
diff --git a/recipes-core/cacao/cacao_git.bb b/recipes-core/cacao/cacao_git.bb
index fef7f34..c050a24 100644
--- a/recipes-core/cacao/cacao_git.bb
+++ b/recipes-core/cacao/cacao_git.bb
@@ -14,6 +14,7 @@  SRCREV = "6c4694f9bd175386a8c451531e9a5ad97aa23b6f"
 SRC_URI = "git://bitbucket.org/cacaovm/cacao.git;protocol=https;branch=master \
            file://0001-java.in-Do-not-use-hardcode-paths.patch \
            file://0002-cacao-use-system-s-boehm-garbage-collector.patch \
+           file://0001-cacao-native-fix-gcc-13-build.patch \
 "
 S = "${WORKDIR}/git"