ARM: Don't define _SYS_AUXV_H in sysdep.h

sysdep.h was defining _SYS_AUXV_H in order to avoid an include guard check
in hwcap.h. Unfortunately it didn't undefine it so it could leak out into
code and caused a build failure with -Wimplicit-function-declaration
building tst-auxv on ARM.

ChangeLog:

2014-09-23  Will Newton  <will.newton@linaro.org>

	* sysdeps/unix/sysv/linux/arm/bits/hwcap.h: Check for
	_LINUX_ARM_SYSDEP_H include guard too.
	* sysdeps/unix/sysv/linux/arm/sysdep.h (_SYS_AUXV_H): Remove
	define.
Move some setrlimit definitions to syscalls.list (bug 14138).

Bug 14138 is followup cleanup after removal of support for old Linux
kernel versions: moving syscalls to syscalls.list where the only
reason for using C definitions was kernel version conditionals that
are no longer present.

This patch deals with the case of setrlimit
(sysdeps/unix/sysv/linux/i386/setrlimit.c, included by various other
architectures).  Where needed (where there is also a compat symbol for
setrlimit@GLIBC_2.0), new syscalls.list entries are added.  Where not
needed (where there is no such compat symbol and the minimum symbol
version for libc is 2.2 or later), no such entries are added as that
in sysdeps/unix/syscalls.list will suffice.  Thus arm and sh need no
such entries, while m68k and powerpc need entries only in a
subdirectory syscalls.list file rather than for all configurations
that previously used setrlimit.c.

