meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
Zoltán Böszörményi f3cd830c09
mariadb: 11.4.8
11.4.7 fixes a huge performance drop from 11.4.5 to 11.4.6.
https://mariadb.com/docs/release-notes/community-server/mariadb-11-4-series/mariadb-11.4.7-release-notes

11.4.8 fixes several crash problems and other issues.
https://mariadb.com/docs/release-notes/community-server/mariadb-11-4-series/mariadb-11.4.8-release-notes

Removed 0001-aio_linux-Check-if-syscall-exists-before-using-it.patch
which is not applicable anymore, the code was rewritten.

Adapted 0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
to fix fuzz.

Add libxml2-native to DEPENDS in mariadb-native to fix the
do_configure failure with the new version.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-10-02 10:17:29 -07:00

67 lines
2.1 KiB
Diff

From 360d41c1dd2d28d5102d66179095cedacaf5dc3a Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Fri, 23 Sep 2022 15:48:21 +0800
Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found
Fix the below do_compile issue in cross-compiling env.
| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_hash', needed by 'sql/lex_hash.h'. Stop.
| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_token', needed by 'sql/lex_token.h'. Stop.
Upstream-Status: Inappropriate [oe build specific]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
sql/CMakeLists.txt | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 0195555e..507136cb 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -63,11 +63,18 @@
${CMAKE_BINARY_DIR}/sql
)
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
- COMMAND gen_lex_token > lex_token.h
- DEPENDS gen_lex_token
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+ COMMAND gen_lex_token > lex_token.h
+ DEPENDS gen_lex_token
+)
+ELSE()
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+ COMMAND gen_lex_token > lex_token.h
)
+ENDIF()
FIND_PACKAGE(BISON 2.4)
@@ -405,11 +412,18 @@
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
ENDIF()
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
- COMMAND gen_lex_hash > lex_hash.h
- DEPENDS gen_lex_hash
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
+ COMMAND gen_lex_hash > lex_hash.h
+ DEPENDS gen_lex_hash
+)
+ELSE()
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
+ COMMAND gen_lex_hash > lex_hash.h
)
+ENDIF()
MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc)
SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")