All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc
@ 2018-08-30 13:41 Diego Rondini
  2018-08-30 14:06 ` ✗ patchtest: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Diego Rondini @ 2018-08-30 13:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Gregory Vimont

From: Gregory Vimont <gregory.vimont@softbankrobotics.com>

When cross compiling on linux with gcc, the host gcc was used instead of
the cross gcc to set compilation flags according to gcc version.

Signed-off-by: Gregory Vimont <gregory.vimont@softbankrobotics.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
The reason of the backport is to fix a crash, details here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-August/120116.html
---
 meta-oe/recipes-support/tbb/tbb.bb                 |  1 +
 .../tbb/tbb/0002-linux-Fix-gcc-version-check.patch | 57 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch

diff --git a/meta-oe/recipes-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb.bb
index bad9481..f870104 100644
--- a/meta-oe/recipes-support/tbb/tbb.bb
+++ b/meta-oe/recipes-support/tbb/tbb.bb
@@ -13,6 +13,7 @@ PV = "${PRDATE}+${SRCPV}"
 SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \
            file://cross-compile.patch \
            file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
+           file://0002-linux-Fix-gcc-version-check.patch \
            file://tbb.pc \
 "
 
diff --git a/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
new file mode 100644
index 0000000..9824b61
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
@@ -0,0 +1,57 @@
+From aee098f1bf0511c6b5544de3170a9e8b51673b60 Mon Sep 17 00:00:00 2001
+From: Pierre Le Magourou <plemagourou@softbankrobotics.com>
+Date: Tue, 23 Jan 2018 15:25:50 +0100
+Subject: [PATCH] linux.gcc: Fix cross compilation error.
+
+When cross compiling on linux with gcc, the host gcc was used instead of
+the cross gcc to set compilation flags according to gcc version.
+
+When the cross gcc was in version 5.X and the host gcc in version 7.X,
+tbb was compiled with the -flifetime-dse=1 flag that does not exist on
+gcc 5.X.
+---
+ build/linux.gcc.inc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
+index 5c1889c..a4d6698 100644
+--- a/build/linux.gcc.inc
++++ b/build/linux.gcc.inc
+@@ -41,29 +41,29 @@ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+ C_FLAGS = $(CPLUS_FLAGS)
+ 
+ # gcc 4.2 and higher support OpenMP
+-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
+     OPENMP_FLAG = -fopenmp
+ endif
+ 
+ # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
+-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
+     RTM_KEY = -mrtm
+ endif
+ 
+ # gcc 4.0 and later have -Wextra that is used by some our customers.
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([4-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([4-9])"))
+     TEST_WARNING_KEY += -Wextra
+ endif
+ 
+ # gcc 5.0 and later have -Wsuggest-override option
+ # enable it via a pre-included header in order to limit to C++11 and above
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([5-9])"))
+     INCLUDE_TEST_HEADERS = -include $(tbb_root)/src/test/harness_preload.h
+ endif
+ 
+ # gcc 6.0 and later have -flifetime-dse option that controls
+ # elimination of stores done outside the object lifetime
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([6-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([6-9])"))
+     # keep pre-contruction stores for zero initialization
+     DSE_KEY = -flifetime-dse=1
+ endif
+-- 
+2.15.1
+
-- 
2.7.4



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

* ✗ patchtest: failure for tbb: check the version of the cross gcc instead of host gcc
  2018-08-30 13:41 [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc Diego Rondini
@ 2018-08-30 14:06 ` Patchwork
  2018-08-30 14:45 ` [meta-oe][rocko][sumo][PATCH] " Diego Rondini
  2018-08-30 16:31 ` Khem Raj
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-30 14:06 UTC (permalink / raw)
  To: Diego Rondini; +Cc: openembedded-core

== Series Details ==

Series: tbb: check the version of the cross gcc instead of host gcc
Revision: 1
URL   : https://patchwork.openembedded.org/series/13818/
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            [meta-oe, rocko, sumo] tbb: check the version of the cross gcc instead of host gcc
 Issue             Series sent to the wrong mailing list [test_target_mailing_list] 
  Suggested fix    Check the project's README (meta-oe, rocko, sumo) and send the patch to the indicated list

* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  rocko (currently at eb3eaa6970)

* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch)

* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



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] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
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] 5+ messages in thread

