]> code.ossystems Code Review - openembedded-core.git/commitdiff
cmake: fix typo in toolchain file
authorØystein Walle <ow@datarespons.no>
Tue, 10 Oct 2017 12:59:40 +0000 (14:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Oct 2017 22:52:03 +0000 (23:52 +0100)
The missing underscore makes CMake define a new variable named "CMAKE"
with the contents "ASM_FLAGS ${CMAKE_C_FLAGS}" instead of a variable
named "CMAKE_ASM_FLAGS" with contents equal to "CMAKE_C_FLAGS". It seems
clear that the intention was to assign "CMAKE_ASM_FLAGS".

CMake uses variables named "CMAKE_<LANG>_FLAGS" for defining default
compiler flags for a given language <LANG>. Leaving this flag unset may
have unintended consequences. Not doing so is however not an error as
far as CMake is concerned so it is silently accepted.

Signed-off-by: Øystein Walle <ow@datarespons.no>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake

index 6518408c70514345197e7c3bfb295f42791ee163..dc8477ea34532158e87d59e130e633c3b64ab4f0 100644 (file)
@@ -1,7 +1,7 @@
 set( CMAKE_SYSTEM_NAME Linux )
 set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
 set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE )
-set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
 set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
 
 set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )