mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08: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.
946 lines
30 KiB
Plaintext
946 lines
30 KiB
Plaintext
# Copyright (C) 1991-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.
|
||
|
||
#
|
||
# Makefile configuration options for the GNU C library.
|
||
#
|
||
ifneq (,)
|
||
This makefile requires GNU Make.
|
||
endif
|
||
|
||
all: # Make this the default goal
|
||
|
||
ifneq "$(origin +included-Makeconfig)" "file"
|
||
|
||
+included-Makeconfig := yes
|
||
|
||
ifdef subdir
|
||
.. := ../
|
||
endif
|
||
|
||
# If config.make exists, the source directory was configured,
|
||
# so don't try to be clever and find another directory to build in.
|
||
ifneq (,$(wildcard $(..)config.make))
|
||
ARCH =
|
||
machine =
|
||
else # Not configured.
|
||
ifndef ARCH
|
||
ifdef machine
|
||
ARCH = $(machine)
|
||
endif # machine
|
||
endif # ARCH
|
||
endif # config.make
|
||
|
||
# Directory for object files and libc.a. If this is not defined, the
|
||
# object files live in the subdirectories where their sources live, and
|
||
# libc.a lives in the parent directory (this probably doesn't work any
|
||
# more).
|
||
ifdef ARCH
|
||
ifeq ($(filter /%,$(ARCH)),)
|
||
objdir := $(..)$(ARCH)
|
||
else
|
||
objdir = $(ARCH)
|
||
endif
|
||
endif
|
||
|
||
# $(common-objdir) is the place to put objects and
|
||
# such that are not specific to a single subdir.
|
||
ifdef objdir
|
||
objpfx := $(patsubst %//,%/,$(objdir)/$(subdir)/)
|
||
common-objpfx = $(objdir)/
|
||
common-objdir = $(objdir)
|
||
else
|
||
objpfx :=
|
||
ifdef ..
|
||
common-objpfx = $(..)
|
||
common-objdir = ..
|
||
else
|
||
# This is a kludge. make wizards might grok.
|
||
common-objpfx = sysdeps/../
|
||
common-objdir = .
|
||
endif
|
||
endif
|
||
|
||
# Root of the sysdeps tree.
|
||
sysdep_dir := $(..)sysdeps
|
||
export sysdep_dir := $(sysdep_dir)
|
||
|
||
# Get the values defined by options to `configure'.
|
||
include $(common-objpfx)config.make
|
||
|
||
# What flags to give to sources which call user provided callbacks
|
||
uses-callbacks = $(exceptions)
|
||
|
||
# What flags to give to tests which test stack alignment
|
||
stack-align-test-flags =
|
||
|
||
# We have a special subdir for each binary format.
|
||
# For now, only ELF is fully supported.
|
||
ifeq ($(elf),yes)
|
||
binfmt-subdir = elf
|
||
else
|
||
# This is probably better than nothing.
|
||
binfmt-subdir = aout
|
||
endif
|
||
|
||
# Complete path to sysdep dirs.
|
||
# `configure' writes a definition of `config-sysdirs' in `config.make'.
|
||
sysdirs := $(foreach D,$(config-sysdirs),$(firstword $(filter /%,$D) $(..)$D))
|
||
|
||
# Add-ons that contribute sysdeps trees get added to the include list
|
||
# after sysdeps/generic. This makes #include <sysdeps/...> work right
|
||
# to find specific add-on files without assuming the add-on directory name.
|
||
# It also means that headers can go into an add-on's base directory
|
||
# instead of the add-on needing a sysdeps/generic of its own.
|
||
sysdeps-srcdirs := $(foreach add-on,$(sysdeps-add-ons),\
|
||
$(firstword $(filter /%,$(add-on)) \
|
||
$(..)$(add-on)))
|
||
+sysdep_dirs = $(sysdirs) $(sysdeps-srcdirs)
|
||
ifdef objdir
|
||
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
|
||
endif
|
||
|
||
# Run config.status to update config.make and config.h. We don't show the
|
||
# dependence of config.h to Make, because it is only touched when it
|
||
# changes and so config.status would be run every time; the dependence of
|
||
# config.make should suffice to force regeneration and re-exec, and the new
|
||
# image will notice if config.h changed.
|
||
$(common-objpfx)config.make: $(common-objpfx)config.status \
|
||
$(..)config.make.in $(..)config.h.in
|
||
cd $(<D); $(SHELL) $(<F)
|
||
|
||
# Find all the add-on and sysdeps configure fragments, to make sure we
|
||
# re-run configure when any of them changes.
|
||
$(common-objpfx)config.status: $(..)version.h $(..)configure \
|
||
$(foreach dir,$(sysdirs),\
|
||
$(wildcard $(dir)/Implies) \
|
||
$(patsubst %.in,%,\
|
||
$(firstword $(wildcard \
|
||
$(addprefix $(dir)/,configure configure.in))))) \
|
||
$(patsubst %.in,%,\
|
||
$(foreach add-on,$(add-ons),\
|
||
$(firstword $(wildcard \
|
||
$(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\
|
||
configure configure.in)))))
|
||
@cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
|
||
echo The GNU C library has not been configured. >&2; \
|
||
echo Run \`configure\' to configure it before building. >&2; \
|
||
echo Try \`configure --help\' for more details. >&2; \
|
||
exit 1; fi
|
||
|
||
# We don't want CPPFLAGS to be exported to the command running configure.
|
||
unexport CPPFLAGS
|
||
|
||
# Get the user's configuration parameters.
|
||
ifneq ($(wildcard $(..)configparms),)
|
||
include $(..)configparms
|
||
endif
|
||
ifneq ($(objpfx),)
|
||
ifneq ($(wildcard $(common-objpfx)configparms),)
|
||
include $(common-objpfx)configparms
|
||
endif
|
||
endif
|
||
|
||
####
|
||
#### These are the configuration variables. You can define values for
|
||
#### the variables below in the file `configparms'.
|
||
#### Do NOT edit this file.
|
||
####
|
||
|
||
|
||
# Common prefix for machine-independent installation directories.
|
||
ifeq ($(origin prefix),undefined) # ifndef would override explicit empty value.
|
||
prefix = /usr/local
|
||
endif
|
||
|
||
# Decide whether we shall build the programs or not. We always do this
|
||
# unless the user tells us (in configparms) or we are building for a
|
||
# standalone target.
|
||
ifndef build-programs
|
||
ifneq ($(config-os),none)
|
||
build-programs=yes
|
||
else
|
||
build-programs=no
|
||
endif
|
||
endif
|
||
|
||
# Common prefix for machine-dependent installation directories.
|
||
ifeq ($(origin exec_prefix),undefined)
|
||
exec_prefix = $(prefix)
|
||
endif
|
||
|
||
# Where to install the library and object files.
|
||
ifndef libdir
|
||
libdir = $(exec_prefix)/lib
|
||
endif
|
||
inst_libdir = $(install_root)$(libdir)
|
||
|
||
# Where to install the shared library and dynamic linker.
|
||
ifndef slibdir
|
||
slibdir = $(exec_prefix)/lib
|
||
endif
|
||
inst_slibdir = $(install_root)$(slibdir)
|
||
|
||
# Prefix to put on files installed in $(libdir). For libraries `libNAME.a',
|
||
# the prefix is spliced between `lib' and the name, so the linker switch
|
||
# `-l$(libprefix)NAME' finds the library; for other files the prefix is
|
||
# just prepended to the whole file name.
|
||
ifeq ($(origin libprefix),undefined)
|
||
libprefix =
|
||
endif
|
||
|
||
# Where to install the header files.
|
||
ifndef includedir
|
||
includedir = $(prefix)/include
|
||
endif
|
||
inst_includedir = $(install_root)$(includedir)
|
||
|
||
# Where to install machine-independent data files.
|
||
# These are the timezone database, and the locale database.
|
||
ifndef datadir
|
||
datadir = $(prefix)/share
|
||
endif
|
||
inst_datadir = $(install_root)$(datadir)
|
||
|
||
# Where to install the timezone data files (which are machine-independent).
|
||
ifndef zonedir
|
||
zonedir = $(datadir)/zoneinfo
|
||
endif
|
||
inst_zonedir = $(install_root)$(zonedir)
|
||
|
||
# Where to install the locale files.
|
||
ifndef localedir
|
||
localedir = $(libdir)/locale
|
||
endif
|
||
inst_localedir = $(install_root)$(localedir)
|
||
|
||
# Where to install the message catalog data files (which are
|
||
# machine-independent).
|
||
ifndef msgcatdir
|
||
msgcatdir = $(datadir)/locale
|
||
endif
|
||
inst_msgcatdir = $(install_root)$(msgcatdir)
|
||
|
||
# Where to install the locale charmap source files.
|
||
ifndef i18ndir
|
||
i18ndir = $(datadir)/i18n
|
||
endif
|
||
inst_i18ndir = $(install_root)$(i18ndir)
|
||
|
||
# Where to install the shared object for charset transformation.
|
||
ifndef gconvdir
|
||
gconvdir = $(libdir)/gconv
|
||
endif
|
||
inst_gconvdir = $(install_root)$(gconvdir)
|
||
|
||
# Where to install programs.
|
||
ifndef bindir
|
||
bindir = $(exec_prefix)/bin
|
||
endif
|
||
inst_bindir = $(install_root)$(bindir)
|
||
|
||
# Where to install internal programs.
|
||
ifndef libexecdir
|
||
libexecdir = $(exec_prefix)/libexec
|
||
endif
|
||
inst_libexecdir = $(install_root)$(libexecdir)
|
||
|
||
# Where to install administrative programs.
|
||
ifndef rootsbindir
|
||
rootsbindir = $(exec_prefix)/sbin
|
||
endif
|
||
inst_rootsbindir = $(install_root)$(rootsbindir)
|
||
|
||
ifndef sbindir
|
||
sbindir = $(exec_prefix)/sbin
|
||
endif
|
||
inst_sbindir = $(install_root)$(sbindir)
|
||
|
||
# Where to install the Info files.
|
||
ifndef infodir
|
||
infodir = $(prefix)/info
|
||
endif
|
||
inst_infodir = $(install_root)$(infodir)
|
||
|
||
# Where to install default configuration files. These include the local
|
||
# timezone specification and network data base files.
|
||
ifndef sysconfdir
|
||
sysconfdir = $(prefix)/etc
|
||
endif
|
||
inst_sysconfdir = $(install_root)$(sysconfdir)
|
||
|
||
# What timezone should be the installed default (e.g., US/Eastern).
|
||
# Run `make -C time echo-zonenames' to see a list of available zone names.
|
||
# The local timezone can be changed with `zic -l TIMEZONE' at any time.
|
||
ifndef localtime
|
||
localtime = Factory
|
||
endif
|
||
|
||
# Where to install the "localtime" timezone file; this is the file whose
|
||
# contents $(localtime) specifies. If this is a relative pathname, it is
|
||
# relative to $(zonedir). It is a good idea to put this somewhere
|
||
# other than there, so the zoneinfo directory contains only universal data,
|
||
# localizing the configuration data elsewhere.
|
||
ifndef localtime-file
|
||
localtime-file = $(sysconfdir)/localtime
|
||
inst_localtime-file = $(install_root)$(localtime-file)
|
||
endif
|
||
|
||
# What to use for leap second specifications in compiling the default
|
||
# timezone files. Set this to `/dev/null' for no leap second handling as
|
||
# 1003.1 requires, or to `leapseconds' for proper leap second handling.
|
||
# Both zone flavors are always available as `posix/ZONE' and `right/ZONE'.
|
||
# This variable determines the default: if it's `/dev/null',
|
||
# ZONE==posix/ZONE; if it's `leapseconds', ZONE==right/ZONE.
|
||
ifndef leapseconds
|
||
leapseconds = /dev/null
|
||
endif
|
||
|
||
# What timezone's DST rules should be used when a POSIX-style TZ
|
||
# environment variable doesn't specify any rules. For 1003.1 compliance
|
||
# this timezone must use rules that are as U.S. federal law defines DST.
|
||
# Run `make -C time echo-zonenames' to see a list of available zone names.
|
||
# This setting can be changed with `zic -p TIMEZONE' at any time.
|
||
# If you want POSIX.1 compatibility, use `America/New_York'.
|
||
ifndef posixrules
|
||
posixrules = America/New_York
|
||
endif
|
||
|
||
# Where to install the "posixrules" timezone file; this is file
|
||
# whose contents $(posixrules) specifies. If this is a relative
|
||
# pathname, it is relative to $(zonedir).
|
||
ifndef posixrules-file
|
||
posixrules-file = posixrules
|
||
endif
|
||
|
||
|
||
# Directory where your system's native header files live.
|
||
# This is used on Unix systems to generate some GNU libc header files.
|
||
ifndef sysincludedir
|
||
sysincludedir = /usr/include
|
||
endif
|
||
|
||
|
||
# Commands to install files.
|
||
ifndef INSTALL_DATA
|
||
INSTALL_DATA = $(INSTALL) -m 644
|
||
endif
|
||
ifndef INSTALL_SCRIPT
|
||
INSTALL_SCRIPT = $(INSTALL)
|
||
endif
|
||
ifndef INSTALL_PROGRAM
|
||
INSTALL_PROGRAM = $(INSTALL)
|
||
endif
|
||
ifndef INSTALL
|
||
INSTALL = install
|
||
endif
|
||
|
||
|
||
# The name of the C compiler.
|
||
# If you've got GCC, and it works, use it.
|
||
ifeq ($(origin CC),default)
|
||
CC := gcc
|
||
endif
|
||
|
||
# The name of the C compiler to use for compilations of programs to run on
|
||
# the host that is building the library. If you set CC to a
|
||
# cross-compiler, you must set this to the normal compiler.
|
||
ifndef BUILD_CC
|
||
BUILD_CC = $(CC)
|
||
endif
|
||
|
||
# Default flags to pass the C compiler.
|
||
ifndef default_cflags
|
||
ifeq ($(release),stable)
|
||
default_cflags := -g -O2
|
||
else
|
||
default_cflags := -g -O
|
||
endif
|
||
endif
|
||
|
||
# Flags to pass the C compiler when assembling preprocessed assembly code
|
||
# (`.S' files). On some systems the assembler doesn't understand the `#' line
|
||
# directives the preprocessor produces. If you have troubling compiling
|
||
# assembly code, try using -P here to suppress these directives.
|
||
ifndef asm-CPPFLAGS
|
||
asm-CPPFLAGS =
|
||
endif
|
||
|
||
# ELF always supports init/fini sections
|
||
ifeq ($(elf),yes)
|
||
have-initfini = yes
|
||
endif
|
||
|
||
# Installed name of the startup code.
|
||
ifneq ($(have-initfini),yes)
|
||
# When not having init/fini, there is just one startfile, called crt0.o.
|
||
start-installed-name = crt0.o
|
||
else
|
||
# On systems having init/fini, crt0.o is called crt1.o, and there are
|
||
# some additional bizarre files.
|
||
start-installed-name = crt1.o
|
||
endif
|
||
# On systems that do not need a special startfile for statically linked
|
||
# binaries, simply set it to the normal name.
|
||
ifndef static-start-installed-name
|
||
static-start-installed-name = $(start-installed-name)
|
||
endif
|
||
|
||
ifeq (yesyesyes,$(build-shared)$(elf)$(have-z-combreloc))
|
||
combreloc-LDFLAGS = -Wl,-z,combreloc
|
||
LDFLAGS.so += $(combreloc-LDFLAGS)
|
||
LDFLAGS-rtld += $(combreloc-LDFLAGS)
|
||
endif
|
||
|
||
relro-LDFLAGS = -Wl,-z,relro
|
||
LDFLAGS.so += $(relro-LDFLAGS)
|
||
LDFLAGS-rtld += $(relro-LDFLAGS)
|
||
|
||
ifeq (yes,$(have-hash-style))
|
||
# For the time being we unconditionally use 'both'. At some time we
|
||
# should declare statically linked code as 'out of luck' and compile
|
||
# with --hash-style=gnu only.
|
||
hashstyle-LDFLAGS = -Wl,--hash-style=both
|
||
LDFLAGS.so += $(hashstyle-LDFLAGS)
|
||
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
|
||
endif
|
||
|
||
# Command for linking programs with the C library.
|
||
ifndef +link
|
||
+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||
$(+preinit) $(+prector) \
|
||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||
$(start-installed-name))\
|
||
$(+preinit) $(link-extra-libs) \
|
||
$(common-objpfx)libc% $(+postinit),$^) \
|
||
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||
endif
|
||
# Command for statically linking programs with the C library.
|
||
ifndef +link-static
|
||
+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
|
||
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||
$(addprefix $(csu-objpfx),$(static-start-installed-name)) \
|
||
$(+preinit) $(+prector) \
|
||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||
$(start-installed-name))\
|
||
$(+preinit) $(link-extra-libs-static) \
|
||
$(common-objpfx)libc% $(+postinit),$^) \
|
||
$(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
|
||
endif
|
||
# Command for statically linking bounded-pointer programs with the C library.
|
||
ifndef +link-bounded
|
||
+link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
|
||
$(sysdep-LDFLAGS) $(LDFLAGS) \
|
||
$(addprefix $(csu-objpfx),b$(static-start-installed-name)) \
|
||
$(+preinit) $(+prector) \
|
||
$(filter-out $(addprefix $(csu-objpfx),start.ob \
|
||
$(start-installed-name))\
|
||
$(+preinit) $(link-extra-libs-bounded) \
|
||
$(common-objpfx)libc% $(+postinit),$^) \
|
||
$(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit)
|
||
endif
|
||
ifndef config-LDFLAGS
|
||
ifeq (yesyes,$(build-shared)$(elf))
|
||
config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
|
||
endif
|
||
endif
|
||
ifndef link-libc
|
||
ifeq (yes,$(build-shared))
|
||
ifeq ($(elf),yes)
|
||
# We need the versioned name of libc.so in the deps of $(others) et al
|
||
# so that the symlink to libc.so is created before anything tries to
|
||
# run the linked programs.
|
||
link-libc = -Wl,-rpath-link=$(rpath-link) \
|
||
$(common-objpfx)libc.so$(libc.so-version) \
|
||
$(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
|
||
# This is how to find at build-time things that will be installed there.
|
||
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
|
||
endif
|
||
rpath-link = \
|
||
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
|
||
elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
|
||
else
|
||
nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
|
||
resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
|
||
link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
|
||
endif
|
||
endif
|
||
|
||
# Differences in the linkers on the various platforms.
|
||
ifeq ($(elf),yes)
|
||
LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
|
||
LDFLAGS-soname-fname = -Wl,-soname,$(@F)
|
||
LDFLAGS-rdynamic = -rdynamic
|
||
LDFLAGS-Bsymbolic = -Bsymbolic
|
||
endif
|
||
|
||
# Choose the default search path for the dynamic linker based on
|
||
# where we will install libraries.
|
||
ifneq ($(libdir),$(slibdir))
|
||
default-rpath = $(slibdir):$(libdir)
|
||
else
|
||
default-rpath = $(libdir)
|
||
endif
|
||
|
||
ifndef link-extra-libs
|
||
link-extra-libs = $(LDLIBS-$(@F))
|
||
link-extra-libs-static = $(link-extra-libs)
|
||
link-extra-libs-bounded = $(link-extra-libs)
|
||
endif
|
||
|
||
# The static libraries.
|
||
ifeq (yes,$(build-static))
|
||
link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
|
||
else
|
||
ifeq (yes,$(build-shared))
|
||
# We can try to link the programs with lib*_pic.a...
|
||
link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a
|
||
endif
|
||
endif
|
||
link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
|
||
|
||
ifndef gnulib
|
||
ifneq ($(have-cc-with-libunwind),yes)
|
||
libunwind =
|
||
else
|
||
libunwind = -lunwind
|
||
endif
|
||
ifneq ($(have-as-needed),yes)
|
||
libgcc_eh := -lgcc_eh $(libunwind)
|
||
else
|
||
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
|
||
endif
|
||
gnulib := -lgcc $(libgcc_eh)
|
||
static-gnulib := -lgcc -lgcc_eh $(libunwind)
|
||
libc.so-gnulib := -lgcc
|
||
endif
|
||
ifeq ($(elf),yes)
|
||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||
+postinit = $(addprefix $(csu-objpfx),crtn.o)
|
||
+prector = `$(CC) --print-file-name=crtbegin.o`
|
||
+postctor = `$(CC) --print-file-name=crtend.o`
|
||
+interp = $(addprefix $(elf-objpfx),interp.os)
|
||
endif
|
||
csu-objpfx = $(common-objpfx)csu/
|
||
elf-objpfx = $(common-objpfx)elf/
|
||
|
||
# How to run a program we just linked with our library.
|
||
# The program binary is assumed to be $(word 2,$^).
|
||
built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
|
||
ifeq (yesyes,$(build-shared)$(elf))
|
||
comma = ,
|
||
sysdep-library-path = \
|
||
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
|
||
$(filter -Wl$(comma)-rpath-link=%,\
|
||
$(sysdep-LDFLAGS)))))
|
||
run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
|
||
$(tests-static) $(xtests-static)),, \
|
||
$(elf-objpfx)$(rtld-installed-name) \
|
||
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
|
||
else
|
||
run-program-prefix =
|
||
endif
|
||
# Never use $(run-program-prefix) for the statically-linked %-bp test programs
|
||
built-program-cmd = $(patsubst %,$(run-program-prefix),\
|
||
$(filter-out %-bp,$(built-program-file))) \
|
||
$(built-program-file)
|
||
|
||
ifndef LD
|
||
LD := ld -X
|
||
endif
|
||
|
||
ifndef RANLIB
|
||
RANLIB = ranlib
|
||
endif
|
||
|
||
# Extra flags to pass to GCC.
|
||
ifeq ($(all-warnings),yes)
|
||
+gccwarn := -Wall -Wwrite-strings -Winline -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
|
||
else
|
||
+gccwarn := -Wall -Wwrite-strings -Winline
|
||
endif
|
||
+gccwarn-c = -Wstrict-prototypes
|
||
|
||
# We do not depend on the address of constants in different files to be
|
||
# actually different, so allow the compiler to merge them all.
|
||
+merge-constants = -fmerge-all-constants
|
||
|
||
# This is the program that generates makefile dependencies from C source files.
|
||
# The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy
|
||
# targets for headers so that removed headers don't break the build.
|
||
ifndef +mkdep
|
||
+mkdep = $(CC) -M -MP
|
||
endif
|
||
|
||
# The program that makes Emacs-style TAGS files.
|
||
ETAGS := etags
|
||
|
||
# The `xgettext' program for producing .pot files from sources.
|
||
ifndef XGETTEXT
|
||
XGETTEXT = xgettext
|
||
endif
|
||
|
||
# The `m4' macro processor; this is used by sysdeps/sparc/Makefile (and
|
||
# perhaps others) to preprocess assembly code in some cases.
|
||
M4 = m4
|
||
|
||
# To force installation of files even if they are older than the
|
||
# installed files. This variable is included in the dependency list
|
||
# of all installation targets.
|
||
ifeq ($(force-install),yes)
|
||
+force = force-install
|
||
else
|
||
+force =
|
||
endif
|
||
|
||
####
|
||
#### End of configuration variables.
|
||
####
|
||
|
||
# This tells some versions of GNU make before 3.63 not to export all variables.
|
||
.NOEXPORT:
|
||
|
||
# We want to echo the commands we're running without
|
||
# umpteen zillion filenames along with it (we use `...' instead)
|
||
# but we don't want this echoing done when the user has said
|
||
# he doesn't want to see commands echoed by using -s.
|
||
ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
|
||
+cmdecho := echo >/dev/null
|
||
else # not -s
|
||
+cmdecho := echo
|
||
endif # -s
|
||
|
||
# These are the flags given to the compiler to tell
|
||
# it what sort of optimization and/or debugging output to do.
|
||
ifndef +cflags
|
||
# If `CFLAGS' was defined, use that.
|
||
ifdef CFLAGS
|
||
+cflags := $(filter-out -I%,$(CFLAGS))
|
||
endif # CFLAGS
|
||
endif # +cflags
|
||
|
||
# If none of the above worked, default to "-g -O".
|
||
ifeq "$(strip $(+cflags))" ""
|
||
+cflags := $(default_cflags)
|
||
endif # $(+cflags) == ""
|
||
|
||
+cflags += $(addprefix -mcpu=,$(with-cpu)) $(+gccwarn) $(+merge-constants)
|
||
+gcc-nowarn := -w
|
||
|
||
# Don't duplicate options if we inherited variables from the parent.
|
||
+cflags := $(sort $(+cflags))
|
||
|
||
|
||
# These are flags given to the C compiler to tell it to look for
|
||
# include files (including ones given in angle brackets) in the parent
|
||
# library source directory, in the include directory, and in the
|
||
# current directory.
|
||
+sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
|
||
+includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
|
||
$(+sysdep-includes) $(includes) \
|
||
$(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
|
||
|
||
# Since libio has several internal header files, we use a -I instead
|
||
# of many little headers in the include directory.
|
||
libio-include = -I$(..)libio
|
||
|
||
# These are the variables that the implicit compilation rules use.
|
||
# Note that we can't use -std=* in CPPFLAGS, because it overrides
|
||
# the implicit -lang-asm and breaks cpp behavior for .S files--notably
|
||
# it causes cpp to stop predefining __ASSEMBLER__.
|
||
CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
|
||
-include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
|
||
$(CPPFLAGS-$(suffix $@)) \
|
||
$(foreach lib,$(libof-$(basename $(@F))) \
|
||
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
|
||
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
|
||
override CFLAGS = -std=gnu99 \
|
||
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
|
||
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
|
||
$(CFLAGS-$(@F))
|
||
override CXXFLAGS = $(c++-sysincludes) \
|
||
$(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
|
||
$(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
|
||
|
||
# If everything is compiled with -fPIC (implicitly) we must tell this by
|
||
# defining the PIC symbol.
|
||
ifeq (yes,$(build-pic-default))
|
||
pic-default = -DPIC
|
||
endif
|
||
|
||
# Enable object files for different versions of the library.
|
||
# Various things use $(object-suffixes) to know what all to make.
|
||
# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
|
||
# to pass different flags for each flavor.
|
||
libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
|
||
all-object-suffixes := .o .os .op .og .ob .oS
|
||
object-suffixes :=
|
||
CPPFLAGS-.o = $(pic-default)
|
||
CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
|
||
ifeq (yes,$(build-static))
|
||
libtype.o := lib%.a
|
||
object-suffixes += .o
|
||
endif
|
||
ifeq (yes,$(build-shared))
|
||
# Under --enable-shared, we will build a shared library of PIC objects.
|
||
# The PIC object files are named foo.os.
|
||
object-suffixes += .os
|
||
CPPFLAGS-.os = -DPIC -DSHARED
|
||
CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
|
||
libtype.os := lib%_pic.a
|
||
# This can be changed by a sysdep makefile
|
||
pic-ccflag = -fPIC
|
||
# This one should always stay like this unless there is a very good reason.
|
||
PIC-ccflag = -fPIC
|
||
endif
|
||
ifeq (yes,$(build-profile))
|
||
# Under --enable-profile, we will build a static library of profiled objects.
|
||
# The profiled object files are named foo.op.
|
||
object-suffixes += .op
|
||
CPPFLAGS-.op = -DPROF $(pic-default)
|
||
CFLAGS-.op = -pg
|
||
libtype.op = lib%_p.a
|
||
endif
|
||
ifeq (yes,$(build-omitfp))
|
||
# Under --enable-omitfp, we build the library optimized without
|
||
# debugging information using -fomit-frame-pointer, and build an extra
|
||
# library with debugging information. The debuggable objects are named foo.og.
|
||
object-suffixes += .og
|
||
CPPFLAGS-.og = $(pic-default)
|
||
CFLAGS-.og = -g
|
||
CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
|
||
CFLAGS-.os += -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
|
||
libtype.og = lib%_g.a
|
||
endif
|
||
|
||
bppfx = BP-
|
||
ifeq (yes,$(build-bounded))
|
||
# Under --enable-bounded, we build the library with `-fbounded-pointers -g'
|
||
# to runtime bounds checking. The bounded-pointer objects are named foo.ob.
|
||
# We disable sibling-call optimizations so that stack traces will be complete
|
||
# and thus aid debugging, since after all, BPs are a debugging tool.
|
||
object-suffixes += .ob
|
||
CPPFLAGS-.ob = -fbounded-pointers $(pic-default)
|
||
CFLAGS-.ob = -g -O2 -fno-optimize-sibling-calls -fno-strict-aliasing
|
||
libtype.ob = lib%_b.a
|
||
endif
|
||
|
||
object-suffixes-for-libc := $(object-suffixes)
|
||
|
||
ifeq (yes,$(build-shared))
|
||
# Build special library that contains the static-only routines for libc.
|
||
object-suffixes-for-libc += .oS
|
||
|
||
# Must build the routines as PIC, though, because they can end up in (users')
|
||
# shared objects. We don't want to use CFLAGS-os because users may, for
|
||
# example, make that processor-specific.
|
||
CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
|
||
CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
|
||
libtype.oS = lib%_nonshared.a
|
||
endif
|
||
|
||
# The assembler can generate debug information too.
|
||
ifndef ASFLAGS
|
||
ifeq ($(have-cpp-asm-debuginfo),yes)
|
||
ASFLAGS := $(filter -g%,$(CFLAGS))
|
||
else
|
||
ASFLAGS :=
|
||
endif
|
||
endif
|
||
ASFLAGS += $(ASFLAGS-config)
|
||
|
||
ifndef BUILD_CC
|
||
BUILD_CC = $(CC)
|
||
endif
|
||
|
||
move-if-change = $(SHELL) $(..)scripts/move-if-change
|
||
|
||
-include $(common-objpfx)sysd-sorted
|
||
subdirs = $(sorted-subdirs)
|
||
subdir-srcdirs = $(foreach dir,$(subdirs),\
|
||
$(firstword $($(dir)-srcdir) $(..)$(dir)))
|
||
|
||
ifeq (yes, $(build-shared))
|
||
|
||
# This is a pair of implicit rules to preprocess a file with # comments,
|
||
# %ifdef et al, based on config.h settings or other %include'd files.
|
||
# We use chained rules instead of a pipeline here so that we can properly
|
||
# check the exit status of cpp rather than using its bad output when there
|
||
# is a preprocessing error. Another rule should depend on the output file
|
||
# `FOO.v', and along with that `FOO.v.i' should be given dependencies
|
||
# listing both its input files, and any header files that it may reference
|
||
# (but no commands).
|
||
%.v.i: $(common-objpfx)config.h
|
||
sed '/^[ ]*#/d;s/^[ ]*%/#/' $(filter-out FORCE %.h,$^) \
|
||
| $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \
|
||
> $@T
|
||
mv -f $@T $@
|
||
%.v: %.v.i
|
||
sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T
|
||
mv -f $@T $@
|
||
|
||
# Process the shlib-versions file, which tells us what shared library
|
||
# version numbers to use when we install shared objects on this system.
|
||
# We need to wait until $(subdirs) is complete.
|
||
ifeq ($(sysd-sorted-done),t)
|
||
-include $(common-objpfx)soversions.mk
|
||
ifndef avoid-generated
|
||
# This lets add-ons give more-specific matches that override defaults
|
||
# in the top-level file.
|
||
$(common-objpfx)shlib-versions.v.i: \
|
||
$(wildcard $(+sysdep_dirs:=/shlib-versions) \
|
||
$(subdir-srcdirs:=/shlib-versions)) \
|
||
$(..)shlib-versions
|
||
|
||
soversions-default-setname = $(patsubst %, %,\
|
||
$(filter-out %_default,\
|
||
$(oldest-abi:%=GLIBC_%)))
|
||
$(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
|
||
$(common-objpfx)shlib-versions.v
|
||
$(AWK) -v default_setname='$(soversions-default-setname)' \
|
||
-v cpu='$(config-machine)' \
|
||
-v vendor='$(config-vendor)' \
|
||
-v os='$(config-os)' \
|
||
-f $^ > $@T
|
||
mv -f $@T $@
|
||
$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
|
||
(seen_DEFAULT=0; seen_WORDSIZE32=0; seen_WORDSIZE64=0; \
|
||
while read which lib number setname; do \
|
||
eval seen_$$which=1; \
|
||
test x"$$which" = xDEFAULT || continue; \
|
||
case $$number in \
|
||
[0-9]*) echo "$$lib.so-version=.$$number"; \
|
||
echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
|
||
*) echo "$$lib.so-version=$$number"; \
|
||
echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
|
||
esac; \
|
||
done; \
|
||
case "$$seen_DEFAULT$$seen_WORDSIZE32$$seen_WORDSIZE64" in \
|
||
100) echo biarch = no;; \
|
||
101) echo biarch = 32;; \
|
||
?1?) echo biarch = 64;; \
|
||
*) echo >&2 BUG; exit 2;; \
|
||
esac; \
|
||
echo soversions.mk-done = t;) < $< > $@T; exit 0
|
||
mv -f $@T $@
|
||
endif
|
||
endif
|
||
|
||
postclean-generated += soversions.mk soversions.i \
|
||
shlib-versions.v shlib-versions.v.i
|
||
|
||
# Generate the header containing the names of all shared libraries.
|
||
# We use a stamp file to avoid unnecessary recompilations.
|
||
before-compile += $(common-objpfx)gnu/lib-names.h
|
||
ifeq ($(soversions.mk-done),t)
|
||
$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @:
|
||
$(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
|
||
$(common-objpfx)soversions.i
|
||
$(make-target-directory)
|
||
@rm -f ${@:stmp=T} $@
|
||
$(AWK) -f $^ > ${@:stmp=T}
|
||
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
|
||
touch $@
|
||
endif
|
||
|
||
common-generated += gnu/lib-names.h gnu/lib-names.stmp
|
||
|
||
# The name under which the run-time dynamic linker is installed.
|
||
# We are currently going for the convention that `/lib/ld.so.1'
|
||
# names the SVR4/ELF ABI-compliant dynamic linker.
|
||
ifndef rtld-installed-name
|
||
ifdef ld.so-version
|
||
rtld-installed-name = $(ld.so-version)
|
||
else
|
||
rtld-installed-name = ld.so.1
|
||
endif
|
||
endif
|
||
|
||
ifndef rtld-version-installed-name
|
||
rtld-version-installed-name = ld-$(version).so
|
||
endif
|
||
|
||
endif # build-shared
|
||
|
||
|
||
ifeq ($(elf),yes)
|
||
dlfcn = dlfcn
|
||
ifeq ($(build-shared),yes)
|
||
libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version)
|
||
else
|
||
libdl = $(common-objpfx)dlfcn/libdl.a
|
||
endif
|
||
else
|
||
ifneq (,$(findstring aix,$(config-os)))
|
||
ifeq ($(build-shared),yes)
|
||
dlfcn = dlfcn
|
||
libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version)
|
||
else
|
||
# No libdl without shared libs on AIX
|
||
dlfcn =
|
||
libdl =
|
||
endif
|
||
else
|
||
# No ELF, no AIX - no libdl, at least for now.
|
||
dlfcn =
|
||
libdl =
|
||
endif
|
||
endif
|
||
|
||
# These are the subdirectories containing the library source. The order
|
||
# is more or less arbitrary. The sorting step will take care of the
|
||
# dependencies.
|
||
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
|
||
stdlib stdio-common libio malloc string wcsmbs time dirent \
|
||
grp pwd posix io termios resource misc socket sysvipc gmon \
|
||
gnulib iconv iconvdata wctype manual shadow po argp \
|
||
crypt nss localedata timezone rt conform debug \
|
||
$(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
|
||
|
||
ifndef avoid-generated
|
||
all-Depend-files := $(wildcard $(foreach dir,$(all-subdirs),\
|
||
$(firstword $($(dir)-srcdir) \
|
||
$(..)$(dir))/Depend))
|
||
$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk \
|
||
$(common-objpfx)config.make $(..)Makeconfig \
|
||
$(wildcard $(sysdirs:=/Subdirs)) \
|
||
$(all-Depend-files)
|
||
$(AWK) -f $< \
|
||
-v subdirs='$(all-subdirs)' \
|
||
-v srcpfx='$(..)' \
|
||
$(filter %/Subdirs %/Depend,$^) > $@-tmp
|
||
mv -f $@-tmp $@
|
||
$(all-Depend-files): ;
|
||
endif
|
||
|
||
# Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here.
|
||
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
|
||
ifneq (,$(sysdep-makeconfigs))
|
||
include $(sysdep-makeconfigs)
|
||
endif
|
||
|
||
|
||
endif # Makeconfig not yet included
|
||
|
||
# Local Variables:
|
||
# mode: makefile
|
||
# End:
|