OSDN Git Service

uclinux-h8/uclibc-ng.git
8 years agoh8300: Makefile update h8300
Yoshinori Sato [Mon, 18 May 2015 07:03:19 +0000 (16:03 +0900)]
h8300: Makefile update

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoh8300: Add new feature
Yoshinori Sato [Mon, 18 May 2015 06:57:46 +0000 (15:57 +0900)]
h8300: Add new feature

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoh8300: headers update
Yoshinori Sato [Mon, 18 May 2015 06:45:51 +0000 (15:45 +0900)]
h8300: headers update

- wire up new kernel

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoh8300: Assembly functions
Yoshinori Sato [Mon, 18 May 2015 06:37:21 +0000 (15:37 +0900)]
h8300: Assembly functions

- remove symbol prefix
- new startup
- new clone syscall support

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoh8300: 64bit integer support
Yoshinori Sato [Mon, 18 May 2015 07:06:41 +0000 (16:06 +0900)]
h8300: 64bit integer support

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoh8300: config update
Yoshinori Sato [Mon, 18 May 2015 06:32:26 +0000 (15:32 +0900)]
h8300: config update

- New toolchain
- Add new flags

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agoadd thanks file
Waldemar Brodkorb [Thu, 21 May 2015 19:38:31 +0000 (21:38 +0200)]
add thanks file

9 years agoRevert "Do not define unimplemented functions"
Waldemar Brodkorb [Sat, 25 Apr 2015 12:09:40 +0000 (07:09 -0500)]
Revert "Do not define unimplemented functions"

This reverts commit bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833.

They are now implemented.

9 years agodisabled ARC tests working now
Waldemar Brodkorb [Sat, 25 Apr 2015 00:47:48 +0000 (02:47 +0200)]
disabled ARC tests working now

As reported by Alexey Brodkin <Alexey.Brodkin@synopsys.com>
these tests do not fail anymore. After upgrading binutils/gcc
tests compile fine.

9 years agoreturn NULL for realloc(p,0) like glibc
Waldemar Brodkorb [Fri, 3 Apr 2015 10:20:41 +0000 (05:20 -0500)]
return NULL for realloc(p,0) like glibc

See discussion here about the issue:
https://sourceware.org/bugzilla/show_bug.cgi?id=12547

Fixes testsuite errors.

9 years agosimplify malloc, remove sbrk support
Waldemar Brodkorb [Fri, 20 Mar 2015 06:57:40 +0000 (01:57 -0500)]
simplify malloc, remove sbrk support

9 years agostick with one malloc implementation for all
Waldemar Brodkorb [Thu, 19 Mar 2015 18:51:09 +0000 (13:51 -0500)]
stick with one malloc implementation for all

Supporting three different malloc implementations seems
a big overhead to be avoided. Just use malloc, which
works for MMU/no-MMU devices just fine.

9 years agofix static linking of pthread apps
Waldemar Brodkorb [Wed, 15 Apr 2015 17:47:57 +0000 (12:47 -0500)]
fix static linking of pthread apps

When compiling python you get duplicate symbol problem.
Seen in the autobuilders of buildroot project.

9 years agouse weak to fix f.e. cdrkit static compile. fixes #3
Waldemar Brodkorb [Thu, 26 Feb 2015 19:46:11 +0000 (20:46 +0100)]
use weak to fix f.e. cdrkit static compile. fixes #3

9 years agofix compile error when LDSO_RUNPATH_OF_EXECUTABLE is set
Waldemar Brodkorb [Mon, 13 Apr 2015 05:34:36 +0000 (07:34 +0200)]
fix compile error when LDSO_RUNPATH_OF_EXECUTABLE is set

9 years agoremove more of the link_warnings
Waldemar Brodkorb [Sun, 12 Apr 2015 16:40:58 +0000 (18:40 +0200)]
remove more of the link_warnings

Only the stub warnings left for now.

9 years agoremove link warnings
Waldemar Brodkorb [Sun, 12 Apr 2015 16:32:11 +0000 (18:32 +0200)]
remove link warnings

As recently discussed on the pgsql mailinglist, this
warnings are more or less useless and some configure scripts
are failing when these warnings are enabled.

http://www.postgresql.org/message-id/20150320132351.GS3636@alvh.no-ip.org

9 years agoremove regex old and fnmatch old
Waldemar Brodkorb [Thu, 2 Apr 2015 20:22:12 +0000 (15:22 -0500)]
remove regex old and fnmatch old

9 years agofor xtensa this is still required to avoid build breakage
Waldemar Brodkorb [Thu, 2 Apr 2015 20:20:39 +0000 (15:20 -0500)]
for xtensa this is still required to avoid build breakage

9 years agowe need -fPIC for the new test for m68k binutils problem
Waldemar Brodkorb [Tue, 31 Mar 2015 18:56:17 +0000 (13:56 -0500)]
we need -fPIC for the new test for m68k binutils problem

9 years agoremove sh64 support
Waldemar Brodkorb [Mon, 30 Mar 2015 08:48:56 +0000 (03:48 -0500)]
remove sh64 support

No real hardware available. The project for sh64 with sh5 seems
dead since 10 years.

9 years agoRevert "gcc 4.9.x produces some calls to abort()"
Waldemar Brodkorb [Sun, 29 Mar 2015 21:22:30 +0000 (16:22 -0500)]
Revert "gcc 4.9.x produces some calls to abort()"

This reverts commit 8d73c06c7a78745a50dc8683fd117aeacd71a04b.

Fixed in a better way by Bernhard in uClibc.

9 years agogcc 4.4 does not have __builtin_unreachable
Waldemar Brodkorb [Sun, 29 Mar 2015 21:20:54 +0000 (16:20 -0500)]
gcc 4.4 does not have __builtin_unreachable

For avr32 we still use gcc 4.4 compiler, so exlude the usage
of __builtin_unreachable here.

9 years agodisable new tests, atomic.h is missing
Waldemar Brodkorb [Sun, 29 Mar 2015 09:43:37 +0000 (04:43 -0500)]
disable new tests, atomic.h is missing

9 years agomerge uClibc master
Waldemar Brodkorb [Sun, 29 Mar 2015 09:42:22 +0000 (04:42 -0500)]
merge uClibc master

9 years agoARC: don't hard-code ELF_NGREG
Alexey Brodkin [Thu, 26 Mar 2015 08:55:37 +0000 (14:25 +0530)]
ARC: don't hard-code ELF_NGREG

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
[updated changelog]

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoARC/signal: shield sa_restorer from compiler toggle side-effects
Vineet Gupta [Thu, 26 Mar 2015 12:37:04 +0000 (18:07 +0530)]
ARC/signal: shield sa_restorer from compiler toggle side-effects

when building uClibc with -O0 (DODEBUG build) the default sigrestorer
had some extra glue code generated for stack manipulation which was
messing up resume from signal path.

So annotate the function with -Os so that gcc would only generate the
bare min 2 instruction TRAP sequence

Reported-and-Debugged-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>
9 years agoARC: switch to NPTL
Vineet Gupta [Thu, 26 Mar 2015 08:55:35 +0000 (14:25 +0530)]
ARC: switch to NPTL

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoAdd support for R_ARC_NONE relocations.
Andrew Burgess [Thu, 26 Mar 2015 08:55:34 +0000 (14:25 +0530)]
Add support for R_ARC_NONE relocations.

The R_ARC_NONE relocation is generated when --gc-sections, used by the
compile time linker, removes some sections.  This is completely normal,
and we can see that all other targets (based on random sampling) have
support for R_*_NONE relocations (named for each target).

Handling R_ARC_NONE involves doing nothing with it, which is nice and
easy.

Signed-off-by: Andrew Burgess <andrew.burgess@embecosm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoinclude: update atomic.h from glibc
Bernhard Reutner-Fischer [Thu, 26 Mar 2015 22:12:38 +0000 (23:12 +0100)]
include: update atomic.h from glibc

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: Add SIMULATOR_uclibc and SIMULATOR_glibc
Bernhard Reutner-Fischer [Thu, 26 Mar 2015 21:51:16 +0000 (22:51 +0100)]
test: Add SIMULATOR_uclibc and SIMULATOR_glibc

