All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile
@ 2016-02-09 11:31 Marek Vasut
  2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Upstream strace 4.11 does not build for arc, metag, nios2, or1k, tile.
Backport patch from strace git master to fix the build issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Robert Yang <liezhi.yang@windriver.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../0001-arc-metag-nios2-or1k-tile-fix-build.patch | 116 +++++++++++++++++++++
 meta/recipes-devtools/strace/strace_4.11.bb        |   1 +
 2 files changed, 117 insertions(+)
 create mode 100644 meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch

diff --git a/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
new file mode 100644
index 0000000..8a2d178
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
@@ -0,0 +1,116 @@
+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 24 Dec 2015 15:40:55 +0000
+Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
+
+Fix build regression introduced by commit
+34683e3926d8c2daa368afb805da422ee7043396.
+
+* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
+* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
+* linux/nios2/syscallent.h: Likewise.
+* linux/or1k/syscallent.h: Likewise.
+* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
+* NEWS: Mention this build fix.
+
+Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+Upstream-Status: Backport
+---
+ NEWS                     | 3 +++
+ linux/32/syscallent.h    | 6 +++---
+ linux/arc/syscallent.h   | 2 +-
+ linux/nios2/syscallent.h | 2 +-
+ linux/or1k/syscallent.h  | 2 +-
+ linux/tile/syscallent1.h | 2 +-
+ pathtrace.c              | 1 +
+ 7 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index fe40ca4..09263eb 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,9 @@
++Noteworthy changes in release ?.?? (????-??-??)
++===============================================
++
++* Bug fixes
++  * Fixed build on arc, metag, nios2, or1k, and tile architectures.
++
+ Noteworthy changes in release 4.11 (2015-12-21)
+ ===============================================
+ 
+diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h
+index 5f997e7..e6f895c 100644
+--- a/linux/32/syscallent.h
++++ b/linux/32/syscallent.h
+@@ -1,5 +1,5 @@
+-#ifndef ARCH_mmap
+-# define ARCH_mmap mmap
++#ifndef sys_ARCH_mmap
++# define sys_ARCH_mmap sys_mmap
+ #endif
+ [  0] = { 2,	0,		SEN(io_setup),			"io_setup"		},
+ [  1] = { 1,	0,		SEN(io_destroy),		"io_destroy"		},
+@@ -276,5 +276,5 @@
+ [283] = { 2,	0,		SEN(membarrier),		"membarrier",		},
+ [284] = { 3,	TM,		SEN(mlock2),			"mlock2"		},
+ 
+-#undef ARCH_mmap
++#undef sys_ARCH_mmap
+ #undef ARCH_WANT_SYNC_FILE_RANGE2
+diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
+index 5847dc4..1100008 100644
+--- a/linux/arc/syscallent.h
++++ b/linux/arc/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	0,	SEN(printargs),	"arc_cacheflush"},
+ [245] = { 1,	0,	SEN(printargs),	"arc_settls"	},
+diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h
+index 8a4b70e..01efe3a 100644
+--- a/linux/nios2/syscallent.h
++++ b/linux/nios2/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = {4,    0,	SEN(cacheflush), "cacheflush"},
+ [245 ... 259] = { },
+diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
+index ed84b3b..351fe25 100644
+--- a/linux/or1k/syscallent.h
++++ b/linux/or1k/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	NF,	SEN(or1k_atomic),	"or1k_atomic"	},
+ [245 ... 259] = { },
+diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
+index c86f059..28dbab4 100644
+--- a/linux/tile/syscallent1.h
++++ b/linux/tile/syscallent1.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_4koff
++#define sys_ARCH_mmap sys_mmap_4koff
+ #define ARCH_WANT_SYNC_FILE_RANGE2 1
+ #include "32/syscallent.h"
+ [244] = { 1,	0,	SEN(printargs),	"cmpxchg_badaddr"	},
+diff --git a/pathtrace.c b/pathtrace.c
+index d530ec2..e72cdf7 100644
+--- a/pathtrace.c
++++ b/pathtrace.c
+@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp)
+ 	case SEN_mmap:
+ 	case SEN_mmap_4koff:
+ 	case SEN_mmap_pgoff:
++	case SEN_ARCH_mmap:
+ 		/* x, x, x, x, fd */
+ 		return fdmatch(tcp, tcp->u_arg[4]);
+ 
+-- 
+2.6.4
+
diff --git a/meta/recipes-devtools/strace/strace_4.11.bb b/meta/recipes-devtools/strace/strace_4.11.bb
index a72a1f9..6b889de 100644
--- a/meta/recipes-devtools/strace/strace_4.11.bb
+++ b/meta/recipes-devtools/strace/strace_4.11.bb
@@ -8,6 +8,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
            file://disable-git-version-gen.patch \
            file://more-robust-test-for-m32-mx32-compile-support.patch \
            file://update-gawk-paths.patch \
