diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-24 02:55:31 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-26 20:23:24 +0200 |
commit | 29ff9055c80efe77a7130767a9fcb3ab8c67e8ce (patch) | |
tree | b061656c1336d7d73ed5eef59352e3d50d8147a7 /libc/sysdeps/linux | |
parent | b06f85d62c41a4ed108628b1c564203f36c0ab4e (diff) |
use a single libc and deduplicate threading code
Similar to musl libc a single libc has many benefits and solves
some open issues with uClibc-ng.
- no pthread_mutex_* weak symbols exported anymore
- applications no longer failing to link when either
-lrt or -lpthread are missing for dynamic and static linking mode
- smaller C library
- slightly better runtime performance
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r-- | libc/sysdeps/linux/arm/Makefile.arch | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/arm/libc-thumb_atomics.S | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/Makefile.in | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/Makefile.arch | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch index cda3db206..78f753361 100644 --- a/libc/sysdeps/linux/arm/Makefile.arch +++ b/libc/sysdeps/linux/arm/Makefile.arch @@ -13,7 +13,6 @@ SSRC-y := \ vfork.S clone.S SSRC-$(UCLIBC_HAS_LFS) += mmap64.S -SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-thumb_atomics.S libc-nonshared-$(UCLIBC_HAS_THREADS_NATIVE) += $(ARCH_OUT)/libc-aeabi_read_tp.os libc-static-$(UCLIBC_HAS_THREADS_NATIVE) += $(ARCH_OUT)/libc-aeabi_read_tp.o CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c diff --git a/libc/sysdeps/linux/arm/libc-thumb_atomics.S b/libc/sysdeps/linux/arm/libc-thumb_atomics.S deleted file mode 100644 index e7bc8950d..000000000 --- a/libc/sysdeps/linux/arm/libc-thumb_atomics.S +++ /dev/null @@ -1 +0,0 @@ -#include <ldso/ldso/arm/thumb_atomics.S> diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in index 887dc3d62..6c35bff0b 100644 --- a/libc/sysdeps/linux/common/Makefile.in +++ b/libc/sysdeps/linux/common/Makefile.in @@ -75,11 +75,13 @@ CSRC-$(if $(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_ADVANCED_REALTIME),y,) += \ fallocate.c $(filter fallocate64.c,$(CSRC-y)) # NPTL needs these internally: madvise.c CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c +ifeq ($(UCLIBC_HAS_THREADS),y) +CSRC- += raise.c +endif ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) -CSRC- += fork.c getpid.c raise.c #open.c close.c read.c write.c +CSRC- += fork.c getpid.c CSRC- += $(if $(findstring =arm=,=$(TARGET_ARCH)=),vfork.c) CSRC- += $(if $(findstring =x86_64=,=$(TARGET_ARCH)=),vfork.c) -#CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c) CSRC- += $(if $(findstring =metag=,=$(TARGET_ARCH)=),vfork.c) endif ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y) @@ -97,6 +99,10 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c cl nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \ sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \ sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c +# use clock_gettime.c from librt only for NPTL +ifeq ($(UCLIBC_HAS_REALTIME)$(UCLIBC_HAS_THREADS_NATIVE),yy) +CSRC- += clock_gettime.c +endif # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \ posix_fallocate.c posix_fallocate64.c diff --git a/libc/sysdeps/linux/i386/Makefile.arch b/libc/sysdeps/linux/i386/Makefile.arch index 1c72d23fd..581e10a5e 100644 --- a/libc/sysdeps/linux/i386/Makefile.arch +++ b/libc/sysdeps/linux/i386/Makefile.arch @@ -9,8 +9,7 @@ CSRC-y := brk.c __syscall_error.c sigaction.c SSRC-y := \ __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \ - sync_file_range.S syscall.S mmap.S \ - copysign.S + sync_file_range.S syscall.S mmap.S SSRC-$(UCLIBC_HAS_LFS) += mmap64.S SSRC-$(if $(findstring yy,$(UCLIBC_HAS_ADVANCED_REALTIME)$(UCLIBC_HAS_LFS)),y) += posix_fadvise64.S |