where SIMULATOR_glibc is an optional simulator to run host binaries and
SIMULATOR_uclibc is an optional simulator to run target (uClibc)
binaries.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: always have at least utmpx
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 23:50:17 +0000 (00:50 +0100)]
utmp: always have at least utmpx

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoNPTL: SH: silence warning
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 23:03:09 +0000 (00:03 +0100)]
NPTL: SH: silence warning

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoSH: add 't' to syscall clobber list
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 23:03:05 +0000 (00:03 +0100)]
SH: add 't' to syscall clobber list

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoldso: mark _dl_exit as noreturn
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 23:02:58 +0000 (00:02 +0100)]
ldso: mark _dl_exit as noreturn

Otherwise gcc might not understand that oom() ended control-flow and
might emit an (untaken) reference to abort() in _dl_update_slotinfo()
on e.g. SH4 which breaks linking ld-uClibc.so.
Arguably -ffreestanding should prevent GCC from emitting this
'.global abort' but alas, it does not, which is another bug..

Also mark the function cold to further lower the incoming frequency and
branch probability.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: tweaks
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 22:59:52 +0000 (23:59 +0100)]
test: tweaks

Fix arc4random exclusion for real.
Silence warning about missing prototype for external helper-function in
tst-scandir

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoinclude: Expand malloc-family comments
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 22:59:49 +0000 (23:59 +0100)]
include: Expand malloc-family comments

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: favour POSIX utmpx over SVID utmp
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 22:59:45 +0000 (23:59 +0100)]
utmp: favour POSIX utmpx over SVID utmp

Note: _PATH_UTMPX == _PATH_UTMP and the utmp struct is identical to the
utmpx struct so this only changes the external API entrypoints and NOT
the underlying data source.

This saves about 500b (~1300b from previously ~1950) while at it.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: Remove unneeded alias
Bernhard Reutner-Fischer [Wed, 25 Mar 2015 22:59:37 +0000 (23:59 +0100)]
utmp: Remove unneeded alias

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agomips: switch float_t to float
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:49 +0000 (00:11 +0100)]
mips: switch float_t to float

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibm: honor NO_LONG_DOUBLE in ldouble_wrappers
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:47 +0000 (00:11 +0100)]
libm: honor NO_LONG_DOUBLE in ldouble_wrappers

Fixes SH build breakage due to attempts to define hidden defs for
unavailable long double functions.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibcrypt: Rename some internal macros
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:44 +0000 (00:11 +0100)]
libcrypt: Rename some internal macros

to avoid clashes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: fix IS_IN_lib* for .s
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:41 +0000 (00:11 +0100)]
buildsys: fix IS_IN_lib* for .s

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: indent
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:38 +0000 (00:11 +0100)]
utmp: indent

indent only, no code changes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: Remove unneeded aliases
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:28 +0000 (00:11 +0100)]
utmp: Remove unneeded aliases

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutmp: add _unlocked suffix to internal helpers
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:24 +0000 (00:11 +0100)]
utmp: add _unlocked suffix to internal helpers

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: HAS_UTMP (XPG2, SVr4 compat) knob
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:21 +0000 (00:11 +0100)]
buildsys: HAS_UTMP (XPG2, SVr4 compat) knob

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibc: TIME64_COMPAT32 for sparc, mips
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:11:15 +0000 (00:11 +0100)]
libc: TIME64_COMPAT32 for sparc, mips

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoRevert "utent.c, wtent.c: move functions from utxent.c"
Bernhard Reutner-Fischer [Mon, 23 Mar 2015 23:09:45 +0000 (00:09 +0100)]
Revert "utent.c, wtent.c: move functions from utxent.c"

This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18.

This change is said to make systemd deadlock (cannot reproduce this)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Conflicts:
include/utmp.h