+           file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \
            file://Makefile-ptest.patch \
            file://run-ptest \
           "
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:57   ` Burton, Ross
  2016-02-09 13:08   ` [PATCH V2 " Marek Vasut
  2016-02-09 11:31 ` [PATCH 3/7] dpkg: Update to 1.18.4 Marek Vasut
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Repair corner cases in nios2 PLT and GP handling. See the patches
themselves for extensive detailed explanation.

The patches don't contain the ChangeLog entries, since the changelog
entries often cause trouble when applying the patch.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/binutils/binutils-2.25.1.inc |   2 +
 ...ress-computations-in-initial-PLT-entries-.patch |  72 ++++++++++++++
 ...018-Correct-nios2-_gp-address-computation.patch | 106 +++++++++++++++++++++
 3 files changed, 180 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.25.1.inc b/meta/recipes-devtools/binutils/binutils-2.25.1.inc
index dc23c4d..f8f8f1a 100644
--- a/meta/recipes-devtools/binutils/binutils-2.25.1.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.25.1.inc
@@ -36,6 +36,8 @@ SRC_URI = "\
      file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \
      file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \
      file://0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch \
+     file://0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \
+     file://0018-Correct-nios2-_gp-address-computation.patch \
      file://binutils-octeon3.patch \
      file://add-thunderx-support-for-gas.patch \
      "
diff --git a/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch b/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
new file mode 100644
index 0000000..8b3fb08
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
@@ -0,0 +1,72 @@
+From 33d4099fc891760ea1f080746dee4dcfc36c757c Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Wed, 9 Dec 2015 16:13:58 -0800
+Subject: [PATCH] Fix GOT address computations in initial PLT entries for
+ nios2.
+
+2015-12-09  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
+	%hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
+	PLT entries.  Assert alignment requirements.
+
+Upstream-Status: Backport
+---
+ bfd/ChangeLog     |  6 ++++++
+ bfd/elf32-nios2.c | 23 ++++++++++++++++-------
+ 2 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 6b29d8b..1c54320 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -5383,12 +5383,17 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 				 + sgotplt->output_offset);
+ 	  if (bfd_link_pic (info))
+ 	    {
+-	      bfd_vma corrected = got_address - (splt->output_section->vma
+-						 + splt->output_offset + 4);
++	      bfd_vma got_pcrel = got_address - (splt->output_section->vma
++						 + splt->output_offset);
++	      /* Both GOT and PLT must be aligned to a 16-byte boundary
++		 for the two loads to share the %hiadj part.  The 4-byte
++		 offset for nextpc is accounted for in the %lo offsets
++		 on the loads.  */
++	      BFD_ASSERT ((got_pcrel & 0xf) == 0);
+ 	      nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
+-	      nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
+-	      nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
+-	      nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
++	      nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
++	      nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
++	      nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
+ 	    }
+ 	  else
+ 	    {
+@@ -5404,6 +5409,10 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 			    6 | ((res_size - (res_offset + 4)) << 6),
+ 			    splt->contents + res_offset);
+ 
++	      /* The GOT must be aligned to a 16-byte boundary for the
++		 two loads to share the same %hiadj part.  */
++	      BFD_ASSERT ((got_address & 0xf) == 0);
++
+ 	      nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
+ 	      nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 4,
+@@ -5411,9 +5420,9 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 	      nios2_elf32_install_imm16 (splt, res_size + 12,
+ 					 hiadj (got_address));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 16,
+-					 (got_address & 0xffff) + 4);
++					 (got_address + 4) & 0xffff);
+ 	      nios2_elf32_install_imm16 (splt, res_size + 20,
+-					 (got_address & 0xffff) + 8);
++					 (got_address + 8) & 0xffff);
+ 	    }
+ 	}
+     }
+-- 
+2.7.0.rc3
+
diff --git a/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch b/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
new file mode 100644
index 0000000..9196dac
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
@@ -0,0 +1,106 @@
+From a7be2893a6449e64fe6cfcdd8700b0a367a69f19 Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Sun, 27 Dec 2015 12:30:26 -0800
+Subject: [PATCH] Correct nios2 _gp address computation.
+
+2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
+	address.
+	(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
+	messages.
+
+Upstream-Status: Backport
+---
+ bfd/ChangeLog     |  7 +++++++
+ bfd/elf32-nios2.c | 31 +++++++++++++++++++++----------
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 1c54320..babecf3 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -3086,7 +3086,15 @@ lookup:
+ 	case bfd_link_hash_defined:
+ 	case bfd_link_hash_defweak:
+ 	  gp_found = TRUE;
+-	  *pgp = lh->u.def.value;
++	  {
++	    asection *sym_sec = lh->u.def.section;
++	    bfd_vma sym_value = lh->u.def.value;
++
++	    if (sym_sec->output_section)
++	      sym_value = (sym_value + sym_sec->output_offset
++			   + sym_sec->output_section->vma);
++	    *pgp = sym_value;
++	  }
+ 	  break;
+ 	case bfd_link_hash_indirect:
+ 	case bfd_link_hash_warning:
+@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       struct elf32_nios2_link_hash_entry *eh;
+       bfd_vma relocation;
+       bfd_vma gp;
+-      bfd_vma reloc_address;
+       bfd_reloc_status_type r = bfd_reloc_ok;
+       const char *name = NULL;
+       int r_type;
+@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       if (info->relocatable)
+ 	continue;
+ 
+-      if (sec && sec->output_section)
+-	reloc_address = (sec->output_section->vma + sec->output_offset
+-			 + rel->r_offset);
+-      else
+-	reloc_address = 0;
+-		
+       if (howto)
+ 	{
+ 	  switch (howto->type)
+@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      /* Turns an absolute address into a gp-relative address.  */
+ 	      if (!nios2_elf_assign_gp (output_bfd, &gp, info))
+ 		{
++		  bfd_vma reloc_address;
++
++		  if (sec && sec->output_section)
++		    reloc_address = (sec->output_section->vma
++				     + sec->output_offset
++				     + rel->r_offset);
++		  else
++		    reloc_address = 0;
++
+ 		  format = _("global pointer relative relocation at address "
+ 			     "0x%08x when _gp not defined\n");
+ 		  sprintf (msgbuf, format, reloc_address);
+@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      else
+ 		{
+ 		  bfd_vma symbol_address = rel->r_addend + relocation;
+-		  relocation = relocation + rel->r_addend - gp;
++		  relocation = symbol_address - gp;
+ 		  rel->r_addend = 0;
+ 		  if (((signed) relocation < -32768
+ 		       || (signed) relocation > 32767)
+@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 			  || h->root.type == bfd_link_hash_defined
+ 			  || h->root.type == bfd_link_hash_defweak))
+ 		    {
++		      if (h)
++			name = h->root.root.string;
+ 		      format = _("Unable to reach %s (at 0x%08x) from the "
+ 				 "global pointer (at 0x%08x) because the "
+ 				 "offset (%d) is out of the allowed range, "
+@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 						  rel->r_offset, relocation,
+ 						  rel->r_addend);
+ 		}
+-
+ 	      break;
+ 	    case R_NIOS2_UJMP:
+ 	      r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
+-- 
+2.7.0.rc3
+
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 3/7] dpkg: Update to 1.18.4
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
  2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:31 ` [PATCH 4/7] guile: Fix nios2 support Marek Vasut
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Update dpkg version to 1.18.4 . This adds nios2 architecture support
among other fixes. One patch was updated so it would apply again.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 ...g-do_package_write_deb-we-have-trees-of-h.patch | 52 +++++++++++++---------
 .../dpkg/{dpkg_1.18.2.bb => dpkg_1.18.4.bb}        |  4 +-
 2 files changed, 32 insertions(+), 24 deletions(-)
 rename meta/recipes-devtools/dpkg/{dpkg_1.18.2.bb => dpkg_1.18.4.bb} (84%)

diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch b/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
index 6967ef4..49ef853 100644
--- a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
@@ -1,7 +1,7 @@
-From d14ffd786993da60ca84c4812da8a6594a8c764e Mon Sep 17 00:00:00 2001
+From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 26 Aug 2015 15:48:13 +0300
-Subject: [PATCH 1/5] When running do_package_write_deb, we have trees of
+Subject: [PATCH] When running do_package_write_deb, we have trees of
  hardlinked files such as the dbg source files in ${PN}-dbg. If something
  makes another copy of one of those files (or deletes one), the number of
  links a file has changes and tar can notice this, e.g.:
@@ -19,23 +19,43 @@ place to avoid that kind of issue).
 Upstream-Status: Inappropriate
 RP 2015/3/27
 ---
- dpkg-deb/build.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
+ dpkg-deb/build.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index ea3d861..1589927 100644
+index 2ddeec6..af363f0 100644
 --- a/dpkg-deb/build.c
 +++ b/dpkg-deb/build.c
-@@ -458,7 +458,7 @@ do_build(const char *const *argv)
+@@ -452,7 +452,7 @@ static void
+ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+              struct compress_params *tar_compress_params, int fd_out)
+ {
+-  int pipe_filenames[2], pipe_tarball[2];
++  int pipe_filenames[2], pipe_tarball[2], rc;
+   pid_t pid_tar, pid_comp;
+ 
+   /* Fork off a tar. We will feed it a list of filenames on stdin later. */
+@@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+   /* All done, clean up wait for tar and <compress> to finish their job. */
+   close(pipe_filenames[1]);
+   subproc_reap(pid_comp, _("<compress> from tar -cf"), 0);
+-  subproc_reap(pid_tar, "tar -cf", 0);
++  rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR);
++  if (rc && rc != 1)
++    ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
+ }
+ 
+ /**
+@@ -509,7 +511,7 @@ do_build(const char *const *argv)
    char *debar;
    char *tfbuf;
    int arfd;
--  int p1[2], p2[2], gzfd;
-+  int p1[2], p2[2], gzfd, rc;
+-  int p1[2], gzfd;
++  int p1[2], gzfd, rc;
    pid_t c1, c2;
  
    /* Decode our arguments. */
-@@ -538,7 +538,9 @@ do_build(const char *const *argv)
+@@ -590,7 +592,9 @@ do_build(const char *const *argv)
    }
    close(p1[0]);
    subproc_reap(c2, _("<compress> from tar -cf"), 0);
@@ -46,18 +66,6 @@ index ea3d861..1589927 100644
  
    if (lseek(gzfd, 0, SEEK_SET))
      ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
-@@ -626,7 +628,10 @@ do_build(const char *const *argv)
-   /* All done, clean up wait for tar and <compress> to finish their job. */
-   close(p1[1]);
-   subproc_reap(c2, _("<compress> from tar -cf"), 0);
--  subproc_reap(c1, "tar -cf", 0);
-+  rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
-+  if (rc && rc != 1)
-+    ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
-+
-   /* Okay, we have data.tar as well now, add it to the ar wrapper. */
-   if (deb_format.major == 2) {
-     char datamember[16 + 1];
 -- 
-2.1.4
+2.7.0
 
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb b/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
similarity index 84%
rename from meta/recipes-devtools/dpkg/dpkg_1.18.2.bb
rename to meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
index dd1109b..7876944 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
@@ -15,6 +15,6 @@ SRC_URI += "file://noman.patch \
 	    file://0006-add-musleabi-to-known-target-tripets.patch \
            "
 
-SRC_URI[md5sum] = "63b9d869081ec49adeef6c5ff62d6576"
-SRC_URI[sha256sum] = "11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4"
+SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd"
+SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da"
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 4/7] guile: Fix nios2 support
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
  2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
  2016-02-09 11:31 ` [PATCH 3/7] dpkg: Update to 1.18.4 Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:31 ` [PATCH 5/7] nspr: Add " Marek Vasut
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Add minor patch to recognize nios2 build target.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 ...002-Recognize-nios2-as-compilation-target.patch | 36 ++++++++++++++++++++++
 meta/recipes-devtools/guile/guile_2.0.11.bb        |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch

