OSDN Git Service

test: NPTL: sync WRITE_BUFFER_SIZE with glibc test
[uclinux-h8/uClibc.git] / Makerules
index 7153836..5030205 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -50,6 +50,10 @@ all_objs: $(ar_objs)
 endif
 $(shared_objs) $(ar_objs): | $(sub_headers)
 
+define objects_with_syms
+       $(foreach o,$(2),$(if $(shell $(NM) $(1) $(o) | grep .),$(o)))
+endef
+
 headers-y: $(headers-y)
        @true
 
@@ -243,7 +247,7 @@ cmd_compile.mi= $(cmd_compile.m:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)
 cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))
 cmd_strip     = $(STRIPTOOL) $(STRIP_FLAGS) $^
 cmd_t_strip   = $(STRIPTOOL) $(STRIP_FLAGS) $@
-cmd_ar        = $(AR) $(ARFLAGS) $@ $^
+cmd_ar        = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^)
 
 define do_ln
        @$(disp_ln)
@@ -300,7 +304,7 @@ define create-lds
        -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
        -Wl,--verbose 2>&1 | LC_ALL=C \
        sed -e '/^=========/,/^=========/!d;/^=========/d' \
-       -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds
+       -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
 endef
 
 define link.so
@@ -373,14 +377,9 @@ $(top_builddir)%.dep:
 $(top_builddir)lib/interp.c: | $(top_builddir)lib
        $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@.tmp
        $(Q)echo "#include <features.h>" >> $@.tmp
-ifeq ($(HARDWIRED_ABSPATH),y)
        $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
                "(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@.tmp
        $(Q)$(SED) -i -e 's://:/:g' $@.tmp
-else
-       $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
-               "(\".interp\"))) =\""$(UCLIBC_LDSO)"\";" >> $@.tmp
-endif
        $(Q)mv $@.tmp $@
 
 $(interp): $(top_builddir)lib/interp.c | $(sub_headers)
@@ -470,6 +469,8 @@ files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) \
        $(libm-a-y) $(libm-so-y) \
        $(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y) \
        $(libthread_db-a-y) $(libthread_db-so-y) $(libpthread-generated-y) \
+       $(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
+       $(PTHREAD_INITFINI:.c=.s) \
        $(librt-a-y) $(librt-so-y)  $(libresolv-a-y) $(libresolv-so-y) \
        $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
        $(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \