blob: 2bffd65c6e9b58c71e572f7c9f2061e7b7d8fa33 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 29217932c34d7e3368764ab64879dc6f1edab1a6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 14 Jan 2019 11:19:44 -0800
4Subject: [PATCH] Use host compiler to compile native tools
5
6Helps in cross compiling
7
8Upstream-Status: Inappropriate [OE-Specific]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12---
13 CMakeLists.txt | 5 ++---
14 1 file changed, 2 insertions(+), 3 deletions(-)
15
Brad Bishop19323692019-04-05 15:28:33 -040016--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050018@@ -1085,11 +1085,10 @@ ELSE()
19 SET(BIN2H_COMMAND "${NATIVE_BIN_DIR}/bin2h")
20 SET(BSINCGEN_COMMAND "${NATIVE_BIN_DIR}/bsincgen")
21 ADD_CUSTOM_COMMAND(OUTPUT "${BIN2H_COMMAND}" "${BSINCGEN_COMMAND}"
22- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "${NATIVE_SRC_DIR}"
23 COMMAND ${CMAKE_COMMAND} -E remove "${BIN2H_COMMAND}" "${BSINCGEN_COMMAND}"
24- COMMAND ${CMAKE_COMMAND} --build . --config "Release"
25+ COMMAND gcc "${NATIVE_SRC_DIR}/bin2h.c" -o "${BIN2H_COMMAND}" -lm
26+ COMMAND gcc "${NATIVE_SRC_DIR}/bsincgen.c" -o "${BSINCGEN_COMMAND}" -lm
27 WORKING_DIRECTORY "${NATIVE_BIN_DIR}"
28- DEPENDS "${NATIVE_SRC_DIR}/CMakeLists.txt"
29 IMPLICIT_DEPENDS
30 C "${NATIVE_SRC_DIR}/bin2h.c"
31 C "${NATIVE_SRC_DIR}/bsincgen.c"