diff --git a/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch b/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
new file mode 100644
index 0000000..519585b
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
@@ -0,0 +1,36 @@
+From 76155065c70b5ab65c6c805423183b360141db84 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 28 Jan 2016 04:46:23 +0100
+Subject: [PATCH] Recognize nios2 as compilation target
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22480 ]
+---
+ module/system/base/target.scm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/system/base/target.scm b/module/system/base/target.scm
+index d60a8e0..d1f6cff 100644
+--- a/module/system/base/target.scm
++++ b/module/system/base/target.scm
+@@ -65,7 +65,7 @@
+       (cond ((string-match "^i[0-9]86$" cpu)
+              (endianness little))
+             ((member cpu '("x86_64" "ia64"
+-                           "powerpcle" "powerpc64le" "mipsel" "mips64el"))
++                           "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2"))
+              (endianness little))
+             ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
+                            "mips" "mips64"))
+@@ -100,7 +100,7 @@
+ 
+           ((string-match "64$" cpu) 8)
+           ((string-match "64[lbe][lbe]$" cpu) 8)
+-          ((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
++          ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2")) 4)
+           ((string-match "^arm.*" cpu) 4)
+           (else (error "unknown CPU word size" cpu)))))
+ 
+-- 
+2.7.0.rc3
+
diff --git a/meta/recipes-devtools/guile/guile_2.0.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
index 6815e25..6cefe66 100644
--- a/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
            file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
            file://remove_strcase_l_funcs.patch \
            file://0001-libguile-Check-for-strtol_l-during-configure.patch \
