src-release.sh: Convert src-release to a shell script

This began as an attempt to make a few small changes to src-release
but heeding the comments at the top of the file it seemed it might be
wise to convert it to a shell script instead which should hopefully
be more maintainable.

This shell script contains most of the functionality of the Makefile
version. It can be run like this:

  # This will build gdb and compress with bzip2, gzip and xz
  ./src-release.sh -bgx gdb

The functionality that has been removed is building tarballs for insight
and gnats, which were broken in the current repository layout and
gas+binutils which amounted to basically the same thing as binutils so
didn't seem worth keeping. The script always builds a tar file,
compression is optional, so no need for specific commands to build tar
files rather than compressed tar files.

The build of gas releases has been fixed, as has extraction of version
numbers which had been broken since the switch to configure.ac files
and AC_INIT.

I also removed the code for distcleaning the intl sub-directory as it
seems like that issue has been fixed.

The script is capable of compressing with bzip2, gzip and xz which
should cover all formats available on gnu.org.

I tested it by producing release tarballs which are substantially
identical to the ones produced by the src-release script.

ChangeLog:

2014-08-27  Will Newton  <will.newton@linaro.org>

	* src-release.sh: New file.
	* src-release: Remove file.
Don't attach dynamic sections to input from ld --just-symbols

bfd/

	PR ld/17313
	* elflink.c (elf_link_add_object_symbols): Don't attach dynamic
	sections to input from ld --just-symbols.

2014-08-27  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/17313
	* ld-i386/i386.exp (i386tests): Add tests for PR ld/17313.
	* ld-x86-64/x86-64.exp (x86_64tests): Likewise.
Use bfd_is_abs_section to check discarded input section

bfd/

	PR ld/17306
	* elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
	to check discarded input section.
	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.

ld/testsuite/

	PR ld/17306
	* ld-i386/i386.exp (i386tests): Add tests for PR ld/17306.
	* ld-x86-64/x86-64.exp (x86_64tests): Likewise.

	* ld-i386/pr17306a.s: New file.
	* ld-i386/pr17306b.s: Likewise.
	* ld-x86-64/pr17306a.s: Likewise.
	* ld-x86-64/pr17306b.s: Likewise.
lib/gdb.exp (gdb_compile_shlib): Add support for clang.

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_compile_shlib): Add support for clang.
Fix terminal state corruption when starting a program from within TUI

The TUI terminal state becomes corrupted (e.g. key sequences such as
Alt_F and Alt_B no longer work) when one attaches to an inferior process
(via "run" or "attach") from within TUI.  This terminal corruption
remains until you switch out of TUI mode.

This happens because the terminal state is not properly saved when
switching to and out from TUI mode.  Although the functions tui_enable()
and tui_disable() both call the function target_terminal_save_ours() to
save the terminal state, this function is a no-op unless GDB has already
attached to an inferior process.  This is because only the "native"
target has a useful implementation of target_terminal_save_ours()
(namely child_terminal_save_ours()) and we only have the "native" target
in our target vector if GDB has already attached to an inferior process.

So without an inferior process, switching to and from TUI mode does not
actually save the terminal state.  Therefore when you attach to an
inferior process from within TUI mode, the proper terminal state is not
restored (after swapping from the inferior's terminal back to the GDB
terminal).

To fix this we just have to ensure that the terminal state is always
being properly saved when switching from and to TUI mode.  To achieve
this, this patch removes the polymorphic function
target_terminal_save_ours() and replaces it with a regular function
gdb_save_tty_state() that always saves the terminal state.

Tested on x86_64-unknown-linux-gnu by running "make check", no new
regressions.

gdb/ChangeLog:
	* target.h (struct target_ops::to_terminal_save_ours): Remove
	declaration.
	(target_terminal_save_ours): Remove macro.
	* target-delegates.c: Regenerate.
	* inf-child.c (inf_child_target): Don't set the nonexistent
	field to_terminal_save_ours.
	* inferior.h (child_terminal_save_ours): Remove declaration.
	* terminal.h (gdb_save_tty_state): New declaration.
	* inflow.c (child_terminal_save_ours): Rename to ...
	(gdb_save_tty_state): ... this.
	* tui/tui.c: Include terminal.h.
	(tui_enable): Use gdb_save_tty_state instead of
	target_terminal_save_ours.
	(tui_disable): Likewise.
Adding last commit's ChangeLog entry.
dwarf2read.c (dwarf_record_line): Fix typo.

gdb/ChangeLog:

  * dwarf2read.c (dwarf_record_line): Fix typo.
psim: Correct spelling in comments.

2014-08-27  Joel Sherrill <joel.sherrill@oarcorp.com>

	* basics.h, device.c, device.h, hw_htab.c, hw_memory.c:
	Correct spelling in comments.
daily update
Remove dwarf_decode_lines argumewant_line_info

Hi,
dwarf_decode_lines is called in two functions,
dwarf2_build_include_psymtabs and handle_DW_AT_stmt_list, in which, 1
is passed to argument 'want_line_info' and 'want_line_info' is a
conditional variable in dwarf_decode_lines.  We can simplify it by
removing 'want_line_info' and propagating the constant 1 into
dwarf_decode_lines.  This is what this patch does.  This patch also
remove one line comment about WANT_LINE_INFO in
handle_DW_AT_stmt_list, as handle_DW_AT_stmt_list doesn't have such
argument.

gdb:

2014-08-28  Yao Qi  <yao@codesourcery.com>

	* dwarf2read.c (dwarf_decode_lines): Update declaration.
	(handle_DW_AT_stmt_list): Remove comment about WANT_LINE_INFO.
	(dwarf_decode_lines): Remove argument
	want_line_info.  Remove condition check on want_line_info.
	Callers update.