OSDN Git Service
Carmelo Amoroso [Tue, 4 Jan 2011 13:16:50 +0000 (14:16 +0100)]
nptl: get rid of preprocessor warning when __ASSUME_TGKILL is not defined
A sample of the warning reported while building for ARM that has not __ASSUME_TGKILL defined.
libpthread/nptl/sysdeps/unix/sysv/linux/raise.c: In function 'raise':
libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:33:5: warning: "__ASSUME_TGKILL" is not defined
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Khem Raj [Sun, 2 Jan 2011 06:59:00 +0000 (22:59 -0800)]
libc/inet/netlinkaccess.h: Use the types from kernel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Austin Foxley [Thu, 30 Dec 2010 01:49:59 +0000 (17:49 -0800)]
sparc: fix linking issue with __syscall_error.c
Finally got around to testing out latest master and
noticed that some buildsystem work last summer broke
shared-builds of nptl on sparc.
A version of __syscall_error.c needs to be linked into
both libpthread and librt
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Konrad Eisele [Tue, 14 Dec 2010 12:49:17 +0000 (13:49 +0100)]
sparc: check for log double support in gcc
To compile the quad float emulation library gcc needs
__LONG_DOUBLE_128__ macro defined. Check first, if not
supported then revert to the qp_ops.c stubs
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Matt Fleming [Mon, 15 Nov 2010 15:34:18 +0000 (15:34 +0000)]
linuxthreads: Fix compilation breakage
With commit "resolv.c: add support for per thread res_state"
(
aab4df0fb51660300559f5f29290709db2f7bfee) _res symbol is now marked
as hidden in an attempt to make the resolver per-thread.
Signed-off-by: Matt Fleming <matthew.fleming@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Wed, 22 Dec 2010 03:29:50 +0000 (19:29 -0800)]
libpthread/nptl_db: Append options to LDFLAGS based on if LD is set to gcc driver or ld itself
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Sun, 19 Dec 2010 05:51:06 +0000 (21:51 -0800)]
Makefile.in: Add header to 'all' target
Stage bits/uClibc_ctype.h when locales are enabled
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Sun, 19 Dec 2010 05:08:58 +0000 (21:08 -0800)]
extra/locale/Makefile: Consider the case of building out of sourcedir
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Sat, 18 Dec 2010 16:09:25 +0000 (08:09 -0800)]
sem_open.c/sem_unlink.c: Use INTUSE macro to get proper function call to __pthread_once
We need to use __pthread_once_internal if available this macro is
therefore used to notify that.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Sat, 18 Dec 2010 16:08:05 +0000 (08:08 -0800)]
nptl: If DOPIC is set then we missed a rule to generate .os variants for pt-*.c files
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Fri, 17 Dec 2010 08:54:50 +0000 (00:54 -0800)]
install_headers: Fix the header installation when using out of source
build ( O=/x/y/z )
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 19:05:56 +0000 (20:05 +0100)]
bump version to 0.9.32-rc1-git
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 19:05:17 +0000 (20:05 +0100)]
release 0.9.32-rc1
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Christian Bruel [Fri, 17 Dec 2010 08:58:25 +0000 (09:58 +0100)]
libm_sh: add optimised assembly implementation of lroundf and lrintf
* libc/sysdeps/linux/sh/sysdep.h: Add LOCAL macro
* libm/sh/sh4/Makefile.arch: Include asm source in the build
* libm/sh/sh4/s_lrintf.S [NEW]: optimised asm lrintf
* libm/sh/sh4/s_lroundf.S [NEW]: optimised asm lroundf
Signed-off-by: Christian Bruel <christian.bruel@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Fri, 17 Dec 2010 07:30:33 +0000 (08:30 +0100)]
libm_powerpc: update buildsys to use TARGET_SUBARCH
Update the powerpc buildsys of libm to use the TARGET_SUBARCH.
Further fix the e500 Makefile.arch by adding the definition
of libm_ARCH_fpu_DIR that was actually missing.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Fri, 17 Dec 2010 07:11:12 +0000 (08:11 +0100)]
libm_sh: Move fenv functions into sh4 sub-folder
Indeed fenv funxtions are SH4 specific, so move them into
an SH4 specific sub-folder.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 15 Dec 2010 17:00:16 +0000 (18:00 +0100)]
sh_fpu: Do not allow inclusion of fpu_control on not SH4 core
Instead of emitting a warning even when compiling for SH4, stop
compilation with an #error directive when not on SH4 core.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Giuseppe Cavallaro [Mon, 13 Dec 2010 10:39:36 +0000 (11:39 +0100)]
sh: fix memcpy saving/restoring FR12-FR15 registers
This patch fixes a bug in the memcpy that doesn't save/restore
the FR12-FR15 registers (callee save registers in ST40 ABI) while
copying many cache lines with FPU in single paired precision mode
and by using all FPU registers (DR and XD).
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Timo Teräs [Tue, 7 Dec 2010 09:27:29 +0000 (11:27 +0200)]
nptl: fix Unwind_Resume PLT calls
My change
a49b3a18e463cbe8c94c41501e386e7f4c61609e fixed two
Unwind_Resume calls to go via PLT to avoid text relocations for PIC
builds. However, it looks the reason for upstream not using PLT calls
is that ebx gets clobbered. So we need to reload it.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Thomas Petazzoni [Sat, 4 Dec 2010 09:29:42 +0000 (10:29 +0100)]
getconf: only use specs that are available
On older glibc (like 2.7), the _SC_V7_* symbols are not defined,
making the build of current uClibc fail on Debian Lenny systems and
other systems using a fairly old glibc. So we make sure to only use
the specs names that are defined by the host C library.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Tue, 24 Aug 2010 08:19:27 +0000 (08:19 +0000)]
create DEVEL_PREFIX/MULTILIB_DIR dir rather than DEVEL_PREFIX/lib
This fixes issue with GNU Make 3.82 when running:
make install DESTDIR=$someplace
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Austin Foxley [Wed, 1 Dec 2010 23:32:41 +0000 (15:32 -0800)]
Config.sparc: remove warning about shared libs on v7
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Natanael Copa [Fri, 26 Nov 2010 14:49:56 +0000 (14:49 +0000)]
libc: fix strtoq
strtoq should always return a quad_t and be an alias of strtol on
64 bit and strtoll on 32 bit.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Filippo Arcidiacono [Mon, 29 Nov 2010 22:31:49 +0000 (23:31 +0100)]
libc_sh: add __tls_get_addr to static libc (SH)
Add __tls_get_addr function to static libc allowing to handle
local dynamic TLS access model.
On SH, linker optimizations are not required, so __tls_get_addr
can be called even in statically linked binaries.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 1 Dec 2010 16:04:05 +0000 (17:04 +0100)]
Revert "libc_tls: Do not include generic libc-tls from arch specific implementation"
This reverts commit
0c468129356f5ce6780e7369c271d74631ae03ba.
Indeed recent updates into buildsys managed to filter-out generic implementation
when arch specific one is defined, so duplicated symbols into the libc.a
In the meanwhile, do a minor fix into mips version not using relative path
to include <generic/libc-tls.c>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Mon, 29 Nov 2010 21:21:52 +0000 (22:21 +0100)]
libc_tls: Do not include generic libc-tls from arch specific implementation
libpthread/nptl/sysdeps/generic/libc-tls.c is built as well, so it does not need
that arch specific version of libc-tls.c (MIPS and ALPHA) includes it.
The arch libc-tls.s is aimed to provide the implementation of __tls_get_addr
for the static libc.a, because on these archs the linker relaxations are not
required and it could be possible to have local-dynamic access models in static
libraries as well.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Sun, 28 Nov 2010 19:44:21 +0000 (20:44 +0100)]
libc_utmp: Fix getutmp and getutmpx for x86_64
On x86_64, when WORDSIZE_COMPAT32 is enabled, the ut_tv field
of 'struct utmp' and 'struct utmpx' are defined as two nested structs
instead of being defined as 'struct timeval', so it is not possible to
directly assign the two ut_tv values.
This patch split the assignment by setting each fields (tv_sec, tv_usec)
of the ut_tv filed separately
It is als compatible with 'struct timeval' usage.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 22:03:03 +0000 (23:03 +0100)]
Revert "ldso: silence warning about unused tls var if !tls"
This reverts commit
23fa805150d573a913cad69d34c06f3b2ce54270.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 22:02:11 +0000 (23:02 +0100)]
Config: default ia32 to i486
NPTL requires i486 on ia32 since i386 doesn't provide required lll
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 21:46:02 +0000 (22:46 +0100)]
libc: silence warning
about implicit declaration of memset in system()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 21:33:01 +0000 (22:33 +0100)]
ldso: silence warning about unused tls var if !tls
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 20:06:38 +0000 (21:06 +0100)]
config_parser: hide symbols
Our impl has diverged from busybox' so make sure nobody else uses it.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 19:54:51 +0000 (20:54 +0100)]
test: ignore some more binaries
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 19:51:46 +0000 (20:51 +0100)]
wchar: bug #1471: fix cornercase in mbrtowc
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 19:21:58 +0000 (20:21 +0100)]
buildsys: add make {,install_}startfiles
This builds and installs the crt files.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 24 Nov 2010 19:20:47 +0000 (20:20 +0100)]
test/math: bessel depend on XSI_MATH
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Philip Nye [Fri, 19 Nov 2010 16:50:35 +0000 (16:50 +0000)]
resolv.c fails for /etc/hosts lookups
Patch attached:
Fix a bug in offset calculations when parsing /etc/hosts in resolv.c.
Formerly a miscalculation meant that having found the correct line, the code
was trashing its own result data.
Signed-off-by: Philip Nye <philipn@engarts.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Konrad Eisele [Thu, 18 Nov 2010 18:32:37 +0000 (10:32 -0800)]
Disables the automatic disable of shared library for sparc-v7.
I dont see a dependency between shared library and v7.
The difference between v7 and v8 is that in v8 you have
the added math asm-insns: smul/umul/udiv/sdiv/urem.
It shouldnt affect shared libraries creation.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Thu, 18 Nov 2010 18:20:43 +0000 (10:20 -0800)]
Adding quad float gcc intrinsic implementation for SPARC
Sparc-Gcc generates q_xxx intrinsic calls for quad float ("long double")
code. The routines from glibc's glibc-2.9/sysdeps/sparc/sparc32/soft-fp/*
where taken and ported to uclibc.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Natanael Copa [Thu, 11 Nov 2010 15:54:19 +0000 (15:54 +0000)]
ntpl: fix static linking by not leaking SSP_ALL_CFLAGS
The SSP_ALL_CFLAGS in nptl arch CFLAGS leaks out and forces things
like dl-support.c, brk.c, sbrk.c memcpy, etc to be built with
-fstack-protector-all. This is bad when linking statically since
initializing TLS will call those functions before SSP is initialized.
The libpthread itself will still be built with -fstack-protector-all
due to CFLAGS-nptl has SSP_ALL_CFLAGS in libpthread/nptl/Makefile.in
Thanks to Timo Teras for helping with this.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 10 Nov 2010 19:10:46 +0000 (20:10 +0100)]
nptl: use correct unwind header for unwind-forcedunwind
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:41:45 +0000 (19:41 +0100)]
microblaze: build infrastructure
Fix Microblaze config and makefiles.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:37:26 +0000 (19:37 +0100)]
microblaze: thread support
Header files needed to build linuxthreads.old for microblaze.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:33:52 +0000 (19:33 +0100)]
microblaze: optimized memcpy/memmove
Port optimized memcpy/memmove from the kernel.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:32:27 +0000 (19:32 +0100)]
microblaze: misc headers
Other header files for uClibc compilation.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:32:13 +0000 (19:32 +0100)]
microblaze: kernel headers
Sync kernel header definitions with those used in recent mainline kernels.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:31:11 +0000 (19:31 +0100)]
microblaze: Restore soft-float
Software floating point for microblaze.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:30:02 +0000 (19:30 +0100)]
microblaze: vfork/clone interface
Fix the microblaze vfork() and clone() implementations.
Add support for clone2().
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:27:57 +0000 (19:27 +0100)]
microblaze: syscall interface
Fix the microblaze syscall interface.
Recent mainline kernels no longer carry userland code to invoke syscalls
and microblaze can use the uClibc generic code.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:25:30 +0000 (19:25 +0100)]
microblaze: Fix crt bootstrap
Rework crt bootstrap to work with the new __uClibc_main(),
and hardwire crt init/fini code since the awk approach to generating it on
the fly doesn't work for microblaze. The output from the gcc 4.1.2 compiler
is scrambled so that the tags expected by the awk script to bracket the
init/fini entry and exit code no longer do.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steven J. Magnani [Wed, 10 Nov 2010 18:23:45 +0000 (19:23 +0100)]
microblaze: Fix setjmp/longjmp
Some state and registers are missing from setjmp/longjmp handling.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Denys Vlasenko [Tue, 2 Nov 2010 06:44:35 +0000 (07:44 +0100)]
ldso/include/dl-hash.h: suppress compiler warning. no code changes
The warning was repeated for every .c file which is including
this header:
./ldso/include/dl-hash.h: In function '_dl_find_hash':
./ldso/include/dl-hash.h:150: warning: unused parameter 'tpntp'
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Tue, 2 Nov 2010 06:35:01 +0000 (07:35 +0100)]
ldouble_wrappers: make code less verbose via WRAPPER2 macro
Tested: ran testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Tue, 2 Nov 2010 06:24:50 +0000 (07:24 +0100)]
ldouble_wrappers: remove i386-specific optimization
It is deemed too unsafe. Quoting Timo:
If I'm building with "-fPIC -pg" it instruments all C functions with
profiler stuff which is called via PLT and causes EBX reloads
--> crash
-fno-omit-frame-pointer is sometimes useful for profiling too
--> crash
Also the upcoming -fsplit-stack will be broken by this too (that might
need additional uclibc support though).
And I'm pretty sure there's also other similar compiler features.
There's no predefined #defines in gcc for any of these.
What I'm trying to say that there are *numerous* situations when the
compiler can create stack frame for you without you ever knowing it. And
if you want to do a tail jump, you really should be doing it from .S
file where you control fully the prologue/epilogue code. (GCC naked
attribute does not seem to work on x86.)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sun, 31 Oct 2010 14:58:18 +0000 (15:58 +0100)]
libm: disable tail jump trick if __SSP_ALL__ (was using wrong conditional)
Thanks, Timo!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sun, 31 Oct 2010 03:36:02 +0000 (04:36 +0100)]
libm: fix tgamma to actually do return true gamma function
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sun, 31 Oct 2010 02:03:38 +0000 (03:03 +0100)]
libm: improve readability of math.h; expand comments and docs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sun, 31 Oct 2010 02:02:00 +0000 (03:02 +0100)]
libm: remove int_WRAPPER_C99 macro, add test which checks that I did not break it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 23:42:08 +0000 (01:42 +0200)]
libm: revert wrong ldouble wrapper hack "fix"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 23:23:34 +0000 (01:23 +0200)]
libm: fix false positives in double tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 22:45:06 +0000 (00:45 +0200)]
libm: fix remaining failures in test-float
These two failures are fixed:
Failure: Test: ilogb (0.0) == FP_ILOGB0 plus exceptions allowed
Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 21:45:41 +0000 (23:45 +0200)]
libm: fix rint/scalb testcase failures
These failures no longer happen:
Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception
Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception
Failure: Test: rint (0.5) == 0.0
Failure: Test: rint (1.5) == 2.0
Failure: Test: rint (2.5) == 2.0
Failure: Test: rint (3.5) == 4.0
Failure: Test: rint (4.5) == 4.0
Failure: Test: rint (-0.5) == -0.0
Failure: Test: rint (-1.5) == -2.0
Failure: Test: rint (-2.5) == -2.0
Failure: Test: rint (-3.5) == -4.0
Failure: Test: rint (-4.5) == -4.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 19:25:35 +0000 (21:25 +0200)]
libm: fix powf testcase failures
Fixed failures:
Failure: Test: pow (1, NaN) == 1
Failure: Test: pow (1, inf) == 1
Failure: Test: pow (-1, inf) == 1
Failure: Test: pow (1, -inf) == 1
Failure: Test: pow (-1, -inf) == 1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 18:30:14 +0000 (20:30 +0200)]
libm: fix scalb testsuite failures
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 18:19:20 +0000 (20:19 +0200)]
libm: fix testuite failure in modf
This error is gone:
Failure: Test: modf (NaN, &x) == NaN
Result:
is: -0.
00000000000000000000e+00 -0
should be: nan nan
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 17:40:35 +0000 (19:40 +0200)]
test/math/*: unbreak
test/math was not running at all, presume it has bit rotted:
It was trying to run libm-test.c as if it is a binary.
It was looking for libm-test-ulps (file with allowed
errors in lower bits) in arch-specific dirs which do not exist
in uclibc, as a result wrong file (libm-test.inc) was used instead.
Test failure was not showing the error result, user had to
fish it out from some .out files.
I added libm-test-ulps-ARCH files from recent glibc,
this filtered out a lot of false positives.
For example, cosf(M_PI_6l * 4.0) ideally should be -0.5,
we are getting -0.
50000005047356477217, and this isn't
a failure (the difference is one lowest bit of mantissa).
"make check UCLIBC_ONLY=1 VERBOSE=1" still fails,
but not as catastrophically as before.
For the record, the failure occurs on the stage where we check
32-bit float functions, these tests fail:
Failure: Test: modf (NaN, &x) == NaN
Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed
Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception
Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, inf) == NaN plus invalid exception
Failure: Test: scalb (-0, inf) == NaN plus invalid exception
Failure: Test: scalb (1, inf) == inf
Failure: Test: scalb (-1, inf) == -inf
Failure: Test: scalb (inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (-inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (inf, NaN) == NaN
Failure: Test: pow (1, NaN) == 1
Failure: Test: pow (1, inf) == 1
Failure: Test: pow (-1, inf) == 1
Failure: Test: pow (1, -inf) == 1
Failure: Test: pow (-1, -inf) == 1
Failure: Test: rint (0.5) == 0.0
Failure: Test: rint (1.5) == 2.0
Failure: Test: rint (2.5) == 2.0
Failure: Test: rint (3.5) == 4.0
Failure: Test: rint (4.5) == 4.0
Failure: Test: rint (-0.5) == -0.0
Failure: Test: rint (-1.5) == -2.0
Failure: Test: rint (-2.5) == -2.0
Failure: Test: rint (-3.5) == -4.0
Failure: Test: rint (-4.5) == -4.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Sat, 30 Oct 2010 13:06:20 +0000 (15:06 +0200)]
sleep: include Linus' email in the comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Fri, 29 Oct 2010 02:01:27 +0000 (04:01 +0200)]
sleep: document testing result on 2.4.x kernels
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Fri, 29 Oct 2010 01:44:57 +0000 (03:44 +0200)]
sleep: add comment with test program for SIG_IGNed SIGCHLD
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Bernhard Reutner-Fischer [Wed, 27 Oct 2010 20:18:23 +0000 (22:18 +0200)]
Fix msync() redefinition for noMMU build
An architecture that _may_ have a MMU (and thus implements
the msync syscall), but for which the kernel and uClibc are built as
noMMU, we have a stub for msync.
Thanks to Steven J. Magnani for noticing.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexander Gordeev [Thu, 7 Oct 2010 14:54:24 +0000 (18:54 +0400)]
mips: fix errno setting after syscall
If there was an error during syscall then after it's completion a3
register holds a non-zero value and v0 holds an actual error code which
should be saved in errno. This can be achieved by calling
__syscall_error with the value from v0 as a parameter. So this value
should be stored in a0, but the appropriate assembly instructions are
missing. Fixed this now by adding "move a0, v0".
I think it was once fixed by
58c5f8ba4cdf62342d05a546d15404cbbb3c4e07
but then something went wrong. Again...
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Denys Vlasenko [Fri, 22 Oct 2010 15:01:05 +0000 (17:01 +0200)]
*: inline constant __sig{add,del}set and __sigismember
text data bss dec hex filename
- 318 4 0 322 142 libc/pwd_grp/lckpwdf.o
+ 312 4 0 316 13c libc/pwd_grp/lckpwdf.o
- 166 0 1 167 a7 libc/stdlib/abort.o
+ 157 0 1 158 9e libc/stdlib/abort.o
- 42 0 0 42 2a libc/sysdeps/linux/common/pause.o
+ 27 0 0 27 1b libc/sysdeps/linux/common/pause.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Fri, 22 Oct 2010 14:52:41 +0000 (16:52 +0200)]
remove superfluous libc_hidden_proto(memcpy) and #include
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Fri, 22 Oct 2010 13:46:04 +0000 (15:46 +0200)]
sleep: tiny code shrink
...or rather, it WILL BE code shrink when gcc become clever enough
to not emit a second, useless XORing of ebx:
31 db xor %ebx,%ebx
85 c0 test %eax,%eax
74 11 je 73 <__GI_sleep+0x73>
31 db xor %ebx,%ebx <=== ?!
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Fri, 22 Oct 2010 13:24:13 +0000 (15:24 +0200)]
sleep: employ __USE_EXTERN_INLINES (with necessary fixes)
__USE_EXTERN_INLINES was unused and had bit-rotted, had to fix it
when it didn't work as intended at first.
text data bss dec hex filename
- 168 0 0 168 a8 libc/unistd/sleep.o
+ 146 0 0 146 92 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Fri, 22 Oct 2010 13:22:40 +0000 (15:22 +0200)]
sleep: check "SIGCHLD is SIG_IGN'ed" first. Saves two syscalls in common case
text data bss dec hex filename
- 197 0 0 197 c5 libc/unistd/sleep.o
+ 168 0 0 168 a8 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Timo Teräs [Fri, 22 Oct 2010 11:58:13 +0000 (13:58 +0200)]
libm/x86: use call instead of jump for wrappers
GCC can emit prologue/epilogue code for the functions in various
different cases:
- frame pointers
- PIC build (to load ebx for indirect calls/jumps)
- forced stack smashing protection
If we used jump in such cases, we'd corrupt the call stack and
crash.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Fri, 22 Oct 2010 11:48:57 +0000 (13:48 +0200)]
sleep: remove commented-out code. no code changes
It can be easily reconstructed, since it's obvious
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Thu, 21 Oct 2010 16:19:35 +0000 (18:19 +0200)]
sleep: code shrink
Use less stack by using same "sigset_t set" object for new and saved
signal set, remove redundant clearing of set, and do not save/restore
errno around sigprocmask(SIG_SETMASK) - it never changes it.
While at it, improve comments and make code style consistent
across sleep.c file.
text data bss dec hex filename
- 242 0 0 242 f2 libc/unistd/sleep.o
+ 197 0 0 197 c5 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Tue, 19 Oct 2010 13:07:00 +0000 (15:07 +0200)]
vfprintf.c: reduce a chunk of #ifdef forest and remove one goto inside it
No code changes according to objdump.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Tue, 19 Oct 2010 12:46:05 +0000 (14:46 +0200)]
_vfprintf.c: de-obfuscate badly twisted fragment. no code changes.
objdump confirms that I did not mess it up.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Tue, 19 Oct 2010 12:37:40 +0000 (14:37 +0200)]
vfprintf.c: remove endif comments which clog up the source. no code changes
Example:
--ppfs->maxposarg;
Verified with objdump that no code is changed
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Denys Vlasenko [Tue, 19 Oct 2010 12:07:51 +0000 (14:07 +0200)]
vfprintf.c: de-obfuscate if(with nested assignments). no logic changes
God knows this file is hard to read as-is, some readability improvement
is in order.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:10 +0000 (06:35 +0000)]
getproto: increase line buffer size, simlify and fix alias handling
We increase line buffer size, reduce MAXALIASES and make sure we don't
segfault when there are too manuy aliases in /etc/protocols.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:09 +0000 (06:35 +0000)]
getnet: simplify alias handling and reduce MAXALIASES
Reduce MAXALIASES to something lower. There will probably never be
need for more than 1 alias but we allow a few extra.
While here we alos fix segfault when there are too many aliases.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:08 +0000 (06:35 +0000)]
getservice: fix handling of long lines
Don't try to be smart by dynamically realloc buffersize as it doesn't
work. Instead, be simple and allocate a buffer big enough.
This fixes a memory leak when calling getserv{ent,byname,byport}
multiple times.
To save memory we reduce number of max aliases. We seldomly will need
more than 1 anyways. While here, fix segfault that happened if there
were too many aliases.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:07 +0000 (06:35 +0000)]
parse_config: discard rest of incomplete line
If line is longer then size of given buffer and buffer is not allocated by
the config parser itself, then discard rest of line.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:06 +0000 (06:35 +0000)]
config parser: always initialize line pointer
We must always initialize line pointer since data pointer might
have changed due to a realloc (in getserv.c for example).
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:05 +0000 (06:35 +0000)]
getservice: getservent_r must return ERANGE when buffer is too small
This fixes issue introduced by
72e1a1ce186c39f07282398e2af9eb0253e60f15
This should also fix the following testcase to exit with error rather
than cause an endless loop.
int main(void) {
if (getservbyname("non-existing", "udp") == NULL)
err(1, "getservbyname");
return 0;
}
Reported by Pirmin Walthert
http://lists.uclibc.org/pipermail/uclibc/2010-August/044277.html
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Natanael Copa [Thu, 14 Oct 2010 06:35:04 +0000 (06:35 +0000)]
config parser: do not assume that realloc return same pointer
We need to update the parser->line pointer on realloc and do not
initialize the token array til after the potensial realloc in
bb_get_chunk_with_continuation().
While here, also replace a realloc() with malloc() where pointer always
is NULL.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Austin Foxley [Fri, 1 Oct 2010 23:06:23 +0000 (16:06 -0700)]
sparc: pipe.S
return value of pipe on success is supposed to be 0
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Salvatore Cro [Thu, 23 Sep 2010 10:01:20 +0000 (12:01 +0200)]
ldso_sh: add support for protected symbols to SH
Protected symbols should not be overridden by
symbols from other modules. Such symbols are exported
i.e. globally visible, but references from whithin
defining modules are satisfied locally.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 22 Sep 2010 10:13:21 +0000 (12:13 +0200)]
libc: Sort HEADERS_RM alphabetically
No functional changes, just a code tidy-up.
Please keep them sorted in future changes.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Mon, 20 Sep 2010 13:03:17 +0000 (15:03 +0200)]
nptl: Fix libpthread build when UCLIBC_LINUX_SPECIFIC is disabled
NPTL library needs both madvise and statfs symbols, that are guarded
by UCLIBC_LINUX_SPECIFIC option. This fix provides these symbols too
when NPTL is used, indipendently by UCLIBC_LINUX_SPECIFIC choice.
Otherwise libpthread link fails as below:
LD libpthread-0.9.32-git.so
libpthread/nptl/libpthread_so.a(pthread_create.oS): In function `__free_tcb':
pthread_create.c:(.text+0x1184): undefined reference to `madvise'
libpthread/nptl/libpthread_so.a(sem_open.oS): In function `__where_is_shmfs':
sem_open.c:(.text+0x764): undefined reference to `statfs'
collect2: ld returned 1 exit status
make: *** [lib/libpthread.so] Error 1
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 30 Jun 2010 06:32:15 +0000 (08:32 +0200)]
libc: Handle cancellation in non multiplexed socket calls
For those archs that provide non multiplexed socket calls
it possible to implement the lib C wrappers without calling the
multi-purpose __socketcall. For a subset of these functions that
are cancellation point, it needs to correctly handle cancellation.
Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Thu, 16 Sep 2010 12:52:11 +0000 (14:52 +0200)]
nptl: Remove nptl/sysdeps/generic directory from include list
All archs have now moved their generic sysdep.h header from
sysdeps/generic to sysdeps/common directory, so it is possible
to remove the sysdeps/generic directory from the include list.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Tue, 20 Jul 2010 05:45:19 +0000 (07:45 +0200)]
nptl_sh: Fix compiler warning due to shadowed variable
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Thu, 16 Sep 2010 10:22:34 +0000 (12:22 +0200)]
libc: Add canonicalize_file_name function
Add canonicalize_file_name function and its related tests.
Required by elfutils and coreutils (readlink).
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Thu, 16 Sep 2010 09:49:20 +0000 (11:49 +0200)]
test: Update gitignore to take into account new tests added.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Filippo Arcidiacono [Tue, 27 Jul 2010 15:45:26 +0000 (17:45 +0200)]
ldso: Do not adjust dynamic section entries unnecessarily
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>