patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
author Titus von Boxberg <titus@v9g.de>
Mon Aug 22 09:41:35 2011 +0200 (2011-08-22)
branch1.12
changeset 2636 d53c6d529923
permissions -rw-r--r--
configure: fix --with-prog=[...]

check_for didn't set variable 'where' when the path to a prog
was passed manually "(cached)".

Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
(transplanted from b1be254591e7b524a0b06a2247a9331ebe0faf1d)
     1 Don't generate RPATH if we're going to be generating RUNPATH.
     2 
     3 need to ponder what ramifications this has before enabling it
     4 
     5 --- binutils/bfd/elflink.c
     6 +++ binutils/bfd/elflink.c
     7 @@ -5382,11 +5382,15 @@
     8  
     9  	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
    10  				      TRUE);
    11 -	  if (indx == (bfd_size_type) -1
    12 -	      || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
    13 +	  if (indx == (bfd_size_type) -1)
    14  	    return FALSE;
    15  
    16 -	  if  (info->new_dtags)
    17 +	  if (!info->new_dtags)
    18 +	    {
    19 +	      if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
    20 +		return FALSE;
    21 +	    }
    22 +	  else
    23  	    {
    24  	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
    25  	      if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))