Use GCC's __attribute__((const)) to reduce code size

__attribute__((const)) is mainly intended for the compiler to optimize
away repeated calls to a function that the compiler knows will return
the same value repeatedly.

By adding __attribute__((const)), the compiler can choose to call the
function just once and cache the return value.  Therefore, this yields
code size reduction.

Here are the reference results by arm-eabi-size for crespo device:

[before]
   text    data     bss     dec     hex filename
 267715   10132   45948  323795   4f0d3

[after]
   text    data     bss     dec     hex filename
 267387   10132   45948  323467   4ef8b

Change-Id: I1d80465c0f88158449702d4dc6398a130eb77195
getopt(): fix missing carriage return on bad parameters

This affect all command line tools which show the usage on stdout
after an invalid parameter error (printed on stderr)

Change-Id: I8e2cb3fda241ab989dc42055f15082f8b3ba1397
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
headers: Unbreak some ARM syscalls

Restore the outside-kernel exclusion for some syscalls that was
removed by change I959b64280e184655ef8c713aa79f9e23cb1f7df4,
since these syscalls are used elsewhere.

Change-Id: I5b5bf3d78edd137e820d25281a375966b6c009ec
armv6: REX routines are currently broken, use alternatives

Change-Id: I7ac05ab6add7802a4cc24fe36f7181e7cdfe07e0
libc: krait: Use performance version of memcpy.

Change-Id: I47d25d1da5b1a96bbc1b60f8acdaa31721a68e73
libc: krait: Use performance version of bcopy and memmove

Change-Id: I587085aeb0c30ceccaa3f420594a194b129632b5
libc: krait: Restore prior version of strcmp.

Change-Id: I8ddcdb4d3a905dd746985435dcdb525ab5a1c947
libc/arm: add cortex-a8 cpu variant

Change-Id: I30e8dd6d4b2e7889aea8f5ed21182a5941bfb489
bionic: Add workarounds for current compilers

With current compilers, we're getting "this function cannot be inlined"
errors on vsnprintf and strlcpy because the always_inline attribute is
set.

Before marking this a "fix" instead of a "workaround", we should figure
out why the functions can't be inlined.

PatchSet 2: Set the topic to linaro.
This is needed to build with AOSP's GCC 4.7.

Change-Id: Id6c5464defafb3f9044c102d32a57e70d760b05d
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	libc/include/sys/cdefs.h
Merge remote-tracking branch 'cm/cm-10.2' into HEAD
Revert "bionic: Add workarounds for current compilers"

This reverts commit 35918326be4b6e3d795349adc340f7dfa0786f73.
Disable pthread debugging
Signed-off-by: Paul Beeler <sparksco@gmail.com>