Skip to contentSkip to conversation

GCC 7.3 fixes

PATCH In review Joel Stanley 3 participants 5 messages Jul 30, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover GCC 7.3 fixes

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
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/2 gcc-7.3: Fix build on ppc64le hosts

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
---
 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
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -0
index b816f7d12f81..81320dc52a59 100644
@@ -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"
meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch new file +36 -0
new file mode 100644
index 000000000000..122260f2bf1d
@@ -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  <[email protected]>
+
+	Backport from mainline
+	2018-01-10  Kelvin Nilsen  <[email protected]>
+
+	* 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
+
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/2 gcc-7.3: Backport fixes for std::pair high memory usage

In reply to Joel Stanley

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
---
 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
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -0
index 81320dc52a59..c7c88f12e499 100644
@@ -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"
meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

✗ patchtest: failure for GCC 7.3 fixes (rev2)

In reply to Joel Stanley

== 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 ([email protected]) 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
#4 lore raw
In reply to Joel Stanley
Quoted 1 line · Joel Stanley

v2: Add Upstream-Status tags

For sumo too ?

- armin

Quoted 19 lines

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