summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-03ppc: cleanup unsupported ppc64 codeWaldemar Brodkorb
Remove ppc64 bits and bytes, as we don't support ppc64 and it makes the code more readable without the dead code.
2016-06-01remove MJN only debug messagesWaldemar Brodkorb
2016-05-31ARM: nptl: Use generic lowlevellock.c, patch from glibcLeonid Lisovskiy
lowlevellock.c for arm differs from the generic lowlevellock.c only in insignificant ways, so can be removed. Follow glibc commit 6d96f5e4c0 Solves __lll_timedlock_wait busy-wait issues described at http://sourceware.org/bugzilla/show_bug.cgi?id=15119 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-31linuxthreads.old: Fix segfault when pthread_mutex_unlock() called against ↵Leonid Lisovskiy
unlocked NORMAL mutex. Althought, it is undefined behavior, there is no reason for segfault. Program received signal SIGSEGV, Segmentation fault. __pthread_unlock (lock=lock@entry=0x804b03c <lock+16>) at libpthread/linuxthreads.old/spinlock.c:231 231 (&lock->__status, oldstatus, (long)(thr->p_nextlock) & ~1L)) It occurs only on platforms which has HAS_COMPARE_AND_SWAP defined. Restore glibc commit fbaf6e72d6 "spinlock.c (__pthread_unlock): Don't crash if called for an untaken mutex." behavior, broken later by commit 4ad1d0cfbf. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-31tests: Take in account Makefiles that have meaning for rebuild only.Leonid Lisovskiy
Currently, targets dependancy list don't include Makefile.in, this leads to incomplete rebuild after target's compiler/linker flags was changed. Use "$(wildcard)" function due to Makefile.in could be absent in subdirectory. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-31arm: add non-assembly versions of pthread_spin_lock/pthread_spin_trylockWaldemar Brodkorb
Sync pthread_spin_lock/pthread_spin_trylock with GNU libc as it avoids any usage of deprecated SWP instruction. This allows to build uClibc-ng for ARMv8 Cortex-A53 CPU in 32 Bit mode.
2016-05-29bump for releasev1.0.15Waldemar Brodkorb
2016-05-29mips: allow to disable prefetch support in memcpy/memsetWaldemar Brodkorb
There exist some problem with the new memcpy/memset functions imported from GNU libc/newlib. If you have any problem with the new MIPS optimized assembly try to disable prefetching support. Thanks to Rene Nielsen and Matthew Fortune analyzing the problem so far.
2016-05-28buildsys: Fix broken link.asneeded functionLeonid Lisovskiy
Both $(CC_FLAG_ASNEEDED) and $(CC_FLAG_NO_ASNEEDED) never become "y", must check for non-empty strings. To keep make 3.80 compatibility "$(if" used only. Fixes: 7da4d1e7 "buildsys: do not use $(and)". Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-28ldso: Force disable -mlong-calls when compiling ldso for ARCAlexey Brodkin
Even though by default for ARC uClibc gets compiled with disabled long-calls user may provide UCLIBC_EXTRA_CFLAGS with "-mlong-calls". With this option uClibc will be successfully compiled but later it will fail in runtime because dynamic loader cannot deal with relocations at least very early on its start. In particular it will be seen as call to non-relocated symbol _dl_parse_dynamic_info() which ends-up as a segfault like this: ------------------------>8-------------------- potentially unexpected fatal signal 11. Path: /bin/test CPU: 0 PID: 63 Comm: test Not tainted 4.5.2 #7 task: 9f13f180 ti: 9f166000 task.ti: 9f166000 [ECR ]: 0x00040000 => Insn could not be fetched [EFA ]: 0x0000283c [BLINK ]: 0x2000407c [ERET ]: 0x283c @No matching VMA found [STAT32]: 0x8008009e : IE U BTA: 0x0000283c SP: 0x5fef5ccc FP: 0x00000000 LPS: 0x20004080 LPE: 0x20004064 LPC: 0x00000000 r00: 0x20006684 r01: 0x5fef5db0 r02: 0x00000000 r03: 0x20000000 r04: 0x80808080 r05: 0x2f2f2f2f r06: 0x41464d00 r07: 0x00000080 r08: 0x000000dd r09: 0x00000000 r10: 0x00000073 r11: 0x80808080 r12: 0x2000407c r13: 0x20000000 r14: 0x5fef5e74 r15: 0x000ceb3c r16: 0x5fef5e7c r17: 0x5fef5d44 r18: 0x000ceb0c r19: 0xffffffff r20: 0x000ceb1c r21: 0x00000000 r22: 0x00000000 r23: 0x000d08a5 r24: 0x00000000 r25: 0x80808080 Segmentation fault ------------------------>8-------------------- Solution to this issue is simple we make sure dynamic loader never gets compiled with "-mlong-calls" by forcing "-mno-long-calls" on it. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com> Cc: linux-snps-arc@lists.infradead.org
2016-05-28Revert "disable always failing tst-signal7"Waldemar Brodkorb
This reverts commit fad6c6021feb6c2dd4a3bd5de1113994d4a9b04e. A fix was applied with a90c9ac641ba4f692f5eec209b82097d93e9b813
2016-05-28linuxthreads: Fix warnings in pthread_tryjoin_np(), pthread_timedjoin_np()Leonid Lisovskiy
Accidentally, commit 43ef9c6b3 wasn't taken into account. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-28ldso/ARC: fix DT_RELACOUNT handlingCupertino Miranda
With new binutils supporting DT_RELACOUNT, ldso was crashing as it was parsing relocs incorrectly. Apparently that code ran for first time and was never tested. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-05-28sigaction: fix for THREADS_NATIVEBaruch Siach
Commit 9c4fce55a (nptl: remove sigaction, sigprocmask, and sigfillset from libpthread) removed pt-sigaction.c from the build to fix static build. However, since the libc sigaction is weak when HAS_THREADS is enabled, static build is not be affected. Tested for xtensa, x86, MIPS32 targets. Fixes nptl/tst-signal7. Moreover, commit 9193a76bb from the 0.9.33 branch has the right version. Ref.: http://patchwork.ozlabs.org/patch/286084/ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-05-28sparc: remove unused 64 bit support codeWaldemar Brodkorb
2016-05-24microblaze: fix linuxthreads supportWaldemar Brodkorb
Got the working code from https://github.com/jdkoftinoff/mb-linux-msli/, otherwise SIGILL while using linuxthreads.
2016-05-24microblaze: fix setjmp/longjmpWaldemar Brodkorb
Sync mostly with GNU libc implementation of setjmp/longjmp. Just generate PIC compatible code, so no difference for static builds are made. Add sysdep.h with some handy assembly macros used inside setjmp.S/__longjmp.S. This unbreaks dynamic linker support, first test suite run only shows 10 errors, which doesn't look so bad.
2016-05-24microblaze: fix ELF detection in ld.soWaldemar Brodkorb
2016-05-18remove linuxthreads.new, rename linuxthreads.oldWaldemar Brodkorb
Linuxthreads.new isn't really useful with the existence of NPTL/TLS for well supported architectures. There is no reason to use LT.new for ARM/MIPS or other architectures supporting NPTL/TLS. It is not available for noMMU architectures like Blackfin or FR-V. To simplify the live of the few uClibc-ng developers, LT.new is removed and LT.old is renamed to LT. LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
2016-05-07libpthread: add missing file for gdbserverWaldemar Brodkorb
copy file from linuxthreads to be able to compile gdbserver.
2016-04-29nptl/tls tests need shared library supportWaldemar Brodkorb
2016-04-26fixup stupid mixup of Makefile copyright and C codeWaldemar Brodkorb
2016-04-26test: add memmove testWaldemar Brodkorb
Triggers a bug in MIPS code under certain circumstances, which are unclear at the moment.
2016-04-26sparc: add deprecated context switching functionsWaldemar Brodkorb
Ported over from glibc mostly without changes. Lightly tested with mongrel2 in qemu-system-sparc.
2016-04-21dltest: fix a typoWaldemar Brodkorb
2016-04-18bump version for releasev1.0.14Waldemar Brodkorb
2016-04-17remove unused defines for lm32/or1kWaldemar Brodkorb
2016-04-17remove m68k binutils workaroundsWaldemar Brodkorb
With binutils 2.26 for m68k and 2.25.1 for coldfire, these -fPIC workarounds no longer required.
2016-04-15replace FSF addresses with URLsNikola Forró
License notices in most of the source files refer to an outdated FSF address. Replace it with URL, like in the rest of the source files.Signed-off-by: Nikola Forró <nforro@redhat.com>
2016-04-11simplify getpagesize, do not depend on kernel macrosWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2016-04-11mips: refresh ULPS file for math testsWaldemar Brodkorb
2016-04-05unlimited access to macrosWaldemar Brodkorb
Sync with GNU libc behaviour.
2016-04-05add copyright find scriptWaldemar Brodkorb
This might be used to generate a Debian copyright file.
2016-04-05remove accidentally added files while cleaning up incomplete sparcv9 supportWaldemar Brodkorb
2016-04-05nptl: remove useless text filesWaldemar Brodkorb
2016-04-03Provide an alias to _obstack_freeAlexey Neyman
GDB 7.11 does not build if compiled against uclibc-ng (1.0.12 was used, but the problematic code exists in 1.0.13 as well). The reason is that GDB release includes its own obstack implementation, but elides the code if <gnu-versions.h> declares a compatible obstack implementation in libc. uclibc-ng does claim compatible obstack interface (GDB expects version 2, but accepts version 1 if sizeof(int) == sizeof(size_t)), however, uclibc-ng does not provide the _obstack_free symbol that is a part of the interface (glibc does provide this symbol). This later causes a link failure. The attached patch makes uclibc-ng enables an alias _obstack_free -> obstack_free. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-03-31bits/byteswap-common.h: import recent headers from glibcAnthony G. Basile
On systems where uClibc doesn't provide an arch specific byteswap.h, we fall back on bits/byteswap-common.h. However, there is a bug in this header in the __bswap_constant_64(x) macro. If, for example, a double is passed, we get 'invalid operands to binary &' in which we mismatch a 'double' and 'long long unsigned int'. The newer glibc headers fix this and so we import them. Also, since the inclusion of byteswap.h is not appropriate for assembly code, we guard a portion of endian.h which uses byteswap.h from inclusion in any assembly. This is needed, for example, for f2fs-tools 1.6.0 on 32-bit big endian PowerPC. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-03-31arm: simplify handling of Thumb related optionsThomas Petazzoni
Currently, the Thumb support on ARM has three related Config.in options, which are not trivial for users to understand, and are in fact not needed: - The USE_BX option is not needed: knowing whether BX is available or not is easy. If you have an ARM > v4 or ARMv4T, then BX is available, otherwise it's not. This is the logic used in glibc. - The USE_LDREXSTREX option is not needed: whenever Thumb2 is available, ldrex/strex are available, so we can simply rely on __thumb2__ to determine whether ldrex/strex should be used, without requiring a Config.in option. - Once USE_BX and USE_LDREXSTREX are removed, the only thing left that COMPILE_IN_THUMB does is to set -mthumb. This makes the option unnecessary, as on ARM at least, the user is already supposed to pass -march=<foo> or other compiler options tuning the library for a specific ARM variant. There is no reason to do otherwise for Thumb, which allows to get rid of the COMPILE_IN_THUMB option. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-31xtensa: fix __sigsetjmp call12 caseMax Filippov
Register window saving loop in __sigsetjmp incorrectly calculates offset in the jmp_buf in case it was called with call12. The bug was introduced in commit f4b1b7ade7971141 "xtensa: fix setjmp that didn't save all registers correctly". Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-26frv: enable in configWaldemar Brodkorb
2016-03-13bump version for releasev1.0.13Waldemar Brodkorb
2016-03-10getaddrinfo: correct AI_V4MAPPED handlingPeter Korsgaard
As recently reported on the Buildroot list: http://lists.busybox.net/pipermail/buildroot/2016-March/155325.html DNS lookups with Node.js currently fails on uClibc-ng. The reason for this is the way AI_V4MAPPED is handled. According to POSIX, AI_V4MAPPED should be ignored unless ai_family is AF_INET6: http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html If the AI_V4MAPPED flag is specified along with an ai_family of AF_INET6, then getaddrinfo() shall return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses (ai_addrlen shall be 16). The AI_V4MAPPED flag shall be ignored unless ai_family equals AF_INET6. uClibc-ng was also handling AI_V4MAPPED for AF_UNSPEC, fix that. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-10DNS: Don't apply search domains to PTR lookupsTim Hockin
This lessens the load on upstream DNS servers (and it was just nonsensical). Signed-off-by: Tim Hockin <thockin@google.com>
2016-03-10DNS: don't count search-path miss as a retryTim Hockin
Currently a miss on a search-path entry is counted as a retry. This means that users with more than (num_nameservers * retries) entries in their search path list fail before trying all search paths. Concretely, a single nameserver with 4 search paths will never try the 4th search because the default retry is 3. The code doesn't currently retry a given nameserver in case of an error, so retries is sort of meaningless (though there are some comments indicating it might come). This change only treats total failure of a nameserver (try next server) as a retry. Signed-off-by: Tim Hockin <thockin@google.com>
2016-03-10ia64: sync with glibc headersWaldemar Brodkorb
2016-03-10ia64: disable atomic testsWaldemar Brodkorb
2016-02-29arm: fix __JMP_BUF_SP definitionMax Filippov
__JMP_BUF_SP is the index of a stack pointer slot in the __jmp_buf. According to ARM __sigsetjmp code it does not depend on configuration parameter __UCLIBC_HAS_FPU__. Make its definition unconditional. __JMP_BUF_SP is used in the unwind_stop through the _JMPBUF_CFA_UNWINDS_ADJ macro, this change fixes cleanup routines call on thread cancellation in configurations with hard FP. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-02-24xtensa: fix stack unwinding over __default_sa_restorerMax Filippov
For some xtensa cores generated code gets arranged so that __default_sa_restorer immediately follows preceding function. E.g.: 40a1b: c03340 sub a3, a3, a4 40a1e: f01d retw.n 00040a20 <__default_sa_restorer>: 40a20: e1a022 movi a2, 225 40a23: 005000 syscall ... Contents of the .eh_frame section: ... 000007f4 00000014 000007f8 FDE cie=00000000 pc=0004076c..00040a20 DW_CFA_advance_loc4: 3 to 0004076f DW_CFA_def_cfa_offset: 48 Due to the way xtensa libgcc uw_frame_state_for calls _Unwind_Find_FDE for non-signal frames, FDE for the previous function is found during thread cancellation signal stack unwinding in that case. Signal stack frame is not recognized and is not unwound properly, breaking cleanup routines calling for cancelled thread. Insert padding before the __default_sa_restorer so that no FDE is found for it, MD_FALLBACK_FRAME_STATE_FOR is called by uw_frame_state_for and the frame is correctly recognized as signal frame. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-02-24ARC: Disable obstackAnton Kolesov
Obstack was enabled in ARC defconfig to enable builds of native binutils and GDB. This is not needed after earlier patch which removes invalid _GNU_OBSTACK_INTERFACE_VERSION definition in cases when obstack is not selected in uClibc configuration. With this change binutils and GDB would use obstack implementation from their own source trees. In fact with recent binutils it is not possible to build it using obstack implementation in uClibc, because binutils/include/obstack.h started to use _obstack_free function instead of obstack_free, but _obstack_free is not defined in uClibc. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com>
2016-02-24Advertise obstack only when chosenAnton Kolesov
This is similar to this patch for GNU glob: ff6ce3999db93a52d1cd22510f8508b660ddf54e. The problem is that libiberty/obstack.c file checks for _GNU_OBSTACK_INTERFACE_VERSION == _OBSTACK_INTERFACE_VERSION and elides libiberty obstack implementation if there is already a compatible implementation in libc. Therefore define should be set only when obstack is actually selected, otherwise it is not possible to build binutils and gdb with uClibc. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com>