blob: 16f123fad84fc9be8d7d0b8f77308b7c9f156acd [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
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 39b80250..d6bdf8ed 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -1288,11 +1288,10 @@ FILE(MAKE_DIRECTORY "${NATIVE_BIN_DIR}")
21 SET(BIN2H_COMMAND "${NATIVE_BIN_DIR}bin2h")
22 SET(BSINCGEN_COMMAND "${NATIVE_BIN_DIR}bsincgen")
23 ADD_CUSTOM_COMMAND(OUTPUT "${BIN2H_COMMAND}" "${BSINCGEN_COMMAND}"
24- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "${NATIVE_SRC_DIR}"
25 COMMAND ${CMAKE_COMMAND} -E remove "${BIN2H_COMMAND}" "${BSINCGEN_COMMAND}"
26- COMMAND ${CMAKE_COMMAND} --build . --config "Release"
27+ COMMAND gcc "${NATIVE_SRC_DIR}bin2h.c" -o "${BIN2H_COMMAND}" -lm
28+ COMMAND gcc "${NATIVE_SRC_DIR}bsincgen.c" -o "${BSINCGEN_COMMAND}" -lm
29 WORKING_DIRECTORY "${NATIVE_BIN_DIR}"
30- DEPENDS "${NATIVE_SRC_DIR}CMakeLists.txt"
31 IMPLICIT_DEPENDS C "${NATIVE_SRC_DIR}bin2h.c"
32 C "${NATIVE_SRC_DIR}bsincgen.c"
33 VERBATIM