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

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 | 40 +++++++++++++
 ...-PR-c-80290-memory-hog-with-std-pair.patch | 58 +++++++++++++++++++
 3 files changed, 100 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 1/2] gcc-7.3: Fix build on ppc64le hosts
  2018-07-30  4:41 [PATCH 0/2] GCC 7.3 fixes Joel Stanley
@ 2018-07-30  4:41 ` Joel Stanley
  2018-07-30  4:42 ` [PATCH 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
  2018-07-30  5:02 ` ✗ patchtest: failure for GCC 7.3 fixes Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2018-07-30  4:41 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 | 40 +++++++++++++++++++
 2 files changed, 41 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..5d8ffb7babca
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch
@@ -0,0 +1,40 @@
+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.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@262243 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ 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 2/2] gcc-7.3: Backport fixes for std::pair high memory usage
  2018-07-30  4:41 [PATCH 0/2] GCC 7.3 fixes Joel Stanley
  2018-07-30  4:41 ` [PATCH 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
@ 2018-07-30  4:42 ` Joel Stanley
  2018-07-30  6:12   ` Khem Raj
  2018-07-30  5:02 ` ✗ patchtest: failure for GCC 7.3 fixes Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2018-07-30  4:42 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 | 58 +++++++++++++++++++
 2 files changed, 59 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..ba43af92fff1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch
@@ -0,0 +1,58 @@
+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.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@262204 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ 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
  2018-07-30  4:41 [PATCH 0/2] GCC 7.3 fixes Joel Stanley
  2018-07-30  4:41 ` [PATCH 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
  2018-07-30  4:42 ` [PATCH 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
@ 2018-07-30  5:02 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-30  5:02 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openembedded-core

== Series Details ==

Series: GCC 7.3 fixes
Revision: 1
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             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/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.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: [PATCH 2/2] gcc-7.3: Backport fixes for std::pair high memory usage
  2018-07-30  4:42 ` [PATCH 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
@ 2018-07-30  6:12   ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2018-07-30  6:12 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openembedded-core

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

V2 is good to install

On Sun, Jul 29, 2018 at 9:42 PM Joel Stanley <joel@jms.id.au> wrote:

> 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 | 58 +++++++++++++++++++
>  2 files changed, 59 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..ba43af92fff1
> --- /dev/null
> +++
> b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch
> @@ -0,0 +1,58 @@
> +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.
> +
> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@262204
> 138bc75d-0d04-0410-961f-82ee72b054a4
> +Signed-off-by: Joel Stanley <joel@jms.id.au>
> +---
> + 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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  4:41 [PATCH 0/2] GCC 7.3 fixes Joel Stanley
2018-07-30  4:41 ` [PATCH 1/2] gcc-7.3: Fix build on ppc64le hosts Joel Stanley
2018-07-30  4:42 ` [PATCH 2/2] gcc-7.3: Backport fixes for std::pair high memory usage Joel Stanley
2018-07-30  6:12   ` Khem Raj
2018-07-30  5:02 ` ✗ patchtest: failure for GCC 7.3 fixes Patchwork

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.