* [PATCH] cmake.bbclass : Add support for cmake projects that use .S files.
@ 2014-09-17 14:33 Philip Balister
2014-09-17 23:07 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Philip Balister @ 2014-09-17 14:33 UTC (permalink / raw)
To: openembedded-core
UHD and GNU radio use the cmake build system. The toolchain file made
from cmake.bbclass does not set the variable needs by cmake projects
that use .S files. UHD added some .S files and these changes are required
to build recent UHD.
Signed-off-by: Philip Balister <philip@balister.org>
---
meta/classes/cmake.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index ab2adec..bfa5995 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -34,10 +34,13 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).
set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
+set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
+set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
+set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cmake.bbclass : Add support for cmake projects that use .S files.
2014-09-17 14:33 [PATCH] cmake.bbclass : Add support for cmake projects that use .S files Philip Balister
@ 2014-09-17 23:07 ` Khem Raj
2014-09-19 13:55 ` Philip Balister
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2014-09-17 23:07 UTC (permalink / raw)
To: Philip Balister; +Cc: Patches and discussions about the oe-core layer
On Wed, Sep 17, 2014 at 7:33 AM, Philip Balister <philip@balister.org> wrote:
> UHD and GNU radio use the cmake build system. The toolchain file made
> from cmake.bbclass does not set the variable needs by cmake projects
> that use .S files. UHD added some .S files and these changes are required
> to build recent UHD.
>
I dont know if this is right thing to do in a generic bbclass. Since
some packages might use bare assembler to compiler assembly files
> Signed-off-by: Philip Balister <philip@balister.org>
> ---
> meta/classes/cmake.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index ab2adec..bfa5995 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -34,10 +34,13 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).
> set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
> set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
> set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
> +set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
> set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
> set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
> +set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
> set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
> set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
> +set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
> set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
> set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>
> --
> 1.8.3.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cmake.bbclass : Add support for cmake projects that use .S files.
2014-09-17 23:07 ` Khem Raj
@ 2014-09-19 13:55 ` Philip Balister
2014-09-19 14:01 ` Otavio Salvador
0 siblings, 1 reply; 4+ messages in thread
From: Philip Balister @ 2014-09-19 13:55 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On 09/17/2014 07:07 PM, Khem Raj wrote:
> On Wed, Sep 17, 2014 at 7:33 AM, Philip Balister <philip@balister.org> wrote:
>> UHD and GNU radio use the cmake build system. The toolchain file made
>> from cmake.bbclass does not set the variable needs by cmake projects
>> that use .S files. UHD added some .S files and these changes are required
>> to build recent UHD.
>>
>
> I dont know if this is right thing to do in a generic bbclass. Since
> some packages might use bare assembler to compiler assembly files
If a cmake project enables assembler and doesn't set the CMAKE_ASM_*
flags to some sane defaults, the build fails. Settings these vars in the
toolchain files fixes the problem.
I am not a cmake guru, but it seems like we should be able to build code
that builds OK natively.
Philip
>
>> Signed-off-by: Philip Balister <philip@balister.org>
>> ---
>> meta/classes/cmake.bbclass | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>> index ab2adec..bfa5995 100644
>> --- a/meta/classes/cmake.bbclass
>> +++ b/meta/classes/cmake.bbclass
>> @@ -34,10 +34,13 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).
>> set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
>> set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
>> set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
>> +set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
>> set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
>> set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
>> +set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
>> set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
>> set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
>> +set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
>> set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>> set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>>
>> --
>> 1.8.3.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cmake.bbclass : Add support for cmake projects that use .S files.
2014-09-19 13:55 ` Philip Balister
@ 2014-09-19 14:01 ` Otavio Salvador
0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2014-09-19 14:01 UTC (permalink / raw)
To: Philip Balister; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
On Fri, Sep 19, 2014 at 10:55 AM, Philip Balister <philip@balister.org>
wrote:
> On 09/17/2014 07:07 PM, Khem Raj wrote:
> > On Wed, Sep 17, 2014 at 7:33 AM, Philip Balister <philip@balister.org>
> wrote:
> >> UHD and GNU radio use the cmake build system. The toolchain file made
> >> from cmake.bbclass does not set the variable needs by cmake projects
> >> that use .S files. UHD added some .S files and these changes are
> required
> >> to build recent UHD.
> >>
> >
> > I dont know if this is right thing to do in a generic bbclass. Since
> > some packages might use bare assembler to compiler assembly files
>
> If a cmake project enables assembler and doesn't set the CMAKE_ASM_*
> flags to some sane defaults, the build fails. Settings these vars in the
> toolchain files fixes the problem.
>
> I am not a cmake guru, but it seems like we should be able to build code
> that builds OK natively.
>
I agree with Philip; I think a sane default makes more sense than a broken
build.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
[-- Attachment #2: Type: text/html, Size: 1925 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-19 14:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 14:33 [PATCH] cmake.bbclass : Add support for cmake projects that use .S files Philip Balister
2014-09-17 23:07 ` Khem Raj
2014-09-19 13:55 ` Philip Balister
2014-09-19 14:01 ` Otavio Salvador
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.