glibc:hjl/pthread/2.22

Last commit made on 2015-09-23
Get this branch:
git clone -b hjl/pthread/2.22 https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
hjl/pthread/2.22
Repository:
lp:glibc

Recent commits

7c846b6... by "H.J. Lu" <email address hidden>

Use STB_SECONDARY on pthread functions in libc

Use STB_SECONDARY binding on pthread functions in libc so that they will
be preempted by definitions in libpthread at link-time as well as at
run-time.

 * csu/libc-tls.c (__pthread_initialize_minimal): Mark it
 secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * misc/error.c (error): Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 (error_at_line): Likewise.
 * posix/wordexp.c (parse_comm): Likewise.
 * stdlib/fmtmsg.c (fmtmsg): Likewise.
 * nptl/Makefile:
 (routines): Add libc-pthread-secondary.
 (CFLAGS-libc-pthread-secondary.c): New.
 * nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0):
 Add pthread_once.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add
 _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer,
 __pthread_getspecific, __pthread_setspecific,
 __pthread_key_create, __pthread_mutex_lock,
 __pthread_mutex_unlock, __pthread_once,
 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock,
 __pthread_rwlock_unlock and __pthread_unwind.
 [HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE):
 Likewise.
 * cleanup_defer_compat.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 _pthread_cleanup_pop_restore and _pthread_cleanup_push_defer.
 * nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New.
 (FORWARD_NORETURN): Likewise.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This.
 (pthread_setcancelstate): Add an alias.
 * nptl/libc-pthread-secondary.c: New file.
 * nptl/nptl-init.c (pthread_functions): Don't include secondary
 pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace ptr_pthread_setcancelstate with
 ptr___pthread_setcancelstate.
 * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
 * nptl/pthread_getspecific.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_getspecific.
 * nptl/pthread_key_create.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_key_create.
 * nptl/pthread_mutex_lock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_mutex_lock.
 * nptl/pthread_mutex_unlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_mutex_unlock.
 * nptl/pthread_once.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_once.
 * nptl/pthread_rwlock_rdlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_rdlock.
 * nptl/pthread_rwlock_unlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_unlock.
 * nptl/pthread_rwlock_wrlock.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_rwlock_wrlock.
 * nptl/pthread_setspecific.c: Include <shlib-compat.h>.
 Add GLIBC_2_0 and GLIBC_PRIVATE versions for
 __pthread_setspecific.
 * nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_cond_broadcast_2_0): Declare only if not in libc.
 (__pthread_cond_destroy_2_0): Likewise.
 (__pthread_cond_init_2_0): Likewise.
 (__pthread_cond_signal_2_0): Likewise.
 (__pthread_cond_timedwait_2_0): Likewise.
 (__pthread_cond_wait_2_0): Likewise.
 * scripts/abilist.awk: Support secondary symbols.
 * sysdeps/generic/localplt.data: Add __pthread_getspecific,
 __pthread_key_create, __pthread_once, __pthread_rwlock_rdlock,
 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
 __pthread_setcancelstate, __pthread_setspecific,
 __pthread_unwind. _pthread_cleanup_pop_restore and
 _pthread_cleanup_push_defer.
 * sysdeps/unix/sysv/linux/i386/localplt.data: Likewise.
 * sysdeps/x86_64/localplt.data: Likewise.
 * sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_maybe_call): Always call FUNC if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__libc_ptf_call): Likewise.
 (__libc_ptf_call_always): Likewise.
 (__pthread_mutex_init): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (__pthread_mutex_destroy): Likewise.
 (__pthread_mutex_lock): Likewise.
 (__pthread_mutex_trylock): Likewise.
 (__pthread_mutex_unlock): Likewise.
 (__pthread_mutexattr_init): Likewise.
 (__pthread_mutexattr_destroy): Likewise.
 (__pthread_mutexattr_settype): Likewise.
 (__pthread_rwlock_destroy): Likewise.
 (__pthread_rwlock_rdlock): Likewise.
 (__pthread_rwlock_tryrdlock): Likewise.
 (__pthread_rwlock_wrlock): Likewise.
 (__pthread_rwlock_trywrlock): Likewise.
 (__pthread_rwlock_unlock): Likewise.
 (__pthread_key_create): Likewise.
 (__pthread_setspecific): Likewise.
 (__pthread_getspecific): Likewise.
 (__pthread_once): Likewise.
 (__pthread_initialize): Likewise.
 (__pthread_atfork): Likewise.
 (_pthread_cleanup_push_defer): Likewise.
 (_pthread_cleanup_pop_restore): Likewise.
 (__pthread_setcancelstate): New prototype.
 (pthread_setcancelstate): Renamed to ...
 (__pthread_setcancelstate): This. Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 * sysdeps/nptl/jmp-unwind.c: Include <bits/libc-lock.h>
 instead of <nptl/pthreadP.h>.
 (__pthread_cleanup_upto): Don't mark it weak if
 HAVE_ASM_SECONDARY_DIRECTIVE is defined.
 (_longjmp_unwind): Use __libc_ptf_call.
 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
 * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always
 call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is
 defined. Replace pthread_setcancelstate with
 __pthread_setcancelstate.
 * sysdeps/unix/sysv/linux/i386/libc.abilist: Add pthread_once.
 * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make
 __lll_lock_wait_private and __lll_unlock_wake_private weak in
 libc.a.
 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
 * sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind):
 Don't mark it weak if HAVE_ASM_SECONDARY_DIRECTIVE is defined.