* Re: [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc
  2018-08-30 13:41 [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc Diego Rondini
  2018-08-30 14:06 ` ✗ patchtest: failure for " Patchwork
@ 2018-08-30 14:45 ` Diego Rondini
  2018-08-30 16:31 ` Khem Raj
  2 siblings, 0 replies; 5+ messages in thread
From: Diego Rondini @ 2018-08-30 14:45 UTC (permalink / raw)
  To: openembedded-core

Sorry, sent to the wrong mailing list. Please drop.

-- 
Diego Rondini
Sr. Embedded Engineer

Kynetics
www.kynetics.com


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

* Re: [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc
  2018-08-30 13:41 [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc Diego Rondini
  2018-08-30 14:06 ` ✗ patchtest: failure for " Patchwork
  2018-08-30 14:45 ` [meta-oe][rocko][sumo][PATCH] " Diego Rondini
@ 2018-08-30 16:31 ` Khem Raj
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2018-08-30 16:31 UTC (permalink / raw)
  To: diego.rondini
  Cc: gregory.vimont, Patches and discussions about the oe-core layer

On Thu, Aug 30, 2018 at 6:42 AM Diego Rondini
<diego.rondini@kynetics.com> wrote:
>
> From: Gregory Vimont <gregory.vimont@softbankrobotics.com>
>
> When cross compiling on linux with gcc, the host gcc was used instead of
> the cross gcc to set compilation flags according to gcc version.
>

this is ok for release branches. Although if I were to do it today, I Would have
also considered clang, clang -dumversion reports as gcc 4.2.1 and that
clearly wrong information
when you compare generic features so we end up disabling stuff for clang
that otherwise would work fine


> Signed-off-by: Gregory Vimont <gregory.vimont@softbankrobotics.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> The reason of the backport is to fix a crash, details here:
> http://lists.openembedded.org/pipermail/openembedded-devel/2018-August/120116.html
> ---
>  meta-oe/recipes-support/tbb/tbb.bb                 |  1 +
>  .../tbb/tbb/0002-linux-Fix-gcc-version-check.patch | 57 ++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
>  create mode 100644 meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
>
> diff --git a/meta-oe/recipes-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb.bb
> index bad9481..f870104 100644
> --- a/meta-oe/recipes-support/tbb/tbb.bb
> +++ b/meta-oe/recipes-support/tbb/tbb.bb
> @@ -13,6 +13,7 @@ PV = "${PRDATE}+${SRCPV}"
>  SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \
>             file://cross-compile.patch \
>             file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
> +           file://0002-linux-Fix-gcc-version-check.patch \
>             file://tbb.pc \
>  "
>
> diff --git a/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
> new file mode 100644
> index 0000000..9824b61
> --- /dev/null
> +++ b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
> @@ -0,0 +1,57 @@
> +From aee098f1bf0511c6b5544de3170a9e8b51673b60 Mon Sep 17 00:00:00 2001
> +From: Pierre Le Magourou <plemagourou@softbankrobotics.com>
> +Date: Tue, 23 Jan 2018 15:25:50 +0100
> +Subject: [PATCH] linux.gcc: Fix cross compilation error.
> +
> +When cross compiling on linux with gcc, the host gcc was used instead of
> +the cross gcc to set compilation flags according to gcc version.
> +
> +When the cross gcc was in version 5.X and the host gcc in version 7.X,
> +tbb was compiled with the -flifetime-dse=1 flag that does not exist on
> +gcc 5.X.
> +---
> + build/linux.gcc.inc | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
> +index 5c1889c..a4d6698 100644
> +--- a/build/linux.gcc.inc
> ++++ b/build/linux.gcc.inc
> +@@ -41,29 +41,29 @@ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
> + C_FLAGS = $(CPLUS_FLAGS)
> +
> + # gcc 4.2 and higher support OpenMP
> +-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
> ++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
> +     OPENMP_FLAG = -fopenmp
> + endif
> +
> + # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
> +-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
> ++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
> +     RTM_KEY = -mrtm
> + endif
> +
> + # gcc 4.0 and later have -Wextra that is used by some our customers.
> +-ifneq (,$(shell gcc -dumpversion | egrep  "^([4-9])"))
> ++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([4-9])"))
> +     TEST_WARNING_KEY += -Wextra
> + endif
> +
> + # gcc 5.0 and later have -Wsuggest-override option
> + # enable it via a pre-included header in order to limit to C++11 and above
> +-ifneq (,$(shell gcc -dumpversion | egrep  "^([5-9])"))
> ++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([5-9])"))
> +     INCLUDE_TEST_HEADERS = -include $(tbb_root)/src/test/harness_preload.h
> + endif
> +
> + # gcc 6.0 and later have -flifetime-dse option that controls
> + # elimination of stores done outside the object lifetime
> +-ifneq (,$(shell gcc -dumpversion | egrep  "^([6-9])"))
> ++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([6-9])"))
> +     # keep pre-contruction stores for zero initialization
> +     DSE_KEY = -flifetime-dse=1
> + endif
> +--
> +2.15.1
> +
> --
> 2.7.4
>


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

* [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc
@ 2018-08-30 14:43 Diego Rondini
  0 siblings, 0 replies; 5+ messages in thread
From: Diego Rondini @ 2018-08-30 14:43 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Gregory Vimont

From: Gregory Vimont <gregory.vimont@softbankrobotics.com>

When cross compiling on linux with gcc, the host gcc was used instead of
the cross gcc to set compilation flags according to gcc version.

Signed-off-by: Gregory Vimont <gregory.vimont@softbankrobotics.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
The reason of the backport is to fix a crash, details here:
http://lists.openembedded.org/pipermail/openembedded-devel/2018-August/120116.html
---
 meta-oe/recipes-support/tbb/tbb.bb                 |  1 +
 .../tbb/tbb/0002-linux-Fix-gcc-version-check.patch | 57 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch

diff --git a/meta-oe/recipes-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb.bb
index bad9481..f870104 100644
--- a/meta-oe/recipes-support/tbb/tbb.bb
+++ b/meta-oe/recipes-support/tbb/tbb.bb
@@ -13,6 +13,7 @@ PV = "${PRDATE}+${SRCPV}"
 SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \
            file://cross-compile.patch \
            file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
+           file://0002-linux-Fix-gcc-version-check.patch \
            file://tbb.pc \
 "
 
diff --git a/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
new file mode 100644
index 0000000..9824b61
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
@@ -0,0 +1,57 @@
+From aee098f1bf0511c6b5544de3170a9e8b51673b60 Mon Sep 17 00:00:00 2001
+From: Pierre Le Magourou <plemagourou@softbankrobotics.com>
+Date: Tue, 23 Jan 2018 15:25:50 +0100
+Subject: [PATCH] linux.gcc: Fix cross compilation error.
+
+When cross compiling on linux with gcc, the host gcc was used instead of
+the cross gcc to set compilation flags according to gcc version.
+
+When the cross gcc was in version 5.X and the host gcc in version 7.X,
+tbb was compiled with the -flifetime-dse=1 flag that does not exist on
+gcc 5.X.
+---
+ build/linux.gcc.inc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
+index 5c1889c..a4d6698 100644
+--- a/build/linux.gcc.inc
++++ b/build/linux.gcc.inc
+@@ -41,29 +41,29 @@ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+ C_FLAGS = $(CPLUS_FLAGS)
+ 
+ # gcc 4.2 and higher support OpenMP
+-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[2-9]|[5-9])"))
+     OPENMP_FLAG = -fopenmp
+ endif
+ 
+ # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
+-ifneq (,$(shell gcc -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^(4\.[8-9]|[5-9])"))
+     RTM_KEY = -mrtm
+ endif
+ 
+ # gcc 4.0 and later have -Wextra that is used by some our customers.
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([4-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([4-9])"))
+     TEST_WARNING_KEY += -Wextra
+ endif
+ 
+ # gcc 5.0 and later have -Wsuggest-override option
+ # enable it via a pre-included header in order to limit to C++11 and above
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([5-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([5-9])"))
+     INCLUDE_TEST_HEADERS = -include $(tbb_root)/src/test/harness_preload.h
+ endif
+ 
+ # gcc 6.0 and later have -flifetime-dse option that controls
+ # elimination of stores done outside the object lifetime
+-ifneq (,$(shell gcc -dumpversion | egrep  "^([6-9])"))
++ifneq (,$(shell $(CC) -dumpversion | egrep  "^([6-9])"))
+     # keep pre-contruction stores for zero initialization
+     DSE_KEY = -flifetime-dse=1
+ endif
+-- 
+2.15.1
+
-- 
2.7.4



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

end of thread, other threads:[~2018-08-30 16:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 13:41 [meta-oe][rocko][sumo][PATCH] tbb: check the version of the cross gcc instead of host gcc Diego Rondini
2018-08-30 14:06 ` ✗ patchtest: failure for " Patchwork
2018-08-30 14:45 ` [meta-oe][rocko][sumo][PATCH] " Diego Rondini
2018-08-30 16:31 ` Khem Raj
2018-08-30 14:43 Diego Rondini

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.