libc: silence warning in fts

cderrno is dead code, comment it out.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
test/tls/tst-tls[6-8]: Fix build errors

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc: Fix sync_file_range.c for MIPS64 N32 ABI

The special sync_file_range handling is only needed for the O32 ABI
(regardless of whether it is on mips32 or mips64).  The N32 (and N64)
ABI's should both use the standard code.  This routine was using the
special code for the N32 ABI because that ABI has a word size of 32 bits
and that is wrong.  This patch fixes it by checking the ABI used instead
of checking the word size.

Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
mips: Remove duplicate macro definitions

The INLINE_SYSCALL, INTERNAL_SYSCALL*, and internal_syscall* macros
are defined for MIPS in both libc/sysdeps/linux/mips/sysdep.h and
libc/sysdeps/linux/mips/bits/syscalls.h.  The macros are the same
in both cases except that syscalls.h defines internal_syscalls[567]
the same for N32 and N64 ABIs and has a different definition for O32.
I believe that is correct.  The sysdep.h header uses the O32 versions
for N32 and has different definitions for N64.  I think that is wrong
and that N32 and N64 should share the same definition (modulo the
type 'long' vs. 'long long' for the arguments.  This setup (from
sysdep.h) now agrees with what glibc has.

I am not positive about which header (sysdep.h vs syscalls.h) is
really the right one to have these definitions in but using sysdep.h
seems to work for all my builds.

Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
buildsys: Add MIPS64R2 support

There is support for mips64(r1) already in uclibc, this change adds mips64r2
by adding the MIPS64R2 config variable and checking it in Rules.mak.

Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
buildsys: pass correct linker to compiler driver

Testing linker features has to be done against the correct linker.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>