aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NPTL/arc: notify kernel of the TP valueHEADmasterGravatar Vineet Gupta2015-07-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native gdb makes a ptrace (GET_THREAD_AREA) which needs to return the TP. however when libc sets up TP reg (for main thread), it doesn't call arc_settls syscall so kernel doesn't know of TP register details (moreso because clone doesnt have SETTLS flag) Note that kernel doesn't know about r25 being TP etc. This commit got lost in merge of NPTL tools into arc-mainline-dev and showed up again as STAR 9000919529 (native gdb can't debug threaded apps) ------->8--------------- [ARCLinux]# gdb ./pth Reading symbols from ./pth...(no debugging symbols found)...done. (gdb) b main Breakpoint 1 at 0x106f2 (gdb) r Starting program: /pth [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". thread_get_info_callback: cannot get thread info: generic error (gdb) q ------->8--------------- Debugged-by: Anton Kolesov <akolesov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getconf.c: undef VERSIONGravatar Bernhard Reutner-Fischer2015-05-281-0/+1
| | | | | | might come in via nptl so undef it before redefining it Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ARC: enable IPv6 in defconfigsGravatar Alexey Brodkin2015-05-262-0/+2
| | | | | | | | | | | These days IPv6 is used more and more in different software packages. And so we're adding IPv6 support by default in uClibc for ARC cores. Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: Makefile updateGravatar Yoshinori Sato2015-05-262-61/+19
| | | | | Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: Add new featureGravatar Yoshinori Sato2015-05-261-0/+1
| | | | | Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: headers updateGravatar Yoshinori Sato2015-05-266-206/+95
| | | | | | | - wire up new kernel Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: Assembly functionsGravatar Yoshinori Sato2015-05-269-53/+120
| | | | | | | | | - remove symbol prefix - new startup - new clone syscall support Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: 64bit integer supportGravatar Yoshinori Sato2015-05-261-10/+0
| | | | | Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* h8300: config updateGravatar Yoshinori Sato2015-05-263-6/+6
| | | | | | | | - New toolchain - Add new flags Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* siginfo: add signal info for seccomp related SIGSYSGravatar Daniel Golle2015-05-205-0/+55
| | | | | | | | | | | | | uClibc doesn't define signal info for the SIGSYS signal which is issued in case of hitting a syscall prohibited by seccomp. This is sad as it makes debugging seccomp filter policies impossible on some architectures (at least ARM and PowerPC, maybe also others) which do not coincidentally set si_value.sival_int as the syscall number. To fix this, import the definitions and macros needed from glibc. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* test/silly: Extend include path.Gravatar Andrew Burgess2015-05-201-0/+7
| | | | | | | | | | | | | | | | When attempting to build uClibc under buildroot, including building the tests, the silly tests don't currently compile, a result of attempting to build using a compiler that does not yet have an installed version of uClibc available. The error is a missing header file, specifically atomic.h. Taking inspiration from the nptl tests, I have extended the EXTRA_CFLAGS variable to add the required include paths. The tests can now be built under buildroot. Signed-off-by: Andrew Burgess <andrew.burgess@embecosm.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* _scanf.c: Implement 'm' modifier for 'c' and '[' conversions.Gravatar Will Newton2015-05-202-18/+57
| | | | | | | | | | | | | | The current code implements the 'm' modifier only for 's' conversions and would cause a segfault if it was used for 'c' or '[' conversions. This patch extends the code to cover these cases too. The original version could write scanned data outside the passed buffer because index i used in the '[' conversion handling block was clobbered. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl_db: fix ommitting td_ta_setconcurrencyGravatar Bernhard Reutner-Fischer2015-05-061-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* init.c (__nptl_initial_report_events): New variable.Gravatar Roland McGrath2015-05-0614-86/+217
| | | | | | | | | | | | | | | | | (__pthread_initialize_minimal_internal): Initialize pd->report_events to that. This patch helps NPTL report TD_CREATE event, so that GDB could catch the event and update its thread_list. Link: http://lists.uclibc.org/pipermail/uclibc/2015-April/048921.html [shengyong: - original patch from glibc: commit 7d9d8bd18906fdd17364f372b160d7ab896ce909 - context adjust - update nptl_db/ChangeLog] Signed-off-by: Roland McGrath <roland@gnu.org> Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: pregen depends on xlocaleGravatar Bernhard Reutner-Fischer2015-04-293-7/+5
| | | | | | pt-initfini eventually depends on xlocale Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* strftime: comment on %0xY %+nY %-nYGravatar Bernhard Reutner-Fischer2015-04-291-0/+24
| | | | | | Would fix: date -u +%4Y%2m%2d%2H%2M%2S Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: swap V=1 with V=2 command printingGravatar Bernhard Reutner-Fischer2015-04-293-5/+5
| | | | | | | | | | Previously V=1 did print abbreviated commands and V=2 the full commands. Kbuild-based build-systems behave in the opposite way and this is apparently confusing or inconvenient for users so swap our V handling to be in line with kbuild (and automake as far as V=0 / V=1 is concerned). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: LT{,.old} CRT prereqGravatar Bernhard Reutner-Fischer2015-04-231-0/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: Tweak pregen wrt headers_depGravatar Bernhard Reutner-Fischer2015-04-231-3/+1
| | | | | | Required for !NPTL, !context-funcs for example. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ARC: enable more options to satisfy build requirements of applicationsGravatar Alexey Brodkin2015-04-222-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Buildroot autobuilder following options were missing: * Libutil stub (UCLIBC_HAS_LIBUTIL option) http://autobuild.buildroot.org/results/ce3/ce39eb9b9ece0968563641fb2207099d1a37b191/ * Program_invocation_name (UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y) http://autobuild.buildroot.org/results/154/1546d909e606daefd41b87dece94d642c0fdeba4/ http://autobuild.buildroot.org/results/bd5/bd54581d7b0cc73bc501072d27e870a443dfce79/ * Ifaddrd support (UCLIBC_SUPPORT_AI_ADDRCONFIG=y) http://autobuild.buildroot.org/results/134/134e78ef1fa87f7fbf26c23ec5dfc68785d79613/ * Libnsl (UCLIBC_HAS_LIBNSL_STUB=y) http://autobuild.buildroot.net/results/331/331ed781b422448205fb9e7c9730ec0c438d6306/ http://autobuild.buildroot.net/results/402/402d64965ac7ac6e1d4e1990080394958802fe8c/ http://autobuild.buildroot.net/results/960/9605bac2972d3e3d3fb91947ae6921e89210247b/ http://autobuild.buildroot.net/results/6b6/6b61ea80a3a6dcead233c4b408eba8b8d647e841/ * UTMP got reworked recently, which breaks packages such as busybox, gdbserver etc so enable that too Enabling mentioned options to make sure more packages could be built with ARC pre-built uClibc tools. Note UCLIBC_USE_NETLINK is a prerequisite for UCLIBC_SUPPORT_AI_ADDRCONFIG. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: pregen depends on xlocaleGravatar Bernhard Reutner-Fischer2015-04-221-2/+2
| | | | | | | since ae9e3f46 sched.h pulls in stdlib.h (for malloc() and free()) and thus also xlocale.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: Add BX and BXC macrosGravatar Bernhard Reutner-Fischer2015-04-2216-116/+63
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: Fix POP_RET for armv4t && interworkingGravatar Bernhard Reutner-Fischer2015-04-221-6/+6
| | | | | | | It seems the condition was reversed which lead to e.g. arm-920t being confused Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* NPTL: Rename a variableGravatar Bernhard Reutner-Fischer2015-04-223-4/+18
| | | | | | There seems to be a bug in gold with static TLS at least on x86_64 (?) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: PRELINK: Remove surplus newlineGravatar Bernhard Reutner-Fischer2015-04-221-1/+2
| | | | | | in early debugging code Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: try to merge all constantsGravatar Bernhard Reutner-Fischer2015-04-221-0/+2
| | | | | | Saves a couple of bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: thumb1: Fix conflicting types for _v3Gravatar Bernhard Reutner-Fischer2015-04-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from ./include/sys/syscall.h:33:0, from libc/sysdeps/linux/common/sync_file_range.c:10: libc/sysdeps/linux/common/sync_file_range.c: In function '__sync_file_range_nocancel': ./include/bits/syscalls.h:144:16: error: conflicting types for '_v3' register int _v3 __asm__ ("v3") = _v3tmp; ^ ./libc/sysdeps/linux/arm/sysdep.h:281:7: note: in expansion of macro 'LOAD_ARGS_7' LOAD_ARGS_##nr (args) \ ^ ./libc/sysdeps/linux/arm/sysdep.h:324:2: note: in expansion of macro 'INTERNAL_SYSCALL_RAW' INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) ^ ./libc/sysdeps/linux/arm/sysdep.h:256:40: note: in expansion of macro 'INTERNAL_SYSCALL' ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \ ^ libc/sysdeps/linux/common/sync_file_range.c:32:9: note: in expansion of macro 'INLINE_SYSCALL' return INLINE_SYSCALL(sync_file_range, 7, fd, 0, ^ In file included from ./libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h:18:0, from ./include/cancel.h:58, from libc/sysdeps/linux/common/sync_file_range.c:15: ./libc/sysdeps/linux/arm/sysdep.h:280:21: note: previous definition of '_v3' was here register int *_v3 __asm__ ("v3") = _sys_buf; \ ... Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* librt: Add missing __dso_handleGravatar Bernhard Reutner-Fischer2015-04-142-0/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* librt: Refine LIBSGravatar Bernhard Reutner-Fischer2015-04-141-4/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* librt: honour HAS_STUBS in buildsysGravatar Bernhard Reutner-Fischer2015-04-141-0/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* include/: ignore sys/random.h symlinkGravatar Bernhard Reutner-Fischer2015-04-141-0/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* librt: Rephrase librt.so library dependenciesGravatar Bernhard Reutner-Fischer2015-04-141-2/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* librt: Fix librt.so depends for !NPTLGravatar Bernhard Reutner-Fischer2015-04-141-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* prelink: handle _begin in a gold-agnostic wayGravatar Bernhard Reutner-Fischer2015-04-143-20/+7
| | | | | | The nostartfiles is redundant but better be safe Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: pass -O to ld unless DODEBUGGravatar Bernhard Reutner-Fischer2015-04-141-1/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: Fix page-size in getifaddrs()Gravatar Bernhard Reutner-Fischer2015-03-311-2/+11
| | | | | | TODO: this could need a cleanup.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: Do not build crt upon pregenGravatar Bernhard Reutner-Fischer2015-03-316-15/+13
| | | | | | No need to build crt when just generating headers Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: tweak ucontext_i.h prerequisitesGravatar Bernhard Reutner-Fischer2015-03-316-16/+18
| | | | | | | | | | ucontext_i.h too depends on uClibc_config.h. Update it to look like the other MANGLE generated files and tweak prereqs Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: Fix setting LIBGCCGravatar Bernhard Reutner-Fischer2015-03-311-3/+3
| | | | | | | We were ending up with multiple entries in LIBGCC for recursive child make instances, avoid that. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "librt: Use -nodefaultlibs instead of -nostdlib"Gravatar Bernhard Reutner-Fischer2015-03-311-3/+0
| | | | | | | | This reverts commit 534f44d53146457b3ca686c47efb9207543b88e1. I don't think this is wanted. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ARC: don't hard-code ELF_NGREGGravatar Alexey Brodkin2015-03-271-5/+2
| | | | | | | | | 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>
* ARC/signal: shield sa_restorer from compiler toggle side-effectsGravatar Vineet Gupta2015-03-271-1/+2
| | | | | | | | | | | | | 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>
* ARC: switch to NPTLGravatar Vineet Gupta2015-03-272-2/+2
| | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add support for R_ARC_NONE relocations.Gravatar Andrew Burgess2015-03-271-0/+4
| | | | | | | | | | | | | | 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>
* include: update atomic.h from glibcGravatar Bernhard Reutner-Fischer2015-03-276-5/+837
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* test: Add SIMULATOR_uclibc and SIMULATOR_glibcGravatar Bernhard Reutner-Fischer2015-03-272-1/+7
| | | | | | | | 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>
* utmp: always have at least utmpxGravatar Bernhard Reutner-Fischer2015-03-261-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* NPTL: SH: silence warningGravatar Bernhard Reutner-Fischer2015-03-261-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* SH: add 't' to syscall clobber listGravatar Bernhard Reutner-Fischer2015-03-261-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: mark _dl_exit as noreturnGravatar Bernhard Reutner-Fischer2015-03-261-1/+9
| | | | | | | | | | | | | 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>