mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 00:31:08 +00:00
11bf311edc
2007-01-11 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/soft-fp/sfp-machine.h: Remove. * sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise. 2007-01-10 Ulrich Drepper <drepper@redhat.com> * io/fts.c: Make sure fts_cur is always valid after return from fts_read. Patch by Miloslav Trmac <mitr@redhat.com>. 2006-10-27 Richard Sandiford <richard@codesourcery.com> * elf/elf.h (R_MIPS_GLOB_DAT): Define. (R_MIPS_NUM): Bump by 1. 2007-01-03 Jakub Jelinek <jakub@redhat.com> * posix/execvp.c: Include alloca.h. (allocate_scripts_argv): Renamed to... (scripts_argv): ... this. Don't allocate buffer here nor count arguments. (execvp): Use alloca if possible. * posix/Makefile: Add rules to build and run tst-vfork3 test. * posix/tst-vfork3.c: New test. * stdlib/Makefile (tst-strtod3-ENV): Define. 2007-01-02 Ulrich Drepper <drepper@redhat.com> * posix/getconf.c: Update copyright year. * nss/getent.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c: Likewise. * elf/ldconfig.c: Likewise. * catgets/gencat.c: Likewise. * csu/version.c: Likewise. * elf/ldd.bash.in: Likewise. * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. * nscd/nscd.c (print_version): Likewise. * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. * malloc/mtrace.pl: Likewise. * debug/catchsegv.sh: Likewise. 2006-12-24 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment attempts. 2006-12-23 Ulrich Drepper <drepper@redhat.com> * posix/wordexp.c: Remove some unnecessary tests. 2006-12-20 SUGIOKA Toshinobu <sugioka@itonet.co.jp> * sysdeps/unix/sysv/linux/sh/bits/shm.h: New file. * nss/getXXbyYY_r.c: Include atomic.h. (INTERNAL (REENTRANT_NAME)): Write startp after start_fct, add atomic_write_barrier () in between. 2006-11-28 Jakub Jelinek <jakub@redhat.com> * elf/dl-support.c: Include dl-procinfo.h. * sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4, PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS, PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X): Define. (_dl_string_platform): Use PPC_PLATFORM_* macros instead of hardcoded constants. * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use PPC_PLATFORM_* macros for array designators. 2006-11-11 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap names to the beginning. (_dl_powerpc_platforms): Add "power6x". * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. (HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP. (_DL_PLATFORMS_COUNT): Increase. (_dl_string_platform): Handle power6x case. * sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP, PPC_FEATURE_POWER6_EXT): Define. (PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment. [-2^31 .. 2^31) range. * sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME. * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): Handle relatime mount option. 2006-12-13 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include kernel-features.h. 2006-12-11 Ulrich Drepper <drepper@redhat.com> * stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand separators also if no non-zero digits found. * stdlib/Makefile (tests): Add tst-strtod3. [BZ #3664] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize empty parsed strings. * stdlib/Makefile (tests): Add tst-strtod2. * stdlib/tst-strtod2.c: New file. [BZ #3673] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit computation. * stdlib/Makefile (tests): Add tst-atof2. * stdlib/tst-atof2.c: New file. [BZ #3674] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value correctly if removing trailing zero of hex-float. * stdlib/Makefile (tests): Add tst-atof1. * stdlib/tst-atof1.c: New file. * misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest. Start searching for next comma at p rather than rest. * misc/Makefile (tests): Add tst-mntent2. * misc/tst-mntent2.c: New test. 2006-12-08 Ulrich Drepper <drepper@redhat.com> * malloc/memusage.c: Handle realloc with new size of zero and non-NULL pointer correctly. (me): Really write first record twice. (struct entry): Make format bi-arch safe. (dest): Write out more realloc statistics. * malloc/memusagestat.c (struct entry): Make format bi-arch safe. 2006-12-05 Jakub Jelinek <jakub@redhat.com> * nis/nis_subr.c (nis_getnames): Revert last change. 2006-12-03 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/unix/sysv/linux/sh/sys/io.h: Removed. 2006-11-30 H.J. Lu <hongjiu.lu@intel.com> * sysdeps/i386/i686/memcmp.S: Use jump table as the base of jump table entries. 2006-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost `clone' function to ensure proper unwinding stop of gdb. * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. 2006-12-01 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.init: Remove obsolete and commented-out -S option handling. 2006-11-23 Jakub Jelinek <jakub@redhat.com> [BZ #3514] * manual/string.texi (strncmp): Fix pastos from wcscmp description. [BZ #3515] * manual/string.texi (strtok): Remove duplicate paragraph. 2006-12-01 Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with libgcc not supporting `rflags' unwinding (register # >= 17). 2006-11-30 Jakub Jelinek <jakub@redhat.com> * sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc succeeded. 2006-11-29 Daniel Jacobowitz <dan@codesourcery.com> Jakub Jelinek <jakub@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct unwind information. * sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for 'restore_rt' even in the 'signal' directory. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list. malloc crashed. Don't allocate memory unnecessarily in each loop. 2006-10-21 Jakub Jelinek <jakub@redhat.com> * resolv/mapv4v6addr.h (map_v4v6_address): Fix last change. 2006-11-20 Ulrich Drepper <drepper@redhat.com> * resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit. 2006-11-18 Bruno Haible <bruno@clisp.org> * sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke __sysconf only after having tried to call getgroups32. 2006-11-19 Ulrich Drepper <drepper@redhat.com> * nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style addresses for IPv4 queries if they can be mapped. 2006-11-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text. * sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise. (signmask): Add .size directive. (othermask): Add .type directive. 2006-11-14 Ulrich Drepper <drepper@redhat.com> * po/nl.po: Update from translation team. * timezone/zdump.c: Redo fix for BZ #3137. 2006-11-14 Jakub Jelinek <jakub@redhat.com> * nss/nss_files/files-alias.c (get_next_alias): Set line back to first_unused after parsing :include: file. * timezone/africa: Update from tzdata2006o. * timezone/antarctica: Likewise. * timezone/asia: Likewise. * timezone/australasia: Likewise. * timezone/backward: Likewise. * timezone/europe: Likewise. * timezone/iso3166.tab: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. * timezone/zone.tab: Likewise. * time/tzfile.c (__tzfile_read): Extend to handle new file format on machines with 64-bit time_t. * timezone/checktab.awk: Update from tzcode2006o. * timezone/ialloc.c: Likewise. * timezone/private.h: Likewise. * timezone/scheck.c: Likewise. * timezone/tzfile.h: Likewise. * timezone/tzselect.ksh: Likewise. * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise. [BZ #3483] * elf/ldconfig.c (main): Call setlocale and textdomain. Patch mostly by Benno Schulenberg <bensberg@justemail.net>. [BZ #3480] * manual/argp.texi: Fix typos. * manual/charset.texi: Likewise. * manual/errno.texi: Likewise. * manual/filesys.texi: Likewise. * manual/lang.texi: Likewise. * manual/maint.texi: Likewise. * manual/memory.texi: Likewise. * manual/message.texi: Likewise. * manual/resource.texi: Likewise. * manual/search.texi: Likewise. * manual/signal.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/sysinfo.texi: Likewise. * manual/syslog.texi: Likewise. * manual/time.texi: Likewise. Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>. [BZ #3465] * sunrpc/clnt_raw.c: Minimal message improvements. * sunrpc/pm_getmaps.c: Likewise. * nis/nss_nisplus/nisplus-publickey.c: Likewise. * nis/nis_print_group_entry.c: Likewise. * locale/programs/repertoire.c: Likewise. * locale/programs/charmap.c: Likewise. * malloc/memusage.sh: Likewise. * elf/dl-deps.c: Likewise. * locale/programs/ld-collate.c: Likewise. * libio/vswprintf.c: Likewise. * malloc/memusagestat.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/rpc_main.c: Likewise. * nscd/cache.c: Likewise. * locale/programs/repertoire.c: Unify output messages. * locale/programs/charmap.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-time.c: Likewise. * elf/ldconfig.c: Likewise. * nscd/selinux.c: Likewise. * elf/cache.c: Likewise. Patch mostly by Benno Schulenberg <bensberg@justemail.net>. 2006-11-10 Jakub Jelinek <jakub@redhat.com> * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization if N is one bigger than return value. * string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1 and l1 last arguments, if buf is defined, verify the return value equals to strlen (buf) and verify no byte beyond passed length is modified. 2006-11-10 Ulrich Drepper <drepper@redhat.com> * po/sv.po: Update from translation team. * sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev): Use __new_sys_siglist instead of _sys_siglist_internal as second macro argument. (_old_sys_siglist): Use declare_symbol_alias macro instead of strong_alias. 2006-11-09 Ulrich Drepper <drepper@redhat.com> [BZ #3493] * posix/unistd.h (sysconf): Remove const attribute. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for temporary or deprecated addresses. Patch by Sridhar Samudrala <sri@us.ibm.com>. * string/Makefile (tests): Add tst-strxfrm2. * string/tst-strxfrm2.c: New file. 2006-10-09 Jakub Jelinek <jakub@redhat.com> * elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0 rather than r->r_brk. * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal optimization even if needed > n. 2006-11-07 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h (declare_symbol): Rename to... (declare_symbol_alias): ... this. Add ORIGINAL argument, imply strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes .size directive. * sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias changes. * sysdeps/gnu/siglist.c: Likewise. 2006-11-03 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES]: Moved to ... * sysdeps/powerpc/fpu/math_private.h: ...here. New file. 2006-11-05 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Update handling of cache descriptor 0x49 for new models. * sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word): Likewise. 2006-11-02 Ulrich Drepper <drepper@redhat.com> * configure.in: Work around ld --help change and avoid -z relro test completely if the architecture doesn't care about security. 2006-11-01 Ulrich Drepper <drepper@redhat.com> * po/sv.po: Update from translation team. 2006-10-31 Ulrich Drepper <drepper@redhat.com> * stdlib/atexit.c (atexit): Don't mark as hidden when used to generate compatibility version. 2006-10-29 Ulrich Drepper <drepper@redhat.com> * configure.in: Relax -z relro requirement a bit. * po/sv.po: Update from translation team. 2006-10-29 Jakub Jelinek <jakub@redhat.com> * elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P. * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise. * elf/dl-close.c (_dl_close_worker): Likewise. * elf/dl-open.c (_dl_open_worker): Likewise. * sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define. * configure.in: Require assembler support for visibility, compiler support for visibility and aliases, linker support for various -z options. * Makeconfig: Remove conditional code which now is unnecessary. * config.h.in: Likewise. * config.make.in: Likewise. * dlfcn/Makefile: Likewise. * elf/Makefile: Likewise. * elf/dl-load.c: Likewise. * elf/rtld.c: Likewise. * include/libc-symbols.h: Likewise. * include/stdio.h: Likewise. * io/Makefile: Likewise. * io/fstat.c: Likewise. * io/fstat64.c: Likewise. * io/fstatat.c: Likewise. * io/fstatat64.c: Likewise. * io/lstat.c: Likewise. * io/lstat64.c: Likewise. * io/mknod.c: Likewise. * io/mknodat.c: Likewise. * io/stat.c: Likewise. * io/stat64.c: Likewise. * libio/stdio.c: Likewise. * nscd/Makefile: Likewise. * stdlib/Makefile: Likewise. * stdlib/atexit.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/i386/sysdep.h: Likewise. * sysdeps/i386/i686/memcmp.S: Likewise. * sysdeps/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. * Makerules: USE_TLS support is now default. * tls.make.c: Likewise. * csu/Versions: Likewise. * csu/libc-start.c: Likewise. * csu/libc-tls.c: Likewise. * csu/version.c: Likewise. * dlfcn/dlinfo.c: Likewise. * elf/dl-addr.c: Likewise. * elf/dl-cache.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-sysdep.c: Likewise. * elf/dl-tls.c: Likewise. * elf/ldconfig.c: Likewise. * elf/rtld.c: Likewise. * elf/tst-tls-dlinfo.c: Likewise. * elf/tst-tls1.c: Likewise. * elf/tst-tls10.h: Likewise. * elf/tst-tls14.c: Likewise. * elf/tst-tls2.c: Likewise. * elf/tst-tls3.c: Likewise. * elf/tst-tls4.c: Likewise. * elf/tst-tls5.c: Likewise. * elf/tst-tls6.c: Likewise. * elf/tst-tls7.c: Likewise. * elf/tst-tls8.c: Likewise. * elf/tst-tls9.c: Likewise. * elf/tst-tlsmod1.c: Likewise. * elf/tst-tlsmod13.c: Likewise. * elf/tst-tlsmod13a.c: Likewise. * elf/tst-tlsmod14a.c: Likewise. * elf/tst-tlsmod2.c: Likewise. * elf/tst-tlsmod3.c: Likewise. * elf/tst-tlsmod4.c: Likewise. * elf/tst-tlsmod5.c: Likewise. * elf/tst-tlsmod6.c: Likewise. * include/errno.h: Likewise. * include/link.h: Likewise. * include/tls.h: Likewise. * locale/global-locale.c: Likewise. * locale/localeinfo.h: Likewise. * malloc/arena.c: Likewise. * malloc/hooks.c: Likewise. * malloc/malloc.c: Likewise. * resolv/Versions: Likewise. * sysdeps/alpha/dl-machine.h: Likewise. * sysdeps/alpha/libc-tls.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/tls.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/ia64/libc-tls.c: Likewise. * sysdeps/mach/hurd/fork.c: Likewise. * sysdeps/mach/hurd/i386/tls.h: Likewise. * sysdeps/powerpc/powerpc32/dl-machine.c: Likwise. * sysdeps/powerpc/powerpc32/dl-machine.h: Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h: Likewise. * sysdeps/s390/libc-tls.c: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. [BZ #3426] * stdlib/stdlib.h: Adjust comment for canonicalize_file_name to reality. 2006-10-27 Jakub Jelinek <jakub@redhat.com> * elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope argument. (_dl_lookup_symbol_x): Adjust caller. * sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove _ns_global_scope. * elf/rtld.c (dl_main): Don't initialize _ns_global_scope. * elf/dl-libc.c: Revert l_scope name changes. * elf/dl-load.c: Likewise. * elf/dl-object.c: Likewise. * elf/rtld.c: Likewise. * elf/dl-close.c (_dl_close): Likewise. * elf/dl-open.c (dl_open_worker): Likewise. If not SINGLE_THREAD_P, always use __rtld_mrlock_{change,done}. Always free old scope list here if not l_scope_mem. * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name change. Never free scope list here. Just __rtld_mrlock_lock before the lookup and __rtld_mrlock_unlock it after the lookup. * elf/dl-sym.c: Likewise. * include/link.h (struct r_scoperec): Remove. (struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem with l_scope_mem and l_scoperec_lock with l_scope_lock. 2006-10-25 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * configure.in: Disable building profile libraries by default. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to _dl_lookup_symbol_x code. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * elf/dl-runtime.c: Include sysdep-cancel.h. (_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-sym.c: Include sysdep-cancel.h. (do_sym): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-close.c: Include sysdep-cancel.h. (_dl_close): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. * elf/dl-open.c: Include sysdep-cancel.h. (dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only if !SINGLE_THREAD_P. Use atomic_* instead of catomic_* macros. 2006-10-17 Jakub Jelinek <jakub@redhat.com> [BZ #3313] * malloc/malloc.c (malloc_consolidate): Set maxfb to address of last fastbin rather than end of fastbin array. 2006-10-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct body macro. * sysdeps/x86_64/bits/atomic.h (__arch_c_compare_and_exchange_val_64_acq): Add missing casts. (catomic_decrement): Use correct body macro. 2006-10-17 Jakub Jelinek <jakub@redhat.com> * include/atomic.h: Add a unique prefix to all local variables in macros. * csu/tst-atomic.c (do_test): Test also catomic_* macros. 2006-10-14 Ulrich Drepper <drepper@redhat.com> * resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated. [BZ #3313] * malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to determine highest fast bin to consolidate, always look into all of them. (do_check_malloc_state): Only require for empty bins for large sizes in main arena. * libio/stdio.h: Add more __wur attributes. 2006-11-12 Andreas Jaeger <aj@suse.de> [BZ #2510] * manual/search.texi (Hash Search Function): Clarify. (Array Search Function): Clarify. 2006-11-12 Joseph Myers <joseph@codesourcery.com> [BZ #2830] * math/atest-exp.c (main): Cast hex value to mp_limb_t before shifting. * math/atest-exp2.c (read_mpn_hex): Likewise. * math/atest-sincos.c (main): Likewise. * sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait. * sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait. * sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for version GLIBC_2.6. * Versions.def: Add GLIBC_2.6 for libc. * sysdeps/i386/i486/bits/atomic.h: Add catomic_* support. 2006-10-11 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (_int_malloc): Remove unused any_larger variable. * nis/nis_defaults.c (__nis_default_access): Don't call getenv twice. * nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv. * sysdeps/generic/unsecvars.h: Add NIS_PATH. 2006-10-11 Ulrich Drepper <drepper@redhat.com> * include/atomic.c: Define catomic_* operations. * sysdeps/x86_64/bits/atomic.h: Likewise. Fix a few minor problems. * stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*. * malloc/memusage.c: Likewise. * gmon/mcount.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-fptr.c: Likewise. * resolv/res_libc.c: Likewise. 2006-10-10 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast. * sysdeps/mach/hurd/futimes.c: Likewise. * sysdeps/mach/hurd/lutimes.c: Likewise. 2006-10-09 Ulrich Drepper <drepper@redhat.com> Jakub Jelinek <jakub@redhat.com> Implement reference counting of scope records. * elf/dl-close.c (_dl_close): Remove all scopes from removed objects from the list in objects which remain. Always allocate new scope record. * elf/dl-open.c (dl_open_worker): When growing array for scopes, don't resize, allocate a new one. * elf/dl-runtime.c: Update reference counters before using a scope array. * elf/dl-sym.c: Likewise. * elf/dl-libc.c: Adjust for l_scope name change. * elf/dl-load.c: Likewise. * elf/dl-object.c: Likewise. * elf/rtld.c: Likewise. * include/link.h: Include <rtld-lowlevel.h>. Define struct r_scoperec. Replace r_scope with pointer to r_scoperec structure. Add l_scoperec_lock. * sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>. * sysdeps/generic/rtld-lowlevel.h: New file. * include/atomic.h: Rename atomic_and to atomic_and_val and atomic_or to atomic_or_val. Define new macros atomic_and and atomic_or which do not return values. * sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or. Various cleanups. * sysdeps/i386/i486/bits/atomic.h: Likewise. * po/sv.po: Update from translation team. 2006-10-07 Ulrich Drepper <drepper@redhat.com> * Versions.def: Add GLIBC_2.6 to libpthread. * include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use. (versioned_symbol): Likewise. (compat_symbol): Likewise. * po/tr.po: Update from translation team. * nis/Banner: Removed. It's been integral part forever and the author info is incomplete anyway. * libio/Banner: Likewise. 2006-10-06 Ulrich Drepper <drepper@redhat.com> * version.h (VERSION): Bump to 2.5.90 for new development tree.
621 lines
24 KiB
Makefile
621 lines
24 KiB
Makefile
# Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc.
|
|
# This file is part of the GNU C Library.
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with the GNU C Library; if not, write to the Free
|
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
# 02111-1307 USA.
|
|
|
|
#
|
|
# Sub-makefile for NPTL portion of the library.
|
|
#
|
|
subdir := nptl
|
|
|
|
headers := pthread.h semaphore.h bits/semaphore.h
|
|
|
|
extra-libs := libpthread
|
|
extra-libs-others := $(extra-libs)
|
|
install-lib-ldscripts := libpthread.so
|
|
|
|
routines = alloca_cutoff forward libc-lowlevellock libc-cancellation
|
|
shared-only-routines = forward
|
|
|
|
libpthread-routines = init vars events version \
|
|
pthread_create pthread_exit pthread_detach \
|
|
pthread_join pthread_tryjoin pthread_timedjoin \
|
|
pthread_self pthread_equal pthread_yield \
|
|
pthread_getconcurrency pthread_setconcurrency \
|
|
pthread_getschedparam pthread_setschedparam \
|
|
pthread_setschedprio \
|
|
pthread_attr_init pthread_attr_destroy \
|
|
pthread_attr_getdetachstate pthread_attr_setdetachstate \
|
|
pthread_attr_getguardsize pthread_attr_setguardsize \
|
|
pthread_attr_getschedparam pthread_attr_setschedparam \
|
|
pthread_attr_getschedpolicy pthread_attr_setschedpolicy \
|
|
pthread_attr_getinheritsched \
|
|
pthread_attr_setinheritsched \
|
|
pthread_attr_getscope pthread_attr_setscope \
|
|
pthread_attr_getstackaddr pthread_attr_setstackaddr \
|
|
pthread_attr_getstacksize pthread_attr_setstacksize \
|
|
pthread_attr_getstack pthread_attr_setstack \
|
|
pthread_getattr_np \
|
|
pthread_mutex_init pthread_mutex_destroy \
|
|
pthread_mutex_lock pthread_mutex_trylock \
|
|
pthread_mutex_timedlock pthread_mutex_unlock \
|
|
pthread_mutexattr_init pthread_mutexattr_destroy \
|
|
pthread_mutexattr_getpshared \
|
|
pthread_mutexattr_setpshared \
|
|
pthread_mutexattr_gettype pthread_mutexattr_settype \
|
|
pthread_rwlock_init pthread_rwlock_destroy \
|
|
pthread_rwlock_rdlock pthread_rwlock_timedrdlock \
|
|
pthread_rwlock_wrlock pthread_rwlock_timedwrlock \
|
|
pthread_rwlock_tryrdlock pthread_rwlock_trywrlock \
|
|
pthread_rwlock_unlock \
|
|
pthread_rwlockattr_init pthread_rwlockattr_destroy \
|
|
pthread_rwlockattr_getpshared \
|
|
pthread_rwlockattr_setpshared \
|
|
pthread_rwlockattr_getkind_np \
|
|
pthread_rwlockattr_setkind_np \
|
|
pthread_cond_init pthread_cond_destroy \
|
|
pthread_cond_wait pthread_cond_timedwait \
|
|
pthread_cond_signal pthread_cond_broadcast \
|
|
old_pthread_cond_init old_pthread_cond_destroy \
|
|
old_pthread_cond_wait old_pthread_cond_timedwait \
|
|
old_pthread_cond_signal old_pthread_cond_broadcast \
|
|
pthread_condattr_init pthread_condattr_destroy \
|
|
pthread_condattr_getpshared pthread_condattr_setpshared \
|
|
pthread_condattr_getclock pthread_condattr_setclock \
|
|
pthread_spin_init pthread_spin_destroy \
|
|
pthread_spin_lock pthread_spin_trylock \
|
|
pthread_spin_unlock \
|
|
pthread_barrier_init pthread_barrier_destroy \
|
|
pthread_barrier_wait \
|
|
pthread_barrierattr_init pthread_barrierattr_destroy \
|
|
pthread_barrierattr_getpshared \
|
|
pthread_barrierattr_setpshared \
|
|
pthread_key_create pthread_key_delete \
|
|
pthread_getspecific pthread_setspecific \
|
|
pthread_sigmask pthread_kill \
|
|
pthread_cancel pthread_testcancel \
|
|
pthread_setcancelstate pthread_setcanceltype \
|
|
pthread_once \
|
|
old_pthread_atfork pthread_atfork \
|
|
pthread_getcpuclockid \
|
|
pthread_clock_gettime pthread_clock_settime \
|
|
sem_init sem_destroy \
|
|
sem_open sem_close sem_unlink \
|
|
sem_getvalue \
|
|
sem_wait sem_trywait sem_timedwait sem_post \
|
|
cleanup cleanup_defer cleanup_compat \
|
|
cleanup_defer_compat unwind \
|
|
pt-longjmp pt-cleanup\
|
|
cancellation \
|
|
lowlevellock lowlevelrobustlock \
|
|
pt-vfork \
|
|
ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \
|
|
ptw-connect ptw-recv ptw-recvfrom ptw-recvmsg ptw-send \
|
|
ptw-sendmsg ptw-sendto ptw-fsync ptw-lseek ptw-llseek \
|
|
ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \
|
|
ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \
|
|
ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \
|
|
ptw-sigwait ptw-sigsuspend \
|
|
pt-raise pt-system \
|
|
flockfile ftrylockfile funlockfile \
|
|
sigaction \
|
|
herrno res pt-allocrtsig \
|
|
pthread_kill_other_threads \
|
|
pthread_getaffinity pthread_setaffinity \
|
|
pthread_attr_getaffinity pthread_attr_setaffinity \
|
|
pthread_mutexattr_getrobust pthread_mutexattr_setrobust \
|
|
pthread_mutex_consistent \
|
|
cleanup_routine unwind-forcedunwind \
|
|
pthread_mutexattr_getprotocol \
|
|
pthread_mutexattr_setprotocol \
|
|
pthread_mutexattr_getprioceiling \
|
|
pthread_mutexattr_setprioceiling tpp \
|
|
pthread_mutex_getprioceiling pthread_mutex_setprioceiling
|
|
# pthread_setuid pthread_seteuid pthread_setreuid \
|
|
# pthread_setresuid \
|
|
# pthread_setgid pthread_setegid pthread_setregid \
|
|
# pthread_setresgid
|
|
|
|
libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
|
|
libpthread-static-only-routines = pthread_atfork
|
|
|
|
CFLAGS-pthread_atfork.c = -DNOT_IN_libc
|
|
|
|
# Since cancellation handling is in large parts handled using exceptions
|
|
# we have to compile some files with exception handling enabled, some
|
|
# even with asynchronous unwind tables.
|
|
|
|
# init.c contains sigcancel_handler().
|
|
CFLAGS-init.c = -fexceptions -fasynchronous-unwind-tables
|
|
# The unwind code itself,
|
|
CFLAGS-unwind.c = -fexceptions
|
|
CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables
|
|
|
|
# The following three functions must be async-cancel safe.
|
|
CFLAGS-pthread_cancel.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pthread_setcancelstate.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pthread_setcanceltype.c = -fexceptions -fasynchronous-unwind-tables
|
|
|
|
# These are internal functions which similar functionality as setcancelstate
|
|
# and setcanceltype.
|
|
CFLAGS-cancellation.c = -fasynchronous-unwind-tables
|
|
CFLAGS-libc-cancellation.c = -fasynchronous-unwind-tables
|
|
|
|
# Calling pthread_exit() must cause the registered cancel handlers to
|
|
# be executed. Therefore exceptions have to be thrown through this
|
|
# function.
|
|
CFLAGS-pthread_exit.c = -fexceptions
|
|
|
|
# Among others, __pthread_unwind is forwarded. This function must handle
|
|
# exceptions.
|
|
CFLAGS-forward.c = -fexceptions
|
|
|
|
# The following are cancellation points. Some of the functions can
|
|
# block and therefore temporarily enable asynchronous cancellation.
|
|
# Those must be compiled asynchronous unwind tables.
|
|
CFLAGS-pthread_testcancel.c = -fexceptions
|
|
CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pthread_once.c = $(uses-callbacks) -fexceptions \
|
|
-fasynchronous-unwind-tables
|
|
CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-sem_wait.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-sem_timedwait.c = -fexceptions -fasynchronous-unwind-tables
|
|
|
|
# These are the function wrappers we have to duplicate here.
|
|
CFLAGS-fcntl.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-lockf.c = -fexceptions
|
|
CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-msgrcv.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pt-system.c = -fexceptions
|
|
|
|
# Don't generate deps for calls with no sources. See sysdeps/unix/Makefile.
|
|
omit-deps = $(unix-syscalls:%=ptw-%)
|
|
|
|
|
|
tests = tst-typesizes \
|
|
tst-attr1 tst-attr2 tst-attr3 \
|
|
tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex5 tst-mutex6 \
|
|
tst-mutex7 tst-mutex8 tst-mutex9 tst-mutex5a tst-mutex7a \
|
|
tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
|
|
tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
|
|
tst-mutexpi9 \
|
|
tst-spin1 tst-spin2 tst-spin3 \
|
|
tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
|
|
tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
|
|
tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
|
|
tst-cond20 tst-cond21 tst-cond22 \
|
|
tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \
|
|
tst-robust6 tst-robust7 tst-robust8 \
|
|
tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 \
|
|
tst-robustpi5 tst-robustpi6 tst-robustpi7 tst-robustpi8 \
|
|
tst-rwlock1 tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 \
|
|
tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 \
|
|
tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \
|
|
tst-once1 tst-once2 tst-once3 tst-once4 \
|
|
tst-key1 tst-key2 tst-key3 tst-key4 \
|
|
tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
|
|
tst-sem8 tst-sem9 \
|
|
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
|
|
tst-align tst-align2 tst-align3 \
|
|
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
|
|
tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \
|
|
tst-raise1 \
|
|
tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-join6 \
|
|
tst-detach1 \
|
|
tst-eintr1 tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 \
|
|
tst-tsd1 tst-tsd2 tst-tsd3 tst-tsd4 tst-tsd5 \
|
|
tst-tls1 tst-tls2 \
|
|
tst-fork1 tst-fork2 tst-fork3 tst-fork4 \
|
|
tst-atfork1 \
|
|
tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel5 \
|
|
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-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-exit1 tst-exit2 tst-exit3 \
|
|
tst-stdio1 tst-stdio2 \
|
|
tst-stack1 tst-stack2 tst-stack3 \
|
|
tst-unload \
|
|
tst-dlsym1 \
|
|
tst-sysconf \
|
|
tst-locale1 tst-locale2 \
|
|
tst-umask1 \
|
|
tst-popen1 \
|
|
tst-clock1 \
|
|
tst-context1 \
|
|
tst-sched1 \
|
|
tst-backtrace1 \
|
|
tst-oddstacklimit \
|
|
tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
|
|
tst-getpid1 tst-getpid2 tst-getpid3 \
|
|
tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99)
|
|
xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
|
|
|
|
# Files which must not be linked with libpthread.
|
|
tests-nolibpthread = tst-unload
|
|
|
|
# This sets the stack resource limit to 1023kb, which is not a multiple
|
|
# of the page size since every architecture's page size is > 1k.
|
|
tst-oddstacklimit-ENV = ; ulimit -s 1023;
|
|
|
|
distribute = eintr.c tst-cleanup4aux.c
|
|
|
|
gen-as-const-headers = pthread-errnos.sym
|
|
|
|
LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
|
|
|
|
|
|
include ../Makeconfig
|
|
|
|
ifeq ($(have-forced-unwind),yes)
|
|
tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \
|
|
tst-cancelx6 tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 \
|
|
tst-cancelx11 tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 \
|
|
tst-cancelx16 tst-cancelx17 tst-cancelx18 tst-cancelx20 tst-cancelx21 \
|
|
tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3 tst-cleanupx4 \
|
|
tst-oncex3 tst-oncex4
|
|
endif
|
|
ifeq ($(build-shared),yes)
|
|
tests += tst-atfork2 tst-tls3 tst-tls4 tst-tls5 tst-_res1 tst-fini1 \
|
|
tst-stackguard1
|
|
tests-nolibpthread += tst-fini1
|
|
ifeq ($(have-z-execstack),yes)
|
|
tests += tst-execstack
|
|
endif
|
|
endif
|
|
|
|
modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \
|
|
tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
|
|
tst-tls5modd tst-tls5mode tst-tls5modf \
|
|
tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod
|
|
extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
|
|
test-extras += $(modules-names)
|
|
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
|
|
|
|
tst-atfork2mod.so-no-z-defs = yes
|
|
tst-tls3mod.so-no-z-defs = yes
|
|
tst-tls5mod.so-no-z-defs = yes
|
|
tst-tls5moda.so-no-z-defs = yes
|
|
tst-tls5modb.so-no-z-defs = yes
|
|
tst-tls5modc.so-no-z-defs = yes
|
|
tst-tls5modd.so-no-z-defs = yes
|
|
tst-tls5mode.so-no-z-defs = yes
|
|
tst-tls5modf.so-no-z-defs = yes
|
|
|
|
ifeq ($(build-shared),yes)
|
|
# Build all the modules even when not actually running test programs.
|
|
tests: $(test-modules)
|
|
endif
|
|
|
|
ifeq ($(build-shared),yes)
|
|
|
|
# Set the `multidir' variable by grabbing the variable from the compiler.
|
|
# We do it once and save the result in a generated makefile.
|
|
-include $(objpfx)multidir.mk
|
|
$(objpfx)multidir.mk: $(common-objpfx)config.make
|
|
$(make-target-directory)
|
|
dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \
|
|
echo "multidir := $$dir" > $@T
|
|
mv -f $@T $@
|
|
|
|
crti-objs := crti.o
|
|
crtn-objs := crtn.o
|
|
ifneq (,$(patsubst .,,$(multidir)))
|
|
generated-dirs := $(firstword $(subst /, , $(multidir)))
|
|
crti-objs += $(multidir)/crti.o
|
|
crtn-objs += $(multidir)/crtn.o
|
|
omit-deps += $(multidir)/crti $(multidir)/crtn
|
|
$(objpfx)$(multidir):
|
|
mkdir -p $@
|
|
endif
|
|
extra-objs += $(crti-objs) $(crtn-objs)
|
|
omit-deps += crti crtn
|
|
|
|
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
|
|
endif
|
|
|
|
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
|
|
CFLAGS-ftrylockfile.c = -D_IO_MTSAFE_IO
|
|
CFLAGS-funlockfile.c = -D_IO_MTSAFE_IO
|
|
|
|
link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
|
|
$(common-objpfx)libc.a
|
|
|
|
ifeq ($(build-static),yes)
|
|
tests-static += tst-locale1 tst-locale2 tst-stackguard1-static
|
|
tests += tst-stackguard1-static
|
|
xtests-static += tst-setuid1-static
|
|
endif
|
|
# These tests are linked with libc before libpthread
|
|
tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x
|
|
|
|
include ../Rules
|
|
|
|
ifeq (yes,$(build-shared))
|
|
# Make sure these things are built in the `make lib' pass so they can be used
|
|
# to run programs during the `make others' pass.
|
|
lib-noranlib: $(addprefix $(objpfx),$(extra-objs))
|
|
|
|
# What we install as libpthread.so for programs to link against is in fact a
|
|
# link script. It contains references for the various libraries we need.
|
|
# The libpthread.so object is not complete since some functions are only
|
|
# defined in libpthread_nonshared.a.
|
|
# We need to use absolute paths since otherwise local copies (if they exist)
|
|
# of the files are taken by the linker.
|
|
install: $(inst_libdir)/libpthread.so
|
|
|
|
$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
|
|
$(objpfx)libpthread.so$(libpthread.so-version) \
|
|
$(inst_libdir)/$(patsubst %,$(libtype.oS),\
|
|
$(libprefix)pthread) \
|
|
$(+force)
|
|
(echo '/* GNU ld script';\
|
|
echo ' Use the shared library, but some functions are only in';\
|
|
echo ' the static library, so try that secondarily. */';\
|
|
cat $<; \
|
|
echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
|
|
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
|
|
')' \
|
|
) > $@.new
|
|
mv -f $@.new $@
|
|
endif
|
|
|
|
|
|
# 'pthread_self' is a simple memory or register load. Setting up the
|
|
# stack frame is more work than the actual operation. Disable the
|
|
# frame creation entirely. This will help applications which call the
|
|
# function frequently to get a thread-specific handle.
|
|
CFLAGS-pthread_self.os += -fomit-frame-pointer
|
|
|
|
# Run the cancellation and cleanup tests also for the modern, exception-based
|
|
# implementation. For this we have to pass the -fexceptions parameter.
|
|
CFLAGS-tst-cancelx2.c += -fexceptions
|
|
CFLAGS-tst-cancelx3.c += -fexceptions
|
|
CFLAGS-tst-cancelx4.c += -fexceptions
|
|
CFLAGS-tst-cancelx5.c += -fexceptions
|
|
CFLAGS-tst-cancelx6.c += -fexceptions
|
|
CFLAGS-tst-cancelx7.c += -fexceptions
|
|
CFLAGS-tst-cancelx8.c += -fexceptions
|
|
CFLAGS-tst-cancelx9.c += -fexceptions
|
|
CFLAGS-tst-cancelx10.c += -fexceptions
|
|
CFLAGS-tst-cancelx11.c += -fexceptions
|
|
CFLAGS-tst-cancelx12.c += -fexceptions
|
|
CFLAGS-tst-cancelx13.c += -fexceptions
|
|
CFLAGS-tst-cancelx14.c += -fexceptions
|
|
CFLAGS-tst-cancelx15.c += -fexceptions
|
|
CFLAGS-tst-cancelx16.c += -fexceptions
|
|
CFLAGS-tst-cancelx17.c += -fexceptions
|
|
CFLAGS-tst-cancelx18.c += -fexceptions
|
|
CFLAGS-tst-cancelx20.c += -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tst-cancelx21.c += -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tst-cleanupx0.c += -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tst-cleanupx1.c += -fexceptions -fasynchronous-unwind-tables
|
|
CFLAGS-tst-cleanupx2.c += -fexceptions
|
|
CFLAGS-tst-cleanupx3.c += -fexceptions
|
|
CFLAGS-tst-cleanupx4.c += -fexceptions
|
|
CFLAGS-tst-oncex3.c += -fexceptions
|
|
CFLAGS-tst-oncex4.c += -fexceptions
|
|
CFLAGS-tst-align.c += $(stack-align-test-flags)
|
|
CFLAGS-tst-align3.c += $(stack-align-test-flags)
|
|
CFLAGS-tst-initializers1.c = -W -Wall -Werror
|
|
CFLAGS-tst-initializers1-< = $(CFLAGS-tst-initializers1.c) \
|
|
$(patsubst tst-initializers1-%.c,-std=%,$<)
|
|
CFLAGS-tst-initializers1-c89.c = $(CFLAGS-tst-initializers1-<)
|
|
CFLAGS-tst-initializers1-c99.c = $(CFLAGS-tst-initializers1-<)
|
|
CFLAGS-tst-initializers1-gnu89.c = $(CFLAGS-tst-initializers1-<)
|
|
CFLAGS-tst-initializers1-gnu99.c = $(CFLAGS-tst-initializers1-<)
|
|
|
|
tst-cancel7-ARGS = --command "$(built-program-cmd)"
|
|
tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
|
|
tst-umask1-ARGS = $(objpfx)tst-umask1.temp
|
|
|
|
$(objpfx)tst-atfork2: $(libdl) $(shared-thread-library)
|
|
LDFLAGS-tst-atfork2 = -rdynamic
|
|
tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
|
|
$(objpfx)tst-atfork2mod.so: $(shared-thread-library)
|
|
|
|
tests: $(objpfx)tst-stack3-mem
|
|
tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
|
|
$(objpfx)tst-stack3-mem: $(objpfx)tst-stack3.out
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-stack3.mtrace > $@
|
|
generated += tst-stack3-mem tst-stack3.mtrace
|
|
|
|
$(objpfx)tst-cleanup4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library)
|
|
$(objpfx)tst-cleanupx4: $(objpfx)tst-cleanup4aux.o $(shared-thread-library)
|
|
|
|
$(objpfx)tst-tls3: $(libdl) $(shared-thread-library)
|
|
LDFLAGS-tst-tls3 = -rdynamic
|
|
$(objpfx)tst-tls3.out: $(objpfx)tst-tls3mod.so
|
|
$(objpfx)tst-tls3mod.so: $(shared-thread-library)
|
|
|
|
$(objpfx)tst-tls4: $(libdl) $(shared-thread-library)
|
|
$(objpfx)tst-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so
|
|
|
|
$(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
|
|
LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
|
|
|
|
ifeq ($(build-shared),yes)
|
|
tests: $(objpfx)tst-tls6.out
|
|
$(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
|
|
$(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
|
|
$(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
|
|
$(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
|
|
$(SHELL) -e tst-tls6.sh $(common-objpfx) $(elf-objpfx) \
|
|
$(rtld-installed-name)
|
|
endif
|
|
|
|
$(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
|
|
|
|
$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so
|
|
|
|
ifeq (yes,$(build-shared))
|
|
$(objpfx)tst-cond11: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-cond19: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-cancel17: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-cancelx17: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-cancel18: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-cancelx18: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-clock2: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.so
|
|
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
|
|
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
|
|
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
|
|
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
|
|
else
|
|
$(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-cond19: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-cancel17: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-cancelx17: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-cancel18: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-cancelx18: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-clock2: $(common-objpfx)rt/librt.a
|
|
$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.a
|
|
endif
|
|
|
|
LDFLAGS-tst-cancel24 = -lstdc++
|
|
|
|
extra-B-pthread.so = -B$(common-objpfx)nptl/
|
|
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
|
|
$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
|
|
$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
|
|
|
|
# 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 \
|
|
$(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
|
|
|
|
# Make sure we link with the thread library.
|
|
ifeq ($(build-shared),yes)
|
|
$(addprefix $(objpfx), \
|
|
$(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
|
|
$(tests-nolibpthread), \
|
|
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
|
|
$(objpfx)libpthread_nonshared.a
|
|
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
|
|
# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
|
|
# since otherwise libpthread.so comes before libc.so when linking.
|
|
$(addprefix $(objpfx), $(tests-reverse)): \
|
|
$(objpfx)../libc.so $(objpfx)libpthread.so \
|
|
$(objpfx)libpthread_nonshared.a
|
|
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
|
|
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
|
|
|
|
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
|
|
else
|
|
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
|
|
endif
|
|
|
|
ifeq ($(build-shared),yes)
|
|
vpath pt-initfini.c $(sysdirs)
|
|
|
|
$(objpfx)pt-initfini.s: pt-initfini.c
|
|
$(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \
|
|
$(patsubst -f%,-fno-%,$(exceptions)) -o $@
|
|
|
|
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
|
|
$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect >& $@
|
|
|
|
# We only have one kind of startup code files. Static binaries and
|
|
# shared libraries are build using the PIC version.
|
|
$(objpfx)crti.S: $(objpfx)pt-initfini.s
|
|
sed -n -e '1,/@HEADER_ENDS/p' \
|
|
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
|
|
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
|
$(objpfx)crtn.S: $(objpfx)pt-initfini.s
|
|
sed -n -e '1,/@HEADER_ENDS/p' \
|
|
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
|
|
-e '/@TRAILER_BEGINS/,$$p' $< > $@
|
|
|
|
$(objpfx)defs.h: $(objpfx)pt-initfini.s
|
|
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
|
|
$(AWK) -f ../csu/defs.awk > $@
|
|
|
|
$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
|
|
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
|
|
|
$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
|
|
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
|
|
|
|
ifneq ($(multidir),.)
|
|
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
|
|
ln -f $< $@
|
|
|
|
$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
|
|
ln -f $< $@
|
|
endif
|
|
|
|
generated += crti.S crtn.S defs.h pt-initfini.s libpthread_nonshared.a \
|
|
multidir.mk tst-atfork2.mtrace tst-cancel-wrappers.out \
|
|
tst-tls6.out
|
|
|
|
generated += $(objpfx)tst-atfork2.mtrace \
|
|
$(addsuffix .so,$(strip $(modules-names)))
|
|
|
|
$(objpfx)version.d: $(objpfx)banner.h
|
|
$(objpfx)version.os: $(objpfx)banner.h
|
|
$(objpfx)banner.h: Banner
|
|
sed 's/\(.*\)/"\1\\n"/' $< > $@
|
|
generated += banner.h
|
|
# Give libpthread.so an entry point and make it directly runnable itself.
|
|
LDFLAGS-pthread.so += -e __nptl_main
|
|
endif
|
|
|
|
ifeq (no,$(cross-compiling))
|
|
ifeq (yes,$(build-shared))
|
|
tests: $(objpfx)tst-cancel-wrappers.out
|
|
$(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh
|
|
$(SHELL) $< $(common-objpfx)libc_pic.a \
|
|
$(common-objpfx)libc.a \
|
|
$(objpfx)libpthread_pic.a \
|
|
$(objpfx)libpthread.a > $@
|
|
endif
|
|
endif
|
|
|
|
tst-exec4-ARGS = $(built-program-cmd)
|
|
|
|
$(objpfx)tst-execstack: $(libdl)
|
|
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
|
|
LDFLAGS-tst-execstack = -Wl,-z,noexecstack
|
|
|
|
$(objpfx)tst-fini1mod.so: $(shared-thread-library)
|
|
|
|
tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
|
|
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
|
|
|
# The tests here better do not run in parallel
|
|
ifneq ($(filter %tests,$(MAKECMDGOALS)),)
|
|
.NOTPARALLEL:
|
|
endif
|