Gentoo Archives: gentoo-dev

From: Michael Palimaka <kensington@g.o>
To: gentoo-dev@l.g.o
Cc: kde@g.o
Subject: [gentoo-dev] Re: [PATCH] cmake-utils.eclass: Extend ASM rules to ASM-ATT
Date: Fri, 02 Mar 2018 08:50:02
Message-Id: 9e15ed0a-acbb-a8e2-2106-6bbb278a0076@gentoo.org
In Reply to: [gentoo-dev] [PATCH] cmake-utils.eclass: Extend ASM rules to ASM-ATT by "Michał Górny"
1 On 02/25/2018 08:06 PM, Michał Górny wrote:
2 > Some CMake projects use ASM-ATT rather than ASM, so extend our rule
3 > overrides to that.
4 >
5 > Bug: https://bugs.gentoo.org/625844
6 > ---
7 > eclass/cmake-utils.eclass | 3 +++
8 > 1 file changed, 3 insertions(+)
9 >
10 > diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
11 > index b9f69a824b14..ef3f3c2607f8 100644
12 > --- a/eclass/cmake-utils.eclass
13 > +++ b/eclass/cmake-utils.eclass
14 > @@ -516,6 +516,7 @@ cmake-utils_src_configure() {
15 > fi
16 > cat > "${build_rules}" <<- _EOF_ || die
17 > SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
18 > + SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
19 > SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
20 > SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
21 > SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
22 > @@ -531,6 +532,7 @@ cmake-utils_src_configure() {
23 > local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake
24 > cat > ${toolchain_file} <<- _EOF_ || die
25 > SET (CMAKE_ASM_COMPILER "${myCC/ /;}")
26 > + SET (CMAKE_ASM-ATT_COMPILER "${myCC/ /;}")
27 > SET (CMAKE_C_COMPILER "${myCC/ /;}")
28 > SET (CMAKE_CXX_COMPILER "${myCXX/ /;}")
29 > SET (CMAKE_Fortran_COMPILER "${myFC/ /;}")
30 > @@ -609,6 +611,7 @@ cmake-utils_src_configure() {
31 > if [[ ${CMAKE_BUILD_TYPE} != Gentoo && ${EAPI} != 5 ]]; then
32 > cat >> ${common_config} <<- _EOF_ || die
33 > SET (CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
34 > + SET (CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
35 > SET (CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
36 > SET (CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
37 > SET (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
38 >
39
40 LGTM