patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
author Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed Apr 07 09:18:20 2010 +0200 (2010-04-07)
changeset 1910 207ad430c254
permissions -rw-r--r--
Add basic support for the Blackfin architecture

For uClibc, the name of the Blackfin architecture is 'bfin'. Actually,
the naming of the architecture is quite messy: for toolchain tuples
and uClibc, it's bfin, but for the kernel, it's blackfin. We've
arbitraly choosen to name it "blackfin" in Crosstool-NG.

Add Blackfin-related uClibc patch to fix a build failure related to
fork() being used in unistd/daemon.c.

Yann E. MORIN:
Apply the patch to the kernel/linux build script to use 'linux'
in the noMMU tuples. See:
http://sourceware.org/ml/crossgcc/2010-04/msg00010.html
yann@1614
     1
Don't generate RPATH if we're going to be generating RUNPATH.
yann@1614
     2
yann@1614
     3
need to ponder what ramifications this has before enabling it
yann@1614
     4
yann@1614
     5
--- binutils/bfd/elflink.c
yann@1614
     6
+++ binutils/bfd/elflink.c
yann@1614
     7
@@ -5382,11 +5382,15 @@
yann@1614
     8
 
yann@1614
     9
 	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
yann@1614
    10
 				      TRUE);
yann@1614
    11
-	  if (indx == (bfd_size_type) -1
yann@1614
    12
-	      || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
yann@1614
    13
+	  if (indx == (bfd_size_type) -1)
yann@1614
    14
 	    return FALSE;
yann@1614
    15
 
yann@1614
    16
-	  if  (info->new_dtags)
yann@1614
    17
+	  if (!info->new_dtags)
yann@1614
    18
+	    {
yann@1614
    19
+	      if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
yann@1614
    20
+		return FALSE;
yann@1614
    21
+	    }
yann@1614
    22
+	  else
yann@1614
    23
 	    {
yann@1614
    24
 	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
yann@1614
    25
 	      if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))