From 870218fb30a83c071b53b036d1eb33df7e30397e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 11 May 2021 19:32:43 +0200 Subject: nptl: Move pthread_attr_setstacksize into libc The symbol was moved using scripts/move-symbol-to-libc.py. It is necessary to arrange for a __libpthread_version_placeholder@GLIBC_2.6 on some of the powerpc targets. Reviewed-by: Adhemerval Zanella --- nptl/pthread_attr_setstacksize.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'nptl/pthread_attr_setstacksize.c') diff --git a/nptl/pthread_attr_setstacksize.c b/nptl/pthread_attr_setstacksize.c index 1433cec..2dbd981 100644 --- a/nptl/pthread_attr_setstacksize.c +++ b/nptl/pthread_attr_setstacksize.c @@ -19,6 +19,7 @@ #include #include #include "pthreadP.h" +#include #ifndef NEW_VERNUM # define NEW_VERNUM GLIBC_2_3_3 @@ -41,15 +42,22 @@ __pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) return 0; } +versioned_symbol (libc, __pthread_attr_setstacksize, + pthread_attr_setstacksize, GLIBC_2_34); + #if PTHREAD_STACK_MIN == 16384 -strong_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) -#else -# include -versioned_symbol (libpthread, __pthread_attr_setstacksize, - pthread_attr_setstacksize, NEW_VERNUM); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstacksize, + pthread_attr_setstacksize, GLIBC_2_1); +# endif +#else /* PTHREAD_STACK_MIN != 16384 */ +# if OTHER_SHLIB_COMPAT (libpthread, NEW_VERNUM, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstacksize, + pthread_attr_setstacksize, NEW_VERNUM); +# endif -# if SHLIB_COMPAT(libpthread, GLIBC_2_1, NEW_VERNUM) +# if OTHER_SHLIB_COMPAT(libpthread, GLIBC_2_1, NEW_VERNUM) int __old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) @@ -73,6 +81,5 @@ __old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) compat_symbol (libpthread, __old_pthread_attr_setstacksize, pthread_attr_setstacksize, GLIBC_2_1); -# endif - -#endif +# endif /* OTHER_SHLIB_COMPAT */ +#endif /* PTHREAD_STACK_MIN != 16384 */ -- cgit v1.1