Skip to contentSkip to conversation

package/gcc: 4.9.x: backport a fix for libcap-ng issue on nios2

PATCH New Romain Naour 3 participants 3 messages Mar 5, 2016 – Mar 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: 4.9.x: backport a fix for libcap-ng issue on nios2

The patch is part of gcc 5.3 release.

Fixes:
http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0

---
 .../gcc/4.9.3/880-nios2_legitimize_address.patch   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/gcc/4.9.3/880-nios2_legitimize_address.patch
package/gcc/4.9.3/880-nios2_legitimize_address.patch new file +49 -0
new file mode 100644
index 0000000..4623f29
@@ -0,0 +1,49 @@
+From b0ea54f3f995754881e0ea6651133aa7b58eeaa2 Mon Sep 17 00:00:00 2001
+From: cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 22 Sep 2015 12:23:20 +0000
+Subject: [PATCH] nios2_legitimize_address 2015-09-22  Chung-Lin Tang 
+ <[email protected]>
+
+	Backport from mainline
+	2015-09-22  Chung-Lin Tang  <[email protected]>
+
+	* config/nios2/nios2.c (nios2_legitimize_address): When handling
+	'reg + reloc' cases, allow first operand to be non-REG, and use
+	force_reg() to enforce address pattern.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch at 228013 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Fixes:
+http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0
+
+[backported to 4.9.3]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ gcc/config/nios2/nios2.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
+index 047b615..41dd6f9 100644
+--- a/gcc/config/nios2/nios2.c
++++ b/gcc/config/nios2/nios2.c
+@@ -1786,15 +1786,15 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
+ 
+      Which will be output as '%tls_le(var+48)(r23)' in assembly.  */
+   if (GET_CODE (x) == PLUS
+-      && GET_CODE (XEXP (x, 0)) == REG
+       && GET_CODE (XEXP (x, 1)) == CONST)
+     {
+-      rtx unspec, offset, reg = XEXP (x, 0);
++      rtx unspec, offset;
+       split_const (XEXP (x, 1), &unspec, &offset);
+       if (GET_CODE (unspec) == UNSPEC
+ 	  && !nios2_large_offset_p (XINT (unspec, 1))
+ 	  && offset != const0_rtx)
+ 	{
++	  rtx reg = force_reg (Pmode, XEXP (x, 0));
+ 	  unspec = copy_rtx (unspec);
+ 	  XVECEXP (unspec, 0, 0)
+ 	    = plus_constant (Pmode, XVECEXP (unspec, 0, 0), INTVAL (offset));
+-- 
+2.5.0
+
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 package/gcc: 4.9.x: backport a fix for libcap-ng issue on nios2

Dear Romain Naour,

Quoted 11 lines · Romain Naour

The patch is part of gcc 5.3 release.

Fixes:
http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0

---
 .../gcc/4.9.3/880-nios2_legitimize_address.patch   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/gcc/4.9.3/880-nios2_legitimize_address.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/gcc: 4.9.x: backport a fix for libcap-ng issue on nios2

In reply to Romain Naour

Dear Romain,

2016-03-05 8:31 GMT-03:00 Romain Naour <[email protected]>:

Quoted 5 lines

The patch is part of gcc 5.3 release.

Fixes:

http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0

Quoted 2 lines

(build-tested on nios2)

Thanks,

Sergio Prado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160307/6f793d7d/attachment.html>