[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [PATCH] cmake-utils.eclass: Extend ASM rules to ASM-ATT
From:       Francesco Riosa <vivo75 () gmail ! com>
Date:       2018-02-25 11:36:15
Message-ID: CAD6zcDzpZEunnRa7c9gtN7uS-_kVJ3=1GhMOOPkHepG+cTgecg () mail ! gmail ! com
[Download RAW message or body]

2018-02-25 10:06 GMT+01:00 Michał Górny <mgorny@gentoo.org>:

> 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&T 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 "<CMAKE_ASM_COMPILER>
> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE
> STRING "ASM compile command" FORCE)
> +               SET (CMAKE_ASM-ATT_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)
> @@ -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
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-02-25 \
10:06 GMT+01:00 Michał Górny <span dir="ltr">&lt;<a href="mailto:mgorny@gentoo.org" \
target="_blank">mgorny@gentoo.org</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Some CMake projects use ASM-ATT rather than ASM, \
so extend our rule<br> overrides to that.<br></blockquote><div><br></div><div>for the \
curious:<br><a href="https://cmake.org/Wiki/CMake/Assembler#ASM-ATT">https://cmake.org/Wiki/CMake/Assembler#ASM-ATT</a><br><br></div><div><h3 \
style="color:rgb(0,0,0);background:none rgb(255,255,255);font-weight:bold;margin:0px \
0px 0.3em;overflow:hidden;padding-top:0.5em;padding-bottom:0.17em;border-bottom:none;f \
ont-size:16.764px;font-family:sans-serif;font-style:normal;font-variant-ligatures:norm \
al;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;tex \
t-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span \
class="gmail-mw-headline" id="gmail-ASM-ATT">ASM-ATT</span></h3><p \
style="margin:0.4em 0px \
0.5em;line-height:1.5em;color:rgb(0,0,0);font-family:sans-serif;font-size:12.7px;font- \
style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;le \
tter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:n \
ormal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">This \
can be used for assembler files in AT&amp;T assembler syntax. This includes the GNU \
assembler gas.</p><ul style="line-height:1.5em;list-style-type:square;margin:0.3em \
0px 0px 1.6em;padding:0px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.7px;fon \
t-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400; \
letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space \
:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><li \
style="margin-bottom:0.1em">Supported assembler names: as, gas, may have toolchain \
specific prefix</li><li style="margin-bottom:0.1em">Supported source files \
extensions: .s, .asm</li><li style="margin-bottom:0.1em">.S files, i.e. assembler \
files which require preprocessing, are not supported</li><li \
style="margin-bottom:0.1em">Involved files: CMakeASM-ATTInformation.cmake, \
CMakeDetermineASM-ATTCompiler.cmake, \
CMakeTestASM-ATTCompiler.cmake</li></ul><br></div><div>  </div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"> <br>
Bug: <a href="https://bugs.gentoo.org/625844" rel="noreferrer" \
                target="_blank">https://bugs.gentoo.org/625844</a><br>
---<br>
  eclass/cmake-utils.eclass | 3 +++<br>
  1 file changed, 3 insertions(+)<br>