9 years agookay, chicken-egg-problem solved really now. (was xtensa no thread failure)
Waldemar Brodkorb [Sun, 8 Mar 2015 19:00:06 +0000 (14:00 -0500)]
okay, chicken-egg-problem solved really now. (was xtensa no thread failure)

9 years agotest: add utmpx test
Bernhard Reutner-Fischer [Sun, 22 Mar 2015 13:47:29 +0000 (14:47 +0100)]
test: add utmpx test

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibc: add getrandom(2)
Bernhard Reutner-Fischer [Sun, 22 Mar 2015 13:47:29 +0000 (14:47 +0100)]
libc: add getrandom(2)

Introduce a <sys/random.h> for it.

/* FIXME: aren't there a couple of __restrict and const missing ?
 */
extern int getrandom(void *__buf, size_t count, unsigned int flags)
    __nonnull ((1)) __wur;

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibrt: Use -nodefaultlibs instead of -nostdlib
Khem Raj [Sat, 23 Jun 2012 23:51:52 +0000 (16:51 -0700)]
librt: Use -nodefaultlibs instead of -nostdlib

nostdlib disables linking in startup files too which is not
what we want here since it needs to resolve __dso_handle
which comes from crtbeginS.o, otherwise librt has this
undefined reference to a weak undefined __dso_handle that
shows up as error (with gold linker)
when shared libraries are being built which are
linking in librt

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agonptl/atfork: Hide pthread_atfork in shared versions
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>
9 years agolibc: Fix vfprintf compilation without HAS_FLOATS
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>
9 years agonptl/arm: Move aeabi_read_tp to uclibc_nonshared.a
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>
9 years agoatexit_old: Do not add it to shared libc
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>
9 years agotest: enable libm test log2
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>
9 years agoextra: add clang flags for gen_bits_syscall_h
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>
9 years agoMakefile.in: add missing dependency on bits/sysnum.h to $(pregen-headers-y)
Max Filippov [Sun, 8 Mar 2015 12:15:13 +0000 (15:15 +0300)]
Makefile.in: add missing dependency on bits/sysnum.h to $(pregen-headers-y)

This fixes the following build error:

  GEN include/bits/sysnum.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/structsem.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/structsem.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.h
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.h
In file included from ./libpthread/nptl/pthreadP.h:25:0,
                 from <stdin>:2:
./include/sys/syscall.h:24:25: fatal error: bits/sysnum.h: No such file or directory
 #include <bits/sysnum.h>
                         ^
compilation terminated.
  GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelcond.h
make[1]: *** [libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h] Error 1

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
9 years agomalloc.h: Add missing feature guard
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>
9 years agomalloc-standard: Add locking to malloc_trim
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>
9 years agomalloc: checked_request2size failure deadlocks
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>
9 years agolibm: Add missing C99 float/ld wrappers
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>
9 years agotest: skip arc4random on glibc
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>
9 years agobuildsys: fix IS_IN_lib* for .i
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>
9 years agolibc: update strverscmp
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>
9 years agonptl: fix exclusion of pthread_setconcurrency.c
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>
9 years agoinclude: silence __leaf warning
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>
9 years agotest: Tweak arc4random exclusion
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>
9 years agoresolv: fix unaligned tmp buffer corner-case
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>
9 years agoAdd fix from OpenWrt for MIPS64 N64 ABI
Waldemar Brodkorb [Sat, 14 Mar 2015 07:06:24 +0000 (08:06 +0100)]
Add fix from OpenWrt for MIPS64 N64 ABI

https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/616-mips_fix_stat_time.patch

When booting in Qemu you get for example failures from mdev -s otherwise.

9 years agounistd.h: put getppid under XOPEN2K8
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>
9 years agobuildsys: create linker script with proper flags
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>
9 years agospawn.h: Fix !_GNU_SOURCE compilation
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>
9 years agoresolve bfin with binfmt flat compile errors
Waldemar Brodkorb [Thu, 12 Mar 2015 04:35:36 +0000 (23:35 -0500)]
resolve bfin with binfmt flat compile errors

gcc for bfin does not support -msoft-float.
Do not enable FDPIC stuff, when compiling FLAT binaries.

