All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
@ 2017-04-18 15:02 Kyle Russell
  2017-04-18 15:31 ` ✗ patchtest: failure for " Patchwork
  2017-04-18 18:53 ` [PATCH] " Khem Raj
  0 siblings, 2 replies; 7+ messages in thread
From: Kyle Russell @ 2017-04-18 15:02 UTC (permalink / raw)
  To: openembedded-core

If CMAKE_SYSTEM_NAME is defined, CMake assumes we're cross-compiling,
which is not necessarily the case.
---
 meta/classes/cmake.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 9e74599..2dbaa8c 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -42,9 +42,13 @@ def map_target_arch_to_uname_arch(target_arch):
     return target_arch
 
 cmake_do_generate_toolchain_file() {
+	if [ "${BUILD_SYS}" == "${HOST_SYS}" ]; then
+	    CMAKE_CROSSCOMPILING="set( CMAKE_CROSSCOMPILING FALSE )"
+	fi
 	cat > ${WORKDIR}/toolchain.cmake <<EOF
 # CMake system name must be something like "Linux".
 # This is important for cross-compiling.
+${CMAKE_CROSSCOMPILING}
 set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
 set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} )
 set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✗ patchtest: failure for cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
  2017-04-18 15:02 [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly Kyle Russell
@ 2017-04-18 15:31 ` Patchwork
  2017-04-18 18:53 ` [PATCH] " Khem Raj
  1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-04-18 15:31 UTC (permalink / raw)
  To: Kyle Russell; +Cc: openembedded-core

== Series Details ==

Series: cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
Revision: 1
URL   : https://patchwork.openembedded.org/series/6401/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
  2017-04-18 15:02 [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly Kyle Russell
  2017-04-18 15:31 ` ✗ patchtest: failure for " Patchwork
@ 2017-04-18 18:53 ` Khem Raj
  2017-04-18 19:17   ` Burton, Ross
  1 sibling, 1 reply; 7+ messages in thread
From: Khem Raj @ 2017-04-18 18:53 UTC (permalink / raw)
  To: Kyle Russell; +Cc: Patches and discussions about the oe-core layer

On Tue, Apr 18, 2017 at 8:02 AM, Kyle Russell <bkylerussell@gmail.com> wrote:
> If CMAKE_SYSTEM_NAME is defined, CMake assumes we're cross-compiling,
> which is not necessarily the case.
> ---
>  meta/classes/cmake.bbclass | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 9e74599..2dbaa8c 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -42,9 +42,13 @@ def map_target_arch_to_uname_arch(target_arch):
>      return target_arch
>
>  cmake_do_generate_toolchain_file() {
> +       if [ "${BUILD_SYS}" == "${HOST_SYS}" ]; then

dont use == here that will make it bash specific.

> +           CMAKE_CROSSCOMPILING="set( CMAKE_CROSSCOMPILING FALSE )"
> +       fi
>         cat > ${WORKDIR}/toolchain.cmake <<EOF
>  # CMake system name must be something like "Linux".
>  # This is important for cross-compiling.
> +${CMAKE_CROSSCOMPILING}
>  set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
>  set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} )
>  set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
  2017-04-18 18:53 ` [PATCH] " Khem Raj
@ 2017-04-18 19:17   ` Burton, Ross
  2017-04-19  3:45     ` Kyle Russell
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2017-04-18 19:17 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

On 18 April 2017 at 19:53, Khem Raj <raj.khem@gmail.com> wrote:

> dont use == here that will make it bash specific.
>

Well spotted Khem.  I've merged this into my staging branch with the test
changed to = for POSIXness.

Thanks,
Ross

[-- Attachment #2: Type: text/html, Size: 755 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
  2017-04-18 19:17   ` Burton, Ross
@ 2017-04-19  3:45     ` Kyle Russell
  2017-04-19  8:19       ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Kyle Russell @ 2017-04-19  3:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

Thank you.  Do I need to submit an amended patch to the mailing list, or
will your fixup get merged in from your staging branch pending no problems?

On Tue, Apr 18, 2017 at 3:17 PM, Burton, Ross <ross.burton@intel.com> wrote:

>
> On 18 April 2017 at 19:53, Khem Raj <raj.khem@gmail.com> wrote:
>
>> dont use == here that will make it bash specific.
>>
>
> Well spotted Khem.  I've merged this into my staging branch with the test
> changed to = for POSIXness.
>
> Thanks,
> Ross
>

[-- Attachment #2: Type: text/html, Size: 1465 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
  2017-04-19  3:45     ` Kyle Russell
@ 2017-04-19  8:19       ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2017-04-19  8:19 UTC (permalink / raw)
  To: Kyle Russell; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

On 19 April 2017 at 04:45, Kyle Russell <bkylerussell@gmail.com> wrote:

> Thank you.  Do I need to submit an amended patch to the mailing list, or
> will your fixup get merged in from your staging branch pending no problems?
>

Don't worry about it, I've fixed it.

Ross

[-- Attachment #2: Type: text/html, Size: 644 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly
@ 2017-04-18 15:36 Kyle Russell
  0 siblings, 0 replies; 7+ messages in thread
From: Kyle Russell @ 2017-04-18 15:36 UTC (permalink / raw)
  To: openembedded-core

If CMAKE_SYSTEM_NAME is defined, CMake assumes we're cross-compiling,
which is not necessarily the case.

Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
---
 meta/classes/cmake.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 9e74599..2dbaa8c 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -42,9 +42,13 @@ def map_target_arch_to_uname_arch(target_arch):
     return target_arch
 
 cmake_do_generate_toolchain_file() {
+	if [ "${BUILD_SYS}" == "${HOST_SYS}" ]; then
+	    CMAKE_CROSSCOMPILING="set( CMAKE_CROSSCOMPILING FALSE )"
+	fi
 	cat > ${WORKDIR}/toolchain.cmake <<EOF
 # CMake system name must be something like "Linux".
 # This is important for cross-compiling.
+${CMAKE_CROSSCOMPILING}
 set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
 set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} )
 set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-19  8:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 15:02 [PATCH] cmake.bbclass: Set CMAKE_CROSSCOMPILING correctly Kyle Russell
2017-04-18 15:31 ` ✗ patchtest: failure for " Patchwork
2017-04-18 18:53 ` [PATCH] " Khem Raj
2017-04-18 19:17   ` Burton, Ross
2017-04-19  3:45     ` Kyle Russell
2017-04-19  8:19       ` Burton, Ross
2017-04-18 15:36 Kyle Russell

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.