OSDN Git Service

uclinux-h8/uClibc.git
12 years agoARM: detect BX availibility at build time
Yann E. MORIN [Sun, 9 Jan 2011 00:45:09 +0000 (01:45 +0100)]
ARM: detect BX availibility at build time

The "use BX" option is now a suggestion that BX be used if available.
Use a macro to detect if BX is available at build time. If so, and
the user requested it be used, then use it. Otherwise, error out.

Macro courtesy Khem RAJ:
  http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoARM: #include <bits/arm_asm.h> where __USE_BX__ is used
Yann E. MORIN [Sun, 9 Jan 2011 00:45:08 +0000 (01:45 +0100)]
ARM: #include <bits/arm_asm.h> where __USE_BX__ is used

The check for __USE_BX__ will be available in bits/arm_asm.h,
so the latter must be included wherever the former is used.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoARM: transform the EABI/OABI choice into a boolean
Yann E. MORIN [Sun, 9 Jan 2011 00:45:07 +0000 (01:45 +0100)]
ARM: transform the EABI/OABI choice into a boolean

The CONFIG_ARM_OABI option is never used.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoARM: remove sub-arch/variants selection from menuconfig
Yann E. MORIN [Sun, 9 Jan 2011 00:45:06 +0000 (01:45 +0100)]
ARM: remove sub-arch/variants selection from menuconfig

Rely on the compiler to be correctly set up to generate
appropriate code for the target variant.

This exposes the Thumb option, as it is no longer auto-selected.
The "Use BX" no longer depends on supported CPU to be selected,
so it now defaults to 'n' as it shall work by default on CPUs
that do not have BX.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoARM: introduce blind options to select & force THUMB mode
Yann E. MORIN [Sun, 9 Jan 2011 00:45:05 +0000 (01:45 +0100)]
ARM: introduce blind options to select & force THUMB mode

Add three new blind options to set use of Thumb mode:
- COMPILE_IN_THUMB_MODE
  - if set, CFLAGS will contain -mthumb
  - if unset, the compiler's default is used
- HAS_THUMB
  - CPUS with Thumb instruction set can select this
  - use of BX depends on this
- FORCE_THUMB
  - CPUs that are Thumb-only must select this
  - this selects: HAS_THUMB, COMPILE_IN_THUMB_MODE and USE_BX

Also, remove leading space in Rules.mak.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoARM: reorder "Use BX" option
Yann E. MORIN [Sun, 9 Jan 2011 00:45:04 +0000 (01:45 +0100)]
ARM: reorder "Use BX" option

"Use BX" is not available on all CPUs, so the option depends on
a correct CPU to be chosen . It is weird that e BX" then appears
_above_ the CPU selection, not below.

Move the "Use BX" after the CPU selection.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoFix __libc_epoll_pwait compile failure on x86
Phil Blundell [Sat, 11 Jun 2011 05:10:46 +0000 (01:10 -0400)]
Fix __libc_epoll_pwait compile failure on x86

This prevents "memory input 7 is not directly addressable" errors.

| libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait':
| libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable
| libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable
| make: *** [libc/sysdeps/linux/common/epoll.o] Error 1
| make: *** Waiting for unfinished jobs....

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agonptl/Makefile.in: Fix the build break caused by UCLIBC_CTOR_DTOR enabling
Khem Raj [Fri, 10 Jun 2011 20:05:34 +0000 (13:05 -0700)]
nptl/Makefile.in: Fix the build break caused by UCLIBC_CTOR_DTOR enabling

Extra / somehow does not match the target and complains that
$(top_builddir)libpthread/nptl/sysdeps/pthread/crti.o has no rules to
build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agobuildsys: fix pregen target (!NPTL with LOCALE)
Carmelo Amoroso [Mon, 30 May 2011 12:22:57 +0000 (14:22 +0200)]
buildsys: fix pregen target (!NPTL with LOCALE)

When NPTL is not enabled, and LOCALE support is used, compilation fails
with the following error:

