Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with
other architectures when we emit IE relocs in a shared library.

	* elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
	emitting initial-exec relocs when not linking an executable.
Fix gdbserver cross build.

The recent libiberty patch caused issues when cross building
gdbserver.  The Makefile ends invoking the build machine's "ar"
instead of the --host version:

  ar  ./libiberty.a \
	    ./regex.o (...)

  ar: illegal option -- .
  Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
	 ar -M [<mri-script]

The libiberty configure script does probe for and finds an appropriate
AR.  However, gdbserver's configure does not probe for AR and
overrides the AR used in the libiberty build by explicitly passing AR
to the sub-builds.

gdb/gdbserver/
2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
	* Makefile.in (AR, AR_FLAGS): Define.
	* configure: Regenerate.
Vectorize gdbserver x86 debug register accessors

This commit makes gdbserver access the x86 debug register accessor
functions via the same function vector as GDB proper.  This removes
a chunk of conditional code that was previously in i386-{nat,low}.h
and leaves a single macro as the only GDB/gdbserver difference in
nat/i386-dregs.c.

gdb/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* i386-nat.h (debug_hw_points): Moved to nat/i386-dregs.c.
	(i386_dr_low_type): Moved to nat/i386-dregs.h.
	(i386_dr_low): Likewise.
	(i386_dr_low_can_set_addr): Moved to nat/i386-dregs.c.
	(i386_dr_low_set_addr): Likewise.
	(i386_dr_low_get_addr): Likewise.
	(i386_dr_low_can_set_control): Likewise.
	(i386_dr_low_set_control): Likewise.
	(i386_dr_low_get_control): Likewise.
	(i386_dr_low_get_status): Likewise.
	(i386_get_debug_register_length): Likewise.
	* nat/i386-dregs.h (i386_dr_low_type): Moved from i386-nat.h.
	(i386_dr_low): Likewise.
	* nat/i386-dregs.c (i386-low.h): Remove include.
	(i386-nat.h): Likewise.
	(nat/i386-dregs.h): New include.
	(i386_dr_low_can_set_addr): Moved from i386-nat.h.
	(i386_dr_low_set_addr): Likewise.
	(i386_dr_low_get_addr): Likewise.
	(i386_dr_low_can_set_control): Likewise.
	(i386_dr_low_set_control): Likewise.
	(i386_dr_low_get_control): Likewise.
	(i386_dr_low_get_status): Likewise.
	(i386_get_debug_register_length): Likewise.
	(debug_hw_points): Likewise.

gdb/gdbserver/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* i386-low.h (i386_dr_low_can_set_addr): Removed.
	(i386_dr_low_set_addr): Likewise.
	(i386_dr_low_get_addr): Likewise.
	(i386_dr_low_can_set_control): Likewise.
	(i386_dr_low_set_control): Likewise.
	(i386_dr_low_get_control): Likewise.
	(i386_dr_low_get_status): Likewise.
	(i386_get_debug_register_length): Likewise.
	* linux-x86-low.c (i386_dr_low_set_addr):
	Changed signature.  Made static.
	(i386_dr_low_get_addr): Likewise.
	(i386_dr_low_set_control): Likewise.
	(i386_dr_low_get_control): Likewise.
	(i386_dr_low_get_status): Likewise.
	(i386_dr_low): New global variable.
	* win32-i386-low.c (i386_dr_low_set_addr):
	Changed signature.  Made static.
	(i386_dr_low_get_addr): Likewise.
	(i386_dr_low_set_control): Likewise.
	(i386_dr_low_get_control): Likewise.
	(i386_dr_low_get_status): Likewise.
	(i386_dr_low): New global variable.
Move shared native target specific code to gdb/nat

https://sourceware.org/gdb/wiki/Common describes the following
directory structure:

 gdb/nat/
   Native target backend files. Code that interfaces with the
   host debug API. E.g., ptrace code, Windows debug API code,
   procfs code should go here.

 gdb/target/
   Host-independent, target vector specific code (target_ops).

 gdb/common/
   All other shared code.

This commit moves all native target backend files currently in
gdb/common to gdb/nat.