<br>
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass<br>
index b9f69a824b14..ef3f3c2607f8 100644<br>
--- a/eclass/cmake-utils.eclass<br>
+++ b/eclass/cmake-utils.eclass<br>
@@ -516,6 +516,7 @@ cmake-utils_src_configure() {<br>
            fi<br>
            cat &gt; &quot;${build_rules}&quot; &lt;&lt;- _EOF_ || die<br>
                        SET (CMAKE_ASM_COMPILE_OBJECT \
&quot;&lt;CMAKE_ASM_COMPILER&gt; &lt;DEFINES&gt; ${includes} ${CPPFLAGS} \
&lt;FLAGS&gt; -o &lt;OBJECT&gt; -c &lt;SOURCE&gt;&quot; CACHE STRING &quot;ASM \
compile command&quot; FORCE)<br> +                       SET \
(CMAKE_ASM-ATT_COMPILE_OBJECT &quot;&lt;CMAKE_ASM_COMPILER&gt; &lt;DEFINES&gt; \
${includes} ${CPPFLAGS} &lt;FLAGS&gt; -o &lt;OBJECT&gt; -c &lt;SOURCE&gt;&quot; CACHE \
STRING &quot;ASM compile command&quot; FORCE)<br>  SET (CMAKE_C_COMPILE_OBJECT \
&quot;&lt;CMAKE_C_COMPILER&gt; &lt;DEFINES&gt; ${includes} ${CPPFLAGS} &lt;FLAGS&gt; \
-o &lt;OBJECT&gt; -c &lt;SOURCE&gt;&quot; CACHE STRING &quot;C compile command&quot; \
FORCE)<br>  SET (CMAKE_CXX_COMPILE_OBJECT &quot;&lt;CMAKE_CXX_COMPILER&gt; \
&lt;DEFINES&gt; ${includes} ${CPPFLAGS} &lt;FLAGS&gt; -o &lt;OBJECT&gt; -c \
&lt;SOURCE&gt;&quot; CACHE STRING &quot;C++ compile command&quot; FORCE)<br>  SET \
(CMAKE_Fortran_COMPILE_OBJECT &quot;&lt;CMAKE_Fortran_COMPILER&gt; &lt;DEFINES&gt; \
${includes} ${FCFLAGS} &lt;FLAGS&gt; -o &lt;OBJECT&gt; -c &lt;SOURCE&gt;&quot; CACHE \
STRING &quot;Fortran compile command&quot; FORCE)<br> @@ -531,6 +532,7 @@ \
                cmake-utils_src_configure() {<br>
            local toolchain_file=${BUILD_DIR}/<wbr>gentoo_toolchain.cmake<br>
            cat &gt; ${toolchain_file} &lt;&lt;- _EOF_ || die<br>
                        SET (CMAKE_ASM_COMPILER &quot;${myCC/ /;}&quot;)<br>
+                       SET (CMAKE_ASM-ATT_COMPILER &quot;${myCC/ /;}&quot;)<br>
                        SET (CMAKE_C_COMPILER &quot;${myCC/ /;}&quot;)<br>
                        SET (CMAKE_CXX_COMPILER &quot;${myCXX/ /;}&quot;)<br>
                        SET (CMAKE_Fortran_COMPILER &quot;${myFC/ /;}&quot;)<br>
@@ -609,6 +611,7 @@ cmake-utils_src_configure() {<br>
            if [[ ${CMAKE_BUILD_TYPE} != Gentoo &amp;&amp; ${EAPI} != 5 ]]; then<br>
                        cat &gt;&gt; ${common_config} &lt;&lt;- _EOF_ || die<br>
                                    SET (CMAKE_ASM_FLAGS_${CMAKE_<wbr>BUILD_TYPE^^} \
&quot;&quot; CACHE STRING &quot;&quot;)<br> +                                   SET \
(CMAKE_ASM-ATT_FLAGS_${CMAKE_<wbr>BUILD_TYPE^^} &quot;&quot; CACHE STRING \
                &quot;&quot;)<br>
                                    SET (CMAKE_C_FLAGS_${CMAKE_BUILD_<wbr>TYPE^^} \
                &quot;&quot; CACHE STRING &quot;&quot;)<br>
                                    SET (CMAKE_CXX_FLAGS_${CMAKE_<wbr>BUILD_TYPE^^} \
                &quot;&quot; CACHE STRING &quot;&quot;)<br>
                                    SET \
(CMAKE_Fortran_FLAGS_${CMAKE_<wbr>BUILD_TYPE^^} &quot;&quot; CACHE STRING \
&quot;&quot;)<br> <span class="gmail-HOEnZb"><font color="#888888">--<br>
2.16.2<br>
<br>
<br>
</font></span></blockquote></div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic