Define _STRING_ARCH_unaligned unconditionally

This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h
header to avoid undefined compiler warnings on platforms that do not
define it.  It also make adjustments in code where tests checked if macro
existed or not.
Save/restore bound registers in _dl_runtime_resolve

This patch saves and restores bound registers in symbol lookup for x86-64:

1. Branches without BND prefix clear bound registers.
2. x86-64 pass bounds in bound registers as specified in MPX psABI
extension on hjl/mpx/master branch at

https://github.com/hjl-tools/x86-64-psABI
https://groups.google.com/forum/#!topic/x86-64-abi/KFsB0XTgWYc

Binutils has been updated to create an alternate PLT to add BND prefix
when branching to ld.so.

	* config.h.in (HAVE_MPX_SUPPORT): New #undef.
	* sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT.
	* sysdeps/x86_64/configure: Regenerated.
	* sysdeps/x86_64/dl-trampoline.S (REGISTER_SAVE_AREA): New
	macro.
	(REGISTER_SAVE_RAX): Likewise.
	(REGISTER_SAVE_RCX): Likewise.
	(REGISTER_SAVE_RDX): Likewise.
	(REGISTER_SAVE_RSI): Likewise.
	(REGISTER_SAVE_RDI): Likewise.
	(REGISTER_SAVE_R8): Likewise.
	(REGISTER_SAVE_R9): Likewise.
	(REGISTER_SAVE_BND0): Likewise.
	(REGISTER_SAVE_BND1): Likewise.
	(REGISTER_SAVE_BND2): Likewise.
	(_dl_runtime_resolve): Use them.  Save and restore Intel MPX
	bound registers when calling _dl_fixup.
benchtests: Add pthread_once common-case test.

We have a single thread that runs a no-op initialization once and then
repeatedly runs checks of the initialization (i.e., an acquire load and
conditional jump) in a tight loop.  This gives us, on average, the
best-case latency of pthread_once (the initialization is the
exactly-once slow path, and we're not looking at initialization-related
synchronization overheads in this case).
malloc: Fix MALLOC_DEBUG -Wundef warning

MALLOC_DEBUG is set optionally on the command line. Default the value
to zero if it is not set on the command line, and test its value
with #if rather than #ifdef. Verified the code is identical before
and after this change apart from line numbers.

ChangeLog:

2014-04-11  Will Newton  <will.newton@linaro.org>

	* malloc/malloc.c [!MALLOC_DEBUG]: #define MALLOC_DEBUG
	to zero if it is not defined elsewhere.  (mtrim): Test
	the value of MALLOC_DEBUG with #if rather than #ifdef.
Fix typo in comment in res_query.c
NEWS: Add comment about changed ABI on s390 and s390x.
S/390: Unify 31 and 64 bit configure.ac
Fixed and unified pthread_once.

[BZ #15215] This unifies various pthread_once architecture-specific
implementations which were using the same algorithm with slightly different
implementations.  It also adds missing memory barriers that are required for
correctness.
benchtests: Improve readability of JSON output

Add a small library to print JSON values and use it to improve the
readability of the benchmark output and the readability of the
benchmark code.

ChangeLog:

2014-04-11  Will Newton  <will.newton@linaro.org>

	* benchtests/Makefile (extra-objs): Add json-lib.o.
	(bench-func): Tidy up JSON output.
	* benchtests/bench-skeleton.c: Include json-lib.h.
	(main): Use JSON library functions to do output of
	benchmark results.
	* benchtests/bench-timing-type.c (main): Output the
	timing type simply, leaving formatting to the user.
	* benchtests/json-lib.c: New file.
	* benchtests/json-lib.h: Likewise.
2014-04-11  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* elf/Makefile (tests): make tst-dlopen-aout conditional on
	enable-hardcoded-path-in-tests
math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.

This fixes a testsuite failure for tile (and possibly microblaze).
Fix typo on ChangeLog.
Fix qsort argument order in collation example
Regenerate sparc ULPs.

	* sysdeps/sparc/fpu/libm-test-ulps: Update.
nscd: Make SELinux checks dynamic.

The SELinux team has indicated to me that glibc's SELinux checks
in nscd are not being carried out as they would expect the API
to be used today. They would like to move away from static header
defines for class and permissions and instead use dynamic checks
at runtime that provide an answer which is dependent on the runtime
status of SELinux i.e. more dynamic.

The following patch is a minimal change that moves us forward in
this direction.

It does the following:

* Stop checking for SELinux headers that define NSCD__SHMEMHOST.
  Check only for the presence or absence of the library.

* Don't encode the specific SELinux permission constants into a
  table at build time, and instead use the symbolic name for the
  permission as expected.

* Lookup the "What do we do if we don't know this permission?"
  policy and use that if we find SELinux's policy is older than
  the glibc policy e.g. we make a request for a permission that
  SELinux doesn't know about.

* Lastly, translate the class and permission and then make
  the permission check. This is done every time we lookup
  a permission, and this is the expected way to use the API.
  SELinux will optimize this for us, and we expect the network
  latencies to hide these extra library calls.

Tested on x86, x86-64, and via Fedora Rawhide since November 2013.

See:
https://sourceware.org/ml/libc-alpha/2014-04/msg00179.html
Support _r_debug for static binaries.

We initialize _r_debug for static binaries to allows debug
agents to treat static binaries a little more like dyanmic
ones. This simplifies the work a debug agent has to do to
access TLS in a static binary via libthread_db.

Tested on x86_64.

See:
https://sourceware.org/ml/libc-alpha/2014-04/msg00183.html

	[BZ #16831]
	* csu/libc-start.c (LIBC_START_MAIN) [!SHARED]: Call
	_dl_debug_initialize.
benchtests: Link against objects in build directory

Using -lm and -lpthread results in the shared objects in the system
being used to link against.  This happened to work for libm because
there haven't been any changes to the libm ABI recently that could
break the existing benchmarks.  This doesn't always work for the
pthread benchmarks.  The correct way to build against libraries in the
build directory is to have the binaries explicitly depend on them so
that $(+link) can pick them up.
Correct IBM long double frexpl.

Besides fixing the bugzilla, this also fixes corner-cases where the high
and low double differ greatly in magnitude, and handles a denormal
input without resorting to a fp rescale.

	[BZ #16740]
	[BZ #16619]
	* sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Rewrite.
	* math/libm-test.inc (frexp_test_data): Add tests.
Update fixed bug list
[BZ #16824] Fix failing y1 due to too large ulps in downward/upward rounding mode.