9 years agoremove duplicate entries
Waldemar Brodkorb [Sun, 8 Mar 2015 22:58:44 +0000 (17:58 -0500)]
remove duplicate entries

9 years agoremove NAN selection, better do it in your build system
Waldemar Brodkorb [Mon, 9 Mar 2015 06:48:19 +0000 (01:48 -0500)]
remove NAN selection, better do it in your build system

With older gcc than 4.9.x, this breaks the build.
These specific compiler flags belongs better to your
favorite build system.

9 years agoadd defines from GNU libc to fix ltrace compile
Waldemar Brodkorb [Wed, 11 Mar 2015 19:33:38 +0000 (20:33 +0100)]
add defines from GNU libc to fix ltrace compile

Closes ticket #4.
http://www.uclibc-ng.org/trac/ticket/4

9 years agofix regression for ARM thumb mode
Waldemar Brodkorb [Sun, 8 Mar 2015 15:59:07 +0000 (10:59 -0500)]
fix regression for ARM thumb mode

Sync with GNU libc, see here why r7 is not usable for
thumb mode:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/arm/sysdep.h;h=37eac192b1e2e7f53f112b16450b9ce57054e27f;hb=HEAD
Remove old OABI support.

Fixes build breakage for ARM noMMU builds.
Still no runtime testing.

9 years agoshould have test it better, fix non-thread compile
Waldemar Brodkorb [Sat, 7 Mar 2015 22:07:11 +0000 (16:07 -0600)]
should have test it better, fix non-thread compile

9 years agofix non-thread compile for xtensa
Waldemar Brodkorb [Thu, 5 Mar 2015 18:47:26 +0000 (19:47 +0100)]
fix non-thread compile for xtensa

9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Wed, 4 Mar 2015 19:36:18 +0000 (13:36 -0600)]
Merge remote-tracking branch 'origin/upstream'

9 years agosparc/clone.S: guard tcb-offsets.h include with RESET_PID
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>
9 years agosymbol got renamed to __UCLIBC_HAS_LINUXTHREADS__
Waldemar Brodkorb [Mon, 2 Mar 2015 18:35:11 +0000 (12:35 -0600)]
symbol got renamed to __UCLIBC_HAS_LINUXTHREADS__

9 years agolibc: silence warning
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>
9 years agoldso: silence warning
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>
9 years agosync with uClibc
Waldemar Brodkorb [Fri, 20 Feb 2015 18:20:22 +0000 (12:20 -0600)]
sync with uClibc

9 years agowhat the fuck.
Waldemar Brodkorb [Fri, 20 Feb 2015 18:15:31 +0000 (12:15 -0600)]
what the fuck.

This reverts commit 8a4eaece396459ccb0fb8a9f25ace1345ee92cae.

9 years agogcc 4.9.x produces some calls to abort()
Waldemar Brodkorb [Fri, 20 Feb 2015 18:02:48 +0000 (12:02 -0600)]
gcc 4.9.x produces some calls to abort()

For sh4/xtensa architectures there is an optimization
bug, which does not allow to compile ld.so with gcc 4.9.2.
Disable this optimization for sh4/xtensa and ld.so compile.

9 years agoldso: silence warning
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>
9 years agoAllow use of executable RUNPATH/RPATH when finding libraries.
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>
9 years agoARC: Remove unused EM_ARC_A5
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>
9 years agoinclude/elf.h: bump EM_NUM
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>
9 years agoelf: Add STT_GNU_IFUNC from glibc
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>
9 years agosync_file_range: fix standard UCLIBC_SYSCALL_ALIGN_64BIT handling
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>
9 years agoposix_fadvise: handle 2 variants for SYSCALL_ALIGN_64BIT
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>
9 years agoARCv2: optimised string routines
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>
9 years agoARCv2 ISA support
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>
9 years agoworkaround is no longer needed for gcc 4.8.x/gcc 4.9.x
Waldemar Brodkorb [Wed, 18 Feb 2015 04:54:31 +0000 (22:54 -0600)]
workaround is no longer needed for gcc 4.8.x/gcc 4.9.x