Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 29217932c34d7e3368764ab64879dc6f1edab1a6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 14 Jan 2019 11:19:44 -0800 |
| 4 | Subject: [PATCH] Use host compiler to compile native tools |
| 5 | |
| 6 | Helps in cross compiling |
| 7 | |
| 8 | Upstream-Status: Inappropriate [OE-Specific] |
| 9 | |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | |
| 12 | --- |
| 13 | CMakeLists.txt | 5 ++--- |
| 14 | 1 file changed, 2 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 17 | index 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 |