summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDouglas Royds <douglas.royds@taitradio.com>2021-03-18 12:25:14 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-28 22:31:47 +0100
commitc553ad2073bae4c7d72a98cd17e70c1d0c59267e (patch)
tree28ff9eafc2c55b09ab8bace6af05ed84cd1c6145 /meta
parentb9739ad63a9465ae581ff00aadf72d5ea18af928 (diff)
downloadpoky-c553ad2073bae4c7d72a98cd17e70c1d0c59267e.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: 0b5d825ccb251bd6015dfcd49ed452b7bd64e6f6) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e9180c9575f0723b51915a0da58452511b6b03bf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/cmake.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 8243f7ce8c..af6a8c4395 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -102,7 +102,8 @@ set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
102set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} ) 102set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} )
103set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} ) 103set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} )
104set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) 104set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
105set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" ) 105find_program( CMAKE_AR ${OECMAKE_AR} DOC "Archiver" REQUIRED )
106
106set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) 107set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
107set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) 108set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
108set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" ) 109set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )