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 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | --- a/CMakeLists.txt |
| 17 | +++ b/CMakeLists.txt |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame^] | 18 | @@ -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" |