(setrlimit@@GLIBC_2.2 and setrlimit@GLIBC_2.0 are now semantically
identical - the new symbol version was about a change of types from
signed to unsigned and the former compatibility code for dealing with
large unsigned arguments on old kernels is no longer needed or
present, having been removed with support for pre-2.4 kernels.
However, making the two versions into aliases doesn't work at present:
the case of having both default and non-default symbol versions on the
same syscalls.list line results in a compat_symbol call in code built
for static libc, which doesn't compile.  I don't suppose it would be
hard to generate SHARED conditionals from make-syscalls.sh to fix
this, but in any case this patch doesn't make things any worse, as the
functions weren't aliases before the patch either.)

Tested for x86, and ran ABI tests for ARM as an example of an
architecture where the setrlimit.c file was just removed without
adding syscalls.list entries.

	[BZ #14138]
	* sysdeps/unix/sysv/linux/arm/setrlimit.c: Remove file.
	* sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/setrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/setrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/setrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/sh/setrlimit.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/syscalls.list (setrlimit): Add
	syscall entry for GLIBC_2.2 symbol version.
	* sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list (setrlimit):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
	(setrlimit): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (setrlimit):
	Likewise.
Clean up gnu/lib-names.h generation (bug 14171).

This patch eliminates the mixture of SONAME information in
shlib-versions files and SONAME information used to generate
gnu/lib-names.h in makefiles, with the information in the makefiles
being removed so all this information comes from the shlib-versions
files.

So that gnu/lib-names.h supports multiple ABIs, it is changed to be
generated on the same basis as gnu/stubs.h: when there are multiple
ABIs, gnu/lib-names.h is a wrapper header (the same header installed
whatever ABI is being built) and separate headers such as
gnu/lib-names-64.h contain the substantive contents (only one such
header being installed by any glibc build).

The rules for building gnu/lib-names.h were moved from Makeconfig to
Makerules because they need to come after sysdeps makefiles are
included (now that "ifndef abi-variants" is a toplevel conditional on
the rules rather than $(abi-variants) being evaluated later inside the
commands for a rule).

Tested for x86_64 and x86 that the installed shared libraries are
unchanged by this patch, and examined the installed gnu/lib-names*.h
headers by hand.  Also tested the case of a single ABI (where there is
just a single header installed, again like stubs.h) by hacking
abi-variants to empty for x86_64.

	[BZ #14171]
	* Makeconfig [$(build-shared) = yes]
	($(common-objpfx)soversions.mk): Don't handle SONAMEs specified in
	makefiles.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	($(common-objpfx)gnu/lib-names.h): Remove rule.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	($(common-objpfx)gnu/lib-names.stmp): Likewise.  Split and moved
	to Makerules.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	(before-compile): Don't append $(common-objpfx)gnu/lib-names.h
	here.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	(common-generated): Don't append gnu/lib-names.h and
	gnu/lib-names.stmp here.
	* Makerules [$(build-shared) = yes && $(soversions.mk-done) = t]
	(lib-names-h-abi): New variable.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	(lib-names-stmp-abi): Likewise.
	[$(build-shared) = yes && $(soversions.mk-done) = t &&
	abi-variants] (before-compile): Append
	$(common-objpfx)$(lib-names-h-abi).
	[$(build-shared) = yes && $(soversions.mk-done) = t &&
	abi-variants] (common-generated): Append gnu/lib-names.h.
	[$(build-shared) = yes && $(soversions.mk-done) = t &&
	abi-variants] (install-others-nosubdir): Depend on
	$(inst_includedir)/$(lib-names-h-abi).
	[$(build-shared) = yes && $(soversions.mk-done) = t &&
	abi-variants] ($(common-objpfx)gnu/lib-names.h): New rule.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	($(common-objpfx)$(lib-names-h-abi)): New rule.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	($(common-objpfx)$(lib-names-stmp-abi)): Likewise.
	[$(build-shared) = yes && $(soversions.mk-done) = t]
	(common-generated): Append $(lib-names-h-abi) and
	$(lib-names-stmp-abi).
	* scripts/lib-names.awk: Do not handle multi being set.
	* sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64-ld-soname):
	Remove variable.
	(abi-lp64_be-ld-soname): Likewise.
	* sysdeps/unix/sysv/linux/arm/Makefile (abi-soft-ld-soname):
	Likewise.
	(abi-hard-ld-soname): Likewise.
	* sysdeps/unix/sysv/linux/i386/shlib-versions: New file.
	* sysdeps/unix/sysv/linux/mips/Makefile (abi-o32_soft-ld-soname):
	Remove variable.
	(abi-o32_hard-ld-soname): Likewise.
	(abi-o32_soft_2008-ld-soname): Likewise.
	(abi-o32_hard_2008-ld-soname): Likewise.
	(abi-n32_soft-ld-soname): Likewise.
	(abi-n32_hard-ld-soname): Likewise.
	(abi-n32_soft_2008-ld-soname): Likewise.
	(abi-n32_hard_2008-ld-soname): Likewise.
	(abi-n64_soft-ld-soname): Likewise.
	(abi-n64_hard-ld-soname): Likewise.
	(abi-n64_soft_2008-ld-soname): Likewise.
	(abi-n64_hard_2008-ld-soname): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/Makefile (abi-64-v1-ld-soname):
	Likewise.
	(abi-64-v2-ld-soname): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Add
	ld.so entries.
	* sysdeps/unix/sysv/linux/s390/Makefile (abi-64-ld-soname): Remove
	variable.
	* sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Add ld.so
	entry.
	* sysdeps/unix/sysv/linux/x86/Makefile (abi-32-ld-soname): Remove
	variable.
	(abi-64-ld-soname): Likewise.
	(abi-x32-ld-soname): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Add ld.so
	entry.
	* sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
Remove shlib-versions entries redundant with DEFAULT entries.

When a shlib-versions file has a DEFAULT line, it's not necessary to
specify the same default minimum symbol version on the lines for
individual libraries.  If those lines otherwise duplicate the default
SONAME for the library in question, they can be removed completely.

This patch makes such cleanups: version entries for ld.so are removed
(leaving just the definition of the architecture-specific dynamic
linker name) and entries for libpthread are removed completely (since
the default is libpthread.so.0).

Tested for x86_64 that the installed shared libraries are unchanged by
this patch.

There are various architectures (hppa, ia64, mips, sh, sparc64) that
define minimum symbol versions (or in the case of mips, omission of
symbol versions) only for particular libraries without a DEFAULT line.
None of these are equivalent to something simpler with a DEFAULT line
because all have some other libraries, not explicitly mentioned, with
symbol versions that would be omitted were such a line used.  In the
mips case I'm pretty sure it was a mistake not to omit the 2.1 symbols
for libthread_db; for the others I don't know if it was a mistake or
deliberate that some symbols in various libraries have 2.0 or 2.1
versions despite other libraries having a 2.2 minimum.

This concludes the shlib-versions cleanups I'm aware of.

	* sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Do not
	specify symbol version for ld.so.  Do not include entry for
	libpthread.
	* sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.