-------------------------------------------------------------------------
  MKDIR include/bits
  GEN include/bits/sysnum.h
make[1]: *** No rule to make target `../..//include/bits/uClibc_ctype.h', needed by `../../extra/locale/gen_wc8bit.c'.  Stop.
make: *** [pregen] Error 2
-------------------------------------------------------------------------

The problem is that "headers" is not listed as prerequisite of pregen.
These have been changed multiple times recently:

o Austin: order headers before pregen-headers
1f5c73c9f8a98b1d2a35cea868a585c97ab0e436
o Khem: pregen: Fix the parallel build problem in pregen target
046035ecde92262d96eff2192ba3cda716f04909
o Khem: pregen-headers: Add new target which depends on headers.
ef18cfe8ebab25f5ef92e81956f50e2dc57df602
o Carmelo: build: Fix infinite loop when no threading support is enabled
ff5e4de7088fe8d34812c2a1e604bf04be713606
In all of these commits headers was actually as prerequisite

In commit 9381d622e2411a35a5fd73a5a573eb269e2dd9c9 [nptl: fix buildsys] by Bernhard, headers was removed,
causing the problem reported above.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 years agolibubacktrace: Fix ASNEEDED emission
Bernhard Reutner-Fischer [Tue, 31 May 2011 07:47:12 +0000 (09:47 +0200)]
libubacktrace: Fix ASNEEDED emission

In master the variable is called SHARED_LIBNAME and not
SHARED_MAJORNAME.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoNPTL: Fix CTOR_DTOR
Bernhard Reutner-Fischer [Tue, 31 May 2011 07:45:44 +0000 (09:45 +0200)]
NPTL: Fix CTOR_DTOR

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolibc: make common longjmp usable with NPTL
Filippo Arcidiacono [Fri, 27 May 2011 15:36:20 +0000 (17:36 +0200)]
libc: make common longjmp usable with NPTL

Call _longjmp_unwind conditionally under NPTL config option,
making longjmp usable with NPTL.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 years agosh: use the common implementation for longjmp
Filippo Arcidiacono [Fri, 27 May 2011 15:17:51 +0000 (17:17 +0200)]
sh: use the common implementation for longjmp

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 years agosh: fix build in !NPTL case
Filippo Arcidiacono [Fri, 27 May 2011 15:08:36 +0000 (17:08 +0200)]
sh: fix build in !NPTL case

Fix build issue due to missing symbols in !NPTL case:
- vfork
- _longjmp_unwind

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 years agoCorrect a bug when remapping textrel segments on nommu
Alan Davis [Thu, 26 May 2011 16:15:06 +0000 (18:15 +0200)]
Correct a bug when remapping textrel segments on nommu

From: Alan Davis <adavis@ti.com>

On C6X, when trying to execute a program that has a textrel DSO, it
fails to load. The telltale line in the LD_DEBUG output is:

_dl_get_ready_to_run:779:       file='';  needed by './a.out'

The corresponding DT_NEEDED entry has 'libc.so.0', but here the
filename is empty. This is what is happening in
_dl_elf_shared_library():

First, map all segments according to their permissions. Text gets
initially mapped read-only.

Then, parse the dynamic information. The dynamic table is in RW but
some of the tags may point to RO. For example, DT_NEEDED points to a
string in .dynstr which is in RO. These pointers get computed
according to the loadmap from the original mapping.

Then, in response to a DT_TEXTREL tag, the RO segment gets remapped,
thereby invaliding anything that points to it, in particular certain
dynamic tags such as DT_NEEDED.

The following patch re-parses the dynamic info after the remapping so
as to re-compute any invalid pointers.

Signed-off-by: Alan Davis <adavis@ti.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
12 years agounwind.h: Move to libc/sysdeps from nptl sysdeps
Khem Raj [Fri, 13 May 2011 22:31:06 +0000 (15:31 -0700)]
unwind.h: Move to libc/sysdeps from nptl sysdeps

Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 years agoepoll: redo cancellation to match master
Bernhard Reutner-Fischer [Fri, 13 May 2011 10:16:29 +0000 (12:16 +0200)]
epoll: redo cancellation to match master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoepoll.c: add cancellation to epoll_[p]wait()
Peter S. Mazinger [Thu, 12 May 2011 23:56:08 +0000 (01:56 +0200)]
epoll.c: add cancellation to epoll_[p]wait()

While there, fix epoll_pwait syscall, it takes 6 arguments

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolibm: fix building out-of-tree
Bernhard Reutner-Fischer [Thu, 12 May 2011 10:26:41 +0000 (12:26 +0200)]
libm: fix building out-of-tree

Thanks to Thierry Reding for noticing!

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agowordexp: fix mishandled return value of pipe call
Bernhard Reutner-Fischer [Thu, 12 May 2011 10:11:14 +0000 (12:11 +0200)]
wordexp: fix mishandled return value of pipe call

and use pipe2 if available while at it.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolinux_specific: handle accept4 and pipe2
Bernhard Reutner-Fischer [Thu, 12 May 2011 08:37:36 +0000 (10:37 +0200)]
linux_specific: handle accept4 and pipe2

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoNPTL: needs madvise internally
Bernhard Reutner-Fischer [Thu, 12 May 2011 08:30:48 +0000 (10:30 +0200)]
NPTL: needs madvise internally

This fixes 8d09a50a044638fde2ed3e1a1c4d3c7c5a3cce5c since NPTL also uses
madvise internally.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agosocket: fix stubs
Bernhard Reutner-Fischer [Thu, 12 May 2011 08:07:25 +0000 (10:07 +0200)]
socket: fix stubs

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agocommentary typo fix
Bernhard Reutner-Fischer [Wed, 11 May 2011 20:22:51 +0000 (22:22 +0200)]
commentary typo fix

s/decriptor/descriptor/

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoepoll: unify epoll.h
Bernhard Reutner-Fischer [Wed, 11 May 2011 20:17:23 +0000 (22:17 +0200)]
epoll: unify epoll.h

12 years agocommentary typo fix
Bernhard Reutner-Fischer [Wed, 11 May 2011 20:03:33 +0000 (22:03 +0200)]
commentary typo fix

use cancellation (with two 'l') uniformly.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoImplement epoll_create1 and epoll_pwait system calls.
Thierry Reding [Wed, 11 May 2011 07:28:13 +0000 (09:28 +0200)]
Implement epoll_create1 and epoll_pwait system calls.

Note: TODO: This lacks cancellation support.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agobuildsys: document UCLIBC_EXTRA_CPPFLAGS
Bernhard Reutner-Fischer [Wed, 11 May 2011 19:16:23 +0000 (21:16 +0200)]
buildsys: document UCLIBC_EXTRA_CPPFLAGS

Rename EXTRA_CPPFLAGS to UCLIBC_EXTRA_CPPFLAGS and make them override
previous flags (by appending - not prepending - them to the other flags).

12 years agolll: avoid shadow warnings
Bernhard Reutner-Fischer [Wed, 11 May 2011 18:42:18 +0000 (20:42 +0200)]
lll: avoid shadow warnings

use __ret uniformly to avoid shadow warnings as seen on x86_64.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agox86_64: add TODO for R_X86_64_RELATIVE
Bernhard Reutner-Fischer [Wed, 11 May 2011 18:29:59 +0000 (20:29 +0200)]
x86_64: add TODO for R_X86_64_RELATIVE

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolibubacktrace: mv unwind.h to include
Bernhard Reutner-Fischer [Wed, 11 May 2011 17:52:16 +0000 (19:52 +0200)]
libubacktrace: mv unwind.h to include

Fixes compilation if NPTL is off.
I hope this doesn't break ARM EABI but cannot check ATM.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoRevert "libubacktrace: fix config-symbol handling"
Bernhard Reutner-Fischer [Wed, 11 May 2011 17:16:17 +0000 (19:16 +0200)]
Revert "libubacktrace: fix config-symbol handling"

