summaryrefslogtreecommitdiff
path: root/libc/misc/internals/Makefile.in
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-12-07 07:56:44 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-12-10 15:14:33 +0100
commit5ca03df6978345c297225212cc0ca33d476b0272 (patch)
tree873ea7e2b6d2202dd01bf27be9d5b3b5ab24c7a2 /libc/misc/internals/Makefile.in
parent6579597083e608f5a66fe8a898d113c2588e2c8f (diff)
threads: optimize single threaded applications
Revert the removal of the weak pthread functions and guarantee a link order so that single threaded applications doesn't link in all the pthread functions they don't use. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'libc/misc/internals/Makefile.in')
-rw-r--r--libc/misc/internals/Makefile.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in
index ae094ee23..ce7f75af5 100644
--- a/libc/misc/internals/Makefile.in
+++ b/libc/misc/internals/Makefile.in
@@ -25,7 +25,9 @@ libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.oS
else
libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.os
endif
-libc-static-y += $(MISC_INTERNALS_OUT)/__uClibc_main.o
+# link order is important to not pull in pthread functions, when
+# a single threaded application is statically linked
+libc-static-y := $(MISC_INTERNALS_OUT)/__uClibc_main.o $(libc-static-y)
libc-static-$(UCLIBC_FORMAT_FLAT_SEP_DATA) += \
$(MISC_INTERNALS_OUT)/shared_flat_initfini.o \
$(MISC_INTERNALS_OUT)/shared_flat_add_library.o