OSDN Git Service

uclinux-h8/uclibc-ng.git
9 years agorevert getopt changes to tests
Waldemar Brodkorb [Mon, 29 Dec 2014 04:10:35 +0000 (22:10 -0600)]
revert getopt changes to tests

The upstream changes are not complete and let the tests
fail. Revert the changes for now, may be upstream will make
a better fix later.

9 years agofor mips64 with N32 ABI we need to use newfstatat
Waldemar Brodkorb [Sun, 28 Dec 2014 20:33:35 +0000 (21:33 +0100)]
for mips64 with N32 ABI we need to use newfstatat

Fixes compile errors with latest util-linux.

9 years agorelocation fixes
Waldemar Brodkorb [Sun, 28 Dec 2014 16:09:15 +0000 (17:09 +0100)]
relocation fixes

From OpenWrt:
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/613-mips64_more_relocation_fixes.patch

9 years agosparc64 support was removed recently
Waldemar Brodkorb [Sun, 28 Dec 2014 16:02:28 +0000 (17:02 +0100)]
sparc64 support was removed recently

Remove leftover code.

9 years agodon't optimize for special mips cpu
Waldemar Brodkorb [Fri, 26 Dec 2014 17:43:07 +0000 (18:43 +0100)]
don't optimize for special mips cpu

When building optimized code for Lemote Yeelong system, a conflict
occurs. Better use optimized flags in your buildsystem, not in uClibc-ng.

9 years agomerge upstream changes
Waldemar Brodkorb [Thu, 25 Dec 2014 21:48:20 +0000 (22:48 +0100)]
merge upstream changes

9 years agosync tcp header with glibc
Waldemar Brodkorb [Thu, 25 Dec 2014 06:28:36 +0000 (07:28 +0100)]
sync tcp header with glibc

Nginx tries to find TCP_FASTOPEN, which is missing here.

9 years agomkostemp: fix implementation
Anthony G. Basile [Mon, 27 Oct 2014 20:13:34 +0000 (16:13 -0400)]
mkostemp: fix implementation

mkostemp(char *template, int flags) generates a unique temporary
filename from a template.  The flags parameter accepts three of
the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC.  The
current implementation of mkostemp(3) does not respect the flags
and in fact confuses the flags with the file mode which should
always be S_IRUSR | S_IWUSR.  This patch corrects this issue.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: Some more tests under conditionals
Bernhard Reutner-Fischer [Mon, 15 Dec 2014 16:32:57 +0000 (17:32 +0100)]
test: Some more tests under conditionals

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agostdio: Fix printing 0.0
Bernhard Reutner-Fischer [Mon, 15 Dec 2014 15:13:01 +0000 (16:13 +0100)]
stdio: Fix printing 0.0

We were relying on FE_DIVBYZERO being turned off when printing
"%f", +-.0
Avoid the whole issue by looking at the sign-bit (in a rough
approximation).

Note that we do not handle gracefully:
  printf ("\n%llf\n", -0.0);
  printf ("\n%llf\n",  0.0);
nor %Lf for both when NOT cast to long double. Avoiding an FPE due to
broken numbers like these does not make sense to me.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agounistd: allow to turn off getopt_long
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 15:18:12 +0000 (16:18 +0100)]
unistd: allow to turn off getopt_long

The GNU variant of getopt() previously had no way to turn off
getopt_long() support.

9 years agotest: disable ptytest unless HAS_PTY
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 15:06:17 +0000 (16:06 +0100)]
test: disable ptytest unless HAS_PTY

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoconfig: move STDIO_FUTEXES up a bit
Bernhard Reutner-Fischer [Fri, 12 Dec 2014 13:43:55 +0000 (14:43 +0100)]
config: move STDIO_FUTEXES up a bit

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agodisable test for noMMU
Waldemar Brodkorb [Wed, 10 Dec 2014 19:05:43 +0000 (13:05 -0600)]
disable test for noMMU

9 years agomkostemp: fix implementation
Anthony G. Basile [Mon, 27 Oct 2014 20:13:34 +0000 (16:13 -0400)]
mkostemp: fix implementation

mkostemp(char *template, int flags) generates a unique temporary
filename from a template.  The flags parameter accepts three of
the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC.  The
current implementation of mkostemp(3) does not respect the flags
and in fact confuses the flags with the file mode which should
always be S_IRUSR | S_IWUSR.  This patch corrects this issue.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
9 years agoadd argument check in mknod
wangyufen [Tue, 11 Nov 2014 07:59:11 +0000 (15:59 +0800)]
add argument check in mknod

mknod() in glibc/eglibc will check the argument, like this,
  ...
  if (k_dev != dev) {
      __set_errno (EINVAL);
      return -1;
   }
  ...
So add argument check in uclibc's mknod() too.

Signed-off-by: Wang Yufen <wangyufen@huawei.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Tue, 9 Dec 2014 14:06:31 +0000 (15:06 +0100)]
Merge remote-tracking branch 'origin/upstream'

9 years agosigaction: Fix !HAS_REALTIME compilation
Bernhard Reutner-Fischer [Tue, 9 Dec 2014 13:30:39 +0000 (14:30 +0100)]
sigaction: Fix !HAS_REALTIME compilation

In file included from ./include/signal.h:279:0,
 from libc/sysdeps/linux/x86_64/sigaction.c:22:
./include/bits/sigaction.h:32:29: error: unknown type name 'siginfo_t'
   void (*sa_sigaction)(int, siginfo_t *, void *);

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoremove text files not useful for uClibc-ng
Waldemar Brodkorb [Mon, 8 Dec 2014 05:56:29 +0000 (06:56 +0100)]
remove text files not useful for uClibc-ng

9 years agoarm: add RESET_PID in the clone impl
Wang Yufen [Fri, 5 Sep 2014 07:19:21 +0000 (15:19 +0800)]
arm: add RESET_PID in the clone impl

Called getpid() When creating a new process with clone(), getpid() returns
the father_process's value. It should be child_process's value.
The reason is missing a RESET_PID in the arm clone impl.

Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Thu, 4 Dec 2014 18:34:29 +0000 (19:34 +0100)]
Merge remote-tracking branch 'origin/upstream'

9 years agomips: rename siginfo _timer members
Bernhard Reutner-Fischer [Wed, 3 Dec 2014 16:43:25 +0000 (17:43 +0100)]
mips: rename siginfo _timer members

Rename _timer[12] to si_tid and si_overrun to fix compilation of
strace-4.9+

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: remove some obsolete optimization CFLAGS
Bernhard Reutner-Fischer [Wed, 3 Dec 2014 15:18:54 +0000 (16:18 +0100)]
buildsys: remove some obsolete optimization CFLAGS

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Mon, 1 Dec 2014 19:47:00 +0000 (20:47 +0100)]
Merge remote-tracking branch 'origin/upstream'

9 years agolocale: Add wcsftime()
Bernhard Reutner-Fischer [Tue, 18 Nov 2014 17:27:47 +0000 (18:27 +0100)]
locale: Add wcsftime()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Thu, 13 Nov 2014 22:27:23 +0000 (23:27 +0100)]
Merge remote-tracking branch 'origin/upstream'

9 years agonptl: compile pt-vfork in ARM-mode
Bernhard Reutner-Fischer [Thu, 13 Nov 2014 19:58:52 +0000 (20:58 +0100)]
nptl: compile pt-vfork in ARM-mode

could need a thumb implementation..

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Tue, 11 Nov 2014 19:58:19 +0000 (20:58 +0100)]
Merge remote-tracking branch 'origin/upstream'

9 years agoConfig.in.arch: enable long double math for xtensa
Max Filippov [Sat, 25 Oct 2014 10:32:35 +0000 (14:32 +0400)]
Config.in.arch: enable long double math for xtensa

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agostatfs: fix compile error when UCLIBC_LINUX_SPECIFIC is not set
Anthony G. Basile [Sat, 6 Sep 2014 23:45:34 +0000 (19:45 -0400)]
statfs: fix compile error when UCLIBC_LINUX_SPECIFIC is not set

statfs() is a Linux-specific function.  When building without
UCLIBC_LINUX_SPECIFIC set, libc_hidden_proto(statfs) in
include/sys/statfs.h is unmatched with libc_hidden_def(statfs)
in libc/sysdeps/linux/common/statfs.c, leading to a compile
error.  This patch fixes this, as well as adds statfs() to the
list of Linux-specific functions in extra/Configs/Config.in.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoreduce the list of supported architectures
Waldemar Brodkorb [Tue, 14 Oct 2014 18:57:16 +0000 (20:57 +0200)]
reduce the list of supported architectures

As most of these architectures either does not compile or embedded
hardware is difficult to get, I disable them for now.
I do not remove the existing code and hope to enable many
of them in the future, but not for 1.0.

9 years agom68k: remove reg.h
Waldemar Brodkorb [Sat, 11 Oct 2014 20:03:17 +0000 (22:03 +0200)]
m68k: remove reg.h

If reg.h exist, gdbserver fails to compile.
I am not sure if this header file is needed for anything.

9 years agoc6x: disable it at the moment
Waldemar Brodkorb [Fri, 10 Oct 2014 19:29:05 +0000 (21:29 +0200)]
c6x: disable it at the moment

There is a NPTL port of uCLibc for c6x, but it doesn't work
with uClibc master. May be someone with real hardware could
sync it. Unfortunately I got no respone from Aurelien and
no response on the mailing list.

9 years agotest: disable for noMMU case
Waldemar Brodkorb [Wed, 8 Oct 2014 06:23:30 +0000 (08:23 +0200)]
test: disable for noMMU case

Pthread tests are failing for coldfire with linuxthreads
enabled.

9 years agodisable a test for avr32, compile failure.
Waldemar Brodkorb [Sun, 5 Oct 2014 20:01:48 +0000 (22:01 +0200)]
disable a test for avr32, compile failure.

9 years agodisable some test for avr32, compile failures.
Waldemar Brodkorb [Sun, 5 Oct 2014 18:32:10 +0000 (20:32 +0200)]
disable some test for avr32, compile failures.

9 years agolinuxthreads: fix compile error for non-MMU
Waldemar Brodkorb [Fri, 3 Oct 2014 06:15:19 +0000 (08:15 +0200)]
linuxthreads: fix compile error for non-MMU

Otherwise you get following linking error, because
of missing functions in libc.a:
undefined reference to `__libc_enable_asynccancel'

Fix by Thorsten Glaser while hacking session.

9 years agom68k: fix linuxthreads compile for coldfire
Waldemar Brodkorb [Fri, 3 Oct 2014 04:27:04 +0000 (06:27 +0200)]
m68k: fix linuxthreads compile for coldfire

The tas instruction is not available for most coldfire CPU's.
Use bset instead in this case as already used in linuxthreads.old.

9 years agodisable linkage of gcc_eh
Waldemar Brodkorb [Fri, 3 Oct 2014 04:11:32 +0000 (06:11 +0200)]
disable linkage of gcc_eh

As recently discussed on the uClibc mailing list here:
http://lists.uclibc.org/pipermail/uclibc/2014-September/048659.html

I think it is not required for gcc 4.8.3, which is default in
f.e. OpenADK. Tested with a DODEBUG build for x86.

9 years agoremove forced gcc optimization
Waldemar Brodkorb [Wed, 1 Oct 2014 18:54:18 +0000 (20:54 +0200)]
remove forced gcc optimization

It was added in 6d6bd8ba78434ecb09395582b5f3e41febd4d4ee,
but it is unclear for me, why this is needed or if it is
required. I don't think we should depend on some gcc
optimization, which might change in the future.
Anyway, this breaks c6x toolchain building (ICE), so I remove it.
Testsuite run for supported architectures didn't add any
new errors.

9 years agolibpthread: disable unimplemented configurations
Waldemar Brodkorb [Fri, 26 Sep 2014 17:16:24 +0000 (19:16 +0200)]
libpthread: disable unimplemented configurations

When NPTL is available for an architecture just allow the use of it.
If NPTL is not available for an architecture, allow to choose between
LT and LT.old. This minimizes misconfiguration of threading library.

9 years agoenable this symbol by default
Waldemar Brodkorb [Fri, 26 Sep 2014 17:00:16 +0000 (19:00 +0200)]
enable this symbol by default

disabling this results in non-working toolchain building, so
better do not allow anyone to disable it.

9 years agoAdd eventfd_read() and eventfd_write()
Waldemar Brodkorb [Sat, 5 Jul 2014 16:09:19 +0000 (18:09 +0200)]
Add eventfd_read() and eventfd_write()

Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 years agoDo not define unimplemented functions
Cristian Morales Vega [Tue, 23 Sep 2014 12:17:25 +0000 (13:17 +0100)]
Do not define unimplemented functions

e.g. fminf() is not implemented, only fmin(), but both are defined.

Signed-off-by: Cristian Morales Vega <cristian@samknows.com>
9 years agocris: remove call to HIDDEN_JUMPTARGET
Waldemar Brodkorb [Fri, 26 Sep 2014 09:46:22 +0000 (11:46 +0200)]
cris: remove call to HIDDEN_JUMPTARGET

errno_location is no longer hidden, so remove the call
to the macro, like done for sparc recently.

9 years agocris: do not include asm/elf.h
Waldemar Brodkorb [Fri, 26 Sep 2014 09:37:02 +0000 (11:37 +0200)]
cris: do not include asm/elf.h

elf.h is not exported by the Linux kernel, do not include
it here. Done like in other architectures.

9 years agotestsuite: fix xtensa macros
Waldemar Brodkorb [Tue, 23 Sep 2014 20:02:18 +0000 (22:02 +0200)]
testsuite: fix xtensa macros

9 years agoadd tls test macros for xtensa
Waldemar Brodkorb [Tue, 23 Sep 2014 16:31:31 +0000 (18:31 +0200)]
add tls test macros for xtensa

http://lists.linux-xtensa.org/pipermail/linux-xtensa/Week-of-Mon-20130819/001153.html

9 years agoxtensa: add support for NPTL
Waldemar Brodkorb [Sat, 20 Sep 2014 20:36:23 +0000 (22:36 +0200)]
xtensa: add support for NPTL

Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl

Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>

9 years agodisable tests for arc as long as binutils is buggy
Waldemar Brodkorb [Tue, 9 Sep 2014 16:40:22 +0000 (18:40 +0200)]
disable tests for arc as long as binutils is buggy

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agodisable tests if HAVE_SHARED is not set
Waldemar Brodkorb [Sun, 7 Sep 2014 14:38:14 +0000 (16:38 +0200)]
disable tests if HAVE_SHARED is not set

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agolinuxthreads: remove unused s390 code
Waldemar Brodkorb [Sat, 6 Sep 2014 12:45:42 +0000 (14:45 +0200)]
linuxthreads: remove unused s390 code

Cleanup linuxthreads by removing unused s390 code.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agonptl: remove duplicate vfork() in libpthread
Waldemar Brodkorb [Sat, 20 Sep 2014 20:09:00 +0000 (22:09 +0200)]
nptl: remove duplicate vfork() in libpthread

Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>:
sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' -e '/^ASFLAGS-pt-vfork\./d' $(git grep -l pt-vfork libpthread/nptl/sysdeps)
find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \;

Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agotest: disable posix_fallocate64 for small embedded systems
Waldemar Brodkorb [Mon, 1 Sep 2014 19:02:19 +0000 (21:02 +0200)]
test: disable posix_fallocate64 for small embedded systems

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agodisable broken architectures
Waldemar Brodkorb [Wed, 17 Sep 2014 21:46:56 +0000 (23:46 +0200)]
disable broken architectures

9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Wed, 17 Sep 2014 21:41:56 +0000 (23:41 +0200)]
Merge remote-tracking branch 'origin/upstream'

9 years agom68k: libc: add fmovem* mcffpu condition
Bernhard Reutner-Fischer [Wed, 17 Sep 2014 18:45:26 +0000 (20:45 +0200)]
m68k: libc: add fmovem* mcffpu condition

add fmovem{x,.d,.*} ISA conditional
Fixes assembler errors for 5206.
isa_a, isa_b (or a+, don't remember) do not have emx, use em.d there.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agosparc: update ptrace.h to latest from glibc
Gustavo Zacarias [Sun, 7 Sep 2014 15:01:34 +0000 (12:01 -0300)]
sparc: update ptrace.h to latest from glibc

Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agopowerpc: update ptrace.h to latest from glibc
Gustavo Zacarias [Sun, 7 Sep 2014 15:01:33 +0000 (12:01 -0300)]
powerpc: update ptrace.h to latest from glibc

Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: remove now redundant lib placement defines
Bernhard Reutner-Fischer [Tue, 16 Sep 2014 20:07:12 +0000 (22:07 +0200)]
buildsys: remove now redundant lib placement defines

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibc: silence missing prototype warning
Bernhard Reutner-Fischer [Tue, 16 Sep 2014 19:36:54 +0000 (21:36 +0200)]
libc: silence missing prototype warning

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: fix IS_IN_lib*
Bernhard Reutner-Fischer [Mon, 15 Sep 2014 20:13:07 +0000 (22:13 +0200)]
buildsys: fix IS_IN_lib*

define NOT_IN_libc / IS_IN_libxxx appropriately
to fix pthread_once

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agonptl: rephrase *.sym handling
Bernhard Reutner-Fischer [Wed, 10 Sep 2014 20:18:55 +0000 (22:18 +0200)]
nptl: rephrase *.sym handling

Avoids circular dependency warning from make by generating the .h
directly from the .sym files, elimination intermediate files.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Tue, 9 Sep 2014 19:20:07 +0000 (21:20 +0200)]
Merge remote-tracking branch 'origin/upstream'

9 years agobuildsys: Fix typo
Bernhard Reutner-Fischer [Tue, 9 Sep 2014 11:49:34 +0000 (13:49 +0200)]
buildsys: Fix typo

LDFLAG-fuse-ld looked at a non-existing var, use the correct one

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibc: add fallocate() and fallocate64()
Anthony G. Basile [Sun, 7 Sep 2014 19:33:46 +0000 (15:33 -0400)]
libc: add fallocate() and fallocate64()

We add the Linux-specific function fallocate() which allows the user to
directly manipulate allocate space for a file.  fallocate() can operate
in different modes, but the default mode is equivalent to posix_fallocate()
which is specified in POSIX.1.

Recent releases of e2fsprogs 1.42.11 and above expect fallocate64() to be
available.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agosparc: update ptrace.h to latest from glibc
Gustavo Zacarias [Mon, 8 Sep 2014 12:54:26 +0000 (09:54 -0300)]
sparc: update ptrace.h to latest from glibc

Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
9 years agopowerpc: update ptrace.h to latest from glibc
Gustavo Zacarias [Mon, 8 Sep 2014 12:54:25 +0000 (09:54 -0300)]
powerpc: update ptrace.h to latest from glibc

Update sys/ptrace.h to latest glibc release for a lot of missing
definitions.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
9 years agobump version to 1.0.0
Waldemar Brodkorb [Mon, 8 Sep 2014 07:11:43 +0000 (09:11 +0200)]
bump version to 1.0.0

prepare for stable release.

9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Mon, 8 Sep 2014 07:10:31 +0000 (09:10 +0200)]
Merge remote-tracking branch 'origin/upstream'

9 years agolibc: split multi-source epoll.c
Bernhard Reutner-Fischer [Fri, 5 Sep 2014 11:59:28 +0000 (13:59 +0200)]
libc: split multi-source epoll.c

We cannot override individual functions on a per-arch basis otherwise

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Thu, 4 Sep 2014 13:18:54 +0000 (15:18 +0200)]
Merge remote-tracking branch 'origin/upstream'

9 years agosparc: remove sparc64/sparcv9 code
Waldemar Brodkorb [Mon, 1 Sep 2014 18:44:20 +0000 (20:44 +0200)]
sparc: remove sparc64/sparcv9 code

The sparc64/sparcv9 code is incomplete. Furthermore there is
no real embedded hardware for sparc64 available, so better remove
it until someone comes up with a complete port.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoldso: Fix compile-error on noMMU
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:21:23 +0000 (13:21 +0200)]
ldso: Fix compile-error on noMMU

Thanks to Waldemar Brodkorb for noticing!

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: wcsftime depends on XLOCALE
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:16:35 +0000 (13:16 +0200)]
test: wcsftime depends on XLOCALE

Thanks to Waldemar Brodkorb for noticing.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: disable librt shmtest on non-MMU systems
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 11:12:52 +0000 (13:12 +0200)]
test: disable librt shmtest on non-MMU systems

This test fails for non-MMU systems, because it uses fork()
Thanks to Waldemar Brodkorb!

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: tweak check_ld flag probing
Bernhard Reutner-Fischer [Thu, 4 Sep 2014 10:46:56 +0000 (12:46 +0200)]
buildsys: tweak check_ld flag probing

ld was (erroneously) complaining that it failed to merge private bfd
data. Silence this mismatch as seen on m68k with obfd binary.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: refine compile.S
Bernhard Reutner-Fischer [Fri, 29 Aug 2014 19:06:18 +0000 (21:06 +0200)]
buildsys: refine compile.S

filter out all -std=

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: use SED for create-lds
Bernhard Reutner-Fischer [Fri, 29 Aug 2014 18:53:04 +0000 (20:53 +0200)]
buildsys: use SED for create-lds

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: disable test for systems without FPU
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:26 +0000 (12:31 +0200)]
test: disable test for systems without FPU

This test fails for systems without fpu.
For example m68k build for non-mmu/non-fpu systems fail.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: sync with glibc, use do_test
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:30 +0000 (12:31 +0200)]
test: sync with glibc, use do_test

This breaks out of a deadlock, which occurs when testing for powerpc. (qemu)
Otherwise the test suite does not finish.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: get out of the endless while loop, when bind failed
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:29 +0000 (12:31 +0200)]
test: get out of the endless while loop, when bind failed

When bind() fails in this test, then /tmp get filled up with
temp files and upcoming tests will fail, because they need to create
temp files, too. Better exit from the loop.
Test still needs to be investigated to fix the failing bind().

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agom68k: fix typo
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:27 +0000 (12:31 +0200)]
m68k: fix typo

otherwise you get compile warnings, when building for m68k.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: do not depend on compile
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:24 +0000 (12:31 +0200)]
test: do not depend on compile

When you cross-compile the testsuite and then try to run
on a system without gcc/binutils it would be nice if no compiling
or linking is tried. Refresh test/README (suggested by Khem)

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agotest: NPTL: sync WRITE_BUFFER_SIZE with glibc test
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:23 +0000 (12:31 +0200)]
test: NPTL: sync WRITE_BUFFER_SIZE with glibc test

Test on Linux 3.16.1 in Qemu ARM fails with:
 TEST_EXEC nptl/ tst-cancel4
ret == 1 ; expected_ret == 0
make[1]: *** [tst-cancel4.exe] Error 1
The output of failed test is:
minimum write buffer size too large
../Test.mak:89: recipe for target 'tst-cancel4.exe' failed

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agosparc: add missing pthread_spin_lock/pthread_spin_trylock
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:22 +0000 (12:31 +0200)]
sparc: add missing pthread_spin_lock/pthread_spin_trylock

tst-spin1.c compile breaks with:
test/nptl/tst-spin1.c:34: undefined reference to `pthread_spin_lock'

pthread_spin_lock and pthread_spin_trylock is missing while
building sparc. add the meta c files here.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agosparc: remove unused subdirs variable
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:21 +0000 (12:31 +0200)]
sparc: remove unused subdirs variable

For sparc TARGET_SUBARCH is never used. And there is a typo in the
path.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoRevert "sparc: disable cancellable system, as it fails in strange ways right now"
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:20 +0000 (12:31 +0200)]
Revert "sparc: disable cancellable system, as it fails in strange ways right now"

This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.

It is unclear in which way this is breaking sparc systems.
With this change added you get following linking error:
libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoRevert "sparc: use HIDDEN_JUMPTARGET for errno"
Waldemar Brodkorb [Thu, 28 Aug 2014 10:31:19 +0000 (12:31 +0200)]
Revert "sparc: use HIDDEN_JUMPTARGET for errno"

This reverts commit f51fb26dbcceee9e48d10facc830bd4a549f6cc2.

This fixes linking error for sparc build.
While building a sparc system you get following linking error:
libc/sysdeps/linux/sparc/pipe.S:54: undefined reference to `__GI___errno_location'

Removing the HIDDEN_JUMPTARGET fixes the issue, while using gcc 4.8.3/binutils 2.24.

The definition of __errno_location was changed recently here:
http://git.uclibc.org/uClibc/commit/?id=8f550715c2b211036fc273add3cb5219397ed312

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoMerge remote-tracking branch 'origin/upstream'
Waldemar Brodkorb [Wed, 27 Aug 2014 19:38:44 +0000 (21:38 +0200)]
Merge remote-tracking branch 'origin/upstream'

9 years agotimex: Sync with glibc
Khem Raj [Mon, 25 Aug 2014 23:58:13 +0000 (16:58 -0700)]
timex: Sync with glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoDefine IPTOS_CLASS_* macros according to RFC 2474
Khem Raj [Mon, 25 Aug 2014 23:58:12 +0000 (16:58 -0700)]
Define IPTOS_CLASS_* macros according to RFC 2474

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuildsys: remove duplicate UCLIBC_EXTRA_CFLAGS
Bernhard Reutner-Fischer [Tue, 26 Aug 2014 18:07:08 +0000 (20:07 +0200)]
buildsys: remove duplicate UCLIBC_EXTRA_CFLAGS

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agomicroblaze: Remove duplicate F_{S,G}ETPIPE_SZ
Bernhard Reutner-Fischer [Mon, 25 Aug 2014 08:41:08 +0000 (10:41 +0200)]
microblaze: Remove duplicate F_{S,G}ETPIPE_SZ

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agofcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZ
Khem Raj [Thu, 20 Feb 2014 09:12:14 +0000 (01:12 -0800)]
fcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZ

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agomathinline.h: Use __extern_inline
Bernhard Reutner-Fischer [Mon, 25 Aug 2014 08:07:44 +0000 (10:07 +0200)]
mathinline.h: Use __extern_inline

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoAdd clock_adjtime syscall
Khem Raj [Sat, 15 Mar 2014 16:32:20 +0000 (09:32 -0700)]
Add clock_adjtime syscall

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agowelcome to the uClibc-ng project take two
Waldemar Brodkorb [Wed, 20 Aug 2014 21:15:57 +0000 (23:15 +0200)]
welcome to the uClibc-ng project take two

9 years agofix for pipe() on sparc
Waldemar Brodkorb [Tue, 19 Aug 2014 19:11:16 +0000 (21:11 +0200)]
fix for pipe() on sparc

When using something like this:
 $ echo foo|grep foo|wc -l
with mksh shell, you get an runtime error.

Glibc and klibc does not do these extra check.
After removing this check using double pipes work fine.
Tested with Qemu 2.1.0.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agolibc: add issetugid()
Anthony G. Basile [Mon, 18 Aug 2014 11:56:08 +0000 (07:56 -0400)]
libc: add issetugid()

issetugid() returns 1 if the process environment or memory address space
is considered tainted, and returns 0 otherwise.  This happens, for example,
when a process's privileges are elevated by the setuid or setgid flags on
an executable belonging to root.  This function first appeard in OpenBSD 2.0
and is needed for the LibreSSL.

This patch follows the same logic as the equivalent musl commit.  For more
information see the commit message at

http://git.musl-libc.org/cgit/musl/commit/?id=ddddec106fd17c3aca3287005d21e92f742aa9d4

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>