6e1ae9b... by "H.J. Lu" <email address hidden>

Place libpthread.a right before libc.a

GCC driver places -lpthread in --start-group -lgcc -lgcc_eh -lpthread
-lc --end-group. Glibc tests should do the same.

 [BZ #14569]
 * Makeconfig (+link-static-before-libc): Also filter out
 $(common-objpfx)nptl/libpthread%. Remove $(link-libc-static).
 (link-libc-static-tests): Place libpthread.a before libc.a.
 * nptl/Makefile (tests-static): Add tst-cancelx7-static,
 tst-raise1-static and tst-cancel7-static.
 (tests): Likewise.
 * nptl/tst-cancel7-static.c: New file.
 * nptl/tst-cancelx7-static.c: Likewise.
 * nptl/tst-raise1-static.c: Likewise.

9a638a9... by "H.J. Lu" <email address hidden>

Make pthread_rwlock_destroy/pthread_rwlock_init/weak

 * pthread_rwlock_destroy.c (pthread_rwlock_destroy): Replace
 strong_alias with weak_alias.
 * pthread_rwlock_init.c (pthread_rwlock_init): Likewise.

ad0a4ce... by "H.J. Lu" <email address hidden>

Add STB_SECONDARY support to conform/linknamespace.pl

 * conform/linknamespace.pl (list_syms): Support STB_SECONDARY.

1c81039... by "H.J. Lu" <email address hidden>

Add STB_SECONDARY support to ld.so

Enable STB_SECONDARY if it is supported by binutils. Add 3 STB_SECONDARY
tests.

 * config.h.in: Add HAVE_ASM_SECONDARY_DIRECTIVE.
 * config.make.in (have-secondary): New macro.
 * configure.in: Check if STB_SECONDARY is supported by as/ld.
 Define HAVE_ASM_SECONDARY_DIRECTIVE and set have-secondary to yes
 if the .secondary assembly directive works.
 * configure: Regenerated.
 * elf/Makefile (tests): Add tst-secondary1 tst-secondary2
 tst-secondary3 if STB_SECONDARY is supported by as/ld.
 (modules-names): Add tst-secondarymod tst-secondary1mod
 tst-secondary2mod tst-secondary3mod if STB_SECONDARY is supported
 by as/ld.
 (LDFLAGS-tst-secondarymod.so): New macro.
 ($(objpfx)tst-secondary1): New rule.
 ($(objpfx)tst-secondary2): Likewise.
 ($(objpfx)tst-secondary3): Likewise.
 * elf/dl-addr.c (determine_info): Also check STB_SECONDARY.
 * elf/dl-lookup.c (do_lookup_x): Handle STB_SECONDARY.
 (_dl_lookup_symbol_x): Likewise.
 * elf/sprof.c (read_symbols): Likewise.
 * elf/elf.h (STB_SECONDARY): New.
 (STB_NUM): Updated.
 * elf/tst-secondary.h: New file.
 * elf/tst-secondary1.c: Likewise.
 * elf/tst-secondary1mod.c: Likewise.
 * elf/tst-secondary2.c: Likewise.
 * elf/tst-secondary2mod.c: Likewise.
 * elf/tst-secondary3.c: Likewise.
 * elf/tst-secondary3mod.c: Likewise.
 * elf/tst-secondarymod.c: Likewise.

2ec11c2... by Zack Weinberg

Deprecate the use of regexp.h

<regexp.h> (not to be confused with <regex.h>) is an obsolete and
frankly horrible regular expression-matching API. It was part of SVID
but was withdrawn in Issue 5 (for reference, we're on Issue 7 now).
It doesn't do anything you can't do with <regex.h>, and using it
involves defining a bunch of macros before including the header.
Moreover, the code in regexp.h that uses those macros has been buggy
since its creation (in 1996) and no one has noticed, which indicates
to me that there are no users. (Specifically, RETURN() is used in a
whole bunch of cases where it should have been ERROR().)

The header is given a warning and marked deprecated for 2.22.

See:
https://sourceware.org/ml/libc-alpha/2015-07/msg00862.html and
https://sourceware.org/ml/libc-alpha/2015-07/msg00871.html.

f4ddb35... by Carlos O'Donell <email address hidden>

Regenerate libc.pot for 2.22 release.

a9e8ea5... by Andrew Senkevich <email address hidden>

Prevent runtime fail of SSE vector math tests on non SSE4.1 machine.

    [BZ #18740]
    * sysdeps/x86_64/fpu/Makefile (double-vlen2-arch-ext-cflags,
    float-vlen4-arch-ext-cflags): Removed.
    * math/Makefile (CFLAGS-test-double-vlen2-wrappers.c,
    CFLAGS-test-float-vlen4-wrappers.c): Likewise.

0e569d3... by Mike Frysinger

hppa: add bz entry for pthreadtypes.h fix

243cc40... by Mike Frysinger

hppa: fix pthreadtypes.h namespace failures

The conform tests flag the "aligned" symbol used inside the attributes,
so rename it to __aligned__ like other headers.