elfutils: remove LOCAL_GCC

Test Plan: verified

Reviewers: randall.rushing, jriordan001

Differential Revision: http://review.codefirex.com/D295
Don't rely on gcc extensions

Summary:
Un-nest nested functions, don't mix ANSI and K&R declarations
This allows elfutils to compile with both gcc (tested 4.7 and
4.8) and clang (tested 3.4).

Change-Id: I584b355f25823182491b8e0fc89b7de9a07036c0
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Test Plan: verified

Reviewers: randall.rushing

Differential Revision: http://review.codefirex.com/D296
Add workaround for clang compiler bug

Summary:
Use -g0 as a workaround for clang bug #18201.
This should be reverted as soon as clang is fixed.

Change-Id: I823f05b13580a9e2f8dedac03cecbeadcb9447b8
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Test Plan: verified

Reviewers: randall.rushing

Differential Revision: http://review.codefirex.com/D297
Don't use __thread when building with clang

Trying to use __thread with clang currently results in undefined
references to __aeabi_read_tp.

Change-Id: Iff2fd8617089abeec7e157caffd4e50c4e64f8c9
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	0.153/libdw/dwarf_error.c
	0.153/libdwfl/dwfl_error.c
	0.153/libelf/elf_error.c