+           file://0002-Recognize-nios2-as-compilation-target.patch \
            "
 
 #           file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 5/7] nspr: Add nios2 support
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
                   ` (2 preceding siblings ...)
  2016-02-09 11:31 ` [PATCH 4/7] guile: Fix nios2 support Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:31 ` [PATCH 6/7] liburcu: " Marek Vasut
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Add small patch to support nios2 in NSPR.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../nspr/nspr/0002-Add-nios2-support.patch         | 105 +++++++++++++++++++++
 meta/recipes-support/nspr/nspr_4.11.bb             |   1 +
 2 files changed, 106 insertions(+)
 create mode 100644 meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch

diff --git a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
new file mode 100644
index 0000000..2322806
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
@@ -0,0 +1,105 @@
+From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sat, 30 Jan 2016 07:18:02 +0100
+Subject: [PATCH] Add nios2 support
+
+Add support for the nios2 CPU.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ]
+---
+ nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++
+ nspr/pr/include/md/_linux.h   | 14 ++++++++++++++
+ 2 files changed, 59 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg
+index 8cbf0cb..150676b 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -972,6 +972,51 @@
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
++#elif defined(__nios2__)
++
++#define IS_LITTLE_ENDIAN    1
++#undef  IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   4
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   4
++#define PR_BYTES_PER_DWORD  8
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    32
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    32
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   5
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   5
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    4
++#define PR_ALIGN_OF_INT64   4
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD    4
++
++#define PR_BYTES_PER_WORD_LOG2   2
++#define PR_BYTES_PER_DWORD_LOG2  3
++
+ #elif defined(__or1k__)
+ 
+ #undef  IS_LITTLE_ENDIAN
+diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
+index d378db5..18260be 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -55,6 +55,8 @@
+ #define _PR_SI_ARCHITECTURE "avr32"
+ #elif defined(__m32r__)
+ #define _PR_SI_ARCHITECTURE "m32r"
++#elif defined(__nios2__)
++#define _PR_SI_ARCHITECTURE "nios2"
+ #elif defined(__or1k__)
+ #define _PR_SI_ARCHITECTURE "or1k"
+ #else
+@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ #define _MD_ATOMIC_SET                _PR_x86_64_AtomicSet
+ #endif
+ 
++#if defined(__nios2__)
++#if defined(__GNUC__)
++/* Use GCC built-in functions */
++#define _PR_HAVE_ATOMIC_OPS
++#define _MD_INIT_ATOMIC()
++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
++#endif
++#endif
++
+ #if defined(__or1k__)
+ #if defined(__GNUC__)
+ /* Use GCC built-in functions */
+-- 
+2.7.0.rc3
+
diff --git a/meta/recipes-support/nspr/nspr_4.11.bb b/meta/recipes-support/nspr/nspr_4.11.bb
index 3dabcb6..a38e20c 100644
--- a/meta/recipes-support/nspr/nspr_4.11.bb
+++ b/meta/recipes-support/nspr/nspr_4.11.bb
@@ -9,6 +9,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
            file://remove-rpath-from-tests.patch \
            file://fix-build-on-x86_64.patch \
            file://remove-srcdir-from-configure-in.patch \
+	   file://0002-Add-nios2-support.patch \
           "
 
 SRC_URI += "file://nspr.pc.in"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
                   ` (3 preceding siblings ...)
  2016-02-09 11:31 ` [PATCH 5/7] nspr: Add " Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:53   ` Burton, Ross
  2016-02-09 11:31 ` [PATCH 7/7] oprofile: " Marek Vasut
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Add support for the nios2 into the liburcu.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../0001-Support-for-NIOS2-architecture.patch      | 144 +++++++++++++++++++++
 meta/recipes-support/liburcu/liburcu_0.9.1.bb      |   8 +-
 2 files changed, 149 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch

diff --git a/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch b/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
new file mode 100644
index 0000000..20957fd
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
@@ -0,0 +1,144 @@
+From add566b913e1b5cd4974a2167157dc08d8245ab0 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 9 Feb 2016 01:52:26 +0100
+Subject: [PATCH] Support for NIOS2 architecture
+
+Add support for the Altera NIOS2 CPU archirecture. The atomic operations
+are handled by the GCC. The memory barriers on this systems are entirely
+trivial too, since the CPU does not support SMP at all.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Pending
+---
+ LICENSE              |  1 +
+ README.md            |  1 +
+ configure.ac         |  1 +
+ urcu/arch/nios2.h    | 40 ++++++++++++++++++++++++++++++++++++++++
+ urcu/uatomic/nios2.h | 32 ++++++++++++++++++++++++++++++++
+ 5 files changed, 75 insertions(+)
+ create mode 100644 urcu/arch/nios2.h
+ create mode 100644 urcu/uatomic/nios2.h
+
+diff --git a/LICENSE b/LICENSE
+index 3147094..a06fdcc 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -45,6 +45,7 @@ compiler.h
+ arch/s390.h
+ uatomic/alpha.h
+ uatomic/mips.h
++uatomic/nios2.h
+ uatomic/s390.h
+ system.h
+ 
+diff --git a/README.md b/README.md
+index f6b290f..6fe9c1e 100644
+--- a/README.md
++++ b/README.md
+@@ -43,6 +43,7 @@ Currently, the following architectures are supported:
+   - S390, S390x
+   - ARM 32/64
+   - MIPS
++  - NIOS2
+   - Alpha
+   - ia64
+   - Sparcv9 32/64
+diff --git a/configure.ac b/configure.ac
+index 39a7777..71a7d71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -124,6 +124,7 @@ AS_CASE([$host_cpu],
+ 	[arm*], [ARCHTYPE="arm"],
+ 	[aarch64], [ARCHTYPE="aarch64"],
+ 	[mips*], [ARCHTYPE="mips"],
++	[nios2*], [ARCHTYPE="nios2"],
+ 	[tile*], [ARCHTYPE="tile"],
+ 	[hppa*], [ARCHTYPE="hppa"],
+ 	[ARCHTYPE="unknown"]
+diff --git a/urcu/arch/nios2.h b/urcu/arch/nios2.h
+new file mode 100644
+index 0000000..030d1bc
+--- /dev/null
++++ b/urcu/arch/nios2.h
+@@ -0,0 +1,40 @@
++#ifndef _URCU_ARCH_NIOS2_H
++#define _URCU_ARCH_NIOS2_H
++
++/*
++ * arch_mips.h: trivial definitions for the NIOS2 architecture.
++ *
++ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include <urcu/compiler.h>
++#include <urcu/config.h>
++#include <urcu/syscall-compat.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define cmm_mb()	__asm__ __volatile__ ("":::"memory")
++
++#ifdef __cplusplus
++}
++#endif
++
++#include <urcu/arch/generic.h>
++
++#endif /* _URCU_ARCH_NIOS2_H */
+diff --git a/urcu/uatomic/nios2.h b/urcu/uatomic/nios2.h
+new file mode 100644
+index 0000000..5b3c303
+--- /dev/null
++++ b/urcu/uatomic/nios2.h
+@@ -0,0 +1,32 @@
++#ifndef _URCU_UATOMIC_ARCH_NIOS2_H
++#define _URCU_UATOMIC_ARCH_NIOS2_H
++
++/*
++ * Atomic exchange operations for the NIOS2 architecture. Let GCC do it.
++ *
++ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <urcu/compiler.h>
++#include <urcu/system.h>
++#include <urcu/uatomic/generic.h>
++
++#endif /* _URCU_UATOMIC_ARCH_NIOS2_H */
+-- 
+2.7.0
+
diff --git a/meta/recipes-support/liburcu/liburcu_0.9.1.bb b/meta/recipes-support/liburcu/liburcu_0.9.1.bb
index 39348d7..dccc05c 100644
--- a/meta/recipes-support/liburcu/liburcu_0.9.1.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.9.1.bb
@@ -3,12 +3,14 @@ HOMEPAGE = "http://lttng.org/urcu"
 BUGTRACKER = "http://lttng.org/project/issues"
 
 LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
                     file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
                     file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
 
-SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
-          "
+SRC_URI = " \
+	http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+	file://0001-Support-for-NIOS2-architecture.patch \
+	"
 
 SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b"
 SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 7/7] oprofile: Add nios2 support
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
                   ` (4 preceding siblings ...)
  2016-02-09 11:31 ` [PATCH 6/7] liburcu: " Marek Vasut
@ 2016-02-09 11:31 ` Marek Vasut
  2016-02-09 11:51 ` [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Burton, Ross
  2016-02-09 13:07 ` [PATCH V2 " Marek Vasut
  7 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 11:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Add support for the nios2 architecture.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-kernel/oprofile/oprofile.inc          |  3 ++-
 ...Add-rmb-definition-for-NIOS2-architecture.patch | 30 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch

diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index faf0e53..cf3ad43 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -23,7 +23,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
            file://automake-foreign.patch \
            file://oprofile-cross-compile-tests.patch \
            file://run-ptest \
-           file://root-home-dir.patch"
+           file://root-home-dir.patch \
+           file://0001-Add-rmb-definition-for-NIOS2-architecture.patch"
 
 SRC_URI_append_libc-musl = " file://musl.patch"
 
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
new file mode 100644
index 0000000..12bf809
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
@@ -0,0 +1,30 @@
+From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 9 Feb 2016 02:00:29 +0100
+Subject: [PATCH] Add rmb() definition for NIOS2 architecture
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Pending
+---
+ libperf_events/operf_utils.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
+index 32954cc..8270e53 100644
+--- a/libperf_events/operf_utils.h
++++ b/libperf_events/operf_utils.h
+@@ -178,6 +178,11 @@ void op_release_resources(void);
+ #define cpu_relax()	asm volatile("" ::: "memory")
+ #endif
+ 
++#ifdef __nios2__
++#define rmb()		asm volatile("" ::: "memory")
++#define cpu_relax()	asm volatile("" ::: "memory")
++#endif
++
+ #ifdef __tile__
+ #include <asm/unistd.h>
+ #define rmb()		__insn_mf()
+-- 
+2.7.0
+
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
                   ` (5 preceding siblings ...)
  2016-02-09 11:31 ` [PATCH 7/7] oprofile: " Marek Vasut
@ 2016-02-09 11:51 ` Burton, Ross
  2016-02-09 13:06   ` Marek Vasut
  2016-02-09 13:07 ` [PATCH V2 " Marek Vasut
  7 siblings, 1 reply; 23+ messages in thread
From: Burton, Ross @ 2016-02-09 11:51 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:

> +From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
> +From: "Dmitry V. Levin" <ldv@altlinux.org>
> +Date: Thu, 24 Dec 2015 15:40:55 +0000
> +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
> +
> +Fix build regression introduced by commit
> +34683e3926d8c2daa368afb805da422ee7043396.
> +
> +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
> +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
> +* linux/nios2/syscallent.h: Likewise.
> +* linux/or1k/syscallent.h: Likewise.
> +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and
> sys_mmap_4koff.
> +* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
> +* NEWS: Mention this build fix.
> +
> +Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> +Upstream-Status: Backport
>

This needs your signed-off-by tag too.

Ross

[-- Attachment #2: Type: text/html, Size: 1485 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 11:31 ` [PATCH 6/7] liburcu: " Marek Vasut
@ 2016-02-09 11:53   ` Burton, Ross
  2016-02-09 12:07     ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Burton, Ross @ 2016-02-09 11:53 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:

> -LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
>

Why did the license checksum change?

Ross

[-- Attachment #2: Type: text/html, Size: 681 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
@ 2016-02-09 11:57   ` Burton, Ross
  2016-02-09 13:08   ` [PATCH V2 " Marek Vasut
  1 sibling, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2016-02-09 11:57 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:

> +From 33d4099fc891760ea1f080746dee4dcfc36c757c Mon Sep 17 00:00:00 2001
> +From: Sandra Loosemore <sandra@codesourcery.com>
> +Date: Wed, 9 Dec 2015 16:13:58 -0800
> +Subject: [PATCH] Fix GOT address computations in initial PLT entries for
> + nios2.
> +
> +2015-12-09  Sandra Loosemore  <sandra@codesourcery.com>
> +
> +       bfd/
> +       * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
> +       %hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
> +       PLT entries.  Assert alignment requirements.
> +
> +Upstream-Status: Backport
>

These patches need your Signed-off-by.

Ross

[-- Attachment #2: Type: text/html, Size: 1243 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 11:53   ` Burton, Ross
@ 2016-02-09 12:07     ` Marek Vasut
  2016-02-09 13:24       ` Burton, Ross
  2016-02-09 17:52       ` Khem Raj
  0 siblings, 2 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 12:07 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Tuesday, February 09, 2016 at 12:53:01 PM, Burton, Ross wrote:
> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
> > -LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3
> > \ +LIC_FILES_CHKSUM =
> > "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
> 
> Why did the license checksum change?

Because the LICENSE file now contains one more entry for nios2, which changed
the checksum of the whole file. Maybe we should trim the checksum to use only
the header in the LICENSE file and not the whole file to prevent this ?

This is the change which triggered the change of the checksum:

+diff --git a/LICENSE b/LICENSE
+index 3147094..a06fdcc 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -45,6 +45,7 @@ compiler.h
+ arch/s390.h
+ uatomic/alpha.h
+ uatomic/mips.h
++uatomic/nios2.h
+ uatomic/s390.h
+ system.h
+

Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile
  2016-02-09 11:51 ` [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Burton, Ross
@ 2016-02-09 13:06   ` Marek Vasut
  0 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 13:06 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Tuesday, February 09, 2016 at 12:51:19 PM, Burton, Ross wrote:
> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
> > +From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
> > +From: "Dmitry V. Levin" <ldv@altlinux.org>
> > +Date: Thu, 24 Dec 2015 15:40:55 +0000
> > +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
> > +
> > +Fix build regression introduced by commit
> > +34683e3926d8c2daa368afb805da422ee7043396.
> > +
> > +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
> > +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
> > +* linux/nios2/syscallent.h: Likewise.
> > +* linux/or1k/syscallent.h: Likewise.
> > +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and
> > sys_mmap_4koff.
> > +* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
> > +* NEWS: Mention this build fix.
> > +
> > +Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> > +Upstream-Status: Backport
> 
> This needs your signed-off-by tag too.

Oops, thanks for the reminder. Let me just repost this.

Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH V2 1/7] strace: Fix build for arc, metag, nios2, or1k, tile
  2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
                   ` (6 preceding siblings ...)
  2016-02-09 11:51 ` [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Burton, Ross
@ 2016-02-09 13:07 ` Marek Vasut
  7 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 13:07 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Upstream strace 4.11 does not build for arc, metag, nios2, or1k, tile.
Backport patch from strace git master to fix the build issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Robert Yang <liezhi.yang@windriver.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../0001-arc-metag-nios2-or1k-tile-fix-build.patch | 117 +++++++++++++++++++++
 meta/recipes-devtools/strace/strace_4.11.bb        |   1 +
 2 files changed, 118 insertions(+)
 create mode 100644 meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch

V2: Add missing SoB line to the backported patch

diff --git a/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
new file mode 100644
index 0000000..a9d3203
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
@@ -0,0 +1,117 @@
+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 24 Dec 2015 15:40:55 +0000
+Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
+
+Fix build regression introduced by commit
+34683e3926d8c2daa368afb805da422ee7043396.
+
+* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
+* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
+* linux/nios2/syscallent.h: Likewise.
+* linux/or1k/syscallent.h: Likewise.
+* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
+* NEWS: Mention this build fix.
+
+Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ NEWS                     | 3 +++
+ linux/32/syscallent.h    | 6 +++---
+ linux/arc/syscallent.h   | 2 +-
+ linux/nios2/syscallent.h | 2 +-
+ linux/or1k/syscallent.h  | 2 +-
+ linux/tile/syscallent1.h | 2 +-
+ pathtrace.c              | 1 +
+ 7 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index fe40ca4..09263eb 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,9 @@
++Noteworthy changes in release ?.?? (????-??-??)
++===============================================
++
++* Bug fixes
++  * Fixed build on arc, metag, nios2, or1k, and tile architectures.
++
+ Noteworthy changes in release 4.11 (2015-12-21)
+ ===============================================
+ 
+diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h
+index 5f997e7..e6f895c 100644
+--- a/linux/32/syscallent.h
++++ b/linux/32/syscallent.h
+@@ -1,5 +1,5 @@
+-#ifndef ARCH_mmap
+-# define ARCH_mmap mmap
++#ifndef sys_ARCH_mmap
++# define sys_ARCH_mmap sys_mmap
+ #endif
+ [  0] = { 2,	0,		SEN(io_setup),			"io_setup"		},
+ [  1] = { 1,	0,		SEN(io_destroy),		"io_destroy"		},
+@@ -276,5 +276,5 @@
+ [283] = { 2,	0,		SEN(membarrier),		"membarrier",		},
+ [284] = { 3,	TM,		SEN(mlock2),			"mlock2"		},
+ 
+-#undef ARCH_mmap
++#undef sys_ARCH_mmap
+ #undef ARCH_WANT_SYNC_FILE_RANGE2
+diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
+index 5847dc4..1100008 100644
+--- a/linux/arc/syscallent.h
++++ b/linux/arc/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	0,	SEN(printargs),	"arc_cacheflush"},
+ [245] = { 1,	0,	SEN(printargs),	"arc_settls"	},
+diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h
+index 8a4b70e..01efe3a 100644
+--- a/linux/nios2/syscallent.h
++++ b/linux/nios2/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = {4,    0,	SEN(cacheflush), "cacheflush"},
+ [245 ... 259] = { },
+diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
+index ed84b3b..351fe25 100644
+--- a/linux/or1k/syscallent.h
++++ b/linux/or1k/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	NF,	SEN(or1k_atomic),	"or1k_atomic"	},
+ [245 ... 259] = { },
+diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
+index c86f059..28dbab4 100644
+--- a/linux/tile/syscallent1.h
++++ b/linux/tile/syscallent1.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_4koff
++#define sys_ARCH_mmap sys_mmap_4koff
+ #define ARCH_WANT_SYNC_FILE_RANGE2 1
+ #include "32/syscallent.h"
+ [244] = { 1,	0,	SEN(printargs),	"cmpxchg_badaddr"	},
+diff --git a/pathtrace.c b/pathtrace.c
+index d530ec2..e72cdf7 100644
+--- a/pathtrace.c
++++ b/pathtrace.c
+@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp)
+ 	case SEN_mmap:
+ 	case SEN_mmap_4koff:
+ 	case SEN_mmap_pgoff:
++	case SEN_ARCH_mmap:
+ 		/* x, x, x, x, fd */
+ 		return fdmatch(tcp, tcp->u_arg[4]);
+ 
+-- 
+2.6.4
+
diff --git a/meta/recipes-devtools/strace/strace_4.11.bb b/meta/recipes-devtools/strace/strace_4.11.bb
index a72a1f9..6b889de 100644
--- a/meta/recipes-devtools/strace/strace_4.11.bb
+++ b/meta/recipes-devtools/strace/strace_4.11.bb
@@ -8,6 +8,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
            file://disable-git-version-gen.patch \
            file://more-robust-test-for-m32-mx32-compile-support.patch \
            file://update-gawk-paths.patch \