This reverts commit 7a080cd149c7b25d415d76506510d55b34819fc2.

This symbol is in fact different (as it is set no 'n').

12 years agoadd pipe2()
Bernhard Reutner-Fischer [Wed, 11 May 2011 11:12:14 +0000 (13:12 +0200)]
add pipe2()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agosocketcalls: add stubs
Bernhard Reutner-Fischer [Wed, 11 May 2011 10:05:20 +0000 (12:05 +0200)]
socketcalls: add stubs

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoaccept4: Implement cancellation
Bernhard Reutner-Fischer [Wed, 11 May 2011 09:31:45 +0000 (11:31 +0200)]
accept4: Implement cancellation

.. and add proper prototype, move it into it's own obj and other such
cleanups.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoImplement accept4 system call.
Thierry Reding [Wed, 11 May 2011 06:40:58 +0000 (08:40 +0200)]
Implement accept4 system call.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolibubacktrace: fix config-symbol handling
Bernhard Reutner-Fischer [Fri, 6 May 2011 17:07:12 +0000 (19:07 +0200)]
libubacktrace: fix config-symbol handling

Config symbals that are not set are empty, not 'n'.

12 years agobuildsys: Turn on strict aliasing for everyone
Bernhard Reutner-Fischer [Wed, 11 May 2011 07:37:35 +0000 (09:37 +0200)]
buildsys: Turn on strict aliasing for everyone

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agoldso: commentary typo fix
Bernhard Reutner-Fischer [Tue, 10 May 2011 19:22:25 +0000 (21:22 +0200)]
ldso: commentary typo fix

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agogetcwd: Fix memory-leak in error path
Bernhard Reutner-Fischer [Tue, 10 May 2011 18:19:46 +0000 (20:19 +0200)]
getcwd: Fix memory-leak in error path

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years ago__uc_malloc: Fix memory-leak in error path
Bernhard Reutner-Fischer [Tue, 10 May 2011 18:09:36 +0000 (20:09 +0200)]
__uc_malloc: Fix memory-leak in error path

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agolibdl: fix local symbol's address handling in dladdr
Filippo Arcidiacono [Fri, 6 May 2011 14:49:28 +0000 (16:49 +0200)]
libdl: fix local symbol's address handling in dladdr

Fix dladdr to correctly handle local function's address so backtrace_symbols
print only the function address for these function, instead of showing the name
of nearest one.
Indeed the dladdr walk through the hash table to find the nearest symbol, that
doesn't contain local symbols.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 years ago*/crtn.S: Remove .size directive for _init and _fini
Bernhard Reutner-Fischer [Tue, 10 May 2011 08:03:58 +0000 (10:03 +0200)]
*/crtn.S: Remove .size directive for _init and _fini

These are split across objects so setting size does not (and never did)
work since the expression cannot be computed at assembly time.

This avoids errors from recent (> 2.21) gas.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoposix_fadvise64: fix x86 implementation
Timo Teräs [Wed, 20 Apr 2011 10:59:15 +0000 (13:59 +0300)]
posix_fadvise64: fix x86 implementation

Commit 73d59554144f429b1cf0d4d7fa7de42bdf59ad92 completely broke
the x86 implementation of posix_fadvise64. It moved the first
the assembly code retn instruction gets missing depending on the

Technically the file has two implementaions for posix_fadvise64,
one when __NR_fadvise64_64 is available, and second one if only
__NR_fadvise64 is there. Fix the #ifdef's to be proper for that.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 years agoi386: fix .size of _init/_fini
Bernhard Reutner-Fischer [Thu, 5 May 2011 07:33:14 +0000 (09:33 +0200)]
i386: fix .size of _init/_fini

binutils-2.21 barf on .size that do not evaluate to const, so use
the section size and not a function that is not visible here.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agox86_64: fix .size of _init/_fini
Bernhard Reutner-Fischer [Thu, 5 May 2011 07:27:15 +0000 (09:27 +0200)]
x86_64: fix .size of _init/_fini

