diff options
author | Douglas Royds <douglas.royds@taitradio.com> | 2021-03-18 12:25:14 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-20 18:54:56 +0000 |
commit | 887e56c1b274db773ad8f9925e222a06992cf650 (patch) | |
tree | db5618299e6efe22acc9edefe09fa68e9e624670 | |
parent | 78f58a4769974ab3b2753b417d9a1af9dea8b84a (diff) | |
download | poky-887e56c1b274db773ad8f9925e222a06992cf650.tar.gz |
cmake: Fully-qualified path to ar
We (correctly enough) pass in our AR to cmake via the toolchain file,
but unlike the other cross-compilation tools (CC, CXX, ranlib, etc),
cmake does not then do its own search in the PATH for our AR.
By using cmake's own find_program() to search the PATH,
make works as expected from the commandline, outside of bitbake.
(From OE-Core rev: e9180c9575f0723b51915a0da58452511b6b03bf)
Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/cmake.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index 70e4f3b6fd..8876ce5aa5 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -102,7 +102,8 @@ set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) | |||
102 | set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} ) | 102 | set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} ) |
103 | set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} ) | 103 | set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} ) |
104 | set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) | 104 | set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) |
105 | set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" ) | 105 | find_program( CMAKE_AR ${OECMAKE_AR} DOC "Archiver" REQUIRED ) |
106 | |||
106 | set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) | 107 | set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) |
107 | set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) | 108 | set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) |
108 | set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" ) | 109 | set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" ) |