[Glibc-bsd-commits] r5046 - trunk/glibc-ports/fbtl

Petr Salinger ps-guest at alioth.debian.org
Sun Oct 13 10:31:09 UTC 2013


Author: ps-guest
Date: 2013-10-13 10:31:09 +0000 (Sun, 13 Oct 2013)
New Revision: 5046

Modified:
   trunk/glibc-ports/fbtl/Makefile
   trunk/glibc-ports/fbtl/Versions
Log:
sync Makefile with 2.18, add more pthread interfaces


Modified: trunk/glibc-ports/fbtl/Makefile
===================================================================
--- trunk/glibc-ports/fbtl/Makefile	2013-10-13 10:21:24 UTC (rev 5045)
+++ trunk/glibc-ports/fbtl/Makefile	2013-10-13 10:31:09 UTC (rev 5046)
@@ -18,7 +18,6 @@
 #
 #	Sub-makefile for NPTL portion of the library.
 #
-
 include ../option-groups.mak
 
 subdir	:= fbtl
@@ -115,16 +114,18 @@
 		      pt-raise pt-system \
 		      flockfile ftrylockfile funlockfile \
 		      sigaction \
-		      herrno res pt-allocrtsig \
+		      pt-allocrtsig \
 		      pthread_kill_other_threads \
+		      pthread_getaffinity pthread_setaffinity \
+		      pthread_attr_getaffinity pthread_attr_setaffinity \
 		      cleanup_routine unwind-forcedunwind \
+		      pthread_setname pthread_getname \
 
-# 		lowlevelrobustlock
+#		lowlevelrobustlock
 #		pthread_sigqueue
-		      
+
 # post linuxthreads interfaces
-#		      pthread_getaffinity pthread_setaffinity \
-#		      pthread_attr_getaffinity pthread_attr_setaffinity \
+
 #		      pthread_mutexattr_getrobust pthread_mutexattr_setrobust \
 #		      pthread_mutex_consistent \
 #		      pthread_mutexattr_getprotocol \
@@ -133,16 +134,17 @@
 #		      pthread_mutexattr_setprioceiling tpp \
 #		      pthread_mutex_getprioceiling \
 #		      pthread_mutex_setprioceiling \
-#		      pthread_setname pthread_getname \
 #		      pthread_setattr_default_np pthread_getattr_default_np
-		      
-		      
+
 # commented out also in nptl
+
 #		      pthread_setuid pthread_seteuid pthread_setreuid \
 #		      pthread_setresuid \
 #		      pthread_setgid pthread_setegid pthread_setregid \
 #		      pthread_setresgid
 
+libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res 
+
 libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
 libpthread-static-only-routines = pthread_atfork
 
@@ -253,14 +255,14 @@
 	tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
 	tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
 	tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
-	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
+	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel25 \
 	tst-cancel-self tst-cancel-self-cancelstate \
 	tst-cancel-self-canceltype tst-cancel-self-testcancel \
 	tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
 	tst-flock1 tst-flock2 \
 	tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
 	tst-signal6 tst-signal7 \
-	tst-exec1 tst-exec2 tst-exec3 tst-exec4 \
+	tst-exec2 tst-exec3 tst-exec4 \
 	tst-exit1 tst-exit2 tst-exit3 \
 	tst-stdio1 tst-stdio2 \
 	tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \
@@ -268,13 +270,12 @@
 	tst-unload \
 	tst-dlsym1 \
 	tst-sysconf \
-	tst-locale1 tst-locale2 \
+	tst-locale2 \
 	tst-umask1 \
 	tst-popen1 \
 	tst-clock1 \
 	tst-context1 \
 	tst-sched1 \
-	tst-backtrace1 \
 	tst-abstime \
 	tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
 	tst-getpid1 tst-getpid2 tst-getpid3 \
@@ -282,6 +283,17 @@
 xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
 test-srcs = tst-oddstacklimit
 
+# This test uses the posix_spawn functions.
+tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1
+
+# This test uses the 'backtrace' functions.
+tests-$(OPTION_EGLIBC_BACKTRACE) += tst-backtrace1
+
+# This test is written in C++.
+tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24
+
+tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1 
+
 # Files which must not be linked with libpthread.
 tests-nolibpthread = tst-unload
 
@@ -300,8 +312,13 @@
 	 tst-oncex3 tst-oncex4
 endif
 ifeq ($(build-shared),yes)
-tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-_res1 tst-fini1 \
+tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-fini1 \
 	 tst-stackguard1
+ifeq ($(versioning),yes)
+# struct __res_state _res is only available with
+# symbol versioning after GLIBC_2.2.
+tests += tst-_res1
+endif
 tests-nolibpthread += tst-fini1
 ifeq ($(have-z-execstack),yes)
 tests += tst-execstack
@@ -440,6 +457,35 @@
 CFLAGS-tst-cleanupx4.c += -fexceptions
 CFLAGS-tst-oncex3.c += -fexceptions
 CFLAGS-tst-oncex4.c += -fexceptions
+
+ldflags-libgcc_s = -Wl,--as-needed -lgcc_s -Wl,--no-as-needed
+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s)
+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s)
+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s)
+
 CFLAGS-tst-align.c += $(stack-align-test-flags)
 CFLAGS-tst-align3.c += $(stack-align-test-flags)
 CFLAGS-tst-initializers1.c = -W -Wall -Werror
@@ -450,7 +496,7 @@
 CFLAGS-tst-initializers1-gnu89.c = $(CFLAGS-tst-initializers1-<)
 CFLAGS-tst-initializers1-gnu99.c = $(CFLAGS-tst-initializers1-<)
 
-tst-cancel7-ARGS = --command "exec $(host-built-program-cmd)"
+tst-cancel7-ARGS = --command "exec $(host-test-program-cmd)"
 tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
 tst-umask1-ARGS = $(objpfx)tst-umask1.temp
 
@@ -490,8 +536,8 @@
 		       $(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
 		       $(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
 		       $(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
-	$(BASH) $< $(common-objpfx) $(elf-objpfx) \
-		$(rtld-installed-name) '$(test-wrapper-env)'
+	$(BASH) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
+	  '$(test-wrapper-env)'
 endif
 
 $(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
@@ -520,16 +566,6 @@
 $(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
 $(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
 
-# the next rule is pre-2.18 only
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-# Depend on ld.so too to get proper versions of ld.so symbols.
-$(objpfx)libpthread.so: $(common-objpfx)libc.so \
-			$(common-objpfx)libc_nonshared.a \
-			$(elfobjdir)/ld.so
-
-
 # Make sure we link with the thread library.
 ifeq ($(build-shared),yes)
 $(addprefix $(objpfx), \
@@ -595,7 +631,7 @@
 endif
 endif
 
-tst-exec4-ARGS = $(host-built-program-cmd)
+tst-exec4-ARGS = $(host-test-program-cmd)
 
 $(objpfx)tst-execstack: $(libdl)
 $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
@@ -603,14 +639,14 @@
 
 $(objpfx)tst-fini1mod.so: $(shared-thread-library)
 
-tst-stackguard1-ARGS = --command "$(host-built-program-cmd) --child"
+tst-stackguard1-ARGS = --command "$(host-test-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
 
 ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-oddstacklimit.out
 
 $(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
-	$(run-program-prefix) $< --command '$(host-built-program-cmd)' > $@
+	$(test-program-prefix) $< --command '$(host-test-program-cmd)' > $@
 endif
 
 # The tests here better do not run in parallel

Modified: trunk/glibc-ports/fbtl/Versions
===================================================================
--- trunk/glibc-ports/fbtl/Versions	2013-10-13 10:21:24 UTC (rev 5045)
+++ trunk/glibc-ports/fbtl/Versions	2013-10-13 10:31:09 UTC (rev 5046)
@@ -223,10 +223,20 @@
     # affinity interfaces without size parameter
     # have not been in linuxthreads and 
     # will be overriden by version from GLIBC_2.3.4
-    #pthread_getaffinity_np; pthread_setaffinity_np;
-    #pthread_attr_getaffinity_np; pthread_attr_setaffinity_np;
+    pthread_getaffinity_np; pthread_setaffinity_np;
+    pthread_attr_getaffinity_np; pthread_attr_setaffinity_np;
   }
 
+  GLIBC_2.3.4 {
+    # New affinity interfaces.
+    pthread_getaffinity_np; pthread_setaffinity_np;
+    pthread_attr_getaffinity_np; pthread_attr_setaffinity_np;
+  }
+
+  GLIBC_2.12 {
+    pthread_setname_np; pthread_getname_np;
+  };
+
   GLIBC_PRIVATE {
     __pthread_initialize_minimal;
     __pthread_clock_gettime; __pthread_clock_settime;




More information about the Glibc-bsd-commits mailing list