summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-23Replace bltzal with lapc for MIPS R6 builds.Steve Ellcey
The R6 version of MIPS does not support the bltzal instruction. This patch changes dl-startup.h and dl-sysdep.h to use lapc on R6 instead. lapc is a new R6 insruction so older systems need to continue to use bltzal in order to load register $31. Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
2015-12-22Replace MIPS specific memcpy.S/memset.S with version from glibc/newlib.Steve Ellcey
These MIPS specific versions of memcpy.S and memset.S are faster than the current ones and match what is in newlib and glibc. They also have support for the mips32r6 and mips64r6 architectures. Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
2015-12-22pselect: Use linux pselect syscall when availableNicolas S. Dade
Linux has a pselect syscall since 2.6.something. Using it rather than emulating it with sigprocmask+select+sigprocmask is smaller code, and works properly. (The emulation has race conditions when unblocked signals arrive before or after the select) The tv.nsec >= 1E9 handling comes from uclibc's linux select() implementation, which itself uses pselect() internally if the pselect syscall exists. I though it would be good to do the same here. Note that although the libc pselect() API has 6 arguments, the linux kernel syscall as 7 arguments. There is an extra, somewhat vestigial, sizeof the signal mask argument. Signed-off-by: Nicolas S. Dade <nic.dade@gmail.com>
2015-12-22libc/pwd_grp: Create template for non-reentrant functionsWaldemar Brodkorb
Avoid a lot of copy'n'paste code, no functionality change Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-22Use gcc's __builtin_mempcpy() as __mempcpy(), if possibleWaldemar Brodkorb
Patch from OpenWrt. Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-22use arch specific thread stack size for nptlWaldemar Brodkorb
Use the arch specific thread stack size for nptl if the size returned by getrlimits exceeds it - fixes threads on systems with only 16 MB RAM. Patch from OpenWRT Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-22Do define some IPv6 related symbols even with IPv6 disabledWaldemar Brodkorb
Fixes compilation of some faulty applictions. Patch from Freetz.org Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-22resolv: fix gethostbyname2_r to match gethostbyname_r, fixing bugs with AAAA ↵Waldemar Brodkorb
lookups The latter half of gethostbyname2_r (doing AAAA queries) is rather dramatically different from the corresponding portion of gethostbyname_r (doing A queries). This leads to problems like calls to getaddrinfo only returning one IPv6 address, even when multiple exist. Seems to be entirely a case of divergent evolution -- a half-decade of fixes for the IPv4 code but no love for IPv6. Until now. ;) DNS behaviour for IPv6 is really no different than for IPv4 -- beyond the difference in address sizes, there's no need for the functions to be so different. Consequently, this patch really is almost just a cut-and-paste of gethostbyname_r, with the appropriate substitutions of in6_addr, AF_INET6, etc; while holding on to the few extra bits that actually belong in there (eg #ifdef __UCLIBC_HAS_IPV6__). Signed-off-by: Wes Campaigne <westacular@gmail.com>
2015-12-22inet/resolv: Fix broken h_aliases list terminator after 2dab3f5Waldemar Brodkorb
Commit 2dab3f5a "resolv: tiny shrinkage in /etc/hosts handling" leads to that read_etc_hosts_r() provide garbage pointer at the end of h_aliases list if more than four hostnames follow a dotted quad in /etc/hosts Test-case: Add following line to /etc/hosts 63.63.0.2 host1 alias2 alias3 alias4 alias5 #include <stdio.h> #include <errno.h> #include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main (void) { int i; char *a; struct hostent *he; struct in_addr ipv4addr; inet_pton(AF_INET, "63.63.0.2", &ipv4addr); he = gethostbyaddr(&ipv4addr, sizeof ipv4addr, AF_INET); if (he == NULL) exit(1); printf("Host name: '%s'\n", he->h_name); i = 0; while ((a = he->h_aliases[i]) != NULL) { printf("Host alias: '%s'\n", a); ++i; } return 0; } Wrong output: Host name: 'host1' Host alias: 'alias2' Host alias: 'alias3' Host alias: 'alias4' Host alias: 'alias5' Host alias: '??' Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17Revert "glibc compat: bump glibc minor version"Waldemar Brodkorb
This reverts commit 4a05ed87ceb946608100642121c32e642b58cd0d. This breaks SSP detection for gcc, which might be problematic for some projects. Revert it after some discussion with buildroot and openembedded people.
2015-12-17reduce stack cache size to save memory spaceWaldemar Brodkorb
Idea from different projects as OpenWrt and others. https://lists.openwrt.org/pipermail/openwrt-devel/2013-November/022299.html https://github.com/wl500g/toolchain/blob/master/toolchain/uClibc/patches/0.9.32/980-stack-cache-maxsize.patch
2015-12-17testsuite subdir fixWaldemar Brodkorb
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17Add implementation for copysignl for ppcKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-12-17libc/stdlib: canonicalize_file_name() memory leakWojciech Nizinski
Uclibc's canonicalize_file_name() is allocating temprary buffer of 4kB (PATH_MAX), and passing it to realpath() as second argument. Function is not checking if realpath() fails and memory is lost.
2015-12-17utlis/ldd: Fix host ldd in case of target wordsize differs from host oneWaldemar Brodkorb
improved solution from http://freetz.org/ticket/842 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17test/tls: tls-macros*.h fixes from glibcWaldemar Brodkorb
glibc commits 4822a2a520 Add x32 support to TLS_LE/TLS_IE/TLS_GD 63fb881a04 tls-macros-mips.h: Load $gp as required. Merge 32-bit and 64-bit versions. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17dlclose fixWaldemar Brodkorb
Patch is from Timo Teras Refs.: http://lists.uclibc.org/pipermail/uclibc/2012-October/047059.html http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/uclibc-dlclose-fix.patch
2015-12-17Fix syslog messages lost if syslogd is temporary busyVladislav Grishenko
Commit 4139fe5aec935ba3f462dcaf6aafb6e5eadf1ab9 fixes SIGSTOPed syslogd issue. but introduced new one - messages will be lost when socket buffer gets full, not only if syslogd is stalled, but even if it accepts message slower than someone sends and possibly leads to security hole, when important messages get lost as result of attacker flooding. Patch adds 1 second waiting for socket buffer can accept the message, helps when syslogd is working hard. If it's stalled/SIGSTOPed, message will be sent to errout as before. After that, further non-blocking /dev/log connect attempts will fail immediately with EAGAIN error until syslogd reads some from it. function old new delta openlog_intern 259 355 +96 static.tv - 8 +8 .rodata 151 159 +8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 112/0) Total: 112 bytes Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
2015-12-17Fix syslog messages lost after syslogd restartsVladislav Grishenko
If syslogd is stopped and restarted while a process has the log open, the next message that process produces will be logged to the console and not to the new instance of syslogd. Further messages will be routed correctly, but not the first one. Based on original patch Bug 3889 - syslog loses messages when syslogd restarted https://bugs.busybox.net/show_bug.cgi?id=3889 function old new delta openlog 33 68 +35 __vsyslog 851 848 -3 openlog_intern 318 259 -59 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 35/-62) Total: -27 bytes Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
2015-12-17resolv: NI_IDN unimplementedWaldemar Brodkorb
Some programs trying to use NI_IDN flag in case of it defined in netdb.h, so hide it to suppress bad values for ai_flags. Inspired by OpenWRT issue #12323 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17resolv: __dns_lookup - immediately switch to next server in case of poll() ↵Waldemar Brodkorb
set error events https://bugs.busybox.net/show_bug.cgi?id=3211 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17dynamically allocate ahostbuf bufferWaldemar Brodkorb
Free 1k of static data (.bss) Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17svc.c: svc_getreqset() buffer overflowWaldemar Brodkorb
http://bugs.busybox.net/show_bug.cgi?id=5588 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17only strip test binaries when DOSTRIP is enabledWaldemar Brodkorb
2015-12-17test needs -fPIC for m68kWaldemar Brodkorb
2015-12-17libc/stdio: Rework custom streams interface similar to glibc.Waldemar Brodkorb
Save 20 bytes per FILE structure, avoid indirect call for read/write/seek/close operations for normal streams. Additionally, custom streams has fileno = -2 now, like in glibc. bloat-o-meter report (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y): function old new delta fopencookie 69 131 +62 ftello64 233 260 +27 fseeko64 298 319 +21 fclose 423 442 +19 .rodata 16696 16708 +12 fileno_unlocked 53 45 -8 __ns_name_pack 859 851 -8 vswscanf 184 144 -40 vdprintf 231 187 -44 vsscanf 210 151 -59 vswprintf 269 201 -68 vsnprintf 249 181 -68 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/7 up/down: 141/-295) Total: -154 bytes Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-17fix readdir_r returns success code while it in fact failedWaldemar Brodkorb
Taken from Freetz.org. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-11Revert "fix tst-signal7 failure"Waldemar Brodkorb
This reverts commit ea21c7610aa1131b37a4533cf13dd89f727fb83f. This was accidently pushed, before first coffee. Sorry this is a bad commit.
2015-12-11config: allow config to handle longer path namesMarkus Mayer
The current (arbitrary) limit of 128 characters for path names has proven too short for Android builds, as longer path names are used there. Change conf.c, so it can handle path lengths up to PATH_MAX characters. Signed-off-by: Markus Mayer <mmayer@broadcom.com>
2015-12-10fix tst-signal7 failureWaldemar Brodkorb
error out on internal NPTL used signals.
2015-12-10disable always failing tst-tls16, until someone unbreak itWaldemar Brodkorb
2015-12-09arc: add ulps file for math testsWaldemar Brodkorb
Using non-generic ulps file reduces failure counts for math tests. Generated with nsim emulator running test-{double,idouble,float,ifloat} -u and gen-libm-test.pl on the build host.
2015-12-09do not hardcode path to perlWaldemar Brodkorb
When cross-compiling on other Unix systems like FreeBSD 10.x, perl is not in /usr/bin. Use env to find the perl interpreter and use no fixed path when executing via make.
2015-12-09sh: add back sh2 specific assembly for clone()Waldemar Brodkorb
In gcc 5.x there is a compile failure, for sh2 builds as shad no longer is accepted. Strange that it is working for 4.9.x. Add back old assembly code.
2015-12-09allow linuxthreads for superh (sh2 noMMU)Waldemar Brodkorb
2015-12-09new test is only for MALLOC_STANDARDWaldemar Brodkorb
2015-12-09bsd supports the same floating point classification functions as c99Waldemar Brodkorb
Fixes inetd compile. From OpenWrt. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Reduce the initial buffer size for open_memstreamWaldemar Brodkorb
Reduce the initial buffer size for open_memstream (used by vasprintf), as most strings are usually smaller than that. Realloc the buffer after finishing the string to further reduce size. Problem appears in case of UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y, see http://dev.openwrt.org/ticket/13024 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Make malloc_stats() GNU libc compatibleWaldemar Brodkorb
This fix commit 76dfc7ce8c "Some requested additional malloc entry points" from 2004's Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Define __attribute_const__Waldemar Brodkorb
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Do not support localised optimizations this helps to have a global -O levelKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Avoid unnecessary rebuilds due to compiler flag changesWaldemar Brodkorb
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-08sync with glibc, add some missing definesWaldemar Brodkorb
These are already used by some applications, so add it.
2015-12-07add definitions for O_PATHWaldemar Brodkorb
Only alpha, hppa and sparc need non-default value.
2015-12-06mips: fix definition.Steve Ellcey
glibc [BZ# 16922] * sysdeps/mips/sys/asm.h (INT_SUB): Fix definition. (LONG_SUB): Ditto. (PTR_SUB): Ditto. glibc commit 5057ad3b50 Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-05good by niosWaldemar Brodkorb
Get rid of NIOS support. We try to support NIOSII.
2015-12-05good by e1Waldemar Brodkorb
It is marked as broken and it seems you can't get any hardware for that anymore.
2015-12-05good bye vaxWaldemar Brodkorb
I mailed with Jan-Benedict Glaw, it seems VAX on Linux is really a lot of work todo and uClibc support didn't work ever.
2015-12-05remove sh64 supportWaldemar Brodkorb
No real hardware available. The project for sh64 with sh5 seems dead since 10 years. Gcc will remove support for it soon.
2015-12-05remove __UCLIBC_ASM_GLOBAL_DIRECTIVE__Waldemar Brodkorb
.globl can be used for every architecture so remove the define. Sync with GNU C library.