+           file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \
            file://Makefile-ptest.patch \
            file://run-ptest \
           "
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
  2016-02-09 11:57   ` Burton, Ross
@ 2016-02-09 13:08   ` Marek Vasut
  2016-02-09 14:21     ` Burton, Ross
  1 sibling, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 13:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

Repair corner cases in nios2 PLT and GP handling. See the patches
themselves for extensive detailed explanation.

The patches don't contain the ChangeLog entries, since the changelog
entries often cause trouble when applying the patch.

Signed-off-by: Marek Vasut <marex@denx.de>
---
 meta/recipes-devtools/binutils/binutils-2.25.1.inc |   2 +
 ...ress-computations-in-initial-PLT-entries-.patch |  73 ++++++++++++++
 ...018-Correct-nios2-_gp-address-computation.patch | 107 +++++++++++++++++++++
 3 files changed, 182 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch

V2: Add missing SoB lines to the backported patches

diff --git a/meta/recipes-devtools/binutils/binutils-2.25.1.inc b/meta/recipes-devtools/binutils/binutils-2.25.1.inc
index dc23c4d..f8f8f1a 100644
--- a/meta/recipes-devtools/binutils/binutils-2.25.1.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.25.1.inc
@@ -36,6 +36,8 @@ SRC_URI = "\
      file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \
      file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \
      file://0016-This-patch-adds-IFUNC-support-for-arm-gold-backend.patch \
+     file://0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \
+     file://0018-Correct-nios2-_gp-address-computation.patch \
      file://binutils-octeon3.patch \
      file://add-thunderx-support-for-gas.patch \
      "
diff --git a/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch b/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
new file mode 100644
index 0000000..c412b76
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0017-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
@@ -0,0 +1,73 @@
+From 33d4099fc891760ea1f080746dee4dcfc36c757c Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Wed, 9 Dec 2015 16:13:58 -0800
+Subject: [PATCH] Fix GOT address computations in initial PLT entries for
+ nios2.
+
+2015-12-09  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
+	%hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
+	PLT entries.  Assert alignment requirements.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ bfd/ChangeLog     |  6 ++++++
+ bfd/elf32-nios2.c | 23 ++++++++++++++++-------
+ 2 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 6b29d8b..1c54320 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -5383,12 +5383,17 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 				 + sgotplt->output_offset);
+ 	  if (bfd_link_pic (info))
+ 	    {
+-	      bfd_vma corrected = got_address - (splt->output_section->vma
+-						 + splt->output_offset + 4);
++	      bfd_vma got_pcrel = got_address - (splt->output_section->vma
++						 + splt->output_offset);
++	      /* Both GOT and PLT must be aligned to a 16-byte boundary
++		 for the two loads to share the %hiadj part.  The 4-byte
++		 offset for nextpc is accounted for in the %lo offsets
++		 on the loads.  */
++	      BFD_ASSERT ((got_pcrel & 0xf) == 0);
+ 	      nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
+-	      nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
+-	      nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
+-	      nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
++	      nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
++	      nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
++	      nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
+ 	    }
+ 	  else
+ 	    {
+@@ -5404,6 +5409,10 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 			    6 | ((res_size - (res_offset + 4)) << 6),
+ 			    splt->contents + res_offset);
+ 
++	      /* The GOT must be aligned to a 16-byte boundary for the
++		 two loads to share the same %hiadj part.  */
++	      BFD_ASSERT ((got_address & 0xf) == 0);
++
+ 	      nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
+ 	      nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 4,
+@@ -5411,9 +5420,9 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 	      nios2_elf32_install_imm16 (splt, res_size + 12,
+ 					 hiadj (got_address));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 16,
+-					 (got_address & 0xffff) + 4);
++					 (got_address + 4) & 0xffff);
+ 	      nios2_elf32_install_imm16 (splt, res_size + 20,
+-					 (got_address & 0xffff) + 8);
++					 (got_address + 8) & 0xffff);
+ 	    }
+ 	}
+     }
+-- 
+2.7.0.rc3
+
diff --git a/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch b/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
new file mode 100644
index 0000000..a580110
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0018-Correct-nios2-_gp-address-computation.patch
@@ -0,0 +1,107 @@
+From a7be2893a6449e64fe6cfcdd8700b0a367a69f19 Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Sun, 27 Dec 2015 12:30:26 -0800
+Subject: [PATCH] Correct nios2 _gp address computation.
+
+2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
+	address.
+	(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
+	messages.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ bfd/ChangeLog     |  7 +++++++
+ bfd/elf32-nios2.c | 31 +++++++++++++++++++++----------
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 1c54320..babecf3 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -3086,7 +3086,15 @@ lookup:
+ 	case bfd_link_hash_defined:
+ 	case bfd_link_hash_defweak:
+ 	  gp_found = TRUE;
+-	  *pgp = lh->u.def.value;
++	  {
++	    asection *sym_sec = lh->u.def.section;
++	    bfd_vma sym_value = lh->u.def.value;
++
++	    if (sym_sec->output_section)
++	      sym_value = (sym_value + sym_sec->output_offset
++			   + sym_sec->output_section->vma);
++	    *pgp = sym_value;
++	  }
+ 	  break;
+ 	case bfd_link_hash_indirect:
+ 	case bfd_link_hash_warning:
+@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       struct elf32_nios2_link_hash_entry *eh;
+       bfd_vma relocation;
+       bfd_vma gp;
+-      bfd_vma reloc_address;
+       bfd_reloc_status_type r = bfd_reloc_ok;
+       const char *name = NULL;
+       int r_type;
+@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       if (info->relocatable)
+ 	continue;
+ 
+-      if (sec && sec->output_section)
+-	reloc_address = (sec->output_section->vma + sec->output_offset
+-			 + rel->r_offset);
+-      else
+-	reloc_address = 0;
+-		
+       if (howto)
+ 	{
+ 	  switch (howto->type)
+@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      /* Turns an absolute address into a gp-relative address.  */
+ 	      if (!nios2_elf_assign_gp (output_bfd, &gp, info))
+ 		{
++		  bfd_vma reloc_address;
++
++		  if (sec && sec->output_section)
++		    reloc_address = (sec->output_section->vma
++				     + sec->output_offset
++				     + rel->r_offset);
++		  else
++		    reloc_address = 0;
++
+ 		  format = _("global pointer relative relocation at address "
+ 			     "0x%08x when _gp not defined\n");
+ 		  sprintf (msgbuf, format, reloc_address);
+@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      else
+ 		{
+ 		  bfd_vma symbol_address = rel->r_addend + relocation;
+-		  relocation = relocation + rel->r_addend - gp;
++		  relocation = symbol_address - gp;
+ 		  rel->r_addend = 0;
+ 		  if (((signed) relocation < -32768
+ 		       || (signed) relocation > 32767)
+@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 			  || h->root.type == bfd_link_hash_defined
+ 			  || h->root.type == bfd_link_hash_defweak))
+ 		    {
++		      if (h)
++			name = h->root.root.string;
+ 		      format = _("Unable to reach %s (at 0x%08x) from the "
+ 				 "global pointer (at 0x%08x) because the "
+ 				 "offset (%d) is out of the allowed range, "
+@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 						  rel->r_offset, relocation,
+ 						  rel->r_addend);
+ 		}
+-
+ 	      break;
+ 	    case R_NIOS2_UJMP:
+ 	      r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
+-- 
+2.7.0.rc3
+
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 12:07     ` Marek Vasut
@ 2016-02-09 13:24       ` Burton, Ross
  2016-02-09 17:52       ` Khem Raj
  1 sibling, 0 replies; 23+ messages in thread
From: Burton, Ross @ 2016-02-09 13:24 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On 9 February 2016 at 12:07, Marek Vasut <marex@denx.de> wrote:

> > Why did the license checksum change?
>
> Because the LICENSE file now contains one more entry for nios2, which
> changed
> the checksum of the whole file. Maybe we should trim the checksum to use
> only
> the header in the LICENSE file and not the whole file to prevent this ?
>
> This is the change which triggered the change of the checksum:


Oh yes, right.  Thanks!

Ross

[-- Attachment #2: Type: text/html, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 13:08   ` [PATCH V2 " Marek Vasut
@ 2016-02-09 14:21     ` Burton, Ross
  2016-02-09 14:29       ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Burton, Ross @ 2016-02-09 14:21 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On 9 February 2016 at 13:08, Marek Vasut <marex@denx.de> wrote:

> Repair corner cases in nios2 PLT and GP handling. See the patches
> themselves for extensive detailed explanation.
>
> The patches don't contain the ChangeLog entries, since the changelog
> entries often cause trouble when applying the patch.
>
> Signed-off-by: Marek Vasut <marex@denx.de>


We've got binutils 2.26 in master now, can you rebase and retest this?

Cheers,
Ross

[-- Attachment #2: Type: text/html, Size: 913 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 14:21     ` Burton, Ross
@ 2016-02-09 14:29       ` Marek Vasut
  2016-02-09 16:00         ` Randy MacLeod
  0 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 14:29 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Tuesday, February 09, 2016 at 03:21:17 PM, Burton, Ross wrote:
> On 9 February 2016 at 13:08, Marek Vasut <marex@denx.de> wrote:
> > Repair corner cases in nios2 PLT and GP handling. See the patches
> > themselves for extensive detailed explanation.
> > 
> > The patches don't contain the ChangeLog entries, since the changelog
> > entries often cause trouble when applying the patch.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> 
> We've got binutils 2.26 in master now, can you rebase and retest this?

I rebased yesterday, well, let's try :-)

Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 14:29       ` Marek Vasut
@ 2016-02-09 16:00         ` Randy MacLeod
  2016-02-09 16:52           ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Randy MacLeod @ 2016-02-09 16:00 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

On 2016-02-09 09:29 AM, Marek Vasut wrote:
> On Tuesday, February 09, 2016 at 03:21:17 PM, Burton, Ross wrote:
>> On 9 February 2016 at 13:08, Marek Vasut <marex@denx.de> wrote:
>>> Repair corner cases in nios2 PLT and GP handling. See the patches
>>> themselves for extensive detailed explanation.

This sentence doesn't really add much value since many patches
contain additional description and the logs here are mostly a
few lines from the ChangeLog which doesn't count as an extensive
detailed explanation in my books. :)

I expect that you're familiar with this but take a look at:
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Committing_your_patch

     Commit with a concise and descriptive message -
     one that explains your changes in a way others get
     a short overview without looking at the code.

>>>
>>> The patches don't contain the ChangeLog entries, since the changelog
>>> entries often cause trouble when applying the patch.

I'd prefer to see the ChangeLog snippets duplicated in the git log
so that it's easier to see what happened.

If you do a v2, please also mention that the patches are backports
since that's important to people when they consider whether the patch
should be accepted.

Thanks!

-- 
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, 
Canada, K2K 2W5


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH V2 2/7] binutils: Repair nios2 PLT and GP handling
  2016-02-09 16:00         ` Randy MacLeod
@ 2016-02-09 16:52           ` Marek Vasut
  0 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 16:52 UTC (permalink / raw)
  To: Randy MacLeod; +Cc: OE-core

On Tuesday, February 09, 2016 at 05:00:11 PM, Randy MacLeod wrote:
> On 2016-02-09 09:29 AM, Marek Vasut wrote:
> > On Tuesday, February 09, 2016 at 03:21:17 PM, Burton, Ross wrote:
> >> On 9 February 2016 at 13:08, Marek Vasut <marex@denx.de> wrote:
> >>> Repair corner cases in nios2 PLT and GP handling. See the patches
> >>> themselves for extensive detailed explanation.
> 
> This sentence doesn't really add much value since many patches
> contain additional description and the logs here are mostly a
> few lines from the ChangeLog which doesn't count as an extensive
> detailed explanation in my books. :)

It's not from changelog, it's from the commit message. The real answer
is that it fixes incorrect computation of the GOT/PLT offsets in case
these tables grow too large. Then there's some sort of off-by-four error
in the computation, which causes linking to fail. It happens in one or
two packages in yocto. I had these patches in my tree for a bit, so my
memory is a little unclear on the gruesome details already.

> I expect that you're familiar with this but take a look at:
> http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Comm
> itting_your_patch
> 
>      Commit with a concise and descriptive message -
>      one that explains your changes in a way others get
>      a short overview without looking at the code.

Yes, I hope it's there.

> >>> The patches don't contain the ChangeLog entries, since the changelog
> >>> entries often cause trouble when applying the patch.
> 
> I'd prefer to see the ChangeLog snippets duplicated in the git log
> so that it's easier to see what happened.

You actually want to avoid that, since it'd make it really hard to apply
these patches onto subsequent versions of binutils if this was necessary.
I hope this won't be necessary and will be dropped once the next version
of binutils arrives. The change which happened is in the patch's commit
message, but it seems like some of the binutils guys are not very fond of 
writing extensive explanation.

> If you do a v2, please also mention that the patches are backports
> since that's important to people when they consider whether the patch
> should be accepted.

This is a V2 ;-)

There is "Upstream-Status: Backport" for each of the patches, it's actually
needed to track the status.

Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 12:07     ` Marek Vasut
  2016-02-09 13:24       ` Burton, Ross
@ 2016-02-09 17:52       ` Khem Raj
  2016-02-09 17:56         ` Marek Vasut
  1 sibling, 1 reply; 23+ messages in thread
From: Khem Raj @ 2016-02-09 17:52 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]


> On Feb 9, 2016, at 4:07 AM, Marek Vasut <marex@denx.de> wrote:
> 
> On Tuesday, February 09, 2016 at 12:53:01 PM, Burton, Ross wrote:
>> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
>>> -LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3
>>> \ +LIC_FILES_CHKSUM =
>>> "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
>> 
>> Why did the license checksum change?
> 
> Because the LICENSE file now contains one more entry for nios2, which changed
> the checksum of the whole file. Maybe we should trim the checksum to use only
> the header in the LICENSE file and not the whole file to prevent this ?
> 
> This is the change which triggered the change of the checksum:
> 
> +diff --git a/LICENSE b/LICENSE
> +index 3147094..a06fdcc 100644
> +--- a/LICENSE
> ++++ b/LICENSE
> +@@ -45,6 +45,7 @@ compiler.h
> + arch/s390.h
> + uatomic/alpha.h
> + uatomic/mips.h
> ++uatomic/nios2.h

I don’t know how the LICENSE file looks like but including file names in license file is
probably worth ignoring in checksums.

> + uatomic/s390.h
> + system.h
> +
> 
> Best regards,
> Marek Vasut
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 17:52       ` Khem Raj
@ 2016-02-09 17:56         ` Marek Vasut
  2016-02-10  9:05           ` Paul Eggleton
  0 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2016-02-09 17:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

On Tuesday, February 09, 2016 at 06:52:12 PM, Khem Raj wrote:
> > On Feb 9, 2016, at 4:07 AM, Marek Vasut <marex@denx.de> wrote:
> > 
> > On Tuesday, February 09, 2016 at 12:53:01 PM, Burton, Ross wrote:
> >> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
> >>> -LIC_FILES_CHKSUM =
> >>> "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
> >>> +LIC_FILES_CHKSUM =
> >>> "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
> >> 
> >> Why did the license checksum change?
> > 
> > Because the LICENSE file now contains one more entry for nios2, which
> > changed the checksum of the whole file. Maybe we should trim the
> > checksum to use only the header in the LICENSE file and not the whole
> > file to prevent this ?
> > 
> > This is the change which triggered the change of the checksum:
> > 
> > +diff --git a/LICENSE b/LICENSE
> > +index 3147094..a06fdcc 100644
> > +--- a/LICENSE
> > ++++ b/LICENSE
> > +@@ -45,6 +45,7 @@ compiler.h
> > + arch/s390.h
> > + uatomic/alpha.h
> > + uatomic/mips.h
> > ++uatomic/nios2.h
> 
> I don’t know how the LICENSE file looks like but including file names in
> license file is probably worth ignoring in checksums.

See below:

Userspace RCU library licensing
Mathieu Desnoyers
September 3, 2012

                                                                                                                                                  
* LGPLv2.1                                                                                                                                        
                                                                                                                                                  
The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt for                                                                     
license details. Refer to the individual file headers for details.                                                                                
                                                                                                                                                  
LGPL-compatible source code can statically use the library header using :                                                                         
                                                                                                                                                  
#define _LGPL_SOURCE
#include <urcu.h>

Dynamic-only linking with the LGPL library is used if _LGPL_SOURCE is not
defined. It permits relinking with newer versions of the library, which is
required by the LGPL license.

See lgpl-relicensing.txt for details.


* MIT-style license :

xchg() primitive has been rewritten from scratch starting from atomic_ops 1.2
which has a MIT-style license that is intended to allow use in both free and
proprietary software:
        http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
        http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/

This MIT-style license (BSD like) apply to:

uatomic/gcc.h
uatomic/unknown.h
uatomic/generic.h
uatomic/sparc64.h
uatomic/arm.h
uatomic/ppc.h
uatomic/x86.h
uatomic.h

MIT/X11 (BSD like) license apply to:

compiler.h
arch/s390.h
uatomic/alpha.h
uatomic/mips.h
uatomic/nios2.h
uatomic/s390.h
system.h


* GPLv2

Library test code is distributed under the GPLv2 license. See gpl-2.0.txt for
license details. See headers of individual files under tests/ for details.


* GPLv3 (or later)

The following build-related macro is under GPLv3 (or later):

m4/ax_tls.m4


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-09 17:56         ` Marek Vasut
@ 2016-02-10  9:05           ` Paul Eggleton
  2016-02-10 11:58             ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Paul Eggleton @ 2016-02-10  9:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Marek Vasut

On Tue, 09 Feb 2016 18:56:09 Marek Vasut wrote:
> On Tuesday, February 09, 2016 at 06:52:12 PM, Khem Raj wrote:
> > > On Feb 9, 2016, at 4:07 AM, Marek Vasut <marex@denx.de> wrote:
> > > 
> > > On Tuesday, February 09, 2016 at 12:53:01 PM, Burton, Ross wrote:
> > >> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
> > >>> -LIC_FILES_CHKSUM =
> > >>> "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
> > >>> +LIC_FILES_CHKSUM =
> > >>> "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
> > >> 
> > >> Why did the license checksum change?
> > > 
> > > Because the LICENSE file now contains one more entry for nios2, which
> > > changed the checksum of the whole file. Maybe we should trim the
> > > checksum to use only the header in the LICENSE file and not the whole
> > > file to prevent this ?
> > > 
> > > This is the change which triggered the change of the checksum:
> > > 
> > > +diff --git a/LICENSE b/LICENSE
> > > +index 3147094..a06fdcc 100644
> > > +--- a/LICENSE
> > > ++++ b/LICENSE
> > > +@@ -45,6 +45,7 @@ compiler.h
> > > + arch/s390.h
> > > + uatomic/alpha.h
> > > + uatomic/mips.h
> > > ++uatomic/nios2.h
> > 
> > I don’t know how the LICENSE file looks like but including file names in
> > license file is probably worth ignoring in checksums.
> 
> See below:
> 
> Userspace RCU library licensing
> Mathieu Desnoyers
> September 3, 2012
> 
> 
> * LGPLv2.1
> 
> The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt
> for license details. Refer to the individual file headers for details.
> 
> LGPL-compatible source code can statically use the library header using :
> 
> #define _LGPL_SOURCE
> #include <urcu.h>
> 
> Dynamic-only linking with the LGPL library is used if _LGPL_SOURCE is not
> defined. It permits relinking with newer versions of the library, which is
> required by the LGPL license.
> 
> See lgpl-relicensing.txt for details.
> 
> 
> * MIT-style license :
> 
> xchg() primitive has been rewritten from scratch starting from atomic_ops
> 1.2 which has a MIT-style license that is intended to allow use in both
> free and proprietary software:
>         http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
>         http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
> 
> This MIT-style license (BSD like) apply to:
> 
> uatomic/gcc.h
> uatomic/unknown.h
> uatomic/generic.h
> uatomic/sparc64.h
> uatomic/arm.h
> uatomic/ppc.h
> uatomic/x86.h
> uatomic.h
> 
> MIT/X11 (BSD like) license apply to:
> 
> compiler.h
> arch/s390.h
> uatomic/alpha.h
> uatomic/mips.h
> uatomic/nios2.h
> uatomic/s390.h
> system.h
> 
> 
> * GPLv2
> 
> Library test code is distributed under the GPLv2 license. See gpl-2.0.txt
> for license details. See headers of individual files under tests/ for
> details.
> 
> 
> * GPLv3 (or later)
> 
> The following build-related macro is under GPLv3 (or later):
> 
> m4/ax_tls.m4

If you only point to part of this file you are risking missing the addition of 
just about any license to the end of the list on a future upgrade. That 
doesn't sound like a good idea to me.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 6/7] liburcu: Add nios2 support
  2016-02-10  9:05           ` Paul Eggleton
@ 2016-02-10 11:58             ` Marek Vasut
  0 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2016-02-10 11:58 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Wednesday, February 10, 2016 at 10:05:52 AM, Paul Eggleton wrote:
> On Tue, 09 Feb 2016 18:56:09 Marek Vasut wrote:
> > On Tuesday, February 09, 2016 at 06:52:12 PM, Khem Raj wrote:
> > > > On Feb 9, 2016, at 4:07 AM, Marek Vasut <marex@denx.de> wrote:
> > > > 
> > > > On Tuesday, February 09, 2016 at 12:53:01 PM, Burton, Ross wrote:
> > > >> On 9 February 2016 at 11:31, Marek Vasut <marex@denx.de> wrote:
> > > >>> -LIC_FILES_CHKSUM =
> > > >>> "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
> > > >>> +LIC_FILES_CHKSUM =
> > > >>> "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
> > > >> 
> > > >> Why did the license checksum change?
> > > > 
> > > > Because the LICENSE file now contains one more entry for nios2, which
> > > > changed the checksum of the whole file. Maybe we should trim the
> > > > checksum to use only the header in the LICENSE file and not the whole
> > > > file to prevent this ?
> > > > 
> > > > This is the change which triggered the change of the checksum:
> > > > 
> > > > +diff --git a/LICENSE b/LICENSE
> > > > +index 3147094..a06fdcc 100644
> > > > +--- a/LICENSE
> > > > ++++ b/LICENSE
> > > > +@@ -45,6 +45,7 @@ compiler.h
> > > > + arch/s390.h
> > > > + uatomic/alpha.h
> > > > + uatomic/mips.h
> > > > ++uatomic/nios2.h
> > > 
> > > I don’t know how the LICENSE file looks like but including file names
> > > in license file is probably worth ignoring in checksums.
> > 
> > See below:
> > 
> > Userspace RCU library licensing
> > Mathieu Desnoyers
> > September 3, 2012
> > 
> > 
> > * LGPLv2.1
> > 
> > The library part is distributed under LGPLv2.1 or later. See lgpl-2.1.txt
> > for license details. Refer to the individual file headers for details.
> > 
> > LGPL-compatible source code can statically use the library header using :
> > 
> > #define _LGPL_SOURCE
> > #include <urcu.h>
> > 
> > Dynamic-only linking with the LGPL library is used if _LGPL_SOURCE is not
> > defined. It permits relinking with newer versions of the library, which
> > is required by the LGPL license.
> > 
> > See lgpl-relicensing.txt for details.
> > 
> > 
> > * MIT-style license :
> > 
> > xchg() primitive has been rewritten from scratch starting from atomic_ops
> > 1.2 which has a MIT-style license that is intended to allow use in both
> > 
> > free and proprietary software:
> >         http://www.hpl.hp.com/research/linux/atomic_ops/LICENSING.txt
> >         http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
> > 
> > This MIT-style license (BSD like) apply to:
> > 
> > uatomic/gcc.h
> > uatomic/unknown.h
> > uatomic/generic.h
> > uatomic/sparc64.h
> > uatomic/arm.h
> > uatomic/ppc.h
> > uatomic/x86.h
> > uatomic.h
> > 
> > MIT/X11 (BSD like) license apply to:
> > 
> > compiler.h
> > arch/s390.h
> > uatomic/alpha.h
> > uatomic/mips.h
> > uatomic/nios2.h
> > uatomic/s390.h
> > system.h
> > 
> > 
> > * GPLv2
> > 
> > Library test code is distributed under the GPLv2 license. See gpl-2.0.txt
> > for license details. See headers of individual files under tests/ for
> > details.
> > 
> > 
> > * GPLv3 (or later)
> > 
> > The following build-related macro is under GPLv3 (or later):
> > 
> > m4/ax_tls.m4
> 
> If you only point to part of this file you are risking missing the addition
> of just about any license to the end of the list on a future upgrade. That
> doesn't sound like a good idea to me.

Hm, ouch. In that case, I guess we should stick with the current situation and
update the license file checksum if needed ?


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2016-02-10 11:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 11:31 [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Marek Vasut
2016-02-09 11:31 ` [PATCH 2/7] binutils: Repair nios2 PLT and GP handling Marek Vasut
2016-02-09 11:57   ` Burton, Ross
2016-02-09 13:08   ` [PATCH V2 " Marek Vasut
2016-02-09 14:21     ` Burton, Ross
2016-02-09 14:29       ` Marek Vasut
2016-02-09 16:00         ` Randy MacLeod
2016-02-09 16:52           ` Marek Vasut
2016-02-09 11:31 ` [PATCH 3/7] dpkg: Update to 1.18.4 Marek Vasut
2016-02-09 11:31 ` [PATCH 4/7] guile: Fix nios2 support Marek Vasut
2016-02-09 11:31 ` [PATCH 5/7] nspr: Add " Marek Vasut
2016-02-09 11:31 ` [PATCH 6/7] liburcu: " Marek Vasut
2016-02-09 11:53   ` Burton, Ross
2016-02-09 12:07     ` Marek Vasut
2016-02-09 13:24       ` Burton, Ross
2016-02-09 17:52       ` Khem Raj
2016-02-09 17:56         ` Marek Vasut
2016-02-10  9:05           ` Paul Eggleton
2016-02-10 11:58             ` Marek Vasut
2016-02-09 11:31 ` [PATCH 7/7] oprofile: " Marek Vasut
2016-02-09 11:51 ` [PATCH 1/7] strace: Fix build for arc, metag, nios2, or1k, tile Burton, Ross
2016-02-09 13:06   ` Marek Vasut
2016-02-09 13:07 ` [PATCH V2 " Marek Vasut

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.