gdb/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* common/gdb_thread_db.h: Moved to nat.  All includes updated.
	* common/glibc_thread_db.h: Likewise.
	* common/i386-cpuid.h: Likewise.
	* common/i386-gcc-cpuid.h: Likewise.
	* common/linux-btrace.h: Likewise.
	* common/linux-osdata.h: Likewise.
	* common/linux-procfs.h: Likewise.
	* common/linux-ptrace.h: Likewise.
	* common/mips-linux-watch.h: Likewise.
	* common/linux-btrace.c: Moved to nat.
	* common/linux-osdata.c: Likewise.
	* common/linux-procfs.c: Likewise.
	* common/linux-ptrace.c: Likewise.
	* common/mips-linux-watch.c: Likewise.
	* nat/gdb_thread_db.h: Moved from common.
	* nat/glibc_thread_db.h: Likewise.
	* nat/i386-cpuid.h: Likewise.
	* nat/i386-gcc-cpuid.h: Likewise.
	* nat/linux-btrace.c: Likewise.
	* nat/linux-btrace.h: Likewise.
	* nat/linux-osdata.c: Likewise.
	* nat/linux-osdata.h: Likewise.
	* nat/linux-procfs.c: Likewise.
	* nat/linux-procfs.h: Likewise.
	* nat/linux-ptrace.c: Likewise.
	* nat/linux-ptrace.h: Likewise.
	* nat/mips-linux-watch.c: Likewise.
	* nat/mips-linux-watch.h: Likewise.
	* Makefile.in (HFILES_NO_SRCDIR): Reflect new locations.
	(object file files): Reordered.
	* gdb/copyright.py (EXCLUDE_LIST): Reflect new location
	of glibc_thread_db.h.

gdb/gdbserver/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* Makefile.in (SFILES): Update locations for files moved
	from common to nat.
	(object file files): Reordered.

gdb/testsuite/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* gdb.arch/i386-avx.exp: Fix include file location.
	* gdb.arch/i386-sse.exp: Likewise.
Fix mingw32 build on x86-64 RHEL 6.5

This commit fixes the mingw32 build on x86-64 RHEL 6.5.

gdb/gdbserver/
2014-06-20  Gary Benson  <gbenson@redhat.com>

	* configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
	* configure: Regenerated.
	* config.in: Likewise.
make obstack object allocators more type-safe

This changes OBSTACK_ZALLOC and OBSTACK_CALLOC to cast their value to
the correct type.  This is more type-safe and also is more in line
with the other object-allocation macros in libiberty.h.

Making this change revealed one trivial error in dwarf2read.c.
On the whole that seems pretty good to me.

Tested by rebuilding.

2014-06-20  Tom Tromey  <tromey@redhat.com>

	* dwarf2read.c (dw2_get_real_path): Use correct type in
	OBSTACK_CALLOC.
	* gdb_obstack.h (OBSTACK_ZALLOC, OBSTACK_CALLOC): Cast result.
Fix --with-system-readline with readline-6.3 patch 5

I have filed now:
	--with-system-readline uses bundled readline include files
	https://sourceware.org/bugzilla/show_bug.cgi?id=17077

To see any effect of the patch below you have to do:
	rm -rf readline
Otherwise readline include files get used the bundled ones from GDB which are
currently 6.2 while system readline may be 6.3 already.

You also have to use system readline-6.3 including its upstream patch:
	[Bug-readline] Readline-6.3 Official Patch 5
	http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html
	Message-ID: <140415125618.AA57598.SM@caleb.ins.cwru.edu>

In short it happens on Fedora Rawhide since:
	readline-6.3-1.fc21
	https://koji.fedoraproject.org/koji/buildinfo?buildID=538941

The error is:
	../../gdb/tui/tui-io.c:132:1: error: 'Function' is deprecated [-Werror=deprecated-declarations]
	 static Function *tui_old_rl_getc_function;
	 ^
	../../gdb/tui/tui-io.c:133:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
	 static VFunction *tui_old_rl_redisplay_function;
	 ^
	../../gdb/tui/tui-io.c:134:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
	 static VFunction *tui_old_rl_prep_terminal;
	 ^
	../../gdb/tui/tui-io.c:135:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
	 static VFunction *tui_old_rl_deprep_terminal;
	 ^

It is since bash change:
lib/readline/rltypedefs.h
       - remove old Function/VFunction/CPFunction/CPPFunction typedefs as
	 suggested by Tom Tromey <tromey@redhat.com>

The new typedefs used below are present in readline/rltypedefs.h since:
	git://git.savannah.gnu.org/bash.git
	commit 28ef6c316f1aff914bb95ac09787a3c83c1815fd
	Date:   Fri Apr 6 19:14:31 2001 +0000

gdb/
2014-06-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix --with-system-readline with readline-6.3 patch 5.
	* tui/tui-io.c (tui_old_rl_getc_function, tui_old_rl_redisplay_function)
	(tui_old_rl_prep_terminal, tui_old_rl_deprep_terminal): Use rl_*_t
	types.

Message-ID: <20140620105004.GA22236@host2.jankratochvil.net>
Fix fallout from 6d00b590

	* targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
	a number of targets.
daily update