* [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error
@ 2017-05-15 15:56 Alexey Brodkin
2017-05-15 18:10 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2017-05-15 15:56 UTC (permalink / raw)
To: buildroot
This fixes the following problem:
------------------------------------>8--------------------------------
arc-linux-gcc -c -Os -fPIC iso9660.i
iso9660.c: In function 'strip_trail':
iso9660.c:155:1: error: unrecognized supposed constant
}
^
(unspec:SI [
(symbol_ref:SI ("*.LANCHOR1") [flags 0x182])
] ARC_UNSPEC_GOTOFFPC)
iso9660.c:155:1: internal compiler error: in arc_legitimate_constant_p, at config/arc/arc.c:6028
------------------------------------>8--------------------------------
Found by Buildroot autobuilder [1].
The fix [2] is in arc-2017.03 development branch of ARC GCC and once it
becomes a part the next release of ARC tools this should be removed
from Buildroot.
[1] http://autobuild.buildroot.net/results/c90/c909e8c397ab972b6aa4d370572cad4fae284d00/build-end.log
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/139fed9d29ab935b3bc5159c0bdf7b8b8a39442d
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
...-return-false-for-any-PIC-related-unspecs.patch | 58 ++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 package/gcc/arc-2017.03-rc2/0001-FIX-PIC-return-false-for-any-PIC-related-unspecs.patch
diff --git a/package/gcc/arc-2017.03-rc2/0001-FIX-PIC-return-false-for-any-PIC-related-unspecs.patch b/package/gcc/arc-2017.03-rc2/0001-FIX-PIC-return-false-for-any-PIC-related-unspecs.patch
new file mode 100644
index 0000000000..ea9708240e
--- /dev/null
+++ b/package/gcc/arc-2017.03-rc2/0001-FIX-PIC-return-false-for-any-PIC-related-unspecs.patch
@@ -0,0 +1,58 @@
+From 139fed9d29ab935b3bc5159c0bdf7b8b8a39442d Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@gmail.com>
+Date: Mon, 15 May 2017 05:05:27 -0400
+Subject: [PATCH] [FIX] PIC: return false for any PIC related unspecs
+
+---
+ gcc/config/arc/arc.c | 9 ++++-----
+ gcc/testsuite/gcc.target/arc/pr9001191897.c | 10 ++++++++++
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/arc/pr9001191897.c
+
+diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
+index 3d53a667d37f..b00126f4d2c4 100644
+--- a/gcc/config/arc/arc.c
++++ b/gcc/config/arc/arc.c
+@@ -6056,11 +6056,8 @@ arc_legitimate_constant_p (machine_mode mode, rtx x)
+ return true;
+
+ case NEG:
+- /* Assembler does not understand -(@label at gotoff). Also, we do
+- not print such pic address constant. */
+- if (GET_CODE (XEXP (x, 0)) == UNSPEC)
+- return false;
+ return arc_legitimate_constant_p (mode, XEXP (x, 0));
++
+ case PLUS:
+ case MINUS:
+ {
+@@ -6090,7 +6087,9 @@ arc_legitimate_constant_p (machine_mode mode, rtx x)
+ case UNSPEC_TLS_IE:
+ return true;
+ default:
+- break;
++ /* Any other unspec ending here are pic related, hence the above
++ constant pic address checking returned false. */
++ return false;
+ }
+ /* Fall through. */
+
+diff --git a/gcc/testsuite/gcc.target/arc/pr9001191897.c b/gcc/testsuite/gcc.target/arc/pr9001191897.c
+new file mode 100644
+index 000000000000..2b9e1689803f
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/pr9001191897.c
+@@ -0,0 +1,10 @@
++/* { dg-do compile } */
++/* { dg-skip-if "" { ! { clmcpu } } } */
++/* { dg-options "-mcpu=arch2 -Os -fpic -mno-sdata -mno-indexed-loads -w" } */
++a;
++c() {
++ static char b[25];
++ for (; a >= 0; a--)
++ if (b[a])
++ b[a] = '\0';
++}
+--
+2.7.4
+
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error
2017-05-15 15:56 [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error Alexey Brodkin
@ 2017-05-15 18:10 ` Peter Korsgaard
2017-05-16 14:07 ` Alexey Brodkin
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2017-05-15 18:10 UTC (permalink / raw)
To: buildroot
>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:
> This fixes the following problem:
> arc-linux-gcc -c -Os -fPIC iso9660.i
> iso9660.c: In function 'strip_trail':
> iso9660.c:155:1: error: unrecognized supposed constant
> }
> ^
> (unspec:SI [
> (symbol_ref:SI ("*.LANCHOR1") [flags 0x182])
> ] ARC_UNSPEC_GOTOFFPC)
> iso9660.c:155:1: internal compiler error: in arc_legitimate_constant_p, at config/arc/arc.c:6028
> Found by Buildroot autobuilder [1].
> The fix [2] is in arc-2017.03 development branch of ARC GCC and once it
> becomes a part the next release of ARC tools this should be removed
> from Buildroot.
> [1] http://autobuild.buildroot.net/results/c90/c909e8c397ab972b6aa4d370572cad4fae284d00/build-end.log
> [2]
> https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/139fed9d29ab935b3bc5159c0bdf7b8b8a39442d
Committed, thanks.
I just noticed that we still have a patch from arc-2016.09. Can you
confirm that this isn't needed any more?
https://git.buildroot.org/buildroot/tree/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error
2017-05-15 18:10 ` Peter Korsgaard
@ 2017-05-16 14:07 ` Alexey Brodkin
2017-05-16 19:25 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2017-05-16 14:07 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Mon, 2017-05-15 at 20:10 +0200, Peter Korsgaard wrote:
> >
> > >
> > > >
> > > > >
> > > > > >
> > > > > > "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:
>
> ?> This fixes the following problem:
> ?> arc-linux-gcc -c -Os -fPIC iso9660.i
> ?> iso9660.c: In function 'strip_trail':
> ?> iso9660.c:155:1: error: unrecognized supposed constant
> ?>??}
> ?>??^
> ?> (unspec:SI [
> ?>?????????(symbol_ref:SI ("*.LANCHOR1") [flags 0x182])
> ?>?????] ARC_UNSPEC_GOTOFFPC)
> ?> iso9660.c:155:1: internal compiler error: in arc_legitimate_constant_p, at config/arc/arc.c:6028
>
> ?> Found by Buildroot autobuilder [1].
>
> ?> The fix [2] is in arc-2017.03 development branch of ARC GCC and once it
> ?> becomes a part the next release of ARC tools this should be removed
> ?> from Buildroot.
>
> ?> [1] https://urldefense.proofpoint.com/v2/url?u=http-3A__autobuild.buildroot.net_results_c90_c909e8c397ab972b6aa4d370572cad4fae284d00_build-2Dend.
> log&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=eyEAZfBkQhTd80xpTFI0NPKpz57Aa8duF3Uu1L_JgXM&s=PiWGi8QYaMIbOlEL
> BukiJt2-WQi9IqfQlPFkxgNqbE8&e=?
> ?> [2]
> ?> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_foss-2Dfor-2Dsynopsys-2Ddwc-2Darc-2Dprocessors_gcc_commit_139fed9d29ab935b3bc5159
> c0bdf7b8b8a39442d&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=eyEAZfBkQhTd80xpTFI0NPKpz57Aa8duF3Uu1L_JgXM&s=OK
> r0FRgbINPdN6fRMnB18MICruG3PJVXVDpOjxISyVk&e=?
>
> Committed, thanks.
Thanks for that.
> I just noticed that we still have a patch from arc-2016.09. Can you
> confirm that this isn't needed any more?
No this is not needed any longer - was just a reminder of incomplete
patch that bumped ARC tools version.
Care to remove this or you'd prefer a patch from my on that regard?
-Alexey
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error
2017-05-16 14:07 ` Alexey Brodkin
@ 2017-05-16 19:25 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-05-16 19:25 UTC (permalink / raw)
To: buildroot
>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:
Hi,
>> I just noticed that we still have a patch from arc-2016.09. Can you
>> confirm that this isn't needed any more?
> No this is not needed any longer - was just a reminder of incomplete
> patch that bumped ARC tools version.
> Care to remove this or you'd prefer a patch from my on that regard?
I can remove it, I just wanted to verify that it wasn't needed any more
- Thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-16 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 15:56 [Buildroot] [PATCH] gcc: arc-2017.03-rc2: Fix "unrecognized supposed constant" error Alexey Brodkin
2017-05-15 18:10 ` Peter Korsgaard
2017-05-16 14:07 ` Alexey Brodkin
2017-05-16 19:25 ` Peter Korsgaard
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.