OSDN Git Service
Vineet Gupta [Fri, 20 Feb 2015 11:43:26 +0000 (17:13 +0530)]
ARC: Remove unused EM_ARC_A5
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 20 Feb 2015 11:35:36 +0000 (12:35 +0100)]
include/elf.h: bump EM_NUM
and remove a few ancient entries
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Fri, 20 Feb 2015 09:57:08 +0000 (15:27 +0530)]
elf: Add STT_GNU_IFUNC from glibc
perf in upstream Linux kernel 3.17 onwards expects STT_GNU_IFUNC
replicate it from glibc
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 19 Feb 2015 13:44:02 +0000 (19:14 +0530)]
sync_file_range: fix standard UCLIBC_SYSCALL_ALIGN_64BIT handling
Currently UCLIBC_SYSCALL_ALIGN_64BIT is not explicitly handled. Fix that
and make sure the special handling is done for powerpc/xtensa which use
UCLIBC_SYSCALL_ALIGN_64BIT but don't use hole punched syscall handler in
kernel.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 19 Feb 2015 13:44:01 +0000 (19:14 +0530)]
posix_fadvise: handle 2 variants for SYSCALL_ALIGN_64BIT
arm/powerpc/xtensa pass @advice as 2nd arg to syscall (vs. canonical 4th)
Current code however does this for UCLIBC_SYSCALL_ALIGN_64BIT which
powerpc/xtensa also happen to define.
This is not true for ARCv2 ISA and possibly other arch of future with
64-bit even register requirement, which uses the standard syscall
handler in kernel.
Fix that by providing 2 variants of SYSCALL_ALIGN_64BIT
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 19 Feb 2015 13:44:00 +0000 (19:14 +0530)]
ARCv2: optimised string routines
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 19 Feb 2015 13:43:59 +0000 (19:13 +0530)]
ARCv2 ISA support
This is next gen Instruction Set Architecture from Synopsys and basis
for the ARC HS family of processors.
http://www.synopsys.com/dw/ipdir.php?ds=arc-hs38-processor&elq_mid=5732&elq_cid=458802
http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/arc-hs/Pages/default.aspx
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anton Kolesov [Wed, 4 Feb 2015 12:34:51 +0000 (15:34 +0300)]
ARC: Add GNU glob to ARC defconfigs
GNU glob is required by make.
Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Feb 2015 22:41:47 +0000 (23:41 +0100)]
libc: add setns()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Thu, 20 Feb 2014 08:30:18 +0000 (00:30 -0800)]
Add eventfd_read() and eventfd_write()
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:44 +0000 (15:25 +0530)]
signal.h: elide memset from sigemptyset
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:42 +0000 (15:25 +0530)]
ARC: sigaction: inline syscall trap
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:43 +0000 (15:25 +0530)]
ARC: sigaction: fold default sigrestorer into "C"
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:41 +0000 (15:25 +0530)]
ARC: siagction: opencode memcpy
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:40 +0000 (15:25 +0530)]
ARC: remove stale TRUNCATE64_HAS_4_ARGS
Not relevant anymore since commit
e8cc14e59ed3f66b84e,
"libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT"
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Sat, 14 Feb 2015 09:55:39 +0000 (15:25 +0530)]
ARC defconfigs: enable some items
perf: UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
elfutils: UCLIBC_HAS_PROGRAM_INVOCATION_NAME
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Sat, 14 Feb 2015 09:55:38 +0000 (15:25 +0530)]
ARC: add configuration option for MMU page size
ARC CPU may have MMU page size of 4/8(default)/16k.
uClibc needs to have page size configured accodring to HW it will be run on.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Sat, 14 Feb 2015 09:55:37 +0000 (15:25 +0530)]
ARC: Conditionalise certain relocations as provided by TLS tools only
uClibc mainline supports NPTL which in turns depends on TLS support in
the tools (gcc/binutils), which is yet to be merged in dev branches.
However there is some non NPTL code in uClibc, added as part of NPTL
effort, which relies on certain relocations only provided by NPTL
binutils. As a result building the current upstream even for LT.old
breaks.
So conditionalize that code on tools, bu tin lack of specific versions,
we use NPTL enabling as a sign the tools are equipped to handle those
relos.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steve Ellcey [Wed, 28 Jan 2015 22:56:07 +0000 (14:56 -0800)]
Update MIPS configuration rules.
Add a configuration choice for the NaN format on MIPS (either the
standard (legacy) format or the newer IEEE 2008 format.
Change how CPU_LDFLAGS are set for MIPS. Use the same value as
CPU_CFLAGS since CC is used to do linking. This ensures consistency
between compiles and links and adds support for N32 ABI to linking.
Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 28 Jan 2015 09:50:34 +0000 (10:50 +0100)]
buildsys: fix IS_IN_lib* for out-of-tree builds
41537a770b46f2376e74af58ba4885749339e81e erroneously stripped the
top_builddir off the per-directory flag setting which works fine for
in-tree builds but is not correct for O=
Just use the full path of the target files to apply the flags to fix
that thinko.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 26 Jan 2015 15:50:29 +0000 (16:50 +0100)]
libc: sync_file_range missing comma
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 24 Jan 2015 19:50:02 +0000 (20:50 +0100)]
libc: ppc64 etc: Fix sync_file_range
Fix copy'n paste error for ppc64 and other sync_file_range2 arches
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Max Filippov [Sat, 10 Jan 2015 03:48:37 +0000 (06:48 +0300)]
xtensa: ldso: drop unused address calculation from _dl_linux_resolve
The result of the calculation in register a12 is never used as the
function _dl_linux_resolver only accepts 2 arguments. Drop it.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Max Filippov [Sat, 10 Jan 2015 01:42:42 +0000 (04:42 +0300)]
xtensa: ldso: coalesce dl_mprotect address ranges
This noticeably lowers the number of mprotect calls at program startup,
e.g. for busybox: 7 calls vs 1835 calls.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wang Yufen [Tue, 11 Nov 2014 07:59:11 +0000 (15:59 +0800)]
add argument check in mknod
mknod() in glibc/eglibc will check the argument, like this,
...
if (k_dev != dev) {
__set_errno (EINVAL);
return -1;
}
...
So add argument check in uclibc's mknod() too.
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Xishi Qiu [Tue, 4 Nov 2014 11:26:28 +0000 (19:26 +0800)]
add argument check in setenv()
setenv() in glibc/eglibc will check the argument, like this,
...
if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
{
__set_errno (EINVAL);
return -1;
}
...
So add argument check in uclibc's setenv() too.
Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 23 Jan 2015 14:47:02 +0000 (15:47 +0100)]
nptl: compile pt-vfork in ARM-mode
amending commit
49a67cf67d5a7194214566bc730ee7e28d55bbe1
could need a thumb implementation..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 19 Jan 2015 21:49:10 +0000 (22:49 +0100)]
libc: Avoid redundant setting of ENOMEM
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 19 Jan 2015 16:24:19 +0000 (17:24 +0100)]
libcrypt: return NULL on unsupported salt
BZ #7808 asks us not to fallback to DES if the optional SHA are disabled
but requested by the user.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 7 Jan 2015 12:26:42 +0000 (13:26 +0100)]
test: Adjust passed options
to follow suit
067637375658047d70c296606ae17ef0bc86499d
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anthony G. Basile [Mon, 27 Oct 2014 20:13:34 +0000 (16:13 -0400)]
mkostemp: fix implementation
mkostemp(char *template, int flags) generates a unique temporary
filename from a template. The flags parameter accepts three of
the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC. The
current implementation of mkostemp(3) does not respect the flags
and in fact confuses the flags with the file mode which should
always be S_IRUSR | S_IWUSR. This patch corrects this issue.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 15 Dec 2014 16:32:57 +0000 (17:32 +0100)]
test: Some more tests under conditionals
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 15 Dec 2014 15:13:01 +0000 (16:13 +0100)]
stdio: Fix printing 0.0
We were relying on FE_DIVBYZERO being turned off when printing
"%f", +-.0
Avoid the whole issue by looking at the sign-bit (in a rough
approximation).
Note that we do not handle gracefully:
printf ("\n%llf\n", -0.0);
printf ("\n%llf\n", 0.0);
nor %Lf for both when NOT cast to long double. Avoiding an FPE due to
broken numbers like these does not make sense to me.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 15:18:12 +0000 (16:18 +0100)]
unistd: allow to turn off getopt_long
The GNU variant of getopt() previously had no way to turn off
getopt_long() support.
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 15:06:17 +0000 (16:06 +0100)]
test: disable ptytest unless HAS_PTY
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 13:43:55 +0000 (14:43 +0100)]
config: move STDIO_FUTEXES up a bit
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 9 Dec 2014 13:30:39 +0000 (14:30 +0100)]
sigaction: Fix !HAS_REALTIME compilation
In file included from ./include/signal.h:279:0,
from libc/sysdeps/linux/x86_64/sigaction.c:22:
./include/bits/sigaction.h:32:29: error: unknown type name 'siginfo_t'
void (*sa_sigaction)(int, siginfo_t *, void *);
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Dec 2014 16:43:25 +0000 (17:43 +0100)]
mips: rename siginfo _timer members
Rename _timer[12] to si_tid and si_overrun to fix compilation of
strace-4.9+
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 3 Dec 2014 15:18:54 +0000 (16:18 +0100)]
buildsys: remove some obsolete optimization CFLAGS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 18 Nov 2014 17:27:47 +0000 (18:27 +0100)]
locale: Add wcsftime()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 13 Nov 2014 19:58:52 +0000 (20:58 +0100)]
nptl: compile pt-vfork in ARM-mode
could need a thumb implementation..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Max Filippov [Sat, 25 Oct 2014 10:32:35 +0000 (14:32 +0400)]
Config.in.arch: enable long double math for xtensa
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anthony G. Basile [Sat, 6 Sep 2014 23:45:34 +0000 (19:45 -0400)]
statfs: fix compile error when UCLIBC_LINUX_SPECIFIC is not set
statfs() is a Linux-specific function. When building without
UCLIBC_LINUX_SPECIFIC set, libc_hidden_proto(statfs) in
include/sys/statfs.h is unmatched with libc_hidden_def(statfs)
in libc/sysdeps/linux/common/statfs.c, leading to a compile
error. This patch fixes this, as well as adds statfs() to the
list of Linux-specific functions in extra/Configs/Config.in.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 17 Sep 2014 18:45:26 +0000 (20:45 +0200)]
m68k: libc: add fmovem* mcffpu condition
add fmovem{x,.d,.*} ISA conditional
Fixes assembler errors for 5206.
isa_a, isa_b (or a+, don't remember) do not have emx, use em.d there.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Gustavo Zacarias [Sun, 7 Sep 2014 15:01:34 +0000 (12:01 -0300)]
sparc: update ptrace.h to latest from glibc
Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Gustavo Zacarias [Sun, 7 Sep 2014 15:01:33 +0000 (12:01 -0300)]
powerpc: update ptrace.h to latest from glibc
Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 16 Sep 2014 20:07:12 +0000 (22:07 +0200)]
buildsys: remove now redundant lib placement defines
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 16 Sep 2014 19:36:54 +0000 (21:36 +0200)]
libc: silence missing prototype warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 15 Sep 2014 20:13:07 +0000 (22:13 +0200)]
buildsys: fix IS_IN_lib*
define NOT_IN_libc / IS_IN_libxxx appropriately
to fix pthread_once
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 10 Sep 2014 20:18:55 +0000 (22:18 +0200)]
nptl: rephrase *.sym handling
Avoids circular dependency warning from make by generating the .h
directly from the .sym files, elimination intermediate files.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 9 Sep 2014 11:49:34 +0000 (13:49 +0200)]
buildsys: Fix typo
LDFLAG-fuse-ld looked at a non-existing var, use the correct one
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anthony G. Basile [Sun, 7 Sep 2014 19:33:46 +0000 (15:33 -0400)]
libc: add fallocate() and fallocate64()
We add the Linux-specific function fallocate() which allows the user to
directly manipulate allocate space for a file. fallocate() can operate
in different modes, but the default mode is equivalent to posix_fallocate()
which is specified in POSIX.1.
Recent releases of e2fsprogs 1.42.11 and above expect fallocate64() to be
available.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 5 Sep 2014 11:59:28 +0000 (13:59 +0200)]
libc: split multi-source epoll.c
We cannot override individual functions on a per-arch basis otherwise
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Mon, 1 Sep 2014 18:44:20 +0000 (20:44 +0200)]
sparc: remove sparc64/sparcv9 code
The sparc64/sparcv9 code is incomplete. Furthermore there is
no real embedded hardware for sparc64 available, so better remove
it until someone comes up with a complete port.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:21:23 +0000 (13:21 +0200)]
ldso: Fix compile-error on noMMU
Thanks to Waldemar Brodkorb for noticing!
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:16:35 +0000 (13:16 +0200)]
test: wcsftime depends on XLOCALE
Thanks to Waldemar Brodkorb for noticing.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:12:52 +0000 (13:12 +0200)]
test: disable librt shmtest on non-MMU systems
This test fails for non-MMU systems, because it uses fork()
Thanks to Waldemar Brodkorb!
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 10:46:56 +0000 (12:46 +0200)]
buildsys: tweak check_ld flag probing
ld was (erroneously) complaining that it failed to merge private bfd
data. Silence this mismatch as seen on m68k with obfd binary.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 29 Aug 2014 19:06:18 +0000 (21:06 +0200)]
buildsys: refine compile.S
filter out all -std=
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 29 Aug 2014 18:53:04 +0000 (20:53 +0200)]
buildsys: use SED for create-lds
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:26 +0000 (12:31 +0200)]
test: disable test for systems without FPU
This test fails for systems without fpu.
For example m68k build for non-mmu/non-fpu systems fail.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:30 +0000 (12:31 +0200)]
test: sync with glibc, use do_test
This breaks out of a deadlock, which occurs when testing for powerpc. (qemu)
Otherwise the test suite does not finish.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:29 +0000 (12:31 +0200)]
test: get out of the endless while loop, when bind failed
When bind() fails in this test, then /tmp get filled up with
temp files and upcoming tests will fail, because they need to create
temp files, too. Better exit from the loop.
Test still needs to be investigated to fix the failing bind().
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:27 +0000 (12:31 +0200)]
m68k: fix typo
otherwise you get compile warnings, when building for m68k.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:24 +0000 (12:31 +0200)]
test: do not depend on compile
When you cross-compile the testsuite and then try to run
on a system without gcc/binutils it would be nice if no compiling
or linking is tried. Refresh test/README (suggested by Khem)
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:23 +0000 (12:31 +0200)]
test: NPTL: sync WRITE_BUFFER_SIZE with glibc test
Test on Linux 3.16.1 in Qemu ARM fails with:
TEST_EXEC nptl/ tst-cancel4
ret == 1 ; expected_ret == 0
make[1]: *** [tst-cancel4.exe] Error 1
The output of failed test is:
minimum write buffer size too large
../Test.mak:89: recipe for target 'tst-cancel4.exe' failed
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:22 +0000 (12:31 +0200)]
sparc: add missing pthread_spin_lock/pthread_spin_trylock
tst-spin1.c compile breaks with:
test/nptl/tst-spin1.c:34: undefined reference to `pthread_spin_lock'
pthread_spin_lock and pthread_spin_trylock is missing while
building sparc. add the meta c files here.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:21 +0000 (12:31 +0200)]
sparc: remove unused subdirs variable
For sparc TARGET_SUBARCH is never used. And there is a typo in the
path.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:20 +0000 (12:31 +0200)]
Revert "sparc: disable cancellable system, as it fails in strange ways right now"
This reverts commit
1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.
It is unclear in which way this is breaking sparc systems.
With this change added you get following linking error:
libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:19 +0000 (12:31 +0200)]
Revert "sparc: use HIDDEN_JUMPTARGET for errno"
This reverts commit
f51fb26dbcceee9e48d10facc830bd4a549f6cc2.
This fixes linking error for sparc build.
While building a sparc system you get following linking error:
libc/sysdeps/linux/sparc/pipe.S:54: undefined reference to `__GI___errno_location'
Removing the HIDDEN_JUMPTARGET fixes the issue, while using gcc 4.8.3/binutils 2.24.
The definition of __errno_location was changed recently here:
http://git.uclibc.org/uClibc/commit/?id=
8f550715c2b211036fc273add3cb5219397ed312
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Mon, 25 Aug 2014 23:58:13 +0000 (16:58 -0700)]
timex: Sync with glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Mon, 25 Aug 2014 23:58:12 +0000 (16:58 -0700)]
Define IPTOS_CLASS_* macros according to RFC 2474
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 26 Aug 2014 18:07:08 +0000 (20:07 +0200)]
buildsys: remove duplicate UCLIBC_EXTRA_CFLAGS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 25 Aug 2014 08:41:08 +0000 (10:41 +0200)]
microblaze: Remove duplicate F_{S,G}ETPIPE_SZ
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Thu, 20 Feb 2014 09:12:14 +0000 (01:12 -0800)]
fcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZ
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 25 Aug 2014 08:07:44 +0000 (10:07 +0200)]
mathinline.h: Use __extern_inline
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Sat, 15 Mar 2014 16:32:20 +0000 (09:32 -0700)]
Add clock_adjtime syscall
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Tue, 19 Aug 2014 19:11:16 +0000 (21:11 +0200)]
fix for pipe() on sparc
When using something like this:
$ echo foo|grep foo|wc -l
with mksh shell, you get an runtime error.
Glibc and klibc does not do these extra check.
After removing this check using double pipes work fine.
Tested with Qemu 2.1.0.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anthony G. Basile [Mon, 18 Aug 2014 11:56:08 +0000 (07:56 -0400)]
libc: add issetugid()
issetugid() returns 1 if the process environment or memory address space
is considered tainted, and returns 0 otherwise. This happens, for example,
when a process's privileges are elevated by the setuid or setgid flags on
an executable belonging to root. This function first appeard in OpenBSD 2.0
and is needed for the LibreSSL.
This patch follows the same logic as the equivalent musl commit. For more
information see the commit message at
http://git.musl-libc.org/cgit/musl/commit/?id=
ddddec106fd17c3aca3287005d21e92f742aa9d4
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Mon, 18 Aug 2014 07:04:28 +0000 (11:04 +0400)]
test/math: fix for MIPS that takes 32/64 suffix into account
This fixes a breakage for MIPS32/64 introduced in:
http://git.uclibc.org/uClibc/commit/?id=
c02bc5763ba9c8f8b464bca89fba28e091ce1ffc
Now ULP_SUFFIX is taken into account when searching for existing
libm-test-ulps-ARCH
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Wed, 13 Aug 2014 12:04:45 +0000 (16:04 +0400)]
test/math: fix for disabled long double math
Commit "test: cater for config" http://git.uclibc.org/uClibc/commit/test/math/Makefile.in?id=
7598eeaa1defa2884adaa890bb115c493d69cc35 inverted check from
ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y)
to
ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
with first branch indeed inverted - instead of adding tests they were excluded.
But "else" branch was not moved up (remember check was inverted).
This causes compile breakage when building basic-test.c:
--->---
TEST_LINK math/ basic-test
basic-test.c: In function 'ldouble_test':
basic-test.c:111:1: warning: implicit declaration of function 'nanl' [-Wimplicit-function-declaration]
TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL)
^
basic-test.o: In function `main':
basic-test.c:(.text.startup+0x834): undefined reference to `nanl'
basic-test.c:(.text.startup+0x858): undefined reference to `nanl'
basic-test.c:(.text.startup+0x880): undefined reference to `nanl'
basic-test.c:(.text.startup+0x8a8): undefined reference to `nanl'
basic-test.c:(.text.startup+0x8d4): undefined reference to `nanl'
basic-test.o:basic-test.c:(.text.startup+0x8e0): more undefined references to `nanl' follow
collect2: error: ld returned 1 exit status
make[3]: *** [basic-test] Error 1
--->---
Fix is simple - merge "old else" branch with the first current one.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anton Kolesov [Fri, 1 Aug 2014 18:16:26 +0000 (22:16 +0400)]
ARC: Enable OBSTACK in defconfig for ARC
OBSTACK is required for native builds of binutils and GDB.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tony Wu [Fri, 25 Jul 2014 05:52:11 +0000 (13:52 +0800)]
uclibc: nptl: fix __lll_lock_wait_private multiple definition
Mark non-pthread __lll_lock_wait_private weak to avoid multiple
definition error in static link mode.
Signed-off-by: Tony Wu <tung7970@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anton Kolesov [Fri, 1 Aug 2014 18:18:47 +0000 (22:18 +0400)]
lseek: Correct order of offset arguments
There was a runtime error in systems without large file support. Call
fseek(fd, 4096, SEEK_SET) has been failing with EINVAL, though it was
succeeding for offset = 4092. This has been happening because llseek system
call accepts 64-bit value as an offset argument and lseek function has been
ordering 32-bits words that form this offset value, according to the
endianness. However this ordering to match endianness is not required,
because llseek doesn't accept one 64-bit offset argument, it accepts two
32-bit offset argument, then stitches them into one following its
endianness. As a result on little endian system, order of words has been
swapped two time: in libc and in kernel. Thus call to fseek with offset 4096
(0x1000) was doing a system call to llseek with offset 0x1000_0000_0000. I'm
not entirely sure why then offset = 4092 hasn't been failing then.
This patch removes malicious swap of words when calling llseek.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 9 Jan 2014 09:35:45 +0000 (15:05 +0530)]
libc: posix_fadvise: Fix build breakage for !LFS
commit
00571b43df2e "libc: posix_fadvise: restore implementation for xtensa"
enabled posix_fadvise() for all arches (it was just not generated
before).
However this also unearthed an issue introduced by
ee84b8b400
"linux: posix_fadvise: use new SYSCALL_ALIGN_64BIT" which is to
referencing LFS'ish code (off64_t) w/o proper checks which causes build
to break for !LFS.
Fix this by calling posix_fadvise64() only for LFS case and open-code
it's equivalent for !LFS.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: markos Chandras <markos.chandras@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb [Tue, 29 Jul 2014 07:53:01 +0000 (09:53 +0200)]
unbreak networking code for sparc
This commit
1e2e4ac6193ffe0900bd392fa3c596883771eb34 breaks networking
on sparc systems. In Linux the socket functions are declared, but not
implemented and must be routed through socketcall().
Tested via Qemu 2.0.0.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Fri, 25 Jul 2014 14:11:21 +0000 (18:11 +0400)]
test_nptl: replace __sigpause with sigpause
On attempt to build uClibc tests following error message appears:
=========
TEST_LINK nptl/ tst-cancel4
tst-cancel4.c: In function 'tf_sigpause':
tst-cancel4.c:765:3: warning: implicit declaration of function
'__sigpause' [-Wimplicit-function-declaration]
__sigpause (SIGCANCEL, 1);
^
tst-cancel4.o: In function `tf_sigpause':
tst-cancel4.c:(.text+0x1054): undefined reference to `__sigpause'
collect2: error: ld returned 1 exit status
=========
This commit http://git.uclibc.org/uClibc/commit/?id=
cef1f9517c319d86b4b426ecc14a10d0fa5494c7
makes __sigpause static limiting its scope to "libc/signal/sigpause.c".
Switching to common implementation "sigpause()" fixes this issue.
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Suggested-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Fri, 25 Jul 2014 12:09:08 +0000 (17:39 +0530)]
ARC/NPTL: clone to set TP if CLONE_SETTLS
Typically kernel would set the TP register of newly created thread in
clone syscall with CLONE_SETTLS.
However this implies that:
* kernel knows of the exact TP register (which is already different for
ARCompact and ARCv2) and is a detail which becomes part of the ABI
* kernel also needs to handle the unlikely but possible case of !TLS
userspace (e.g. Android libc) case where TP reg is not reserved and
thus need not be mucked with (using ELF personality based detection)
It is better to confine this detail to userspace runtime and set TP reg
right after clone syscall returns.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Fri, 25 Jul 2014 12:09:07 +0000 (17:39 +0530)]
ARC/NPTL: Add tests
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Fri, 25 Jul 2014 12:09:06 +0000 (17:39 +0530)]
ARC/NPTL: Fix __libc_sigaction redefinition with static links
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Fri, 25 Jul 2014 12:09:05 +0000 (17:39 +0530)]
NPTL: ARC support
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Joern Rennecke [Fri, 25 Jul 2014 12:09:04 +0000 (17:39 +0530)]
ARC: ldso: Use @pcl syntax.
Signed-off-by: Joern Rennecke <joern.rennecke@embecosm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Fri, 1 Aug 2014 08:16:12 +0000 (04:16 -0400)]
bits/time.h: sync with latest glibc
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Jian Peng [Wed, 9 Jul 2014 18:27:25 +0000 (22:27 +0400)]
test/math: add fallback to libm-test-ulps-generic logic
Under test/math/, there is libm-test-ulps-generic used as fallback
in case that libm-test-ulps-$(TARGET_ARCH) does not exist.
This is required for arches that don't have ULPS yet.
Original patch from Jian Peng was found here:
http://lists.uclibc.org/pipermail/uclibc/2011-April/045172.html
Signed-off-by: Jian Peng <jipeng2005@gmail.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 24 Jul 2014 18:44:42 +0000 (20:44 +0200)]
Changelog: complete old data and cycle
We switched to detailed per-release Changelog some time ago, available
on the website.
Move the old Changelog for historical reasons.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Anton Kolesov [Thu, 26 Jun 2014 06:03:35 +0000 (11:33 +0530)]
ARC: Implement native GDB requirements in procfs.h
Native GDB requires elf_fpregset_t to be defined, even if floating point
registers are absent. In this case we use empty structure. Additionally we
redefined prfpregset_t to use this new type.
And there has been an error: it was defined that user_regs_struct has 20
registers, while it has 40.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 26 Jun 2014 06:03:34 +0000 (11:33 +0530)]
ARC: clone: Ensure that @fn returns back to clone
This showed up due to longstanding test/unistd/clone failure where post
clone, the callback was not exiting and rather falling thru in into main
program.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 26 Jun 2014 06:03:33 +0000 (11:33 +0530)]
ARC: ldso: Dont force frame pointer as it useless for unwinding on ARC
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 26 Jun 2014 06:03:32 +0000 (11:33 +0530)]
ARC: make sigaction inline with other arches
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta [Thu, 26 Jun 2014 06:03:31 +0000 (11:33 +0530)]
ARC: syscalls.h: code-reuse/fix-arg-annotations
- Use syscalls-common.h vers of INTERNAL_SYSCALL / INLINE_SYSCALL_NOERR
- INLINE_SYSCALL takes syscall name (e.g. write)
- {INLINE,INTERNAL}_SYSCALL_NCS macros take syscall num (__NR_write)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>