mariadb/mariadb-10.5.10-e2k.patch
2023-05-15 17:33:50 +03:00

57 lines
1.9 KiB
Diff

diff --git a/cmake/abi_check.cmake b/cmake/abi_check.cmake
index e4a783f3..caba8b37 100644
--- a/cmake/abi_check.cmake
+++ b/cmake/abi_check.cmake
@@ -22,7 +22,7 @@
# only be run on Unix and only if gcc is used. On some Unixes,
# (Solaris) sed or diff might act differently from GNU, so we run only
# on systems we can trust.
-IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Linux")
+IF((APPLE OR CMAKE_SYSTEM_NAME MATCHES "Linux") AND NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
SET(RUN_ABI_CHECK 1)
ELSE()
SET(RUN_ABI_CHECK 0)
diff --git a/mysys/my_context.c b/mysys/my_context.c
index 4153927d..8fa98a85 100644
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -107,8 +107,16 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
c->user_data= d;
c->active= 1;
u.p= c;
+#ifdef __e2k__
+ if (makecontext_e2k(&c->spawned_context, my_context_spawn_internal, 2,
+ u.a[0], u.a[1]) < 0) {
+ c->active= 0;
+ return -1;
+ }
+#else
makecontext(&c->spawned_context, my_context_spawn_internal, 2,
u.a[0], u.a[1]);
+#endif
return my_context_continue(c);
}
@@ -150,6 +158,9 @@ my_context_destroy(struct my_context *c)
{
if (c->stack)
{
+#ifdef __e2k__
+ freecontext_e2k(&c->spawned_context);
+#endif
#ifdef HAVE_VALGRIND_MEMCHECK_H
VALGRIND_STACK_DEREGISTER(c->valgrind_stack_id);
#endif
diff --git a/wsrep-lib/include/wsrep/compiler.hpp b/wsrep-lib/include/wsrep/compiler.hpp
index 5f8e1ce0..76eb77d6 100644
--- a/wsrep-lib/include/wsrep/compiler.hpp
+++ b/wsrep-lib/include/wsrep/compiler.hpp
@@ -40,7 +40,7 @@
#ifndef WSREP_LIB_COMPILER_HPP
#define WSREP_LIB_COMPILER_HPP
-#if __cplusplus >= 201103L && !(__GNUC__ == 4 && __GNUG_MINOR__ < 8)
+#if __cplusplus >= 201103L && !(__GNUC__ == 4 && __GNUG_MINOR__ < 8) && !defined(__LCC__)
#define WSREP_NORETURN [[noreturn]]
#else
#define WSREP_NORETURN __attribute__((noreturn))