OSDN Git Service
Khem Raj [Sat, 23 Jun 2012 22:59:01 +0000 (15:59 -0700)]
nptl/atfork: Hide pthread_atfork in shared versions
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 22 Mar 2015 13:47:29 +0000 (14:47 +0100)]
libc: Fix vfprintf compilation without HAS_FLOATS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Sat, 23 Jun 2012 21:21:17 +0000 (14:21 -0700)]
nptl/arm: Move aeabi_read_tp to uclibc_nonshared.a
Otherwise it creates wrong references from shared libs
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Sat, 23 Jun 2012 20:26:30 +0000 (13:26 -0700)]
atexit_old: Do not add it to shared libc
atexit should only be in either uclibc_nonshared.a
shared libc case or libc.a in static build case
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 22 Mar 2015 13:47:29 +0000 (14:47 +0100)]
test: enable libm test log2
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 22 Mar 2015 13:47:29 +0000 (14:47 +0100)]
extra: add clang flags for gen_bits_syscall_h
Closes bugzilla #6008
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 18 Mar 2015 22:12:58 +0000 (23:12 +0100)]
malloc.h: Add missing feature guard
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 18 Mar 2015 22:11:39 +0000 (23:11 +0100)]
malloc-standard: Add locking to malloc_trim
Closes bugzilla #4586
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Zhiqiang Zhang [Wed, 18 Mar 2015 10:44:50 +0000 (18:44 +0800)]
malloc: checked_request2size failure deadlocks
For some rarely cases(almost App bugs), calling malloc with
a very largre size, checked_request2size check will fail,set
ENOMEM, and return 0 to caller.
But this will let __malloc_lock futex locked and owned by the
caller. In multithread circumstance, other thread calling
malloc/calloc will NOT succeed and get locked.
Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 18 Mar 2015 21:32:22 +0000 (22:32 +0100)]
libm: Add missing C99 float/ld wrappers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 18 Mar 2015 21:32:13 +0000 (22:32 +0100)]
test: skip arc4random on glibc
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 18 Mar 2015 21:31:53 +0000 (22:31 +0100)]
buildsys: fix IS_IN_lib* for .i
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Mar 2015 20:19:10 +0000 (21:19 +0100)]
libc: update strverscmp
Closes bugzilla #7936
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Mar 2015 19:56:17 +0000 (20:56 +0100)]
nptl: fix exclusion of pthread_setconcurrency.c
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Mar 2015 19:54:58 +0000 (20:54 +0100)]
include: silence __leaf warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Mar 2015 19:54:38 +0000 (20:54 +0100)]
test: Tweak arc4random exclusion
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexey Brodkin [Wed, 11 Mar 2015 23:21:12 +0000 (02:21 +0300)]
resolv: fix unaligned tmp buffer corner-case
On execution of "inet/gethost_r-align" test I noticed failure due
to unaligned access (instaed of 4-byte aligned 1-byte aligned
address was attempted to be accessed).
Further investigation confirmed this nice and helpful test failure.
Following commit removed usage of ALIGN_BUFFER_OFFSET on entry to
__read_etc_hosts_r():
http://git.uclibc.org/uClibc/commit/?id=
f65e66078b9f4d2d7f0fc336dee36e78fc467c0f
So indeed if target architecture doesn't allow unaligned access
and provided tmp buffer is not word aligned (and we will deal with pointers
which means word-sized data units), then CPU will fail during execution.
In case of ARC we'll see "Unaligned access" exception like this:
--->8---
# potentially unexpected fatal signal 7.
Path: /root/uClibc/test/inet/gethost_r-align
CPU: 0 PID: 5514 Comm: gethost_r-align Not tainted 3.13.11 #2
task:
8f42a580 ti:
8f40e000 task.ti:
8f40e000
[ECR ]: 0x00230400 => Misaligned r/w from 0x5fdab341
[EFA ]: 0x5fdab341
[BLINK ]: 0x20032a18
[ERET ]: 0x20032a3c
@off 0x12a3c in [/lib/libuClibc-0.9.34-git.so]
VMA: 0x20020000 to 0x20062000
[STAT32]: 0x00000086 : U E2 E1
BTA: 0x20046014 SP: 0x5fdab260 FP: 0x00000000
LPS: 0x20046064 LPE: 0x20046068 LPC: 0x00000000
r00: 0x5fdab341 r01: 0x00000005 r02: 0x00000015
r03: 0x00000000 r04: 0x5fdab358 r05: 0x00000000
r06: 0x0a0a0a00 r07: 0x00000000 r08: 0x0000003f
r09: 0x20067050 r10: 0x00000000 r11: 0x00000014
r12: 0x00000001 r13: 0x00000000 r14: 0x20060660
r15: 0x20060661 r16: 0x00000006 r17: 0x5fdab371
r18: 0x00000018 r19: 0x5fdab2b4 r20: 0x00020000
r21: 0x00000000 r22: 0x00029068 r23: 0x5fdab371
r24: 0x00010000 r25: 0x00000000
--->8---
To fix this problem we'll re-introduce tmp buffer force alignment
before config parser invocation.
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 13 Mar 2015 20:03:10 +0000 (21:03 +0100)]
unistd.h: put getppid under XOPEN2K8
Add __LEAF to all __THROW, introduce non-leaf __THROWNL
Adjust affected spots accordingly.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 11 Mar 2015 21:59:51 +0000 (22:59 +0100)]
buildsys: create linker script with proper flags
We were not passing the correct use-ld and -m{32,64,...} when creating
the linker script. Revisit for gold later on anyway.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 11 Mar 2015 21:58:32 +0000 (22:58 +0100)]
spawn.h: Fix !_GNU_SOURCE compilation
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Gustavo Zacarias [Tue, 3 Mar 2015 18:04:45 +0000 (15:04 -0300)]
sparc/clone.S: guard tcb-offsets.h include with RESET_PID
Otherwise we have a broken scenario with non-threading builds.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 27 Feb 2015 18:50:09 +0000 (19:50 +0100)]
libc: silence warning
include/bits/sigset.h:219:62: warning: right-hand operand of comma expression has no effect [-Wunused-value]
include/bits/sigset.h:210:63: warning: right-hand operand of comma expression has no effect [-Wunused-value]
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 27 Feb 2015 09:41:30 +0000 (10:41 +0100)]
ldso: silence warning
In file included from ldso/ldso/ldso.c:87:0:
ldso/ldso/dl-startup.c: In function '_dl_start':
ldso/ldso/dl-startup.c:184:32: warning: cast from pointer to integer of differennt size [-Wpointer-to-int-cast]
auxvt[AT_BASE].a_un.a_val = (Elf32_Addr) &_begin;
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 20 Feb 2015 17:52:45 +0000 (18:52 +0100)]
ldso: silence warning
symbol_addr was set but not used
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steve Ellcey [Fri, 20 Feb 2015 00:03:26 +0000 (16:03 -0800)]
Allow use of executable RUNPATH/RPATH when finding libraries.
This option will modify ldso so that it will use the executables
RUNPATH/RPATH to find to find libraries even though this behavour
is not standard. Setting this option causes the uclibc dynamic linker
behavour to match the glibc dynamic linker.
Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
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>