From 6e69ad054a39e8ee92bbeebb5a2e6ccab8a1d511 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Wed, 25 Jul 2018 22:12:04 +0930 Subject: 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. This is a patch from the gcc-7 branch that resolves the issue. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162 Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897 Signed-off-by: Joel Stanley --- .../meta/recipes-devtools/gcc/gcc-7.3.inc | 1 + ...ix-ppc64le-build-Partial-backport-r256656.patch | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch (limited to 'import-layers/yocto-poky/meta') diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc index 8a66e83dd3..6dff694a19 100644 --- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc +++ b/import-layers/yocto-poky/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-PR-c-80290-memory-hog-with-std-pair.patch \ + file://0001-Fix-ppc64le-build-Partial-backport-r256656.patch \ " SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2" diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch new file mode 100644 index 0000000000..5d8ffb7bab --- /dev/null +++ b/import-layers/yocto-poky/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 +Date: Fri, 29 Jun 2018 09:31:30 +0000 +Subject: [PATCH] Partial backport r256656 + +2018-06-29 Martin Liska + + Backport from mainline + 2018-01-10 Kelvin Nilsen + + * 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 +--- + 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 + -- cgit v1.2.3