127 lines
4.7 KiB
Diff
127 lines
4.7 KiB
Diff
Author: Justin Jagieniak <justin@jagieniak.net>, John Zimmermann <me@johnnynator.dev>
|
|
Date: Fri Apr 11 14:19:00 2021 +0200
|
|
|
|
Fix cross-compile patch to consider CMAKE_CROSSCOMPILING_EMULATOR aswell.
|
|
|
|
--- CMakeLists.txt.orig 2021-04-11 12:37:42.766483860 +0200
|
|
+++ CMakeLists.txt 2021-04-11 13:05:49.491976374 +0200
|
|
@@ -397,7 +397,7 @@
|
|
|
|
CHECK_SYSTEMD()
|
|
|
|
-IF(CMAKE_CROSSCOMPILING)
|
|
+IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
|
|
INCLUDE(${IMPORT_EXECUTABLES})
|
|
ENDIF()
|
|
@@ -479,7 +479,7 @@
|
|
ADD_SUBDIRECTORY(support-files)
|
|
ADD_SUBDIRECTORY(extra/aws_sdk)
|
|
|
|
-IF(NOT CMAKE_CROSSCOMPILING)
|
|
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
SET(EXPORTED comp_err comp_sql factorial)
|
|
IF(NOT WITHOUT_SERVER)
|
|
SET(EXPORTED ${EXPORTED} gen_lex_hash gen_lex_token)
|
|
|
|
--- configure.cmake.orig 2021-04-11 13:45:39.143733089 +0200
|
|
+++ configure.cmake 2021-04-11 13:46:06.378730316 +0200
|
|
@@ -668,7 +668,7 @@
|
|
" HAVE_PTHREAD_YIELD_ZERO_ARG)
|
|
|
|
IF(NOT STACK_DIRECTION)
|
|
- IF(CMAKE_CROSSCOMPILING)
|
|
+ IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
MESSAGE(FATAL_ERROR
|
|
"STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
|
|
"or -DSTACK_DIRECTION=-1 when calling cmake.")
|
|
|
|
--- storage/mroonga/vendor/groonga/CMakeLists.txt.orig 2021-04-11 13:48:22.249716484 +0200
|
|
+++ storage/mroonga/vendor/groonga/CMakeLists.txt 2021-04-11 13:49:44.050708156 +0200
|
|
@@ -405,7 +405,7 @@
|
|
set(MECAB_LIBRARIES libmecab)
|
|
else()
|
|
set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path")
|
|
- if(NOT CMAKE_CROSSCOMPILING)
|
|
+ if(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}")
|
|
endif()
|
|
if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}")
|
|
|
|
--- storage/innobase/innodb.cmake.orig 2021-04-11 13:52:39.129690331 +0200
|
|
+++ storage/innobase/innodb.cmake 2021-04-11 13:53:03.656687834 +0200
|
|
@@ -36,7 +36,7 @@
|
|
|
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
|
|
|
-IF(CMAKE_CROSSCOMPILING)
|
|
+IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
# Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS when
|
|
# cross-compiling. Not as precise, but usually good enough.
|
|
# This only make sense for atomic tests in this file, this trick doesn't
|
|
|
|
--- sql/CMakeLists.txt.orig 2021-04-11 13:54:43.469677673 +0200
|
|
+++ sql/CMakeLists.txt 2021-04-11 13:55:46.337671272 +0200
|
|
@@ -356,7 +356,7 @@
|
|
COMPILE_FLAGS "-p ORA")
|
|
ENDIF()
|
|
|
|
-IF(NOT CMAKE_CROSSCOMPILING)
|
|
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
ADD_EXECUTABLE(gen_lex_token gen_lex_token.cc
|
|
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.hh)
|
|
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
|
|
@@ -406,7 +406,7 @@
|
|
)
|
|
|
|
# Install initial database (default on windows, optional target elsewhere)
|
|
-IF(TARGET mariadbd AND NOT CMAKE_CROSSCOMPILING)
|
|
+IF(TARGET mariadbd AND (NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR))
|
|
IF(GENERATOR_IS_MULTI_CONFIG)
|
|
SET (CONFIG_PARAM -DCONFIG=${CMAKE_CFG_INTDIR})
|
|
ENDIF()
|
|
|
|
--- scripts/CMakeLists.txt.orig 2021-04-11 13:57:30.088660710 +0200
|
|
+++ scripts/CMakeLists.txt 2021-04-11 13:58:12.486656393 +0200
|
|
@@ -28,14 +28,14 @@
|
|
)
|
|
ENDMACRO()
|
|
|
|
-IF(NOT CMAKE_CROSSCOMPILING)
|
|
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
|
ADD_EXECUTABLE(comp_sql comp_sql.c)
|
|
TARGET_LINK_LIBRARIES(comp_sql)
|
|
ENDIF()
|
|
|
|
# Build mysql_fix_privilege_tables.sql (concatenate 3 sql scripts)
|
|
-IF(NOT WIN32 OR CMAKE_CROSSCOMPILING)
|
|
+IF(NOT WIN32 OR (CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR))
|
|
FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable")
|
|
MARK_AS_ADVANCED(CAT_EXECUTABLE)
|
|
ENDIF()
|
|
|
|
--- extra/CMakeLists.txt.orig 2021-04-11 14:02:55.048627626 +0200
|
|
+++ extra/CMakeLists.txt 2021-04-11 14:03:24.136624665 +0200
|
|
@@ -18,7 +18,7 @@
|
|
# Default install component for the files is Server here
|
|
SET(MYSQL_INSTALL_COMPONENT Server)
|
|
|
|
-IF(NOT CMAKE_CROSSCOMPILING)
|
|
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
ADD_EXECUTABLE(comp_err comp_err.c)
|
|
TARGET_LINK_LIBRARIES(comp_err mysys)
|
|
ENDIF()
|
|
|
|
--- dbug/CMakeLists.txt.orig 2021-04-11 14:12:39.744568100 +0200
|
|
+++ dbug/CMakeLists.txt 2021-04-11 14:13:02.588565774 +0200
|
|
@@ -25,7 +25,7 @@
|
|
ADD_EXECUTABLE(tests tests.c)
|
|
TARGET_LINK_LIBRARIES(tests dbug)
|
|
|
|
-IF(NOT CMAKE_CROSSCOMPILING)
|
|
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
|
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
|
TARGET_LINK_LIBRARIES(factorial dbug)
|
|
ENDIF()
|