binutils-2.21 barf on .size that do not evaluate to const, so use the
section size and not a function that is not visible here.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoRevert "*/crt?.S: remove .size directives"
Bernhard Reutner-Fischer [Thu, 5 May 2011 07:19:16 +0000 (09:19 +0200)]
Revert "*/crt?.S: remove .size directives"

Removing them generally was not a good idea

This reverts commit 233c504cd940d9802226b6a3a092368b86978f5e.

13 years ago*/crt?.S: remove .size directives
Bernhard Reutner-Fischer [Wed, 4 May 2011 08:01:24 +0000 (10:01 +0200)]
*/crt?.S: remove .size directives

sed -i -e '/\.size[[:space:]]/d' $(grep -l "\.size" libc/sysdeps/linux/*/crt*.[sSc])

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agolibubacktrace: fix backtrace support on arm-eabi, which needs libgcc_eh linked too
Henning Heinold [Fri, 29 Apr 2011 11:58:02 +0000 (13:58 +0200)]
libubacktrace: fix backtrace support on arm-eabi, which needs libgcc_eh linked too

Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agogetaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r
Denys Vlasenko [Tue, 3 May 2011 15:29:35 +0000 (17:29 +0200)]
getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r

Also, freeaddrinfo(NULL) is ok, no need to check parameted for NULL
before calling it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
13 years agogetaddrinfo.c: improve code readability. No functional changes
Denys Vlasenko [Tue, 3 May 2011 15:28:19 +0000 (17:28 +0200)]
getaddrinfo.c: improve code readability. No functional changes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
13 years agostring: remove unused variable
Bernhard Reutner-Fischer [Tue, 3 May 2011 14:40:31 +0000 (16:40 +0200)]
string: remove unused variable

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agox86_64: silence warning if !TLS
Bernhard Reutner-Fischer [Tue, 3 May 2011 14:36:15 +0000 (16:36 +0200)]
x86_64: silence warning if !TLS

TODO: fix all other arches

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agobuildsys: prettify ssp.c handling
Bernhard Reutner-Fischer [Tue, 3 May 2011 14:24:08 +0000 (16:24 +0200)]
buildsys: prettify ssp.c handling

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agomadvise is LINUX_SPECIFIC
Bernhard Reutner-Fischer [Tue, 3 May 2011 14:15:30 +0000 (16:15 +0200)]
madvise is LINUX_SPECIFIC

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agotest_nptl: fix expected result for tst-cputimer[123]
Filippo Arcidiacono [Tue, 3 May 2011 07:32:53 +0000 (09:32 +0200)]
test_nptl: fix expected result for tst-cputimer[123]

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agotest_nptl: fix expected result for tst-clock2 test
Filippo Arcidiacono [Mon, 2 May 2011 10:59:18 +0000 (12:59 +0200)]
test_nptl: fix expected result for tst-clock2 test

tst-clock2 should return 0 when _SC_THREAD_CPUTIME option isn't
available, instead of treating it as an error.
Further set the expected ret value as 0 avoiding to hide any real failures
in case of THREAD_CPUTIME feature available.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agobuildsys: make $(LOCAL_INSTALL_PATH) phony
Bernhard Reutner-Fischer [Mon, 2 May 2011 08:15:41 +0000 (10:15 +0200)]
buildsys: make $(LOCAL_INSTALL_PATH) phony

Could depend on the individual files too but this makes sure that
nothing is missed.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoether_aton: reject invalid input
Bernhard Reutner-Fischer [Mon, 2 May 2011 08:10:47 +0000 (10:10 +0200)]
ether_aton: reject invalid input

fixes PR2227

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agotests: disable ether tests if !HAS_SOCKET
Bernhard Reutner-Fischer [Sun, 1 May 2011 16:00:04 +0000 (18:00 +0200)]
tests: disable ether tests if !HAS_SOCKET

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoinet: add ether_aton testcase
David A Ramos [Sun, 1 May 2011 15:28:31 +0000 (17:28 +0200)]
inet: add ether_aton testcase

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agosysconf: clock_getres depends on HAS_REALTIME
Bernhard Reutner-Fischer [Fri, 29 Apr 2011 12:14:27 +0000 (14:14 +0200)]
sysconf: clock_getres depends on HAS_REALTIME

Bug was introduced in revision a202cf6f.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years ago__rt_sigwaitinfo: depends on HAS_REALTIME
Bernhard Reutner-Fischer [Fri, 29 Apr 2011 12:05:54 +0000 (14:05 +0200)]
__rt_sigwaitinfo: depends on HAS_REALTIME

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agobuildsys: minor fixes in Makefile.arch for C6X
Carmelo Amoroso [Wed, 27 Apr 2011 07:29:44 +0000 (09:29 +0200)]
buildsys: minor fixes in Makefile.arch for C6X

Just a tidy-up by removing commented-out lines.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agobuildsys: minor fixes in Makefile.arch for microblaze
Carmelo Amoroso [Wed, 27 Apr 2011 07:20:48 +0000 (09:20 +0200)]
buildsys: minor fixes in Makefile.arch for microblaze

Do not include Makefile.commonarch directly from within arch specific
Makefile, as it is already done in parent Maefile.in.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agolibubacktrace: enabled for all archs indeed.
Carmelo Amoroso [Tue, 26 Apr 2011 11:54:13 +0000 (13:54 +0200)]
libubacktrace: enabled for all archs indeed.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agosparc: don't access fp registers when configured for no fpu
Austin Foxley [Fri, 22 Apr 2011 23:21:30 +0000 (16:21 -0700)]
sparc: don't access fp registers when configured for no fpu

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
13 years agolibubacktrace: generic implementation based dwarf
Carmelo Amoroso [Fri, 22 Apr 2011 10:55:43 +0000 (12:55 +0200)]
libubacktrace: generic implementation based dwarf

Use the initial implementation for SH4 based on dwarf for all archs.
Indeed there are not obvious reason for which it should not work in general.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agoAdded fts support for traversing UNIX file hierarchies.
Salvatore Cro [Wed, 20 Apr 2011 10:49:25 +0000 (12:49 +0200)]
Added fts support for traversing UNIX file hierarchies.

It is required by libdwfl in elfutils package.

Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agotest: fix tst-tls13 expected result and timeout
Salvatore Cro [Fri, 8 Apr 2011 15:56:22 +0000 (17:56 +0200)]
test: fix tst-tls13 expected result and timeout

tst-tls13 is expected to return 0 when passing.
Set higher timeout to avoid failure on slow archs.

Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agodl-startup: fix typos in block comment
Kevin Cernekee [Sat, 16 Apr 2011 17:02:00 +0000 (10:02 -0700)]
dl-startup: fix typos in block comment

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agoMIPS LDSO: pass sym_ref parameter to _dl_find_hash() to support PROTECTED symbols
Maksim Rayskiy [Fri, 15 Apr 2011 17:25:40 +0000 (10:25 -0700)]
MIPS LDSO: pass sym_ref parameter to _dl_find_hash() to support PROTECTED symbols

_dl_find_hash() relies on sym_ref parameter to check if the looked-up symbol
is protected. The code fixes a case when _dl_perform_mips_global_got_relocations()
was calling _dl_find_hash() without providing sym_ref parameter.
The bug was causing hangs if a library exporting non-protected symbol was earlier in
link order than library with the same symbol declared as protected.

Signed-off-by: Maksim Rayskiy <mrayskiy@broadcom.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
13 years agobuildsys: do_rm ARCH_HEADERS
Bernhard Reutner-Fischer [Thu, 14 Apr 2011 07:59:26 +0000 (09:59 +0200)]
buildsys: do_rm ARCH_HEADERS

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoresolv: really fix res_close not to hang with ipv6
Bernhard Reutner-Fischer [Wed, 13 Apr 2011 17:38:40 +0000 (19:38 +0200)]
resolv: really fix res_close not to hang with ipv6

Fix goof in previous commit.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agobuildsys: do not use $(and)
Bernhard Reutner-Fischer [Wed, 13 Apr 2011 08:26:38 +0000 (10:26 +0200)]
buildsys: do not use $(and)

make-3.80 does not have $(and) and $(or), so workaround for now.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agobuildsys: fix GNU make v3.80 compatibility again
Kevin Cernekee [Sun, 10 Apr 2011 02:55:07 +0000 (19:55 -0700)]
buildsys: fix GNU make v3.80 compatibility again

GNU make 3.80 cannot handle "$(and)" or "$(or)" from commit 18e7136e
(buildsys: use kbuild style).  Replace them with ifeq/ifneq.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoresolv: fix res_close not to hang with ipv6
Bernhard Reutner-Fischer [Tue, 12 Apr 2011 07:39:20 +0000 (09:39 +0200)]
resolv: fix res_close not to hang with ipv6

Timo Teräs writes:
The memory release loop is missing an obvious counter increment.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoSupport dynamic assignment of DSBT_INDEX
Bernd Schmidt [Mon, 11 Apr 2011 11:21:23 +0000 (13:21 +0200)]
Support dynamic assignment of DSBT_INDEX

For DSBT targets (C6X only at this point), we'd like to support the case
where the user did not specify --dsbt-index at link time when building a
shared library. The dynamic linker can still assign an index at runtime
and fix up the DSBT_INDEX relocs, at the cost of startup time and memory
space.

Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
13 years agoFix malloc alignment
Bernd Schmidt [Mon, 11 Apr 2011 11:19:05 +0000 (13:19 +0200)]
Fix malloc alignment

In commit 3e0a1f388, Richard tried to fix malloc alignments by using
 alignof (double __attribute_aligned__(sizeof (size_t))).
This doesn't work, since attribute_aligned overrides the alignment
rather than providing a minimum. On C6X, malloc returns four-byte
aligned values rather than the necessary eight-byte alignment.

It's simpler to use a comparison and pick the bigger of the two values,
so that's what I've done.

Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
13 years agoFix nommu handling of DT_TEXTREL
Bernd Schmidt [Mon, 11 Apr 2011 11:13:18 +0000 (13:13 +0200)]
Fix nommu handling of DT_TEXTREL

We have a problem with DT_TEXTREL shared libraries on nommu machines.
The dynamic linker's strategy is to map the text segment read-only
first, then look for DT_TEXTREL, and use mprotect to change protections
if necessary. This fails on nommu, since a nommu kernel can decide to
share the memory for private read-only file mappings, and mprotect
doesn't (can't) do anything about this sharing. Existing nommu targets
apparently have no need for this, but on C6X, we may need to assign
library indices at run-time if no --dsbt-index option was passed to the
linker at build time.

Hence, the following patch, which instead of using mprotect, redoes the
mapping with PF_W set.

Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
13 years agoutils/ldd: Check for returned pointer from strrchr not the value it holds
Kevin Day [Wed, 30 Mar 2011 11:51:22 +0000 (04:51 -0700)]
utils/ldd: Check for returned pointer from strrchr not the value it holds

Signed-off-by: Kevin Day <thekevinday@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 years agocris: add provide arch-specific vfork implementation
Thorsten Glaser [Sat, 26 Mar 2011 15:11:51 +0000 (15:11 +0000)]
cris: add provide arch-specific vfork implementation

vfork must be called with nothing at all on the stack,
so implementing it via syscall() does not work.

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agolutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined
Peter S. Mazinger [Fri, 18 Mar 2011 14:37:35 +0000 (15:37 +0100)]
lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined

while there, provide stubs for functions depending on utimensat syscall.

Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 years agobump version to 0.9.32-rc3-git
Bernhard Reutner-Fischer [Wed, 16 Mar 2011 19:20:32 +0000 (20:20 +0100)]
bump version to 0.9.32-rc3-git

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agorelease 0.9.32-rc3
Bernhard Reutner-Fischer [Wed, 16 Mar 2011 19:11:13 +0000 (20:11 +0100)]
release 0.9.32-rc3

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agomemalign: include sys/param.h for MAX
Bernhard Reutner-Fischer [Wed, 16 Mar 2011 19:09:43 +0000 (20:09 +0100)]
memalign: include sys/param.h for MAX

libc/stdlib/malloc/memalign.c:22:1: warning: "MAX" redefined In file included from
./libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:25,
                 from ./include/bits/libc-lock.h:36,
                 from ./include/bits/stdio-lock.h:23,
                 from ./include/bits/uClibc_mutex.h:71,
                 from libc/stdlib/malloc/malloc.h:135,
                 from libc/stdlib/malloc/memalign.c:18:
./include/sys/param.h:75:1: warning: this is the location of the previous definition

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoarm/bits/atomic.h: Include common/bit/atomic.h for thumb1
Khem Raj [Tue, 15 Mar 2011 05:45:33 +0000 (22:45 -0700)]
arm/bits/atomic.h: Include common/bit/atomic.h for thumb1

This restores the behavior for thumb1 builds and yet uses
the new atomic.h for arm and thumb2 modes.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 years agowctype.h: fix libc_hidden_proto for iswupper and add it for iswspace
Peter S. Mazinger [Thu, 10 Mar 2011 12:15:10 +0000 (13:15 +0100)]
wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace

Old typo, became visible due to other changes.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agoadd libc_hidden_proto for wcs[n]casecmp_l
Peter S. Mazinger [Thu, 10 Mar 2011 12:13:26 +0000 (13:13 +0100)]
add libc_hidden_proto for wcs[n]casecmp_l

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agoreally fix missing __libc_drand48_data
Peter S. Mazinger [Thu, 10 Mar 2011 12:02:19 +0000 (13:02 +0100)]
really fix missing __libc_drand48_data

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agoRevert "missing prototype of __libc_drand48_data fixed"
Peter S. Mazinger [Thu, 10 Mar 2011 11:59:15 +0000 (12:59 +0100)]
Revert "missing prototype of __libc_drand48_data fixed"

This reverts commit e2cea9b9edabe885b9bf2586f9541ffb8fe93f3f.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agomissing prototype of __libc_drand48_data fixed
Peter S. Mazinger [Thu, 10 Mar 2011 10:43:07 +0000 (11:43 +0100)]
missing prototype of __libc_drand48_data fixed

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agotime.c, time.h: remove unused hidden strftime/strptime
Peter S. Mazinger [Thu, 10 Mar 2011 10:34:38 +0000 (11:34 +0100)]
time.c, time.h: remove unused hidden strftime/strptime

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agonanosleep.c: remove duplicated libc_hidden_proto
Peter S. Mazinger [Thu, 10 Mar 2011 10:33:51 +0000 (11:33 +0100)]
nanosleep.c: remove duplicated libc_hidden_proto

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agoctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31
Peter S. Mazinger [Thu, 10 Mar 2011 10:06:25 +0000 (11:06 +0100)]
ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years ago_wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions
Peter S. Mazinger [Thu, 10 Mar 2011 09:50:01 +0000 (10:50 +0100)]
_wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agotime.c, wchar.h: remove unused hidden wcsftime
Peter S. Mazinger [Wed, 9 Mar 2011 23:49:01 +0000 (00:49 +0100)]
time.c, wchar.h: remove unused hidden wcsftime

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agostr[n]casecmp.c: fix hidden usage
Peter S. Mazinger [Wed, 9 Mar 2011 23:01:10 +0000 (00:01 +0100)]
str[n]casecmp.c: fix hidden usage

Provide visible str[n]casecmp[_l], wcs[n]casecmp[_l].

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agoremove unused hidden functions
Peter S. Mazinger [Wed, 9 Mar 2011 22:20:16 +0000 (23:20 +0100)]
remove unused hidden functions

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
13 years agofrv/memset.S: add missing libc_hidden_def
Peter S. Mazinger [Wed, 9 Mar 2011 21:37:05 +0000 (22:37 +0100)]
frv/memset.S: add missing libc_hidden_def

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>