All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] GCC 7.3 fixes
@ 2018-07-30  5:10 Joel Stanley
  2018-07-30  5:10 ` [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joel Stanley @ 2018-07-30  5:10 UTC (permalink / raw)
  To: openembedded-core

v2: Add Upstream-Status tags

This series has a pair of patches that we have been using in OpenBMC's
Yocto tree for a few weeks. The build fix is required to compile from
our ppc64le build machines.

The std::pair fix reduces memory requirements from many gigabytes down
to something reasonable.

Joel Stanley (2):
  gcc-7.3: Fix build on ppc64le hosts
  gcc-7.3: Backport fixes for std::pair high memory usage

 meta/recipes-devtools/gcc/gcc-7.3.inc         |  2 +
 ...c64le-build-Partial-backport-r256656.patch | 36 ++++++++++++
 ...-PR-c-80290-memory-hog-with-std-pair.patch | 57 +++++++++++++++++++
 3 files changed, 95 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch

-- 
2.17.1



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

* [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts
  2018-07-30  5:10 [PATCH v2 0/2] GCC 7.3 fixes Joel Stanley
@ 2018-07-30  5:10 ` Joel Stanley
  2018-07-30  5:10 ` [PATCH v2 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2018-07-30  5:10 UTC (permalink / raw)
  To: openembedded-core

When building on ppc64le hosts that have GCC 8 (such as Ubuntu 18.10)
the GCC build bootstrap fails.

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162

This is a fix that was applied to the upstream GCC 7 branch.

Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 meta/recipes-devtools/gcc/gcc-7.3.inc         |  1 +
 ...c64le-build-Partial-backport-r256656.patch | 36 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch

diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc
index b816f7d12f81..81320dc52a59 100644
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -79,6 +79,7 @@ SRC_URI = "\
 BACKPORTS = "\
            file://0001-Fix-internal-compiler-error-in-testcase.patch \
            file://0001-PR-rtl-optimization-83030.patch \
+           file://0001-Fix-ppc64le-build-Partial-backport-r256656.patch \
 "
 
 SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch b/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch
new file mode 100644
index 000000000000..122260f2bf1d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch
@@ -0,0 +1,36 @@
+From aa65a43516da1d48011ef621ed5988289711d99b Mon Sep 17 00:00:00 2001
+From: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 29 Jun 2018 09:31:30 +0000
+Subject: [PATCH] Partial backport r256656
+
+2018-06-29  Martin Liska  <mliska@suse.cz>
+
+	Backport from mainline
+	2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
+
+	* lex.c (search_line_fast): Remove illegal coercion of an
+	unaligned pointer value to vector pointer type and replace with
+	use of __builtin_vec_vsx_ld () built-in function, which operates
+	on unaligned pointer values.
+
+Upstream-Status: Backport
+---
+ libcpp/lex.c  |  2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index 097c78002cbb..e0fb9e822c44 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
+     {
+       vc m_nl, m_cr, m_bs, m_qm;
+ 
+-      data = *((const vc *)s);
++      data = __builtin_vec_vsx_ld (0, s);
+       s += 16;
+ 
+       m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
+-- 
+2.17.1
+
-- 
2.17.1



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

* [PATCH v2 2/2] gcc-7.3: Backport fixes for std::pair high memory usage
  2018-07-30  5:10 [PATCH v2 0/2] GCC 7.3 fixes Joel Stanley
  2018-07-30  5:10 ` [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
@ 2018-07-30  5:10 ` Joel Stanley
  2018-07-30  5:32 ` ✗ patchtest: failure for GCC 7.3 fixes (rev2) Patchwork
  2018-07-30 16:38 ` [PATCH v2 0/2] GCC 7.3 fixes akuster808
  3 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2018-07-30  5:10 UTC (permalink / raw)
  To: openembedded-core

C++ applications that contain a specfic use of std::pair with tempates
cause the build to require many gigabytes of RAM to build.

This is a fix that was applied to the upstream GCC 7 branch.

Change-Id: I213f96d1d6332e2dce5765482ff3413f1abd7ff8
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 meta/recipes-devtools/gcc/gcc-7.3.inc         |  1 +
 ...-PR-c-80290-memory-hog-with-std-pair.patch | 57 +++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch

diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc
index 81320dc52a59..c7c88f12e499 100644
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -80,6 +80,7 @@ BACKPORTS = "\
            file://0001-Fix-internal-compiler-error-in-testcase.patch \
            file://0001-PR-rtl-optimization-83030.patch \
            file://0001-Fix-ppc64le-build-Partial-backport-r256656.patch \
+           file://0001-PR-c-80290-memory-hog-with-std-pair.patch \
 "
 
 SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch
new file mode 100644
index 000000000000..1ad19dc0ea80
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch
@@ -0,0 +1,57 @@
+From 8c014bceeca6a558519e86b16a8142accc41e94f Mon Sep 17 00:00:00 2001
+From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 28 Jun 2018 00:25:21 +0000
+Subject: [PATCH] 	PR c++/80290 - memory-hog with std::pair.
+
+	* pt.c (type_unification_real): Skip non-dependent conversion
+	check for a nested list argument.
+	(braced_init_depth): New.
+
+Upstream-Status: Backport
+---
+ gcc/cp/pt.c      | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
+index 79cfd0129226..71077a3b0498 100644
+--- a/gcc/cp/pt.c
++++ b/gcc/cp/pt.c
+@@ -19242,6 +19242,24 @@ try_array_deduction (tree tparms, tree targs, tree parm)
+ 			  /*nondeduced*/false, array_deduction_r);
+ }
+ 
++/* Returns how many levels of { } INIT contains.  */
++
++static int
++braced_init_depth (tree init)
++{
++  if (!init || !BRACE_ENCLOSED_INITIALIZER_P (init))
++    return 0;
++  unsigned i; tree val;
++  unsigned max = 0;
++  FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), i, val)
++    {
++      unsigned elt_d = braced_init_depth (val);
++      if (elt_d > max)
++	max = elt_d;
++    }
++  return max + 1;
++}
++
+ /* Most parms like fn_type_unification.
+ 
+    If SUBR is 1, we're being called recursively (to unify the
+@@ -19478,6 +19496,10 @@ type_unification_real (tree tparms,
+ 
+ 	    if (uses_template_parms (parm))
+ 	      continue;
++	    /* Workaround for c++/80290: avoid combinatorial explosion on
++	       deeply nested braced init-lists.  */
++	    if (braced_init_depth (arg) > 2)
++	      continue;
+ 	    if (check_non_deducible_conversion (parm, arg, strict, flags,
+ 						explain_p))
+ 	      return 1;
+-- 
+2.17.1
+
-- 
2.17.1



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

* ✗ patchtest: failure for GCC 7.3 fixes (rev2)
  2018-07-30  5:10 [PATCH v2 0/2] GCC 7.3 fixes Joel Stanley
  2018-07-30  5:10 ` [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
  2018-07-30  5:10 ` [PATCH v2 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
@ 2018-07-30  5:32 ` Patchwork
  2018-07-30 16:38 ` [PATCH v2 0/2] GCC 7.3 fixes akuster808
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-30  5:32 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openembedded-core

== Series Details ==

Series: GCC 7.3 fixes (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/13290/
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:



* 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/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch)



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: [PATCH v2 0/2] GCC 7.3 fixes
  2018-07-30  5:10 [PATCH v2 0/2] GCC 7.3 fixes Joel Stanley
                   ` (2 preceding siblings ...)
  2018-07-30  5:32 ` ✗ patchtest: failure for GCC 7.3 fixes (rev2) Patchwork
@ 2018-07-30 16:38 ` akuster808
  3 siblings, 0 replies; 5+ messages in thread
From: akuster808 @ 2018-07-30 16:38 UTC (permalink / raw)
  To: Joel Stanley, openembedded-core



On 07/29/2018 10:10 PM, Joel Stanley wrote:
> v2: Add Upstream-Status tags
For sumo too ?

- armin
>
> This series has a pair of patches that we have been using in OpenBMC's
> Yocto tree for a few weeks. The build fix is required to compile from
> our ppc64le build machines.
>
> The std::pair fix reduces memory requirements from many gigabytes down
> to something reasonable.
>
> Joel Stanley (2):
>   gcc-7.3: Fix build on ppc64le hosts
>   gcc-7.3: Backport fixes for std::pair high memory usage
>
>  meta/recipes-devtools/gcc/gcc-7.3.inc         |  2 +
>  ...c64le-build-Partial-backport-r256656.patch | 36 ++++++++++++
>  ...-PR-c-80290-memory-hog-with-std-pair.patch | 57 +++++++++++++++++++
>  3 files changed, 95 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch
>  create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch
>



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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  5:10 [PATCH v2 0/2] GCC 7.3 fixes Joel Stanley
2018-07-30  5:10 ` [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
2018-07-30  5:10 ` [PATCH v2 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
2018-07-30  5:32 ` ✗ patchtest: failure for GCC 7.3 fixes (rev2) Patchwork
2018-07-30 16:38 ` [PATCH v2 0/2] GCC 7.3 fixes akuster808

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.