From cbf4efdad952074b3adc412c87ad766d40165293 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 1 Dec 2016 00:02:32 +0100 Subject: cmake-utils.eclass: Set assembler correctly, #601292 Use in the assembly compile command in order to fix building assembly files. It turns out that is no longer correctly evaluated in that command once it is no longer set explicitly in the toolchain file and passed through the environment instead. Pass ASM and ASMFLAGS (equal to CC and CFLAGS) appropriately to enforce using the correct compiler. --- eclass/cmake-utils.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index b21435b1782d..784ae44b6812 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -517,7 +517,7 @@ enable_cmake-utils_src_configure() { includes="" fi cat > "${build_rules}" <<- _EOF_ || die - SET (CMAKE_ASM_COMPILE_OBJECT " ${includes} ${CFLAGS} -o -c " CACHE STRING "ASM compile command" FORCE) + SET (CMAKE_ASM_COMPILE_OBJECT " ${includes} ${CPPFLAGS} -o -c " CACHE STRING "ASM compile command" FORCE) SET (CMAKE_C_COMPILE_OBJECT " ${includes} ${CPPFLAGS} -o -c " CACHE STRING "C compile command" FORCE) SET (CMAKE_CXX_COMPILE_OBJECT " ${includes} ${CPPFLAGS} -o -c " CACHE STRING "C++ compile command" FORCE) SET (CMAKE_Fortran_COMPILE_OBJECT " ${includes} ${FCFLAGS} -o -c " CACHE STRING "Fortran compile command" FORCE) @@ -532,6 +532,8 @@ enable_cmake-utils_src_configure() { # Bug 542530, export those instead of setting paths in toolchain file local -x CC=$(tc-getCC) CXX=$(tc-getCXX) FC=$(tc-getFC) local -x PKG_CONFIG=$(tc-getPKG_CONFIG) + # Bug 601292, set the compiler for assembly as well + local -x ASM=$(tc-getCC) ASMFLAGS=${CFLAGS} if tc-is-cross-compiler; then local sysname -- cgit v1.2.3-65-gdbad