summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-12-02 11:57:56 +0100
committerMichał Górny <mgorny@gentoo.org>2016-12-08 09:00:17 +0100
commited24aa4f0f0d24178cc6c08f36c8550a11ff3e7e (patch)
tree995de7fe92fd4b2e268d058ff82605d95b5a7261 /eclass
parentcmake-utils.eclass: Split multi-arg CC/CXX/FC correctly, #542530 (diff)
downloadgentoo-ed24aa4f0f0d24178cc6c08f36c8550a11ff3e7e.tar.gz
gentoo-ed24aa4f0f0d24178cc6c08f36c8550a11ff3e7e.tar.bz2
gentoo-ed24aa4f0f0d24178cc6c08f36c8550a11ff3e7e.zip
cmake-utils.eclass: Set assembly compiler & flags directly
Set the assembly compiler and flags directly instead of implicitly forcing them in the build rule.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake-utils.eclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index c53666e2c0f..1fddae1ace8 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -517,7 +517,7 @@ enable_cmake-utils_src_configure() {
includes="<INCLUDES>"
fi
cat > "${build_rules}" <<- _EOF_ || die
- SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
+ SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
@@ -532,6 +532,7 @@ enable_cmake-utils_src_configure() {
# space separated.
local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake
cat > ${toolchain_file} <<- _EOF_ || die
+ SET (CMAKE_ASM_COMPILER "${myCC/ /;}")
SET (CMAKE_C_COMPILER "${myCC/ /;}")
SET (CMAKE_CXX_COMPILER "${myCXX/ /;}")
SET (CMAKE_Fortran_COMPILER "${myFC/ /;}")
@@ -539,6 +540,8 @@ enable_cmake-utils_src_configure() {
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
_EOF_
+ # We are using the C compiler for assembly by default.
+ local -x ASMFLAGS=${CFLAGS}
local -x PKG_CONFIG=$(tc-getPKG_CONFIG)
if tc-is-cross-compiler; then