2018-02-25 10:06 GMT+01:00 Michał Górny :
> Some CMake projects use ASM-ATT rather than ASM, so extend our rule
> overrides to that.
>
for the curious:
https://cmake.org/Wiki/CMake/Assembler#ASM-ATT
ASM-ATT
This can be used for assembler files in AT assembler syntax. This
includes the GNU assembler gas.
- Supported assembler names: as, gas, may have toolchain specific prefix
- Supported source files extensions: .s, .asm
- .S files, i.e. assembler files which require preprocessing, are not
supported
- Involved files: CMakeASM-ATTInformation.cmake,
CMakeDetermineASM-ATTCompiler.cmake, CMakeTestASM-ATTCompiler.cmake
>
> Bug: https://bugs.gentoo.org/625844
> ---
> eclass/cmake-utils.eclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
> index b9f69a824b14..ef3f3c2607f8 100644
> --- a/eclass/cmake-utils.eclass
> +++ b/eclass/cmake-utils.eclass
> @@ -516,6 +516,7 @@ cmake-utils_src_configure() {
> fi
> cat > "${build_rules}" <<- _EOF_ || die
> SET (CMAKE_ASM_COMPILE_OBJECT "
> ${includes} ${CPPFLAGS} -o -c " CACHE
> STRING "ASM compile command" FORCE)
> + SET (CMAKE_ASM-ATT_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)
> @@ -531,6 +532,7 @@ cmake-utils_src_configure() {
> local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake
> cat > ${toolchain_file} <<- _EOF_ || die
> SET (CMAKE_ASM_COMPILER "${myCC/ /;}")
> + SET (CMAKE_ASM-ATT_COMPILER "${myCC/ /;}")
> SET (CMAKE_C_COMPILER "${myCC/ /;}")
> SET (CMAKE_CXX_COMPILER "${myCXX/ /;}")
> SET (CMAKE_Fortran_COMPILER "${myFC/ /;}")
> @@ -609,6 +611,7 @@ cmake-utils_src_configure() {
> if [[ ${CMAKE_BUILD_TYPE} != Gentoo && ${EAPI} != 5 ]]; then
> cat >> ${common_config} <<- _EOF_ || die
> SET (CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} ""
> CACHE STRING "")
> + SET (CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} ""
> CACHE STRING "")
> SET (CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE
> STRING "")
> SET (CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} ""
> CACHE STRING "")
> SET (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} ""
> CACHE STRING "")
> --
> 2.16.2
>
>
>