patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Wed Jun 08 15:47:43 2011 +0200 (2011-06-08)
changeset 2508 9e2761e59a75
permissions -rw-r--r--
debug/cross-gdb: check host dependencies

Cross-gdb depends on expat and python. If either is missing, cross-gdb will
build successfully, but lacking some features.

Especially, if expat is missing, cross-gdb will be unable to parse the target
description, which may lead to runtime malfunctions and the following GDB
warning:
"Can not parse XML target description; XML support was disabled at compile time"

Hence, expat should be considered mandatory.

On the other hand, the features missing without python are not critical, so
python should not be considered mandatory.

This patch does the following:
- At configure time, warn the user if either expat or python is missing.
- In menuconfig, disable the static build options regarding cross-gdb if no
static version of expat is available, and disable cross-gdb if expat is
missing.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
[yann.morin.1998@anciens.enib.fr: add comment for impossible static cross-gdb]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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))