* [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host
@ 2018-07-30 10:36 Joel Stanley
2018-07-31 20:02 ` Thomas Petazzoni
2018-08-23 21:52 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Joel Stanley @ 2018-07-30 10:36 UTC (permalink / raw)
To: buildroot
When building on a ppc64le host we see this error:
build/genmatch --gimple ../../gcc/match.pd \
> tmp-gimple-match.c
../../gcc/match.pd:120:1 error: expected (, got NAME
negative value by 0 gives -0, not +0. */
This was reported upstream[1] and fixed on the GCC 6 [2] and GCC 7 [3]
branches:
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.
The patches included in Buildroot contain just the code changes, and not
the changelog, to make it easer to manage backporting.
Tested on Ubuntu Cosmic ppc64le.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
[2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261621
[3] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262243
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
.../6.4.0/0002-fix-building-on-ppc64.patch | 38 ++++++++++++++++++
.../7.3.0/0002-fix-building-on-ppc64.patch | 40 +++++++++++++++++++
2 files changed, 78 insertions(+)
create mode 100644 package/gcc/6.4.0/0002-fix-building-on-ppc64.patch
create mode 100644 package/gcc/7.3.0/0002-fix-building-on-ppc64.patch
diff --git a/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch b/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch
new file mode 100644
index 000000000000..ee096cfcf1e2
--- /dev/null
+++ b/package/gcc/6.4.0/0002-fix-building-on-ppc64.patch
@@ -0,0 +1,38 @@
+From 765527ad3725c5f3e82ab2b8e5031120b409983d Mon Sep 17 00:00:00 2001
+From: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 15 Jun 2018 08:51:28 +0000
+Subject: [PATCH] Partial backport r256656
+
+2018-06-15 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 at 261621 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ libcpp/lex.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index e5a0397f3099..b789686f1c49 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
+
diff --git a/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch b/package/gcc/7.3.0/0002-fix-building-on-ppc64.patch
new file mode 100644
index 000000000000..78a028c29a98
--- /dev/null
+++ b/package/gcc/7.3.0/0002-fix-building-on-ppc64.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 at 261621 138bc75d-0d04-0410-961f-82ee72b054a4
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch at 262243 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ libcpp/lex.c | 2 +-
+ 1 file changed, 1 insertion(+), 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] 3+ messages in thread
* [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host
2018-07-30 10:36 [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host Joel Stanley
@ 2018-07-31 20:02 ` Thomas Petazzoni
2018-08-23 21:52 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-07-31 20:02 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 30 Jul 2018 20:06:30 +0930, Joel Stanley wrote:
> When building on a ppc64le host we see this error:
>
> build/genmatch --gimple ../../gcc/match.pd \
> > tmp-gimple-match.c
> ../../gcc/match.pd:120:1 error: expected (, got NAME
> negative value by 0 gives -0, not +0. */
>
> This was reported upstream[1] and fixed on the GCC 6 [2] and GCC 7 [3]
> branches:
>
> 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.
>
> The patches included in Buildroot contain just the code changes, and not
> the changelog, to make it easer to manage backporting.
>
> Tested on Ubuntu Cosmic ppc64le.
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
> [2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261621
> [3] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262243
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> .../6.4.0/0002-fix-building-on-ppc64.patch | 38 ++++++++++++++++++
> .../7.3.0/0002-fix-building-on-ppc64.patch | 40 +++++++++++++++++++
> 2 files changed, 78 insertions(+)
> create mode 100644 package/gcc/6.4.0/0002-fix-building-on-ppc64.patch
> create mode 100644 package/gcc/7.3.0/0002-fix-building-on-ppc64.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host
2018-07-30 10:36 [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host Joel Stanley
2018-07-31 20:02 ` Thomas Petazzoni
@ 2018-08-23 21:52 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-08-23 21:52 UTC (permalink / raw)
To: buildroot
>>>>> "Joel" == Joel Stanley <joel@jms.id.au> writes:
> When building on a ppc64le host we see this error:
> build/genmatch --gimple ../../gcc/match.pd \
>> tmp-gimple-match.c
> ../../gcc/match.pd:120:1 error: expected (, got NAME
> negative value by 0 gives -0, not +0. */
> This was reported upstream[1] and fixed on the GCC 6 [2] and GCC 7 [3]
> branches:
> 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.
> The patches included in Buildroot contain just the code changes, and not
> the changelog, to make it easer to manage backporting.
> Tested on Ubuntu Cosmic ppc64le.
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
> [2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=261621
> [3] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=262243
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Committed to 2018.02.x and 2018.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-23 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 10:36 [Buildroot] [PATCH] gcc: Fix building on ppc64le GCC 8 host Joel Stanley
2018-07-31 20:02 ` Thomas Petazzoni
2018-08-23 21:52 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox