[oe-commits] Khem Raj : binutils_git.bb: Fix building target binutils build for SH4/ uclibc

git version control git at git.openembedded.org
Fri Nov 26 00:13:19 UTC 2010


Module: openembedded.git
Branch: release-2010.12
Commit: 8d893d2e962781a561687cd06d397a2e0eafae6a
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=8d893d2e962781a561687cd06d397a2e0eafae6a

Author: Khem Raj <raj.khem at gmail.com>
Date:   Thu Nov 25 16:10:30 2010 -0800

binutils_git.bb: Fix building target binutils build for SH4/uclibc

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../binutils-git/fix-clone-conflicts.patch         |   72 ++++++++++++++++++++
 recipes/binutils/binutils_git.bb                   |    5 +-
 2 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/recipes/binutils/binutils-git/fix-clone-conflicts.patch b/recipes/binutils/binutils-git/fix-clone-conflicts.patch
new file mode 100644
index 0000000..5491e26
--- /dev/null
+++ b/recipes/binutils/binutils-git/fix-clone-conflicts.patch
@@ -0,0 +1,72 @@
+Fixes the following error for SH4 native binutils
+
+/scratch/oe/work/sh4-oe-linux-uclibc/binutils-git-r13.2+gitr0+6ef128735ce52ee2acf8cfd80f6d72003dd39ab7/git/gas/config/obj-elf.c:744: error: declaration of 'clone' shadows a global declaration/scratch/oe/sysroots/sh4-oe-linux-uclibc/usr/include/bits/sched.h:74: error: shadowed declaration is here/scratch/oe/work/sh4-oe-linux-uclibc/binutils-git-r13.2+gitr0+6ef128735ce52ee2acf8cfd80f6d72003dd39ab7/git/gas/config/obj-elf.c: In function 'obj_elf_section':/scratch/oe/work/sh4-oe-linux-uclibc/binutils-git-r13.2+gitr0+6ef128735ce52ee2acf8cfd80f6d72003dd39ab7/git/gas/config/obj-elf.c:981: error: declaration of 'clone' shadows a global declaration/scratch/oe/sysroots/sh4-oe-linux-uclibc/usr/include/bits/sched.h:74: error: shadowed declaration is heremake[4]: *** [obj-elf.o] Error 1
+
+-Khem
+
+Index: git/gas/config/obj-elf.c
+===================================================================
+--- git.orig/gas/config/obj-elf.c
++++ git/gas/config/obj-elf.c
+@@ -741,10 +741,10 @@ obj_elf_change_section (const char *name
+ }
+ 
+ static bfd_vma
+-obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *clone)
++obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *duplicate)
+ {
+   bfd_vma attr = 0;
+-  *clone = FALSE;
++  *duplicate = FALSE;
+ 
+   while (len > 0)
+     {
+@@ -775,7 +775,7 @@ obj_elf_parse_section_letters (char *str
+ 	  attr |= SHF_TLS;
+ 	  break;
+ 	case '?':
+-	  *clone = TRUE;
++	  *duplicate = TRUE;
+ 	  break;
+ 	/* Compatibility.  */
+ 	case 'm':
+@@ -978,7 +978,7 @@ obj_elf_section (int push)
+ 
+       if (*input_line_pointer == '"')
+ 	{
+-	  bfd_boolean clone;
++	  bfd_boolean duplicate;
+ 
+ 	  beg = demand_copy_C_string (&dummy);
+ 	  if (beg == NULL)
+@@ -986,7 +986,7 @@ obj_elf_section (int push)
+ 	      ignore_rest_of_line ();
+ 	      return;
+ 	    }
+-	  attr |= obj_elf_parse_section_letters (beg, strlen (beg), &clone);
++	  attr |= obj_elf_parse_section_letters (beg, strlen (beg), &duplicate);
+ 
+ 	  SKIP_WHITESPACE ();
+ 	  if (*input_line_pointer == ',')
+@@ -1038,10 +1038,10 @@ obj_elf_section (int push)
+ 	      attr &= ~SHF_MERGE;
+ 	    }
+ 
+-	  if ((attr & SHF_GROUP) != 0 && clone)
++	  if ((attr & SHF_GROUP) != 0 && duplicate)
+ 	    {
+ 	      as_warn (_("? section flag ignored with G present"));
+-	      clone = FALSE;
++	      duplicate = FALSE;
+ 	    }
+ 	  if ((attr & SHF_GROUP) != 0 && *input_line_pointer == ',')
+ 	    {
+@@ -1063,7 +1063,7 @@ obj_elf_section (int push)
+ 	      attr &= ~SHF_GROUP;
+ 	    }
+ 
+-	  if (clone)
++	  if (duplicate)
+ 	    {
+ 	      const char *now_group = elf_group_name (now_seg);
+ 	      if (now_group != NULL)
diff --git a/recipes/binutils/binutils_git.bb b/recipes/binutils/binutils_git.bb
index bf94849..26583bb 100644
--- a/recipes/binutils/binutils_git.bb
+++ b/recipes/binutils/binutils_git.bb
@@ -1,7 +1,7 @@
 FILESPATHPKG =. "binutils-git:"
-SRCREV = "6ef128735ce52ee2acf8cfd80f6d72003dd39ab7"
+SRCREV = "63afe4ed46b5b8c21445192c9046d1c3de2859ec"
 require binutils.inc
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 PR_append = "+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
@@ -12,4 +12,5 @@ SRC_URI = "git://sources.redhat.com/git/binutils.git;branch=binutils-2_21-branch
      file://binutils-uclibc-300-006_better_file_error.patch \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
      file://binutils-uclibc-gas-needs-libm.patch \
+     file://fix-clone-conflicts.patch \
      "





More information about the Openembedded-commits mailing list