Updated to fedora-glibc-20060301T0647

This commit is contained in:
Jakub Jelinek 2006-03-01 06:55:57 +00:00
parent 378b1353df
commit 6a8c1091fd
938 changed files with 5663 additions and 38435 deletions

706
ChangeLog
View File

@ -1,3 +1,709 @@
2006-03-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/pread.c: Copy in mips pread.c.
* sysdeps/unix/sysv/linux/sh/pwrite.c: Copy in mips pwrite.c.
* sysdeps/unix/sysv/linux/sh/pread64.c: Copy in mips pread64.c.
* sysdeps/unix/sysv/linux/sh/pwrite64.c: Copy in mips pwrite64.c.
2006-02-28 Roland McGrath <roland@redhat.com>
* elf/tst-tls-dlinfo.c: New file.
* elf/Makefile (tests): Add it.
($(objpfx)tst-tls-dlinfo): Depend on $(libdl).
($(objpfx)tst-tls-dlinfo.out): Depend on $(objpfx)tst-tlsmod2.so.
* dlfcn/dlfcn.h (RTLD_DI_PROFILENAME, RTLD_DI_PROFILEOUT): New enum
values, reserve unsupported requested names used on Solaris.
(RTLD_DI_TLS_MODID, RTLD_DI_TLS_DATA): New enum values.
(RTLD_DI_MAX): Likewise.
* dlfcn/dlinfo.c (dlinfo_doit): Handle RTLD_DI_TLS_MODID and
RTLD_DI_TLS_DATA.
* elf/dl-tls.c (_dl_tls_get_addr_soft): New function.
* sysdeps/generic/ldsodefs.h: Declare it.
* elf/Versions (ld: GLIBC_PRIVATE): Add it.
* elf/link.h (struct dl_phdr_info): New members dlpi_tls_modid,
dlpi_tls_data.
* elf/dl-iteratephdr.c (__dl_iterate_phdr): Fill them in.
* include/link.h: Don't copy contents from elf/link.h.
Instead, #include it while #define'ing around link_map.
* elf/dl-debug.c (_dl_debug_initialize): Add a cast.
Add bogus extern decl to verify link_map members.
* elf/loadtest.c (MAPS): New macro, cast _r_debug._r_map.
(OUT, main): Use it in place of _r_debug._r_map.
* elf/unload.c: Likewise.
* elf/unload2.c: Likewise.
* elf/neededtest.c (check_loaded_objects): Likewise.
* elf/neededtest2.c (check_loaded_objects): Likewise.
* elf/neededtest3.c (check_loaded_objects): Likewise.
* elf/neededtest4.c (check_loaded_objects): Likewise.
* elf/circleload1.c (check_loaded_objects): Likewise.
* nscd/nscd_helper.c: Include <time.h> for `time' declaration.
* include/fcntl.h: Declare __openat, __open64. Use libc_hidden_proto.
* io/openat.c (__openat): Define instead of openat.
Use libc_hidden_def. Define openat with weak_alias.
* io/openat64.c (__openat64): Define instead of openat64.
Use libc_hidden_def. Define openat64 with weak_alias.
* sysdeps/unix/sysv/linux/openat.c: Likewise.
* libio/genops.c: Include <sched.h> for __sched_yield decl.
* Makeconfig (+includes): Add back $(includes)
after $(+sysdep-includes).
* Makerules ($(common-objpfx)%.make): Use -DASSEMBLER.
2006-02-28 Jakub Jelinek <jakub@redhat.com>
* posix/sys/types.h [!__GNUC_PREREQ (2, 7)] (int64_t, u_int64_t):
typedef to long int resp. unsigned long int on 64-bit arches.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: Include x86_64
umount.c rather than hppa umount.c.
* sysdeps/unix/sysv/linux/sparc/sparc32/chown.c: Include sh chown.c
rather than m68k chown.c.
* sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include sh
fchownat.c rather than m68k fchownat.c.
* sysdeps/unix/sysv/linux/sh/chown.c: Copy over from m68k chown.c.
* sysdeps/unix/sysv/linux/sh/fchownat.c: Copy over from m68k
fchownat.c.
* sysdeps/unix/sysv/linux/x86_64/brk.c: Copy over from hppa brk.c.
* sysdeps/unix/sysv/linux/x86_64/umount.c: Copy over from hppa
umount.c.
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/hppa: Directory removed, saved in ports repository.
* sysdeps/mach/hppa: Likewise.
* sysdeps/mach/hurd/hppa: Likewise.
* sysdeps/unix/sysv/linux/hppa: Likewise.
* configure.in (machine): Remove hppa* cases.
* configure: Regenerated.
* shlib-versions: Remove hppa cases.
* sysdeps/m68k: Directory removed, saved in ports repository.
* sysdeps/unix/bsd/m68k: Likewise.
* sysdeps/unix/sysv/linux/m68k: Likewise.
* configure.in (machine): Remove m68* cases.
* configure: Regenerated.
* elf/rtld-Rules (subdir-args): New variable.
(rtld-subdir-make): Use it.
2006-02-22 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
(DO_CALL): Add support for 6 system call parameters.
(DECLARGS_6, ASMFMT_6): Define.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Copy in i386/bits/fcntl.h.
2006-02-27 Roland McGrath <roland@redhat.com>
* scripts/config.guess: Update from master, timestamp='2006-02-27'.
* scripts/config.sub: Update from master, timestamp='2006-02-27'.
* Makefile (subdir-target-args): New variable.
($(all-subdirs-targets)): Use it in place of -C option.
* Rules: Use $(..) instead of ../ if it's already defined.
* Makeconfig (subdir-srcdirs): New variable.
* csu/Makefile (all-Banner-files): Use it.
* configure.in (--enable-add-ons): Set to "yes" by default.
Handle absolute add-on directory names when looking for configure
fragments. Also look for sysdeps/*/preconfigure fragments in add-ons.
Require add-on configure to set $libc_add_on_canonical, use
that in $add_ons_sfx. Substitute add_on_subdirs with computed list
of subdir names each add-on configure set in libc_add_on_subdirs.
* configure: Regenerated.
* Makefile (%/preconfigure: %/preconfigure.in): New pattern rule.
* config.make.in (add-on-subdirs): New substituted variable.
* Makeconfig (all-subdirs): Include $(add-on-subdirs).
Remove $(add-ons), $(sysdep-subdirs).
Don't filter out $(sysdep-inhibit-subdirs).
($(common-objpfx)sysd-dirs): Target removed. Don't include it.
($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs
files together to gen-sorted.awk, and $(subdirs) via -v.
(subdirs): Remove magic reordering for mach and hurd.
* scripts/gen-sorted.awk: Use subdirs from command line.
Process Subdirs and Depend files directly.
Let Subdirs files use "first dir" and "inhibit dir".
Always move elf to the end of the list.
* hurd/Depend: New file.
* sysdeps/mach/Subdirs: Use "first mach".
* Makefile (dist-separate): Remove linuxthreads.
(dist-separate-linuxthreads): Variable removed.
(glibc-%.tar rule): Use $(sysdeps-add-ons).
* Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs),
not $(all-subdirs).
(sysdep-makefiles): Use $(sysdirs).
(sysdirs): Remove export.
($(+sysdir_pfx)sysd-rules): Handle absolute directory names in
$(config-sysdirs).
(+sysdir_pfx): Variable removed.
(sysd-rules): Use $(common-objpfx) in place of it.
(sysdirs): Variable moved to ...
* Makeconfig (sysdirs): ... here.
Handle absolute directory names in $(config-sysdirs).
(full_config_sysdirs): Variable removed.
* csu/Makefile: Use $(sysdirs) in vpath directive.
* math/Makefile (ulps-file): Use $(sysdirs).
* sysdeps/gnu/Makefile (errlist-c): Likewise.
($(objpfx)errlist-compat.c): Likewise.
* Makeconfig (all-Subdirs-files): Likewise.
($(common-objpfx)config.status): Likewise.
* configure.in (sysnames): Handle absolute add-on directory names.
(sysdeps_add_ons): New variable, AC_SUBST it.
Compute which add-ons contributed sysdeps directories.
* configure: Regenerated.
* config.make.in (sysdeps-add-ons): New substituted variable.
* Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ...
* Makeconfig: ... to here.
(+sysdep_dirs): Append $(sysdeps-add-ons) here.
(+includes): Remove $(objpfx) include, already in $(+sysdep_dirs).
Remove $(includes).
(sysdep-makeconfigs): Use $(+sysdep_dirs).
($(common-objpfx)shlib-versions.v.i): Likewise.
* Makeconfig: Remove hair to set Makeconfig-add-on.
* sysdeps/unix/Makefile (sysdirs): Remove export.
(asm_CPP): Variable removed.
($(common-objpfx)sysd-syscalls): Pass them directly for the script.
* sysdeps/posix/Makefile: New file.
* Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix
values here with ?=.
* stdlib/gen-mpn-copy: File removed.
* stdlib/Makefile (distribute): Remove it.
* configure.in: Don't grok --with-gmp.
* configure: Regenerated.
* configure.in (libc_cv_idn): Don't check it; libidn/configure does it.
* configure: Regenerated.
2006-02-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set
when syscall is used.
* io/fcntl.h (AT_SYMLINK_FOLLOW): Define.
2006-02-26 Roland McGrath <roland@redhat.com>
* bare: Directory removed, saved in ports repository.
* sysdeps/unix/common/Makefile: File removed.
* sysdeps/unix/common/glue-ctype.c: File removed.
* sysdeps/unix/common/configure.in: File removed.
* sysdeps/unix/common/configure: File removed.
* sysdeps/unix/configure.in: File removed.
* sysdeps/unix/configure: File removed.
* sysdeps/unix/make_errlist.c: File removed.
* sysdeps/unix/Makefile ($(objpfx)errlist.c, $(objpfx)make_errlist):
Rules removed.
* timezone/africa: Update from tzdata2006b (comment changes only).
* timezone/antarctica: Likewise.
* timezone/asia: Likewise.
* timezone/australasia: Likewise.
* timezone/backward: Likewise.
* timezone/etcetera: Likewise.
* timezone/europe: Likewise.
* timezone/factory: Likewise.
* timezone/iso3166.tab: Likewise.
* timezone/leapseconds: Likewise.
* timezone/northamerica: Likewise.
* timezone/pacificnew: Likewise.
* timezone/solar87: Likewise.
* timezone/solar88: Likewise.
* timezone/solar89: Likewise.
* timezone/southamerica: Likewise.
* timezone/systemv: Likewise.
* timezone/zone.tab: Likewise.
2006-02-26 Ulrich Drepper <drepper@redhat.com>
* posix/unistd.h: Add fifth parameter to linkat.
* io/linkat.c: Likewise.
* sysdeps/unix/sysv/linux/linkat.c: Likewise.
* io/tst-linkat.c (do_test): Pass new parameter to linkat.
* elf/do-lookup.h (do_lookup_x): No need to compare SKIP to NULL
before comparison with MAP.
* elf/dl-sym.c (do_sym): For RTLD_NEXT, pass MATCH to
dl_lookup_symbol_x instead of L.
2006-02-24 Mike Frysinger <vapier@gentoo.org>
* sysdeps/gnu/net/if.h (IFF_DYNAMIC): New macro.
2006-02-24 David S. Miller <davem@sunset.davemloft.net>
* configure.in: Use sparc/sparc32/sparcv9/sparcv9b in place
of sparc/sparc32/sparcv9b.
* sysdeps/sparc/sparc32/sparcv9b/Implies: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies: File removed.
2006-02-24 Roland McGrath <roland@redhat.com>
* elf/elf.h (HWCAP_SPARC_BLKINIT): New macro.
* sysdeps/sparc/dl-procinfo.h (HWCAP_IMPORTANT): Add it.
(_DL_HWCAP_COUNT): Increase to 7.
* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add "v9v".
From David S. Miller <davem@sunset.davemloft.net>.
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c: Moved to ...
* sysdeps/sparc/dl-procinfo.c: ... here, new file.
* sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Moved to ...
* sysdeps/sparc/dl-procinfo.h: ... here, new file.
(HWCAP_IMPORTANT): Include HWCAP_SPARC_V9 when [__WORDSIZE != 64].
* sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: File removed.
* elf/sofini.c (__FRAME_END__): Mark as const.
* elf/soinit.c (__EH_FRAME_BEGIN__): Likewise. Add used attribute.
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
* soft-fp/single.h (SFtype): Define.
(union _FP_UNION_S): Use it.
* soft-fp/double.h (DFtype): Define.
(union _FP_UNION_D): Use it.
* soft-fp/extended.h (XFtype): Define.
(union _FP_UNION_E): Use it.
* soft-fp/quad.h (TFtype): Define.
(union _FP_UNION_Q): Use it.
* soft-fp/soft-fp.h: Add _LIBC conditionals.
(SI_BITS, DI_BITS): Define.
* soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for
X##_c.
(_FP_CMP_EQ): Use parentheses for && inside ||.
(_FP_TO_INT): Use statement expressions in conditional controlling
constant shift.
(_FP_FROM_INT): Likewise. Take unsigned type as argument.
* soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2,
_FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in
conditional controlling possibly constant shift.
(_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||.
* soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
__FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags.
* soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
* soft-fp/floatdidf.c: Pass unsigned type and macro for type size.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/fixdfdi.c: Pass macro for type size.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise.
* sysdeps/powerpc/soft-fp/q_itoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
* soft-fp/adddf3.c: Use typedefs for argument and return types.
* soft-fp/addsf3.c: Likewise.
* soft-fp/addtf3.c: Likewise.
* soft-fp/divdf3.c: Likewise.
* soft-fp/divsf3.c: Likewise.
* soft-fp/divtf3.c: Likewise.
* soft-fp/eqdf2.c: Likewise.
* soft-fp/eqsf2.c: Likewise.
* soft-fp/eqtf2.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/fixdfdi.c: Likewise.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* soft-fp/floatdidf.c: Likewise.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/gedf2.c: Likewise.
* soft-fp/gesf2.c: Likewise.
* soft-fp/getf2.c: Likewise.
* soft-fp/ledf2.c: Likewise.
* soft-fp/lesf2.c: Likewise.
* soft-fp/letf2.c: Likewise.
* soft-fp/muldf3.c: Likewise.
* soft-fp/mulsf3.c: Likewise.
* soft-fp/multf3.c: Likewise.
* soft-fp/negdf2.c: Likewise.
* soft-fp/negsf2.c: Likewise.
* soft-fp/negtf2.c: Likewise.
* soft-fp/sqrtdf2.c: Likewise.
* soft-fp/sqrtsf2.c: Likewise.
* soft-fp/sqrttf2.c: Likewise.
* soft-fp/subdf3.c: Likewise.
* soft-fp/subsf3.c: Likewise.
* soft-fp/subtf3.c: Likewise.
* soft-fp/truncdfsf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* soft-fp/unorddf2.c: Likewise.
* soft-fp/unordsf2.c: Likewise.
* soft-fp/unordtf2.c: Likewise.
2006-02-09 Joseph S. Myers <joseph@codesourcery.com>
* soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define.
(_FP_OVERFLOW_SEMIRAW): Likewise.
(_FP_CHECK_SIGNAN_SEMIRAW): Likewise.
(_FP_CHOOSENAN_SEMIRAW): Likewise.
(_FP_EXP_NORMAL): Likewise.
(_FP_PACK_SEMIRAW): Likewise.
(_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value.
(_FP_SUB): Likewise.
(_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID
exception for conversions where most negative representable
integer is correct truncated value, but do set INEXACT for such
conversions where appropriate. Don't always left-shift for
converting to a wider integer.
(_FP_FROM_INT): Rewrite to yield raw value. Correct shift for
integers with one more bits than (mantissa + guard) bits for the
floating point format. Don't use __FP_FRAC_SRS_1 for shifting
integers that may be wider than _FP_W_TYPE_SIZE.
(FP_CONV): Don't define.
(FP_EXTEND): Define.
(FP_TRUNC): Likewise.
* soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define.
(_FP_FRAC_CONV_1_1): Don't define.
(_FP_FRAC_COPY_1_1): Define.
* soft-fp/op-2.h (_FP_FRAC_SRST_2): Define.
(_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define.
(_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define.
* soft-fp/op-4.h (_FP_FRAC_SRST_4): Define.
(_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4.
(_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define.
(_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define.
(_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define.
(_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define.
* soft-fp/single.h (_FP_FRACTBITS_S): Define.
(_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S.
(_FP_WFRACXBITS_S): Likewise.
(_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define.
(FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define.
(FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define.
* soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define.
(FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define
(FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define.
* soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define.
(FP_UNPACK_EP): Correct typo.
(FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define.
(FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define.
* soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define.
(FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define.
(FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define.
* soft-fp/fixdfdi.c: Use unsigned type for result of conversion.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise.
* soft-fp/adddf3.c: Update for changed soft-fp interfaces.
* soft-fp/addsf3.c: Likewise.
* soft-fp/addtf3.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/fixdfdi.c: Likewise.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* soft-fp/floatdidf.c: Likewise.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/subdf3.c: Likewise.
* soft-fp/subsf3.c: Likewise.
* soft-fp/subtf3.c: Likewise.
* soft-fp/truncdfsf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* sysdeps/alpha/soft-fp/ots_add.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise.
* sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_sub.c: Likewise.
* sysdeps/powerpc/soft-fp/q_add.c: Likewise.
* sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_itoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtod.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtos.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtou.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise.
* sysdeps/powerpc/soft-fp/q_stoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_sub.c: Likewise.
* sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
2006-02-23 Roland McGrath <roland@redhat.com>
* include/libc-symbols.h: Fix comment typo.
From Peter Kjellerstedt <peter.kjellerstedt@axis.com>.
* sysdeps/unix/sysv/linux/i386/fchownat.c: Diddle code so that "fail"
label is always used.
[BZ #2172]
* bits/syslog-path.h: New file.
* misc/Makefile (headers): Add it.
* misc/sys/syslog.h: Include it.
(_PATH_LOG): Macro removed.
From Robert Millan <robertmh@gnu.org>.
* sysdeps/unix/sysv/linux/ftruncate64.c: Find generic implementation
in misc/, not posix/.
Reported by David S. Miller <davem@davemloft.net>.
2006-02-23 Jakub Jelinek <jakub@redhat.com>
* posix/sched_yield.c (__sched_yield): Add libc_hidden_def.
* sysdeps/mach/sched_yield.c (__sched_yield): Likewise.
2006-02-22 Roland McGrath <roland@redhat.com>
* po/libc.pot: Regenerated.
2006-02-22 Jakub Jelinek <jakub@redhat.com>
* nis/ypclnt.c (yperr_string, ypbinderr_string): Add N_()
around string literals.
2005-10-03 Jakub Jelinek <jakub@redhat.com>
* nscd/selinux.c (audit_init): Print error string in the failure
message.
2006-02-21 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CLONE_THREAD_FLAGS): Consolidate definitions.
* sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Update comment, remove
__THROW from epoll_wait, to match .../linux/sys/epoll.h file.
2006-02-03 Jakub Jelinek <jakub@redhat.com>
* manual/filesys.texi (futimes): Fix prototype.
2004-08-09 Paul Eggert <eggert@cs.ucla.edu>
[BZ #315]
* manual/memory.texi (Obstacks Data Alignment): The default
alignment is not 4: it is enough to hold any type of data.
Problem reported by Benno in
<http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
2005-11-15 Robert Millan <robertmh@gnu.org>
[BZ #2161]
* manual/llio.texi (read, write): Document EINVAL on unaligned access.
2006-02-21 Roland McGrath <roland@redhat.com>
* sysdeps/i386/i686/memset.S: Fix treatment of unaligned pointer.
Reported by John Zulauf <john.zulauf@amd.com>.
2004-11-23 Richard Sandiford <rsandifo@redhat.com>
* configure.in (libc_cv_gcc_dwarf2_unwind_info): Delete.
(HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove AC_DEFINEs.
* configure: Regenerate.
* config.h.in (HAVE_DWARF2_UNWIND_INFO{,_STATIC}): Remove undefs.
* elf/soinit.c: Don't include gccframe.h.
(__EH_FRAME_BEGIN__): Define unconditionally.
(__register_frame_info, __deregister_frame_info)
(__register_frame_info_bases, __deregister_frame_info_bases)
(__register_frame, __deregister_frame): Remove declarations.
(__libc_global_ctors, __libc_fini): Don't call registry functions.
* elf/sofini.c (__EH_FRAME_END__): Define unconditionally.
2006-01-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
[BZ #2178]
* sysdeps/mach/hurd/getsid.c (getsid): When parameter PID is zero,
use _hurd_pid instead.
2006-02-20 Richard Henderson <rth@redhat.com>
* sysdeps/alpha/soft-fp/Makefile (CPPFLAGS): Add soft-fp include
to math subdir.
* sysdeps/alpha/soft-fp/e_sqrtl.c: Don't use local-soft-fp.h.
(__ieee754_sqrtl): Add _round local variable.
* sysdeps/unix/sysv/linux/alpha/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/alpha/fxstatat.c: Fix hidden defs.
2006-02-20 Roland McGrath <roland@redhat.com>
* sysdeps/mips: Directory removed, saved in ports repository.
* sysdeps/unix/mips: Likewise.
* sysdeps/unix/sysv/linux/mips: Likewise.
* sysdeps/mach/mips: Likewise.
* sysdeps/mach/hurd/mips: Likewise.
* shlib-versions: Remove mips matches, now in ports fragment.
* sysdeps/unix/sysv/linux/kernel-features.h: Likewise.
* configure.in (machine): Likewise.
* configure: Regenerated.
* hurd/hurd/xattr.h: New file.
* hurd/xattr.c: New file.
* hurd/Makefile (routines): Add it.
* sysdeps/mach/hurd/fgetxattr.c: New file.
* sysdeps/mach/hurd/flistxattr.c: New file.
* sysdeps/mach/hurd/fremovexattr.c: New file.
* sysdeps/mach/hurd/fsetxattr.c: New file.
* sysdeps/mach/hurd/getxattr.c: New file.
* sysdeps/mach/hurd/lgetxattr.c: New file.
* sysdeps/mach/hurd/listxattr.c: New file.
* sysdeps/mach/hurd/lsetxattr.c: New file.
* sysdeps/mach/hurd/removexattr.c: New file.
* sysdeps/mach/hurd/setxattr.c: New file.
2006-02-15 Thomas Schwinge <tschwinge@gnu.org>
[BZ #2329]
* include/unistd.h (__getresuid, __getresgid, __setresuid)
(__setresgid): Fix argument name order in prototypes.
* posix/unistd.h (getresuid, getresgid, setresuid, setresgid):
Likewise.
* posix/getresuid.c (__getresuid): Fix argument order in definition.
* posix/getresgid.c (__getresgid): Likewise.
* posix/setresuid.c (__setresuid): Likewise.
* posix/setresgid.c (__setresgid): Likewise.
* sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise.
* sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise.
* sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise.
* sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise.
Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
2006-02-13 Mike Frysinger <vapier@gentoo.org>
[BZ #2380]
* string/tester.c (test_strnlen): New function.
(test_strchr): Call it.
(test_strncat): Test lengths where the sign bit is set.
(test_strncmp): Likewise.
2006-02-17 Jakub Jelinek <jakub@redhat.com>
* include/atomic.h (atomic_and, atomic_or): Define.

View File

@ -99,7 +99,20 @@ binfmt-subdir = aout
endif
# Complete path to sysdep dirs.
export full_config_sysdirs := $(addprefix $(..),$(config-sysdirs))
# `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.
+sysdep_dirs := $(sysdirs) $(foreach add-on,$(sysdeps-add-ons),\
$(firstword $(filter /%,$(add-on)) \
$(..)$(add-on)))
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
@ -113,16 +126,16 @@ $(common-objpfx)config.make: $(common-objpfx)config.status \
# 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,$(full_config_sysdirs),\
$(wildcard \
$(dir)/Implies) \
$(foreach dir,$(sysdirs),\
$(wildcard $(dir)/Implies) \
$(patsubst %.in,%,\
$(firstword $(wildcard \
$(addprefix $(dir)/,configure configure.in))))) \
$(patsubst %.in,%,\
$(foreach dir,$(add-ons),\
$(foreach add-on,$(add-ons),\
$(firstword $(wildcard \
$(addprefix $(..)$(dir)/,configure configure.in)))))
$(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; \
@ -632,11 +645,10 @@ endif # $(+cflags) == ""
# 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' will be defined by Makerules.
+includes = -I$(..)include \
$(patsubst %/,-I%,$(objpfx)) $(+sysdep-includes) \
$(patsubst %/,-I%,$(..)) $(libio-include) $(includes) -I. \
$(sysincludes)
+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.
@ -753,12 +765,10 @@ endif
move-if-change = $(SHELL) $(..)scripts/move-if-change
-include $(common-objpfx)sysd-dirs
ifeq ($(sysd-dirs-done),t)
-include $(common-objpfx)sysd-sorted
subdirs = $(sorted-subdirs)
endif
subdir-srcdirs = $(foreach dir,$(subdirs),\
$(firstword $($(dir)-srcdir) $(..)$(dir)))
ifeq (yes, $(build-shared))
@ -789,9 +799,8 @@ 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 $(patsubst %, $(..)%/shlib-versions,$(add-ons) \
$(config-sysdirs) \
$(subdirs))) \
$(wildcard $(+sysdep_dirs:=/shlib-versions) \
$(subdir-srcdirs:=/shlib-versions)) \
$(..)shlib-versions
soversions-default-setname = $(patsubst %, %,\
@ -891,81 +900,39 @@ 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. Only the $(binfmt-subdir) should always be kept at the
# end of the list.
# dependencies.
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
stdlib stdio-common libio malloc string wcsmbs time dirent \
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 $(add-ons) nss localedata timezone rt conform debug \
$(sysdep-subdirs) $(dlfcn) $(binfmt-subdir)
all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
# The mach and hurd subdirectories have many generated header files which
# much of the rest of the library depends on, so it is best to build them
# first (and mach before hurd, at that). The before-compile additions in
# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
# not to exist when making in other directories, but it will be slower that
# way with more somewhat expensive `make' invocations.
subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
$(filter-out mach hurd,$(subdirs))
crypt nss localedata timezone rt conform debug \
$(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
ifndef avoid-generated
all-Subdirs-files = $(wildcard $(config-sysdirs:%=$(..)%/Subdirs))
$(common-objpfx)sysd-dirs: $(common-objpfx)config.make $(all-Subdirs-files)
$(AWK) 'BEGIN { subdirs = ""; inhibit = "" }; \
/^#/ { next }; \
/^[^-]/ { subdirs = subdirs " " $$0 }; \
/^-/ { inhibit = inhibit " " substr($$0, 2) }; \
END { printf "sysdep-subdirs =%s\n", subdirs; \
printf "sysdep-inhibit-subdirs =%s\n", inhibit; \
print "sysd-dirs-done = t" }' \
$(patsubst $<,/dev/null,$^) > $@-tmp
mv -f $@-tmp $@
all-Depend-files = $(wildcard $(..)*/Depend)
$(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \
$(common-objpfx)sysd-dirs $(..)Makeconfig
{ { dirs='$(patsubst $(..)%/Depend,%,$(filter %/Depend,$^))'; \
for d in $$dirs; do \
while read on; do \
echo "depend $$d $$on"; \
done < $(..)$$d/Depend; \
done; \
for f in $(all-subdirs); do \
echo $$f; \
done; \
} | $(AWK) -f $< && \
echo sysd-sorted-done = t; \
} > $@-tmp
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 $(patsubst %,$(..)%/Makeconfig,\
$(config-sysdirs) $(add-ons)))
sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig))
ifneq (,$(sysdep-makeconfigs))
Makeconfig-doing-sysdep := $(sysdep-makeconfigs)
# Before each one, include ourselves again to do the bit below that
# will set `Makeconfig-add-on' in an add-on's Makeconfig fragment.
include $(foreach M,$(sysdep-makeconfigs),$(..)Makeconfig $M)
include $(sysdep-makeconfigs)
endif
endif # Makeconfig not yet included
# The whole body above didn't run when we are included as a subroutine
# of ourselves in the sysdep-makeconfigs include line. This bit runs.
ifneq (,$(Makeconfig-doing-sysdep))
sysdep-Makeconfig := $(firstword $(Makeconfig-doing-sysdep))
Makeconfig-doing-sysdep := $(filter-out $(sysdep-Makeconfig),\
$(Makeconfig-doing-sysdep))
Makeconfig-add-on := $(filter $(add-ons),$(patsubst $(..)%/Makeconfig,%,\
$(sysdep-Makeconfig)))
endif
# Local Variables:
# mode: makefile
# End:

View File

@ -50,6 +50,7 @@ endef
configure: configure.in aclocal.m4; $(autoconf-it)
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
%/preconfigure: %/preconfigure.in aclocal.m4; $(autoconf-it)
endif # $(AUTOCONF) = no
@ -202,7 +203,13 @@ all-subdirs-targets := $(foreach dir,$(subdirs),\
# The action for each of those is to cd into the directory and make the
# target there.
$(all-subdirs-targets):
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
$(MAKE) $(PARALLELMFLAGS) $(subdir-target-args) $(@F)
define subdir-target-args
subdir=$(@D)$(if $($(@D)-srcdir),\
-C $($(@D)-srcdir) ..=`pwd`/,\
-C $(@D) ..=../)
endef
.PHONY: $(+subdir_targets) $(all-subdirs-targets)
@ -353,17 +360,16 @@ files-for-dist := README FAQ INSTALL NOTES configure
tag-of-stem = glibc-$(subst .,_,$*)
# Add-ons in the main repository but distributed in their own tar files.
dist-separate = libidn linuxthreads
dist-separate = libidn
# Directories in each add-on.
dist-separate-libidn = libidn
dist-separate-linuxthreads = linuxthreads linuxthreads_db
glibc-%.tar $(dist-separate:%=glibc-%-%.tar): $(files-for-dist) \
$(foreach D,$(dist-separate),\
$D/configure)
@rm -fr glibc-$*
$(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(add-ons)) \
$(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(sysdeps-add-ons)) \
-name configure`
cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc
# Touch all the configure scripts going into the tarball since cvs export

View File

@ -56,22 +56,6 @@ ifndef +included-Makeconfig
include $(..)Makeconfig
endif
# `configure' writes a definition of `config-sysdirs' in `config.make'.
sysdirs = $(strip $(full_config_sysdirs))
+sysdir_pfx = $(common-objpfx)
export sysdirs := $(sysdirs)
+sysdep_dirs := $(full_config_sysdirs)
ifdef objdir
+sysdep_dirs := $(objdir) $(+sysdep_dirs)
endif
# Add -I switches to get the right sysdep directories.
# `+includes' in Makeconfig references $(+sysdep-includes).
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
# This variable is used in ``include $(o-iterator)'' after defining
# $(o-iterator-doit) to produce some desired rule using $o for the object
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
@ -94,7 +78,7 @@ vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
# being included individually by a subdir makefile (hurd/Makefile needs this).
in-Makerules := yes
sysdep-makefiles := $(wildcard $(full_config_sysdirs:=/Makefile))
sysdep-makefiles := $(wildcard $(sysdirs:=/Makefile))
ifneq (,$(sysdep-makefiles))
include $(sysdep-makefiles)
endif
@ -165,7 +149,7 @@ ifndef subdir
$(common-objpfx)%.make: $(..)%.make.c $(..)Makerules $(common-before-compile)
rm -f $@T $@.dT
(echo '# Generated from $*.make.c by Makerules.'; \
$(CC) $(CFLAGS) $(CPPFLAGS) -E $< \
$(CC) $(CFLAGS) $(CPPFLAGS) -E -DASSEMBLER $< \
-MD -MP -MT '$$(common-objpfx)$*.make' -MF $@.dT \
| sed -n '/@@@/{s/@@@[ ]*\(.*\)@@@/\1/;s/[ ]*$$//p;}'; \
echo 'common-generated += $(@F)'; \
@ -229,20 +213,22 @@ endef
close-check-inhibit-asm = ;; esac ;
endif
-include $(+sysdir_pfx)sysd-rules
-include $(common-objpfx)sysd-rules
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
# The value of $(+sysdep_dirs) the sysd-rules was computed for
# differs from the one we are using now. So force a rebuild of sysd-rules.
sysd-rules-force = FORCE
FORCE:
endif
$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
$(wildcard $(foreach dir,$(sysdirs),\
$(dir)/Makefile))\
$(sysd-rules-force)
$(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
$(sysdep-makefiles) $(sysd-rules-force)
-@rm -f $@T
(echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
for dir in $(config-sysdirs:%='$$(..)%'); do \
for dir in $(config-sysdirs); do \
case "$$dir" in \
/*) ;; \
*) dir="\$$(..)$$dir" ;; \
esac; \
for o in $(all-object-suffixes); do \
$(open-check-inhibit-asm) \
echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
@ -340,7 +326,7 @@ postclean-generated += sysd-versions Versions.all abi-versions.h \
Versions.def.v.i Versions.def.v Versions.v.i Versions.v
ifndef avoid-generated
ifneq ($(sysd-versions-subdirs),$(all-subdirs) $(config-sysdirs))
ifneq ($(sysd-versions-subdirs),$(sorted-subdirs) $(config-sysdirs))
sysd-versions-force = FORCE
FORCE:
endif
@ -358,14 +344,14 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
} | LC_ALL=C $(AWK) -f $< > $@T
mv -f $@T $@
# See %.v/%.v.i implicit rules in Makeconfig.
$(common-objpfx)Versions.v.i: $(wildcard $(all-subdirs:%=$(..)%/Versions)) \
$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
$(wildcard $(sysdirs:%=%/Versions)) \
$(common-objpfx)abi-versions.h \
$(sysd-versions-force)
$(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
$(common-objpfx)Versions.v \
$(..)scripts/versions.awk
( echo 'sysd-versions-subdirs = $(all-subdirs) $(config-sysdirs)' ; \
( echo 'sysd-versions-subdirs = $(subdirs) $(config-sysdirs)' ; \
cat $(word 2,$^) \
| LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
-v move_if_change='$(move-if-change)' \
@ -1301,18 +1287,12 @@ endif
endif
# There's no good place to put this - here will do.
ifeq ($(filter %posix, $(sysdirs)),)
L_tmpnam = 1
TMP_MAX = 0
L_ctermid = 1
L_cuserid = 1
else
L_tmpnam = 20
TMP_MAX = 238328
L_ctermid = 9
L_cuserid = 9
endif
# These will have been set by sysdeps/posix/Makefile.
L_tmpnam ?= 1
TMP_MAX ?= 0
L_ctermid ?= 1
L_cuserid ?= 1
stdio_lim = $(common-objpfx)bits/stdio_lim.h
$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @:

4
Rules
View File

@ -27,7 +27,7 @@ endif
all: # Don't let the default goal come from Makeconfig.
include ../Makeconfig
include $(firstword $(..) ../)Makeconfig
ifndef subdir
Each subdirectory makefile must define the `subdir' variable.
@ -65,7 +65,7 @@ endif
# See below. This must be set before Makerules processes it.
before-compile += $(common-objpfx)bits/stdio_lim.h
include ../Makerules
include $(..)Makerules
.PHONY: subdir_lib
subdir_lib: lib-noranlib

View File

@ -1,6 +0,0 @@
*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
*.gz *.Z *.tar *.tgz
=*
TODO COPYING* AUTHORS copyr-* copying.*
glibc-*
distinfo

View File

@ -1,55 +0,0 @@
# Copyright (C) 1994, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
#
# 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.
subdir := bare
bare-routines := brdinit console strtsupp
routines = $(bare-routines)
elided-routines = $(bare-routines)
extra-objs = $(bare-routines:%=%.o)
install-lib = lib$(config-vendor).a
include ../Rules
#
# For bare targets, the $(config-vendor) is the name of the board.
# We will place the board dependent code ONLY in a library which
# is board dependent. This way many target boards can share a
# single libc.a. To resolve all symbols and successfully link
# a program, the application must link against libc.a and libMY_TARGET.a.
# For example, the target specific library for the Motorola MVME135
# board will be named libmvme135.a. To link a program for the
# MVME135, one must link against -lc and -lmvme135.
#
lib: $(objpfx)lib$(config-vendor).a
$(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o)
# This library is small enough that it's simplest to recreate the archive
# from scratch each time.
rm -f $@
ifdef objdir
cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%)
else
$(AR) cq$(verbose) $@ $^
endif
$(RANLIB) $@

View File

@ -1,28 +0,0 @@
/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
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. */
#include <standalone.h>
/* This file is only required when a "bare" board is configured. */
/* Start Support Routines
The start code for some CPUs (e.g. i386) require target dependent
support. For more info, consult the start file for your CPU. */

View File

@ -1,4 +1,4 @@
/* Private macros for accessing __jmp_buf contents. HPPA version.
/* <bits/syslog-path.h> -- _PATH_LOG definition
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@ -17,4 +17,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#define JB_SP (76/4)
#ifndef _SYS_SYSLOG_H
# error "Never include this file directly. Use <sys/syslog.h> instead"
#endif
#ifndef _BITS_SYSLOG_PATH_H
#define _BITS_SYSLOG_PATH_H 1
#define _PATH_LOG "/dev/log"
#endif /* bits/syslog-path.h */

View File

@ -89,13 +89,6 @@
/* Define if static NSS modules are wanted. */
#undef DO_STATIC_NSS
/* Define if gcc uses DWARF2 unwind information for exception support. */
#undef HAVE_DWARF2_UNWIND_INFO
/* Define if gcc uses DWARF2 unwind information for exception support
with static variable. */
#undef HAVE_DWARF2_UNWIND_INFO_STATIC
/* Define if the compiler supports __builtin_expect. */
#undef HAVE_BUILTIN_EXPECT

View File

@ -88,6 +88,8 @@ build-omitfp = @omitfp@
build-bounded = @bounded@
build-static-nss = @static_nss@
add-ons = @add_ons@
add-on-subdirs = @add_on_subdirs@
sysdeps-add-ons = @sysdeps_add_ons@
cross-compiling = @cross_compiling@
force-install = @force_install@

361
configure vendored
View File

@ -313,7 +313,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine submachine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -891,7 +891,6 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gmp=DIRECTORY find GMP source code in DIRECTORY (not needed)
--with-gd=DIR find libgd include dir and library with prefix DIR
--with-gd-include=DIR find libgd include files in DIR
--with-gd-lib=DIR find libgd library files in DIR
@ -1406,22 +1405,6 @@ fi
# This will get text that should go into config.make.
config_vars=
# Check for a --with-gmp argument and set gmp-srcdir in config.make.
# Check whether --with-gmp or --without-gmp was given.
if test "${with_gmp+set}" = set; then
withval="$with_gmp"
case "$with_gmp" in
yes) { { echo "$as_me:$LINENO: error: --with-gmp requires an argument; use --with-gmp=DIRECTORY" >&5
echo "$as_me: error: --with-gmp requires an argument; use --with-gmp=DIRECTORY" >&2;}
{ (exit 1); exit 1; }; } ;;
''|no) ;;
*) config_vars="$config_vars
gmp-srcdir = $withval" ;;
esac
fi;
# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
# Check whether --with-gd or --without-gd was given.
@ -1618,15 +1601,9 @@ fi
# Check whether --enable-add-ons or --disable-add-ons was given.
if test "${enable_add_ons+set}" = set; then
enableval="$enable_add_ons"
case "$enableval" in
yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
add_ons_automatic=yes
test "$add_ons" = "*" && add_ons= ;;
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`
add_ons_automatic=no ;;
esac
else
add_ons= add_ons_automatic=no
enable_add_ons=yes
fi;
@ -1844,7 +1821,7 @@ echo "$as_me: error: --with-cpu requires an argument" >&2;}
fi;
# An add-on can set this when it the tuple to disable the sanity check below.
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@ -1852,6 +1829,18 @@ libc_config_ok=no
subdirs="$subdirs "
case "$enable_add_ons" in
''|no) add_ons= ;;
yes|'*')
add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
sed 's@/[^/]*$@@' | sort | uniq`
add_ons_automatic=yes
;;
*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
add_ons_automatic=no ;;
esac
configured_add_ons=
add_ons_sfx=
add_ons_pfx=
if test x"$add_ons" != x; then
@ -1885,13 +1874,6 @@ echo "$as_me: error:
{ (exit 1); exit 1; }; }
;;
esac
# Test whether such a subdir really exists.
test -d $srcdir/$f || {
{ { echo "$as_me:$LINENO: error: add-on directory \"$f\" does not exist" >&5
echo "$as_me: error: add-on directory \"$f\" does not exist" >&2;}
{ (exit 1); exit 1; }; }
}
done
# Now source each add-on's configure fragment.
@ -1901,19 +1883,81 @@ echo "$as_me: error: add-on directory \"$f\" does not exist" >&2;}
# whether it goes into the list to be actually used in the build.
use_add_ons=
for libc_add_on in $add_ons; do
libc_add_on_frag=$srcdir/$libc_add_on/configure
if test -r $libc_add_on_frag; then
echo "$as_me:$LINENO: result: running configure fragment for add-on $libc_add_on" >&5
echo "${ECHO_T}running configure fragment for add-on $libc_add_on" >&6
. $libc_add_on_frag
else
{ echo "$as_me:$LINENO: WARNING: add-on fragment $libc_add_on_frag missing" >&5
echo "$as_me: WARNING: add-on fragment $libc_add_on_frag missing" >&2;}
# Test whether such a directory really exists.
# It can be absolute, or relative to $srcdir, or relative to the build dir.
case "$libc_add_on" in
/*)
libc_add_on_srcdir=$libc_add_on
;;
*)
test -d "$srcdir/$libc_add_on" || {
if test -d "$libc_add_on"; then
libc_add_on="`pwd`/$libc_add_on"
else
{ { echo "$as_me:$LINENO: error: add-on directory \"$libc_add_on\" does not exist" >&5
echo "$as_me: error: add-on directory \"$libc_add_on\" does not exist" >&2;}
{ (exit 1); exit 1; }; }
fi
}
libc_add_on_srcdir=$srcdir/$libc_add_on
;;
esac
libc_add_on_frag=$libc_add_on_srcdir/configure
libc_add_on_canonical=
if test -r "$libc_add_on_frag"; then
{ echo "$as_me:$LINENO: running configure fragment for add-on $libc_add_on" >&5
echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;}
libc_add_on_canonical=unknown
libc_add_on_subdirs=
. "$libc_add_on_frag"
test -z "$libc_add_on" || {
configured_add_ons="$configured_add_ons $libc_add_on"
if test "x$libc_add_on_canonical" = xunknown; then
{ { echo "$as_me:$LINENO: error: fragment must set \$libc_add_on_canonical" >&5
echo "$as_me: error: fragment must set \$libc_add_on_canonical" >&2;}
{ (exit 1); exit 1; }; }
fi
for d in $libc_add_on_subdirs; do
case "$libc_add_on" in
/*) subdir_srcdir="$libc_add_on" ;;
*) subdir_srcdir="\$(..)$libc_add_on" ;;
esac
case "$d" in
.)
d="${libc_add_on_canonical:-$libc_add_on}"
;;
/*)
subdir_srcdir="$d"
;;
*)
subdir_srcdir="$subdir_srcdir/$d"
;;
esac
d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
add_on_subdirs="$add_on_subdirs $d"
test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
$d-srcdir = $subdir_srcdir"
done
}
fi
if test -n "$libc_add_on"; then
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
echo "$as_me:$LINENO: checking add-on $libc_add_on for preconfigure fragments" >&5
echo $ECHO_N "checking add-on $libc_add_on for preconfigure fragments... $ECHO_C" >&6
for frag in $frags; do
name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&6
. "$frag"
done
echo "$as_me:$LINENO: result: " >&5
echo "${ECHO_T}" >&6
fi
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
add_ons_sfx="$add_ons_sfx /$libc_add_on"
test -z "$libc_add_on_canonical" ||
add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
fi
done
# Use echo to strip excess whitespace.
@ -1922,6 +1966,7 @@ fi
###
### I put this here to prevent those annoying emails from people who cannot
### read and try to compile glibc on unsupported platforms. --drepper
@ -1954,41 +1999,10 @@ a29k | am29000) base_machine=a29k machine=a29k ;;
alpha*) base_machine=alpha machine=alpha/$machine ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
hppa*) base_machine=hppa machine=hppa/hppa1.1 ;;
i[34567]86) base_machine=i386 machine=i386/$machine ;;
ia64) base_machine=ia64 machine=ia64 ;;
m680?0) base_machine=m68k machine=m68k/$machine ;;
m68k) base_machine=m68k machine=m68k/m68020 ;;
m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64
case "$CC $CFLAGS $CPPFLAGS " in
*" -mabi=n32 "*) mips_cc_abi=n32 ;;
*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
*) mips_cc_abi=default ;;
esac
case $config_os in
*abin32*) mips_config_abi=n32 ;;
*abi64*|*abin64*) mips_config_abi=64 ;;
*abi32*|*abio32*) mips_config_abi=32 ;;
*) mips_config_abi=$mips_cc_abi ;;
esac
case $mips_config_abi in
default) machine=mips/mips64/n32 mips_config_abi=n32 ;;
n32) machine=mips/mips64/n32 ;;
64) machine=mips/mips64/n64 ;;
32) machine=mips/mips32/kern64 ;;
esac
machine=$machine/$config_machine
if test $mips_config_abi != $mips_cc_abi; then
# This won't make it to config.make, but we want to
# set this in case configure tests depend on it.
CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
fi
;;
mips*) base_machine=mips machine=mips/mips32/$machine ;;
powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
s390) base_machine=s390 machine=s390/s390-32 ;;
@ -2002,7 +2016,7 @@ sparcv8 | supersparc | hypersparc)
sparcv8plus | sparcv8plusa | sparcv9)
base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
sparcv8plusb | sparcv9b)
base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
sparc64)
base_machine=sparc machine=sparc/sparc64 ;;
sparc64b)
@ -2092,8 +2106,8 @@ done
# Find what sysdep directories exist.
sysnames_add_ons=
sysnames=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for b in $base ''; do
for m0 in $mach ''; do
for v in /$vendor ''; do
@ -2103,17 +2117,27 @@ for b in $base ''; do
for m in $mach ''; do
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test "$m0$m0sub$b$v$o$m$msub"; then
if test -n "$m0$m0sub$b$v$o$m$msub"; then
try_srcdir="${srcdir}/"
case "$d" in
/*) try_srcdir= ;;
esac
try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
test -n "$enable_debug_configure" &&
echo "$0 DEBUG: try $try" >&2
if test -d $srcdir/$try; then
if test -d "$try_srcdir$try"; then
sysnames="$sysnames $try"
{ test -n "$o" || test -n "$b"; } && os_used=t
{ test -n "$m" || test -n "$m0"; } && machine_used=t
case x${m0:-$m} in
x*/$submachine) submachine_used=t ;;
esac
if test -n "$d"; then
case "$sysnames_add_ons" in
*" $d "*) ;;
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
esac
fi
fi
fi
done
@ -2123,19 +2147,6 @@ for b in $base ''; do
done
done
done
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test -n "$d" && test "$d" != "$a"; then
try="${d}sysdeps/generic${a}"
test -n "$enable_debug_configure" &&
echo "$0 DEBUG: try $try" >&2
if test -d $srcdir/$try; then
sysnames="$sysnames $try"
fi
fi
done
done
IFS="$ac_save_ifs"
if test -z "$os_used" && test "$os" != none; then
{ { echo "$as_me:$LINENO: error: Operating system $os is not supported." >&5
@ -2222,6 +2233,10 @@ while test $# -gt 0; do
then
implied="$implied $try"
found=yes
case "$sysnames_add_ons" in
*" $d "*) ;;
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
esac
fi
done
if test $found = no; then
@ -2261,6 +2276,65 @@ sysnames="$names $default_sysnames"
echo "$as_me:$LINENO: result: $default_sysnames" >&5
echo "${ECHO_T}$default_sysnames" >&6
# Collect the list of add-ons that supply partial sysdeps trees.
sysdeps_add_ons=
for add_on in $add_ons; do
case "$add_on" in
/*) xsrcdir= ;;
*) xsrcdir="$srcdir/" ;;
esac
test -d "$xsrcdir$add_on/sysdeps" || {
case "$configured_add_ons " in
*" $add_on "*) ;;
*|'')
{ { echo "$as_me:$LINENO: error: add-on $add_on has no configure fragment or sysdeps tree" >&5
echo "$as_me: error: add-on $add_on has no configure fragment or sysdeps tree" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
continue
}
sysdeps_add_ons="$sysdeps_add_ons $add_on"
case "$sysnames_add_ons" in
*" $add_on/ "*) ;;
*|'')
{ echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no sysdeps directories" >&5
echo "$as_me: WARNING: add-on $add_on contributed no sysdeps directories" >&2;}
continue ;;
esac
found=no
for d in $sysnames; do
case "$d" in
$add_on/sysdeps/*) ;;
*) continue ;;
esac
(cd "$xsrcdir$d" && for f in *[!~]; do
case "$f" in
sys|bits)
for ff in $f/*.h; do
test -d "$ff" || { test -e "$ff" && exit 88; }
done
;;
*)
test -d "$f" || { test -e "$f" && exit 88; }
;;
esac
done)
if test $? -eq 88; then
found=yes
break
fi
done
if test $found = no; then
{ echo "$as_me:$LINENO: WARNING: add-on $add_on contributed no useful sysdeps directories" >&5
echo "$as_me: WARNING: add-on $add_on contributed no useful sysdeps directories" >&2;}
fi
done
### Locate tools.
@ -6295,102 +6369,6 @@ _ACEOF
fi
fi
echo "$as_me:$LINENO: checking for DWARF2 unwind info support" >&5
echo $ECHO_N "checking for DWARF2 unwind info support... $ECHO_C" >&6
if test "${libc_cv_gcc_dwarf2_unwind_info+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.c <<EOF
#line $LINENO "configure"
static char *__EH_FRAME_BEGIN__;
_start ()
{
#ifdef CHECK__register_frame
__register_frame (__EH_FRAME_BEGIN__);
__deregister_frame (__EH_FRAME_BEGIN__);
#endif
#ifdef CHECK__register_frame_info
__register_frame_info (__EH_FRAME_BEGIN__);
__deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
}
int __eh_pc;
__throw () {}
/* FIXME: this is fragile. */
malloc () {}
strcmp () {}
strlen () {}
memcpy () {}
memset () {}
free () {}
abort () {}
__bzero () {}
dl_iterate_phdr () {}
EOF
libc_unwind_check="${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame_info \
$LDFLAGS \
-nostdlib -nostartfiles -o conftest conftest.c \
-lgcc"
# Some platforms' specs put -lgcc first. The second one doesn't hurt.
if { ac_try='$libc_unwind_check >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } ||
{ ac_try='$libc_unwind_check -lgcc_eh -lgcc >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
then
if $libc_unwind_check -v 2>&1 >/dev/null \
| grep -- --eh-frame-hdr 2>&1 >/dev/null; then
libc_cv_gcc_dwarf2_unwind_info=no_registry_needed
else
libc_cv_gcc_dwarf2_unwind_info=static
fi
else
libc_cv_gcc_dwarf2_unwind_info=no
fi
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame
$LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
libc_cv_gcc_dwarf2_unwind_info=yes
else
libc_cv_gcc_dwarf2_unwind_info=no
fi
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_gcc_dwarf2_unwind_info" >&5
echo "${ECHO_T}$libc_cv_gcc_dwarf2_unwind_info" >&6
case $libc_cv_gcc_dwarf2_unwind_info in
yes)
cat >>confdefs.h <<\_ACEOF
#define HAVE_DWARF2_UNWIND_INFO 1
_ACEOF
;;
static)
cat >>confdefs.h <<\_ACEOF
#define HAVE_DWARF2_UNWIND_INFO 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_DWARF2_UNWIND_INFO_STATIC 1
_ACEOF
;;
esac
echo "$as_me:$LINENO: checking for __builtin_expect" >&5
echo $ECHO_N "checking for __builtin_expect... $ECHO_C" >&6
if test "${libc_cv_gcc_builtin_expect+set}" = set; then
@ -7688,13 +7666,6 @@ if test $shared = default; then
shared=$elf
fi
if test x"$libc_cv_idn" = xyes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBIDN 1
_ACEOF
fi
echo "$as_me:$LINENO: checking whether -fPIC is default" >&5
echo $ECHO_N "checking whether -fPIC is default... $ECHO_C" >&6
if test "${pic_default+set}" = set; then
@ -8382,9 +8353,11 @@ s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@subdirs@,$subdirs,;t t
s,@add_ons@,$add_ons,;t t
s,@add_on_subdirs@,$add_on_subdirs,;t t
s,@base_machine@,$base_machine,;t t
s,@submachine@,$submachine,;t t
s,@sysnames@,$sysnames,;t t
s,@sysdeps_add_ons@,$sysdeps_add_ons,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t

View File

@ -13,18 +13,6 @@ fi
# This will get text that should go into config.make.
config_vars=
# Check for a --with-gmp argument and set gmp-srcdir in config.make.
AC_ARG_WITH([gmp],
AC_HELP_STRING([--with-gmp=DIRECTORY],
[find GMP source code in DIRECTORY (not needed)]),
[
case "$with_gmp" in
yes) AC_MSG_ERROR([--with-gmp requires an argument; use --with-gmp=DIRECTORY]) ;;
''|no) ;;
*) config_vars="$config_vars
gmp-srcdir = $withval" ;;
esac
])
# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
AC_ARG_WITH([gd],
AC_HELP_STRING([--with-gd=DIR],
@ -186,15 +174,9 @@ fi
dnl Generic infrastructure for drop-in additions to libc.
AC_ARG_ENABLE([add-ons],
AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
[configure and build add-ons in DIR1,DIR2,... search for add-ons if no parameter given]),
[case "$enableval" in
yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
add_ons_automatic=yes
test "$add_ons" = "*" && add_ons= ;;
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`
add_ons_automatic=no ;;
esac],
[add_ons= add_ons_automatic=no])
[configure and build add-ons in DIR1,DIR2,...
search for add-ons if no parameter given]),
, [enable_add_ons=yes])
dnl Let the user avoid using TLS. Don't know why but...
AC_ARG_WITH([tls],
@ -344,7 +326,7 @@ AC_ARG_WITH([cpu],
])
# An add-on can set this when it the tuple to disable the sanity check below.
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
dnl Having this here, though empty, makes sure that if add-ons' fragments
@ -352,6 +334,18 @@ dnl do AC_CONFIG_SUBDIRS([some-dir]), which just sets $subdirs, then
dnl our AC_OUTPUT will actually use it.
AC_CONFIG_SUBDIRS()
case "$enable_add_ons" in
''|no) add_ons= ;;
yes|'*')
add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
sed 's@/[[^/]]*$@@' | sort | uniq`
add_ons_automatic=yes
;;
*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
add_ons_automatic=no ;;
esac
configured_add_ons=
add_ons_sfx=
add_ons_pfx=
if test x"$add_ons" != x; then
@ -373,11 +367,6 @@ if test x"$add_ons" != x; then
*** \`localedata' add-on.])
;;
esac
# Test whether such a subdir really exists.
test -d $srcdir/$f || {
AC_MSG_ERROR(add-on directory \"$f\" does not exist)
}
done
# Now source each add-on's configure fragment.
@ -387,23 +376,81 @@ if test x"$add_ons" != x; then
# whether it goes into the list to be actually used in the build.
use_add_ons=
for libc_add_on in $add_ons; do
libc_add_on_frag=$srcdir/$libc_add_on/configure
if test -r $libc_add_on_frag; then
AC_MSG_RESULT(running configure fragment for add-on $libc_add_on)
. $libc_add_on_frag
else
AC_MSG_WARN(add-on fragment $libc_add_on_frag missing)
# Test whether such a directory really exists.
# It can be absolute, or relative to $srcdir, or relative to the build dir.
case "$libc_add_on" in
/*)
libc_add_on_srcdir=$libc_add_on
;;
*)
test -d "$srcdir/$libc_add_on" || {
if test -d "$libc_add_on"; then
libc_add_on="`pwd`/$libc_add_on"
else
AC_MSG_ERROR(add-on directory \"$libc_add_on\" does not exist)
fi
}
libc_add_on_srcdir=$srcdir/$libc_add_on
;;
esac
libc_add_on_frag=$libc_add_on_srcdir/configure
libc_add_on_canonical=
if test -r "$libc_add_on_frag"; then
AC_MSG_NOTICE(running configure fragment for add-on $libc_add_on)
libc_add_on_canonical=unknown
libc_add_on_subdirs=
. "$libc_add_on_frag"
test -z "$libc_add_on" || {
configured_add_ons="$configured_add_ons $libc_add_on"
if test "x$libc_add_on_canonical" = xunknown; then
AC_MSG_ERROR(fragment must set \$libc_add_on_canonical)
fi
for d in $libc_add_on_subdirs; do
case "$libc_add_on" in
/*) subdir_srcdir="$libc_add_on" ;;
*) subdir_srcdir="\$(..)$libc_add_on" ;;
esac
case "$d" in
.)
d="${libc_add_on_canonical:-$libc_add_on}"
;;
/*)
subdir_srcdir="$d"
;;
*)
subdir_srcdir="$subdir_srcdir/$d"
;;
esac
d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'`
add_on_subdirs="$add_on_subdirs $d"
test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars
$d-srcdir = $subdir_srcdir"
done
}
fi
if test -n "$libc_add_on"; then
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
AC_MSG_CHECKING(add-on $libc_add_on for preconfigure fragments)
for frag in $frags; do
name=`echo "$frag" | sed 's@/[[^/]]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
. "$frag"
done
AC_MSG_RESULT()
fi
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
add_ons_sfx="$add_ons_sfx /$libc_add_on"
test -z "$libc_add_on_canonical" ||
add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical"
fi
done
# Use echo to strip excess whitespace.
add_ons="`echo $use_add_ons`"
fi
AC_SUBST(add_ons)
AC_SUBST(add_on_subdirs)
###
@ -440,41 +487,10 @@ a29k | am29000) base_machine=a29k machine=a29k ;;
alpha*) base_machine=alpha machine=alpha/$machine ;;
c3[012]) base_machine=cx0 machine=cx0/c30 ;;
c4[04]) base_machine=cx0 machine=cx0/c40 ;;
hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
hppa*) base_machine=hppa machine=hppa/hppa1.1 ;;
i[34567]86) base_machine=i386 machine=i386/$machine ;;
ia64) base_machine=ia64 machine=ia64 ;;
m680?0) base_machine=m68k machine=m68k/$machine ;;
m68k) base_machine=m68k machine=m68k/m68020 ;;
m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips64*) base_machine=mips64
case "$CC $CFLAGS $CPPFLAGS " in
*" -mabi=n32 "*) mips_cc_abi=n32 ;;
*" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
*" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
*) mips_cc_abi=default ;;
esac
case $config_os in
*abin32*) mips_config_abi=n32 ;;
*abi64*|*abin64*) mips_config_abi=64 ;;
*abi32*|*abio32*) mips_config_abi=32 ;;
*) mips_config_abi=$mips_cc_abi ;;
esac
case $mips_config_abi in
default) machine=mips/mips64/n32 mips_config_abi=n32 ;;
n32) machine=mips/mips64/n32 ;;
64) machine=mips/mips64/n64 ;;
32) machine=mips/mips32/kern64 ;;
esac
machine=$machine/$config_machine
if test $mips_config_abi != $mips_cc_abi; then
# This won't make it to config.make, but we want to
# set this in case configure tests depend on it.
CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
fi
;;
mips*) base_machine=mips machine=mips/mips32/$machine ;;
powerpc) base_machine=powerpc machine=powerpc/powerpc32 ;;
powerpc64) base_machine=powerpc machine=powerpc/powerpc64 ;;
s390) base_machine=s390 machine=s390/s390-32 ;;
@ -488,7 +504,7 @@ sparcv8 | supersparc | hypersparc)
sparcv8plus | sparcv8plusa | sparcv9)
base_machine=sparc machine=sparc/sparc32/sparcv9 ;;
sparcv8plusb | sparcv9b)
base_machine=sparc machine=sparc/sparc32/sparcv9b ;;
base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;;
sparc64)
base_machine=sparc machine=sparc/sparc64 ;;
sparc64b)
@ -579,8 +595,8 @@ dnl We are done with glob and regexp uses of [ and ]; return to autoconf.
changequote([,])dnl
# Find what sysdep directories exist.
sysnames_add_ons=
sysnames=
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for b in $base ''; do
for m0 in $mach ''; do
for v in /$vendor ''; do
@ -590,17 +606,27 @@ for b in $base ''; do
for m in $mach ''; do
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test "$m0$m0sub$b$v$o$m$msub"; then
if test -n "$m0$m0sub$b$v$o$m$msub"; then
try_srcdir="${srcdir}/"
case "$d" in
/*) try_srcdir= ;;
esac
try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
test -n "$enable_debug_configure" &&
echo "$0 [DEBUG]: try $try" >&2
if test -d $srcdir/$try; then
if test -d "$try_srcdir$try"; then
sysnames="$sysnames $try"
{ test -n "$o" || test -n "$b"; } && os_used=t
{ test -n "$m" || test -n "$m0"; } && machine_used=t
case x${m0:-$m} in
x*/$submachine) submachine_used=t ;;
esac
if test -n "$d"; then
case "$sysnames_add_ons" in
*" $d "*) ;;
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
esac
fi
fi
fi
done
@ -610,19 +636,6 @@ for b in $base ''; do
done
done
done
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test -n "$d" && test "$d" != "$a"; then
try="${d}sysdeps/generic${a}"
test -n "$enable_debug_configure" &&
echo "$0 DEBUG: try $try" >&2
if test -d $srcdir/$try; then
sysnames="$sysnames $try"
fi
fi
done
done
IFS="$ac_save_ifs"
if test -z "$os_used" && test "$os" != none; then
AC_MSG_ERROR(Operating system $os is not supported.)
@ -703,6 +716,10 @@ while test $# -gt 0; do
then
implied="$implied $try"
found=yes
case "$sysnames_add_ons" in
*" $d "*) ;;
*|'') sysnames_add_ons="$sysnames_add_ons $d" ;;
esac
fi
done
if test $found = no; then
@ -742,6 +759,61 @@ AC_SUBST(sysnames)
# The other names were emitted during the scan.
AC_MSG_RESULT($default_sysnames)
# Collect the list of add-ons that supply partial sysdeps trees.
sysdeps_add_ons=
for add_on in $add_ons; do
case "$add_on" in
/*) xsrcdir= ;;
*) xsrcdir="$srcdir/" ;;
esac
test -d "$xsrcdir$add_on/sysdeps" || {
case "$configured_add_ons " in
*" $add_on "*) ;;
*|'')
AC_MSG_ERROR(add-on $add_on has no configure fragment or sysdeps tree)
;;
esac
continue
}
sysdeps_add_ons="$sysdeps_add_ons $add_on"
case "$sysnames_add_ons" in
*" $add_on/ "*) ;;
*|'')
AC_MSG_WARN(add-on $add_on contributed no sysdeps directories)
continue ;;
esac
found=no
for d in $sysnames; do
case "$d" in
$add_on/sysdeps/*) ;;
*) continue ;;
esac
(cd "$xsrcdir$d" && for f in *[[!~]]; do
case "$f" in
sys|bits)
for ff in $f/*.h; do
test -d "$ff" || { test -e "$ff" && exit 88; }
done
;;
*)
test -d "$f" || { test -e "$f" && exit 88; }
;;
esac
done)
if test $? -eq 88; then
found=yes
break
fi
done
if test $found = no; then
AC_MSG_WARN(add-on $add_on contributed no useful sysdeps directories)
fi
done
AC_SUBST(sysdeps_add_ons)
### Locate tools.
@ -1753,71 +1825,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; then
fi
fi
AC_CACHE_CHECK(for DWARF2 unwind info support, libc_cv_gcc_dwarf2_unwind_info,
[cat > conftest.c <<EOF
#line $LINENO "configure"
static char *__EH_FRAME_BEGIN__;
_start ()
{
#ifdef CHECK__register_frame
__register_frame (__EH_FRAME_BEGIN__);
__deregister_frame (__EH_FRAME_BEGIN__);
#endif
#ifdef CHECK__register_frame_info
__register_frame_info (__EH_FRAME_BEGIN__);
__deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
}
int __eh_pc;
__throw () {}
/* FIXME: this is fragile. */
malloc () {}
strcmp () {}
strlen () {}
memcpy () {}
memset () {}
free () {}
abort () {}
__bzero () {}
dl_iterate_phdr () {}
EOF
libc_unwind_check="${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame_info \
$LDFLAGS \
-nostdlib -nostartfiles -o conftest conftest.c \
-lgcc"
# Some platforms' specs put -lgcc first. The second one doesn't hurt.
if AC_TRY_COMMAND([$libc_unwind_check >&AS_MESSAGE_LOG_FD]) ||
AC_TRY_COMMAND([$libc_unwind_check -lgcc_eh -lgcc >&AS_MESSAGE_LOG_FD])
then
if $libc_unwind_check -v 2>&1 >/dev/null \
| grep -- --eh-frame-hdr 2>&1 >/dev/null; then
libc_cv_gcc_dwarf2_unwind_info=no_registry_needed
else
libc_cv_gcc_dwarf2_unwind_info=static
fi
else
libc_cv_gcc_dwarf2_unwind_info=no
fi
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -DCHECK__register_frame
$LDFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc_dwarf2_unwind_info=yes
else
libc_cv_gcc_dwarf2_unwind_info=no
fi
fi
rm -f conftest*])
case $libc_cv_gcc_dwarf2_unwind_info in
yes)
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
;;
static)
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO)
AC_DEFINE(HAVE_DWARF2_UNWIND_INFO_STATIC)
;;
esac
dnl Check whether compiler understands __builtin_expect.
AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
[cat > conftest.c <<EOF
@ -2118,10 +2125,6 @@ if test $shared = default; then
shared=$elf
fi
if test x"$libc_cv_idn" = xyes; then
AC_DEFINE(HAVE_LIBIDN)
fi
AC_CACHE_CHECK([whether -fPIC is default], pic_default,
[pic_default=yes
cat > conftest.c <<EOF

View File

@ -1,5 +1,5 @@
# Makefile for csu code for GNU C library.
# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1995-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
@ -95,7 +95,7 @@ $(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
vpath initfini.c $(full_config_sysdirs)
vpath initfini.c $(sysdirs)
$(objpfx)initfini.s: initfini.c $(before-compile)
$(compile.c) -S $(CFLAGS-initfini.s) -finhibit-size-directive \
@ -200,8 +200,7 @@ $(objpfx)abi-tag.h: $(..)abi-tags
if test -r $@.new; then mv -f $@.new $@; \
else echo >&2 'This configuration not matched in $<'; exit 1; fi
all-Banner-files = $(wildcard $(addsuffix /Banner, \
$(addprefix $(..), $(subdirs))))
all-Banner-files = $(wildcard $(addsuffix /Banner,$(subdir-srcdirs)))
$(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
$(make-target-directory)
(case $(config-os) in \

View File

@ -1,5 +1,6 @@
/* User functions for run-time dynamic loading.
Copyright (C) 1995-1999,2000,2001,2003,2004 Free Software Foundation, Inc.
Copyright (C) 1995-1999,2000,2001,2003,2004,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
@ -135,6 +136,8 @@ enum
store the `struct link_map *' for HANDLE there. */
RTLD_DI_LINKMAP = 2,
RTLD_DI_CONFIGADDR = 3, /* Unsupported, defined by Solaris. */
/* Treat ARG as `Dl_serinfo *' (see below), and fill in to describe the
directories that will be searched for dependencies of this object.
RTLD_DI_SERINFOSIZE fills in just the `dls_cnt' and `dls_size'
@ -147,7 +150,21 @@ enum
expand $ORIGIN in this shared object's dependency file names. */
RTLD_DI_ORIGIN = 6,
RTLD_DI_CONFIGADDR = 3 /* Unsupported, defined by Solaris. */
RTLD_DI_PROFILENAME = 7, /* Unsupported, defined by Solaris. */
RTLD_DI_PROFILEOUT = 8, /* Unsupported, defined by Solaris. */
/* Treat ARG as `size_t *', and store there the TLS module ID
of this object's PT_TLS segment, as used in TLS relocations;
store zero if this object does not define a PT_TLS segment. */
RTLD_DI_TLS_MODID = 9,
/* Treat ARG as `void **', and store there a pointer to the calling
thread's TLS block corresponding to this object's PT_TLS segment.
Store a null pointer if this object does not define a PT_TLS
segment, or if the calling thread has not allocated a block for it. */
RTLD_DI_TLS_DATA = 10,
RTLD_DI_MAX = 10,
};

View File

@ -1,5 +1,5 @@
/* dlinfo -- Get information from the dynamic linker.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 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
@ -32,6 +32,10 @@ dlinfo (void *handle, int request, void *arg)
#else
# ifdef USE_TLS
# include <dl-tls.h>
# endif
struct dlinfo_args
{
ElfW(Addr) caller;
@ -90,6 +94,24 @@ RTLD_SELF used in code not dynamically loaded"));
case RTLD_DI_ORIGIN:
strcpy (args->arg, l->l_origin);
break;
case RTLD_DI_TLS_MODID:
*(size_t *) args->arg = 0;
#ifdef USE_TLS
*(size_t *) args->arg = l->l_tls_modid;
#endif
break;
case RTLD_DI_TLS_DATA:
{
void *data = NULL;
#ifdef USE_TLS
if (l->l_tls_modid != 0)
data = _dl_tls_get_addr_soft (l);
#endif
*(void **) args->arg = data;
break;
}
}
}

View File

@ -163,9 +163,11 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
neededtest3 neededtest4 unload2 lateglobal initfirst global \
restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 tst-align \
tst-align2 $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \
tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
tst-tls-dlinfo \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
unload3 unload4 unload5 unload6 tst-audit1 tst-global1 order2 \
tst-stackguard1
# reldep9
@ -700,6 +702,11 @@ $(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so
$(objpfx)tst-tls15: $(libdl)
$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so
$(objpfx)tst-tls-dlinfo: $(libdl)
$(objpfx)tst-tls-dlinfo.out: $(objpfx)tst-tlsmod2.so
CFLAGS-tst-align.c = $(stack-align-test-flags)
CFLAGS-tst-align2.c = $(stack-align-test-flags)
CFLAGS-tst-alignmod.c = $(stack-align-test-flags)

View File

@ -57,6 +57,7 @@ ld {
_dl_allocate_tls; _dl_deallocate_tls;
_dl_get_tls_static_info; _dl_allocate_tls_init;
_dl_tls_setup; _dl_rtld_di_serinfo;
_dl_tls_get_addr_soft;
_dl_make_stack_executable;
# Only here for gdb while a better method is developed.
_dl_debug_state;

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
static int
check_loaded_objects (const char **loaded)
{
@ -24,7 +26,7 @@ check_loaded_objects (const char **loaded)
printf(" Name\n");
printf(" --------------------------------------------------------\n");
for (lm = _r_debug.r_map; lm; lm = lm->l_next)
for (lm = MAPS; lm; lm = lm->l_next)
{
if (lm->l_name && lm->l_name[0])
printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount);

View File

@ -1,5 +1,6 @@
/* Communicate dynamic linker state to the debugger at runtime.
Copyright (C) 1996, 1998,2000,2002,2004,2005 Free Software Foundation, Inc.
Copyright (C) 1996, 1998,2000,2002,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
@ -19,6 +20,18 @@
#include <ldsodefs.h>
/* These are the members in the public `struct link_map' type.
Sanity check that the internal type and the public type match. */
#define VERIFY_MEMBER(name) \
(offsetof (struct link_map_public, name) == offsetof (struct link_map, name))
extern const int verify_link_map_members[(VERIFY_MEMBER (l_addr)
&& VERIFY_MEMBER (l_name)
&& VERIFY_MEMBER (l_ld)
&& VERIFY_MEMBER (l_next)
&& VERIFY_MEMBER (l_prev))
? 1 : -1];
/* This structure communicates dl state to the debugger. The debugger
normally finds it via the DT_DEBUG entry in the dynamic section, but in
a statically-linked program there is no dynamic section for the debugger
@ -46,7 +59,7 @@ _dl_debug_initialize (ElfW(Addr) ldbase, Lmid_t ns)
/* Tell the debugger where to find the map of loaded objects. */
r->r_version = 1 /* R_DEBUG_VERSION XXX */;
r->r_ldbase = ldbase ?: _r_debug.r_ldbase;
r->r_map = GL(dl_ns)[ns]._ns_loaded;
r->r_map = (void *) GL(dl_ns)[ns]._ns_loaded;
r->r_brk = (ElfW(Addr)) &_dl_debug_state;
}

View File

@ -1,5 +1,5 @@
/* Get loaded objects program headers.
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2001,2002,2003,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
@ -68,6 +68,13 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
info.dlpi_phnum = l->l_phnum;
info.dlpi_adds = GL(dl_load_adds);
info.dlpi_subs = GL(dl_load_adds) - nloaded;
info.dlpi_tls_modid = 0;
info.dlpi_tls_data = NULL;
#ifdef USE_TLS
info.dlpi_tls_modid = l->l_tls_modid;
if (info.dlpi_tls_modid != 0)
info.dlpi_tls_data = _dl_tls_get_addr_soft (l);
#endif
ret = callback (&info, sizeof (struct dl_phdr_info), data);
if (ret)
break;

View File

@ -1,5 +1,5 @@
/* Look up a symbol in a shared object loaded by `dlopen'.
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 1999,2000,2001,2002,2004,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
@ -103,7 +103,7 @@ RTLD_NEXT used in code not dynamically loaded"));
while (l->l_loader != NULL)
l = l->l_loader;
result = GLRO(dl_lookup_symbol_x) (name, l, &ref, l->l_local_scope,
result = GLRO(dl_lookup_symbol_x) (name, match, &ref, l->l_local_scope,
vers, 0, 0, match);
}
else

View File

@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. Generic version.
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
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
@ -735,9 +735,53 @@ __tls_get_addr (GET_ADDR_ARGS)
# endif
/* Look up the module's TLS block as for __tls_get_addr,
but never touch anything. Return null if it's not allocated yet. */
void *
internal_function
_dl_tls_get_addr_soft (struct link_map *l)
{
if (__builtin_expect (l->l_tls_modid == 0, 0))
/* This module has no TLS segment. */
return NULL;
dtv_t *dtv = THREAD_DTV ();
if (__builtin_expect (dtv[0].counter != GL(dl_tls_generation), 0))
{
/* This thread's DTV is not completely current,
but it might already cover this module. */
if (l->l_tls_modid >= dtv[-1].counter)
/* Nope. */
return NULL;
size_t idx = l->l_tls_modid;
struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
while (idx >= listp->len)
{
idx -= listp->len;
listp = listp->next;
}
/* We've reached the slot for this module.
If its generation counter is higher than the DTV's,
this thread does not know about this module yet. */
if (dtv[0].counter < listp->slotinfo[idx].gen)
return NULL;
}
void *data = dtv[l->l_tls_modid].pointer.val;
if (__builtin_expect (data == TLS_DTV_UNALLOCATED, 0))
/* The DTV is current, but this thread has not yet needed
to allocate this module's segment. */
data = NULL;
return data;
}
void
_dl_add_to_slotinfo (struct link_map *l)
_dl_add_to_slotinfo (struct link_map *l)
{
/* Now that we know the object is loaded successfully add
modules containing TLS data to the dtv info table. We

View File

@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-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
@ -45,7 +45,7 @@ do_lookup_x (const char *undef_name, unsigned long int hash,
map = list[i]->l_real;
/* Here come the extra test needed for `_dl_lookup_symbol_skip'. */
if (skip != NULL && map == skip)
if (map == skip)
continue;
/* Don't search the executable when resolving a copy reloc. */

View File

@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-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
@ -1250,14 +1250,15 @@ typedef struct
#define DT_SPARC_REGISTER 0x70000001
#define DT_SPARC_NUM 2
/* Bits present in AT_HWCAP, primarily for Sparc32. */
/* Bits present in AT_HWCAP on SPARC. */
#define HWCAP_SPARC_FLUSH 1 /* The cpu supports flush insn. */
#define HWCAP_SPARC_FLUSH 1 /* The CPU supports flush insn. */
#define HWCAP_SPARC_STBAR 2
#define HWCAP_SPARC_SWAP 4
#define HWCAP_SPARC_MULDIV 8
#define HWCAP_SPARC_V9 16 /* The cpu is v9, so v8plus is ok. */
#define HWCAP_SPARC_V9 16 /* The CPU is v9, so v8plus is ok. */
#define HWCAP_SPARC_ULTRA3 32
#define HWCAP_SPARC_BLKINIT 64 /* Sun4v with block-init/load-twin. */
/* MIPS R3000 specific definitions. */

View File

@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
Copyright (C) 1995-2001, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-2001, 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
@ -135,7 +135,6 @@ enum
la_symbind call. */
};
struct dl_phdr_info
{
ElfW(Addr) dlpi_addr;
@ -143,15 +142,24 @@ struct dl_phdr_info
const ElfW(Phdr) *dlpi_phdr;
ElfW(Half) dlpi_phnum;
/* Note: the next two members were introduced after the first
/* Note: Following members were introduced after the first
version of this structure was available. Check the SIZE
argument passed to the dl_iterate_phdr() callback to determine
whether or not they are provided. */
argument passed to the dl_iterate_phdr callback to determine
whether or not each later member is available. */
/* Incremented when a new object may have been added. */
unsigned long long int dlpi_adds;
/* Incremented when an object may have been removed. */
unsigned long long int dlpi_subs;
/* If there is a PT_TLS segment, its module ID as used in
TLS relocations, else zero. */
size_t dlpi_tls_modid;
/* The address of the calling thread's instance of this module's
PT_TLS segment, if it has one and it has been allocated
in the calling thread, otherwise a null pointer. */
void *dlpi_tls_data;
};
__BEGIN_DECLS

View File

@ -70,8 +70,10 @@ static const struct
#include <include/link.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
#define OUT \
for (map = _r_debug.r_map; map != NULL; map = map->l_next) \
for (map = MAPS; map != NULL; map = map->l_next) \
if (map->l_type == lt_loaded) \
printf ("name = \"%s\", direct_opencount = %d\n", \
map->l_name, (int) map->l_direct_opencount); \
@ -147,7 +149,7 @@ main (int argc, char *argv[])
{
/* In this case none of the objects above should be
present. */
for (map = _r_debug.r_map; map != NULL; map = map->l_next)
for (map = MAPS; map != NULL; map = map->l_next)
if (map->l_type == lt_loaded
&& (strstr (map->l_name, testobjs[0].name) != NULL
|| strstr (map->l_name, testobjs[1].name) != NULL
@ -180,7 +182,7 @@ main (int argc, char *argv[])
}
/* Check whether all files are unloaded. */
for (map = _r_debug.r_map; map != NULL; map = map->l_next)
for (map = MAPS; map != NULL; map = map->l_next)
if (map->l_type == lt_loaded)
{
printf ("name = \"%s\", direct_opencount = %d\n",

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
static int
check_loaded_objects (const char **loaded)
{
@ -24,7 +26,7 @@ check_loaded_objects (const char **loaded)
printf(" Name\n");
printf(" --------------------------------------------------------\n");
for (lm = _r_debug.r_map; lm; lm = lm->l_next)
for (lm = MAPS; lm; lm = lm->l_next)
{
if (lm->l_name && lm->l_name[0])
printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount);

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
static int
check_loaded_objects (const char **loaded)
{
@ -24,7 +26,7 @@ check_loaded_objects (const char **loaded)
printf(" Name\n");
printf(" --------------------------------------------------------\n");
for (lm = _r_debug.r_map; lm; lm = lm->l_next)
for (lm = MAPS; lm; lm = lm->l_next)
{
if (lm->l_name && lm->l_name[0])
printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount);

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
static int
check_loaded_objects (const char **loaded)
{
@ -24,7 +26,7 @@ check_loaded_objects (const char **loaded)
printf(" Name\n");
printf(" --------------------------------------------------------\n");
for (lm = _r_debug.r_map; lm; lm = lm->l_next)
for (lm = MAPS; lm; lm = lm->l_next)
{
if (lm->l_name && lm->l_name[0])
printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount);

View File

@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
static int
check_loaded_objects (const char **loaded)
{
@ -24,7 +26,7 @@ check_loaded_objects (const char **loaded)
printf(" Name\n");
printf(" --------------------------------------------------------\n");
for (lm = _r_debug.r_map; lm; lm = lm->l_next)
for (lm = MAPS; lm; lm = lm->l_next)
{
if (lm->l_name && lm->l_name[0])
printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount);

View File

@ -1,6 +1,6 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 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
@ -72,10 +72,16 @@ include $(patsubst %,../o-iterator.mk,$(object-suffixes-left))
# This is how we descend into each subdirectory. See below.
define rtld-subdir-make
$(MAKE) -C ../$* objdir=$(objdir) -f Makefile -f ../elf/rtld-Rules rtld-all \
$(MAKE) $(subdir-args) objdir=$(objdir) \
-f Makefile -f ../elf/rtld-Rules rtld-all \
rtld-modules='$(addprefix rtld-,$(rtld-$*))'
endef
# See subdir-target-args in ../Makefile for the model.
subdir-args = subdir=$*$(if $($*-srcdir),\
-C $($*-srcdir) ..=`pwd`/,\
-C $(..)$* ..=../)
FORCE:
else

View File

@ -8,12 +8,10 @@ static void (*const __DTOR_END__[1]) (void)
__attribute__ ((used, section (".dtors")))
= { 0 };
#ifdef HAVE_DWARF2_UNWIND_INFO
/* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
this would be the 'length' field in a real FDE. */
typedef unsigned int ui32 __attribute__ ((mode (SI)));
static ui32 __FRAME_END__[1]
__attribute__ ((used, section (".eh_frame")))
= { 0 };
#endif
static const ui32 __FRAME_END__[1]
__attribute__ ((used, section (".eh_frame")))
= { 0 };

View File

@ -6,10 +6,6 @@
#include <libc-internal.h>
#include <stdlib.h>
#ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
# include <gccframe.h>
#endif
static void (*const __CTOR_LIST__[1]) (void)
__attribute__ ((section (".ctors")))
= { (void (*) (void)) -1 };
@ -24,21 +20,9 @@ run_hooks (void (*const list[]) (void))
(**list) ();
}
#ifdef HAVE_DWARF2_UNWIND_INFO
static char __EH_FRAME_BEGIN__[]
__attribute__ ((section (".eh_frame")))
= { };
# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
extern void __register_frame_info (const void *, struct object *);
extern void __register_frame_info_bases (const void *, struct object *,
void *, void *);
extern void __deregister_frame_info (const void *);
extern void __deregister_frame_info_bases (const void *);
# else
extern void __register_frame (const void *);
extern void __deregister_frame (const void *);
# endif
#endif
static const char __EH_FRAME_BEGIN__[]
__attribute__ ((used, section (".eh_frame")))
= { };
/* This function will be called from _init in init-first.c. */
void
@ -46,33 +30,6 @@ __libc_global_ctors (void)
{
/* Call constructor functions. */
run_hooks (__CTOR_LIST__);
#ifdef HAVE_DWARF2_UNWIND_INFO
# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
{
static struct object ob;
# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA
void *tbase, *dbase;
# ifdef CRT_GET_RFIB_TEXT
CRT_GET_RFIB_TEXT (tbase);
# else
tbase = NULL;
# endif
# ifdef CRT_GET_RFIB_DATA
CRT_GET_RFIB_DATA (dbase);
# else
dbase = NULL;
# endif
__register_frame_info_bases (__EH_FRAME_BEGIN__, &ob, tbase, dbase);
# else
__register_frame_info (__EH_FRAME_BEGIN__, &ob);
# endif
}
# else
__register_frame (__EH_FRAME_BEGIN__);
# endif
#endif
}
@ -83,17 +40,6 @@ __libc_fini (void)
{
/* Call destructor functions. */
run_hooks (__DTOR_LIST__);
#ifdef HAVE_DWARF2_UNWIND_INFO
# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA
__deregister_frame_info_bases (__EH_FRAME_BEGIN__);
# else
__deregister_frame_info (__EH_FRAME_BEGIN__);
# endif
# else
__deregister_frame (__EH_FRAME_BEGIN__);
# endif
#endif
}
void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))

92
elf/tst-tls-dlinfo.c Normal file
View File

@ -0,0 +1,92 @@
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <tls.h>
#define TEST_FUNCTION do_test ()
static int
do_test (void)
{
#ifdef USE_TLS
static const char modname[] = "tst-tlsmod2.so";
int result = 0;
int *foop;
int (*fp) (int, int *);
void *h;
h = dlopen (modname, RTLD_LAZY);
if (h == NULL)
{
printf ("cannot open '%s': %s\n", modname, dlerror ());
exit (1);
}
fp = dlsym (h, "in_dso");
if (fp == NULL)
{
printf ("cannot get symbol 'in_dso': %s\n", dlerror ());
exit (1);
}
size_t modid = -1;
if (dlinfo (h, RTLD_DI_TLS_MODID, &modid))
{
printf ("dlinfo RTLD_DI_TLS_MODID failed: %s\n", dlerror ());
result = 1;
}
else
printf ("dlinfo says TLS module ID %Zu\n", modid);
void *block;
if (dlinfo (h, RTLD_DI_TLS_DATA, &block))
{
printf ("dlinfo RTLD_DI_TLS_DATA failed: %s\n", dlerror ());
result = 1;
}
else if (block != NULL)
{
printf ("dlinfo RTLD_DI_TLS_DATA says %p but should be unallocated\n",
block);
result = 1;
}
result |= fp (0, NULL);
foop = dlsym (h, "foo");
if (foop == NULL)
{
printf ("cannot get symbol 'foo' the second time: %s\n", dlerror ());
exit (1);
}
if (*foop != 16)
{
puts ("foo != 16");
result = 1;
}
/* Now the module's TLS block has been used and should appear. */
if (dlinfo (h, RTLD_DI_TLS_DATA, &block))
{
printf ("dlinfo RTLD_DI_TLS_DATA failed the second time: %s\n",
dlerror ());
result = 1;
}
else if (block != foop)
{
printf ("dlinfo RTLD_DI_TLS_DATA says %p but should be %p\n",
block, foop);
result = 1;
}
dlclose (h);
return result;
#else
return 0;
#endif
}
#include "../test-skeleton.c"

View File

@ -9,8 +9,10 @@
#include <stdio.h>
#include <stdlib.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
#define OUT \
for (map = _r_debug.r_map; map != NULL; map = map->l_next) \
for (map = MAPS; map != NULL; map = map->l_next) \
if (map->l_type == lt_loaded) \
printf ("name = \"%s\", direct_opencount = %d\n", \
map->l_name, (int) map->l_direct_opencount); \

View File

@ -6,8 +6,10 @@
#include <stdio.h>
#include <stdlib.h>
#define MAPS ((struct link_map *) _r_debug.r_map)
#define OUT \
for (map = _r_debug.r_map; map != NULL; map = map->l_next) \
for (map = MAPS; map != NULL; map = map->l_next) \
if (map->l_type == lt_loaded) \
printf ("name = \"%s\", direct_opencount = %d\n", \
map->l_name, (int) map->l_direct_opencount); \

View File

@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc4
fedora-sync-date := 2006-02-17 16:09 UTC
fedora-sync-tag := fedora-glibc-20060217T1609
fedora-sync-date := 2006-03-01 06:47 UTC
fedora-sync-tag := fedora-glibc-20060301T0647

View File

@ -1,4 +1,4 @@
%define glibcrelease 38
%define glibcrelease 39
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define prelinkarches noarch
%define xenarches i686 athlon
@ -1332,6 +1332,9 @@ rm -f *.filelist*
%endif
%changelog
* Wed Mar 1 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-39
- update from CVS
* Fri Feb 17 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-38
- update from CVS
- robust mutexes rewrite

9
hurd/Depend Normal file
View File

@ -0,0 +1,9 @@
# This file says that the mach subdirectory should appear before this one.
# The mach and hurd subdirectories have many generated header files which
# much of the rest of the library depends on, so it is best to build them
# first (and mach before hurd, at that). The before-compile additions in
# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
# not to exist when making in other directories, but it will be slower that
# way with more somewhat expensive `make' invocations.
mach

View File

@ -1,4 +1,4 @@
# Copyright (C) 1991,92,93,94,95,96,97,98,99,2001,2002
# Copyright (C) 1991,92,93,94,95,96,97,98,99,2001,2002,2004
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@ -60,7 +60,7 @@ routines = hurdstartup hurdinit \
vpprintf \
ports-get ports-set hurdports hurdmsg \
errno-loc \
$(sig) $(dtable) $(inlines) port-cleanup report-wait
$(sig) $(dtable) $(inlines) port-cleanup report-wait xattr
sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
thread-self thread-cancel intr-msg catch-signal

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
/* Access to extended attributes on files for GNU/Hurd.
Copyright (C) 2005 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
@ -16,24 +17,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* Default stack size. */
#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
#ifndef _HURD_XATTR_H
#define _HURD_XATTR_H 1
/* Required stack pointer alignment at beginning. */
#define STACK_ALIGN 16
#include <sys/xattr.h> /* This defines the XATTR_* flags. */
/* Minimal stack size after allocating thread descriptor and guard size. */
#define MINIMAL_REST_STACK 2048
/* Alignment requirement for TCB. */
#define TCB_ALIGNMENT 16
/* These are the internal versions of getxattr/setxattr/listxattr. */
extern error_t _hurd_xattr_get (io_t port, const char *name,
void *value, size_t *size);
extern error_t _hurd_xattr_set (io_t port, const char *name,
const void *value, size_t size, int flags);
extern error_t _hurd_xattr_remove (io_t port, const char *name);
extern error_t _hurd_xattr_list (io_t port, void *buffer, size_t *size);
/* Location of current stack frame. */
#define CURRENT_STACK_FRAME __builtin_frame_address (0)
/* XXX Until we have a better place keep the definitions here. */
#define __exit_thread_inline(val) \
INLINE_SYSCALL (exit, 1, (val))
#endif /* hurd/xattr.h */

201
hurd/xattr.c Normal file
View File

@ -0,0 +1,201 @@
/* Support for *xattr interfaces on GNU/Hurd.
Copyright (C) 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. */
#include <hurd.h>
#include <hurd/xattr.h>
#include <string.h>
#include <sys/mman.h>
/* Right now we support only a fixed set of xattr names for Hurd features.
There are no RPC interfaces for free-form xattr names and values.
Name Value encoding
---- ----- --------
gnu.author empty if st_author==st_uid
uid_t giving st_author value
gnu.translator empty if no passive translator
translator and arguments: "/hurd/foo\0arg1\0arg2\0"
*/
error_t
_hurd_xattr_get (io_t port, const char *name, void *value, size_t *size)
{
if (strncmp (name, "gnu.", 4))
return EOPNOTSUPP;
name += 4;
if (!strcmp (name, "author"))
{
struct stat64 st;
error_t err = __io_stat (port, &st);
if (err)
return err;
if (st.st_author == st.st_uid)
*size = 0;
else if (value)
{
if (*size < sizeof st.st_author)
return ERANGE;
memcpy (value, &st.st_author, sizeof st.st_author);
}
*size = sizeof st.st_author;
return 0;
}
if (!strcmp (name, "translator"))
{
char *buf = value;
size_t bufsz = value ? *size : 0;
error_t err = __file_get_translator (port, &buf, &bufsz);
if (err)
return err;
if (value != NULL && *size < bufsz)
{
if (buf != value)
munmap (buf, bufsz);
return -ERANGE;
}
if (buf != value && bufsz > 0)
{
if (value != NULL)
memcpy (value, buf, bufsz);
munmap (buf, bufsz);
}
*size = bufsz;
return 0;
}
return EOPNOTSUPP;
}
error_t
_hurd_xattr_set (io_t port, const char *name, const void *value, size_t size,
int flags)
{
if (strncmp (name, "gnu.", 4))
return EOPNOTSUPP;
name += 4;
if (!strcmp (name, "author"))
switch (size)
{
default:
return EINVAL;
case 0: /* "Clear" author by setting to st_uid. */
{
struct stat64 st;
error_t err = __io_stat (port, &st);
if (err)
return err;
if (st.st_author == st.st_uid)
{
/* Nothing to do. */
if (flags & XATTR_REPLACE)
return ENODATA;
return 0;
}
if (flags & XATTR_CREATE)
return EEXIST;
return __file_chauthor (port, st.st_uid);
}
case sizeof (uid_t): /* Set the author. */
{
uid_t id;
memcpy (&id, value, sizeof id);
if (flags & (XATTR_CREATE|XATTR_REPLACE))
{
struct stat64 st;
error_t err = __io_stat (port, &st);
if (err)
return err;
if (st.st_author == st.st_uid)
{
if (flags & XATTR_REPLACE)
return ENODATA;
}
else if (flags & XATTR_CREATE)
return EEXIST;
if (st.st_author == id)
/* Nothing to do. */
return 0;
}
return __file_chauthor (port, id);
}
}
if (!strcmp (name, "translator"))
{
if (flags & XATTR_REPLACE)
{
/* Must make sure it's already there. */
char *buf = NULL;
size_t bufsz = 0;
error_t err = __file_get_translator (port, &buf, &bufsz);
if (err)
return err;
if (bufsz > 0)
{
munmap (buf, bufsz);
return ENODATA;
}
}
return __file_set_translator (port,
FS_TRANS_SET | ((flags & XATTR_CREATE)
? FS_TRANS_EXCL : 0), 0, 0,
value, size,
MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
}
return EOPNOTSUPP;
}
error_t
_hurd_xattr_remove (io_t port, const char *name)
{
return _hurd_xattr_set (port, name, NULL, 0, XATTR_REPLACE);
}
error_t
_hurd_xattr_list (io_t port, void *buffer, size_t *size)
{
size_t total = 0;
char *bufp = buffer;
inline void add (const char *name, size_t len)
{
total += len;
if (bufp != NULL && total <= *size)
bufp = __mempcpy (bufp, name, len);
}
#define add(s) add (s, sizeof s)
struct stat64 st;
error_t err = __io_stat (port, &st);
if (err)
return err;
if (st.st_author != st.st_uid)
add ("gnu.author");
if (st.st_mode & S_IPTRANS)
add ("gnu.translator");
if (buffer != NULL && total > *size)
return ERANGE;
*size = total;
return 0;
}

View File

@ -17,6 +17,13 @@ extern int __open (__const char *__file, int __oflag, ...);
libc_hidden_proto (__open)
extern int __fcntl (int __fd, int __cmd, ...);
libc_hidden_proto (__fcntl)
extern int __openat (int __fd, __const char *__file, int __oflag, ...)
__nonnull ((2));
libc_hidden_proto (__openat)
extern int __openat64 (int __fd, __const char *__file, int __oflag, ...)
__nonnull ((2));
libc_hidden_proto (__openat64)
/* Helper functions for the various *at functions. For Linux. */
extern void __atfct_seterrno (int errval, int fd, const char *buf)

View File

@ -1,6 +1,7 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
Copyright (C) 1995-1998,2000-2003,2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-1998,2000-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
@ -502,7 +503,7 @@ for linking")
}
libc_hidden_weak (foo)
Simularly for global data. If references to foo within libc.so should
Similarly for global data. If references to foo within libc.so should
always go to foo defined in libc.so, then in include/foo.h you add:
libc_hidden_proto (foo)
@ -517,7 +518,7 @@ for linking")
int foo = INITIAL_FOO_VALUE;
libc_hidden_data_weak (foo)
If foo is normally just an alias (strong or weak) of some other function,
If foo is normally just an alias (strong or weak) to some other function,
you should use the normal strong_alias first, then add libc_hidden_def
or libc_hidden_weak:

View File

@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-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
@ -18,67 +18,32 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _LINK_H
#define _LINK_H 1
#ifndef _PRIVATE_LINK_H
#define _PRIVATE_LINK_H 1
#ifdef _LINK_H
# error this should be impossible
#endif
/* Get most of the contents from the public header, but we define a
different `struct link_map' type for private use. The la_objopen
prototype uses the type, so we have to declare it separately. */
#define link_map link_map_public
#define la_objopen la_objopen_wrongproto
#include <elf/link.h>
#undef link_map
#undef la_objopen
struct link_map;
extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid,
uintptr_t *__cookie);
#include <elf.h>
#include <dlfcn.h>
#include <stddef.h>
#include <sys/types.h>
/* We use this macro to refer to ELF types independent of the native wordsize.
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
#define _ElfW_1(e,w,t) e##w##t
#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
#include <bits/link.h>
#include <bits/linkmap.h>
#include <dl-lookupcfg.h>
#include <tls.h> /* Defines USE_TLS. */
/* Rendezvous structure used by the run-time dynamic linker to communicate
details of shared object loading to the debugger. If the executable's
dynamic section has a DT_DEBUG element, the run-time linker sets that
element's value to the address where this structure can be found. */
struct r_debug
{
int r_version; /* Version number for this protocol. */
struct link_map *r_map; /* Head of the chain of loaded objects. */
/* This is the address of a function internal to the run-time linker,
that will always be called when the linker begins to map in a
library or unmap it, and again when the mapping change is complete.
The debugger can set a breakpoint at this address if it wants to
notice shared object mapping changes. */
ElfW(Addr) r_brk;
enum
{
/* This state value describes the mapping change taking place when
the `r_brk' address is called. */
RT_CONSISTENT, /* Mapping change is complete. */
RT_ADD, /* Beginning to add a new object. */
RT_DELETE /* Beginning to remove an object mapping. */
} r_state;
ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
};
/* This is the instance of that structure used by the dynamic linker. */
extern struct r_debug _r_debug;
/* This symbol refers to the "dynamic structure" in the `.dynamic' section
of whatever module refers to `_DYNAMIC'. So, to find its own
`struct r_debug', a program could do:
for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn)
if (dyn->d_tag == DT_DEBUG)
r_debug = (struct r_debug *) dyn->d_un.d_ptr;
*/
extern ElfW(Dyn) _DYNAMIC[];
/* Some internal data structures of the dynamic linker used in the
linker map. We only provide forward declarations. */
@ -316,45 +281,6 @@ struct link_map
} l_audit[0];
};
/* Version numbers for la_version handshake interface. */
#define LAV_CURRENT 1
/* Activity types signaled through la_activity. */
enum
{
LA_ACT_CONSISTENT,
LA_ACT_ADD,
LA_ACT_DELETE
};
/* Values representing origin of name for dynamic loading. */
enum
{
LA_SER_ORIG = 0x01, /* Original name. */
LA_SER_LIBPATH = 0x02, /* Directory from LD_LIBRARY_PATH. */
LA_SER_RUNPATH = 0x04, /* Directory from RPATH/RUNPATH. */
LA_SER_CONFIG = 0x08, /* Found through ldconfig. */
LA_SER_DEFAULT = 0x40, /* Default directory. */
LA_SER_SECURE = 0x80 /* Unused. */
};
/* Values for la_objopen return value. */
enum
{
LA_FLG_BINDTO = 0x01, /* Audit symbols bound to this object. */
LA_FLG_BINDFROM = 0x02 /* Audit symbols bound from this object. */
};
/* Values for la_symbind flags parameter. */
enum
{
LA_SYMB_NOPLTENTER = 0x01, /* la_pltenter will not be called. */
LA_SYMB_NOPLTEXIT = 0x02, /* la_pltexit will not be called. */
LA_SYMB_STRUCTCALL = 0x04, /* Return value is a structure. */
LA_SYMB_DLSYM = 0x08, /* Binding due to dlsym call. */
LA_SYMB_ALTVALUE = 0x10 /* Value has been changed by a previous
la_symbind call. */
};
#if __ELF_NATIVE_CLASS == 32
# define symbind symbind32
@ -364,22 +290,8 @@ enum
# error "__ELF_NATIVE_CLASS must be defined"
#endif
struct dl_phdr_info
{
ElfW(Addr) dlpi_addr;
const char *dlpi_name;
const ElfW(Phdr) *dlpi_phdr;
ElfW(Half) dlpi_phnum;
unsigned long long int dlpi_adds;
unsigned long long int dlpi_subs;
};
extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
void *data);
extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
void *data);
#endif /* link.h */
#endif /* include/link.h */

View File

@ -96,10 +96,10 @@ extern int __setgid (__gid_t __gid);
extern int __setpgid (__pid_t __pid, __pid_t __pgid);
libc_hidden_proto (__setpgid)
extern int __setregid (__gid_t __rgid, __gid_t __egid);
extern int __getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
extern int __getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
extern int __setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
extern int __setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
libc_hidden_proto (__getresuid)
libc_hidden_proto (__getresgid)
libc_hidden_proto (__setresuid)

View File

@ -58,11 +58,12 @@ __BEGIN_DECLS
#ifdef __USE_ATFILE
# define AT_FDCWD -100 /* Special value used to indicate
openat should use the current
working directory. */
the *at functions should use the
current working directory. */
# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
# define AT_REMOVEDIR 0x200 /* Remove directory instead of
unlinking file. */
# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
# define AT_EACCESS 0x200 /* Test access permitted for
effective IDs, not real IDs. */
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
/* Copyright (C) 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
@ -24,11 +24,12 @@
/* Make a link to FROM relative to FROMFD called TO relative to TOFD. */
int
linkat (fromfd, from, tofd, to)
linkat (fromfd, from, tofd, to, flags)
int fromfd;
const char *from;
int tofd;
const char *to;
int flags;
{
if (from == NULL || to == NULL)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
/* Copyright (C) 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
@ -26,7 +26,7 @@
the directory associated with FD. If OFLAG includes O_CREAT, a
third argument is the file protection. */
int
openat (fd, file, oflag)
__openat (fd, file, oflag)
int fd;
const char *file;
int oflag;
@ -64,6 +64,8 @@ openat (fd, file, oflag)
__set_errno (ENOSYS);
return -1;
}
libc_hidden_def (__openat)
weak_alias (__openat, openat)
stub_warning (openat)
#include <stub-tag.h>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
/* Copyright (C) 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
@ -26,7 +26,7 @@
the directory associated with FD. If OFLAG includes O_CREAT, a
third argument is the file protection. */
int
openat64 (fd, file, oflag)
__openat64 (fd, file, oflag)
int fd;
const char *file;
int oflag;
@ -64,6 +64,8 @@ openat64 (fd, file, oflag)
__set_errno (ENOSYS);
return -1;
}
libc_hidden_def (__openat64)
weak_alias (__openat64, openat64)
stub_warning (openat64)
#include <stub-tag.h>

View File

@ -105,7 +105,7 @@ do_test (void)
close (fd);
if (linkat (dir_fd, "some-file", dir_fd, "another-file") != 0)
if (linkat (dir_fd, "some-file", dir_fd, "another-file", 0) != 0)
{
puts ("symlinkat failed");
return 1;

View File

@ -1,3 +1,15 @@
2006-02-27 Roland McGrath <roland@redhat.com>
* Makefile: Use $(..) in place of ../.
* configure.in (libc_add_on_canonical, libc_add_on_subdirs): Set them.
* configure: Regenerated.
2006-02-25 Roland McGrath <roland@redhat.com>
* configure.in: New file.
* configure: Replaced with generated file.
* sysdeps/unix/configure: File removed.
2005-03-08 Paul Eggert <eggert@cs.ucla.edu>
* iconvme.c (SIZE_MAX): New macro, if not already defined.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 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
@ -31,10 +31,10 @@ libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \
iconvme
include ../Makeconfig
include $(..)Makeconfig
libcidn-inhibit-o = $(filter-out .os,$(object-suffixes))
include ../Rules
include $(..)Rules
$(objpfx)libcidn.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a

13
libidn/configure vendored
View File

@ -1,3 +1,10 @@
# This is only to keep the GNU C library configure mechanism happy.
# This is a shell script fragment sourced by the main configure script.
# We have nothing we need to add here.
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
libc_add_on_canonical=
libc_add_on_subdirs=.
# Get this defined in config.h for main source code to test.
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBIDN 1
_ACEOF

8
libidn/configure.in Normal file
View File

@ -0,0 +1,8 @@
dnl glibc configure fragment for libidn add-on
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
libc_add_on_canonical=
libc_add_on_subdirs=.
# Get this defined in config.h for main source code to test.
AC_DEFINE([HAVE_LIBIDN])

View File

@ -1,2 +0,0 @@
# Signal that libidn is available.
libc_cv_idn=yes

View File

@ -34,6 +34,9 @@
#endif
#include <string.h>
#include <stdbool.h>
#ifdef _LIBC
#include <sched.h>
#endif
#ifdef _IO_MTSAFE_IO
static _IO_lock_t list_all_lock = _IO_lock_initializer;

View File

@ -368,6 +368,11 @@ sending it a @code{SIGTTIN} signal isn't working. This might happen if
the signal is being blocked or ignored, or because the process group is
orphaned. @xref{Job Control}, for more information about job control,
and @ref{Signal Handling}, for information about signals.
@item EINVAL
In some systems, when reading from a character or block device, position
and size offsets must be aligned to a particular block size. This error
indicates that the offsets were not properly aligned.
@end table
Please note that there is no function named @code{read64}. This is not
@ -515,6 +520,11 @@ The device containing the file is full.
This error is returned when you try to write to a pipe or FIFO that
isn't open for reading by any process. When this happens, a @code{SIGPIPE}
signal is also sent to the process; see @ref{Signal Handling}.
@item EINVAL
In some systems, when writing to a character or block device, position
and size offsets must be aligned to a particular block size. This error
indicates that the offsets were not properly aligned.
@end table
Unless you have arranged to prevent @code{EINTR} failures, you should

View File

@ -1968,7 +1968,8 @@ obstack_next_free (@var{obstack-ptr}) - obstack_base (@var{obstack-ptr})
Each obstack has an @dfn{alignment boundary}; each object allocated in
the obstack automatically starts on an address that is a multiple of the
specified boundary. By default, this boundary is 4 bytes.
specified boundary. By default, this boundary is aligned so that
the object can hold any type of data.
To access an obstack's alignment boundary, use the macro
@code{obstack_alignment_mask}, whose function prototype looks like
@ -1980,7 +1981,9 @@ this:
The value is a bit mask; a bit that is 1 indicates that the corresponding
bit in the address of an object should be 0. The mask value should be one
less than a power of 2; the effect is that all object addresses are
multiples of that power of 2. The default value of the mask is 3, so that
multiples of that power of 2. The default value of the mask is a value
that allows aligned objects to hold any type of data: for example, if
its value is 3, any type of data can be stored at locations whose
addresses are multiples of 4. A mask value of 0 means an object can start
on any multiple of 1 (that is, no alignment is required).

View File

@ -108,7 +108,7 @@ generated += $(libm-tests-generated) libm-test.stmp
# This is needed for dependencies
before-compile += $(objpfx)libm-test.c
ulps-file = $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps)))
ulps-file = $(firstword $(wildcard $(sysdirs:%=%/libm-test-ulps)))
$(addprefix $(objpfx), $(libm-tests-generated)): $(objpfx)libm-test.stmp

View File

@ -30,7 +30,8 @@ headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
regexp.h bits/select.h bits/mman.h sys/xattr.h \
syslog.h sys/syslog.h bits/syslog.h bits/syslog-ldbl.h
syslog.h sys/syslog.h \
bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h
routines := brk sbrk sstk ioctl \
readv writev \

View File

@ -36,8 +36,8 @@
#define __need___va_list
#include <stdarg.h>
#define _PATH_LOG "/dev/log"
/* This file defines _PATH_LOG. */
#include <bits/syslog-path.h>
/*
* priorities/facilities are encoded into a single 32-bit quantity, where the

View File

@ -819,58 +819,58 @@ yperr_string (const int error)
switch (error)
{
case YPERR_SUCCESS:
str = "Success";
str = N_("Success");
break;
case YPERR_BADARGS:
str = "Request arguments bad";
str = N_("Request arguments bad");
break;
case YPERR_RPC:
str = "RPC failure on NIS operation";
str = N_("RPC failure on NIS operation");
break;
case YPERR_DOMAIN:
str = "Can't bind to server which serves this domain";
str = N_("Can't bind to server which serves this domain");
break;
case YPERR_MAP:
str = "No such map in server's domain";
str = N_("No such map in server's domain");
break;
case YPERR_KEY:
str = "No such key in map";
str = N_("No such key in map");
break;
case YPERR_YPERR:
str = "Internal NIS error";
str = N_("Internal NIS error");
break;
case YPERR_RESRC:
str = "Local resource allocation failure";
str = N_("Local resource allocation failure");
break;
case YPERR_NOMORE:
str = "No more records in map database";
str = N_("No more records in map database");
break;
case YPERR_PMAP:
str = "Can't communicate with portmapper";
str = N_("Can't communicate with portmapper");
break;
case YPERR_YPBIND:
str = "Can't communicate with ypbind";
str = N_("Can't communicate with ypbind");
break;
case YPERR_YPSERV:
str = "Can't communicate with ypserv";
str = N_("Can't communicate with ypserv");
break;
case YPERR_NODOM:
str = "Local domain name not set";
str = N_("Local domain name not set");
break;
case YPERR_BADDB:
str = "NIS map database is bad";
str = N_("NIS map database is bad");
break;
case YPERR_VERS:
str = "NIS client/server version mismatch - can't supply service";
str = N_("NIS client/server version mismatch - can't supply service");
break;
case YPERR_ACCESS:
str = "Permission denied";
str = N_("Permission denied");
break;
case YPERR_BUSY:
str = "Database is busy";
str = N_("Database is busy");
break;
default:
str = "Unknown NIS error code";
str = N_("Unknown NIS error code");
break;
}
return _(str);
@ -907,19 +907,19 @@ ypbinderr_string (const int error)
switch (error)
{
case 0:
str = "Success";
str = N_("Success");
break;
case YPBIND_ERR_ERR:
str = "Internal ypbind error";
str = N_("Internal ypbind error");
break;
case YPBIND_ERR_NOSERV:
str = "Domain not bound";
str = N_("Domain not bound");
break;
case YPBIND_ERR_RESC:
str = "System resource allocation failure";
str = N_("System resource allocation failure");
break;
default:
str = "Unknown ypbind error";
str = N_("Unknown ypbind error");
break;
}
return _(str);

View File

@ -1,3 +1,98 @@
2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
instead of <clone.S>.
2006-02-27 Jakub Jelinek <jakub@redhat.com>
* Makefile (libpthread-routines): Add
pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
and pthread_mutex_[sg]etprioceiling.
* Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
pthread_mutex_setprioceiling.
* sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
PTHREAD_PRIO_PROTECT): New enum values.
(pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
prototypes.
* pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
(PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
Define.
(PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
(PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
* pthread_mutex_init.c (__pthread_mutex_init): For the time being
return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
protocol mutexes.
* pthread_mutex_getprioceiling.c: New file.
* pthread_mutex_setprioceiling.c: New file.
* pthread_mutexattr_getprioceiling.c: New file.
* pthread_mutexattr_setprioceiling.c: New file.
* pthread_mutexattr_getprotocol.c: New file.
* pthread_mutexattr_setprotocol.c: New file.
2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2006-02-27 Roland McGrath <roland@redhat.com>
* sysdeps/pthread/Subdirs: List nptl here too.
* configure (libc_add_on_canonical): New variable.
* sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
* sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
self to get main source tree's file.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
* Makefile: Use $(sysdirs) in vpath directive.
* sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
(CPPFLAGS-timer_routines.c): Likewise.
* Makeconfig (includes): Variable removed.
2006-02-26 Roland McGrath <roland@redhat.com>
* sysdeps/generic/pt-raise.c: Moved to ...
* pt-raise.c: ... here.
* sysdeps/generic/lowlevellock.h: Moved to ...
* lowlevellock.h: ... here.
2006-02-23 Roland McGrath <roland@redhat.com>
* descr.h (struct pthread): Add final member `end_padding'.
(PTHREAD_STRUCT_END_PADDING): Use it.
2006-02-20 Roland McGrath <roland@redhat.com>
* sysdeps/mips: Directory removed, saved in ports repository.
* sysdeps/unix/sysv/linux/mips: Likewise.
2006-02-18 Ulrich Drepper <drepper@redhat.com>
* tst-robust1.c: Add second mutex to check that the mutex list is
handled correctly.
2006-02-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
@ -48,7 +143,7 @@
2006-02-15 Ulrich Drepper <drepper@redhat.com>
* pthreadp.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
* pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
PTHREAD_MUTEX_OWNERDEAD.
(PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
@ -85,6 +180,7 @@
but the owner for all robust mutex types.
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
__pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
* sysdeps/pthread/pthread.h: Adjust mutex initializers.
* sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2002,2003,2005,2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -28,7 +28,3 @@ static-thread-library = $(common-objpfx)nptl/libpthread.a
bounded-thread-library = $(common-objpfx)nptl/libpthread_b.a
rpath-dirs += nptl
ifneq ($(subdir),nptl)
includes += -I$(..)nptl
endif

View File

@ -118,7 +118,12 @@ libpthread-routines = init vars events version \
pthread_attr_getaffinity pthread_attr_setaffinity \
pthread_mutexattr_getrobust pthread_mutexattr_setrobust \
pthread_mutex_consistent \
cleanup_routine unwind-forcedunwind
cleanup_routine unwind-forcedunwind \
pthread_mutexattr_getprotocol \
pthread_mutexattr_setprotocol \
pthread_mutexattr_getprioceiling \
pthread_mutexattr_setprioceiling \
pthread_mutex_getprioceiling pthread_mutex_setprioceiling
# pthread_setuid pthread_seteuid pthread_setreuid \
# pthread_setresuid \
# pthread_setgid pthread_setegid pthread_setregid \
@ -532,7 +537,7 @@ $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif
ifeq ($(build-shared),yes)
vpath pt-initfini.c $(full_config_sysdirs)
vpath pt-initfini.c $(sysdirs)
$(objpfx)pt-initfini.s: pt-initfini.c
$(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \

View File

@ -235,6 +235,9 @@ libpthread {
GLIBC_2.4 {
pthread_mutexattr_getrobust_np; pthread_mutexattr_setrobust_np;
pthread_mutex_consistent_np;
pthread_mutexattr_getprotocol; pthread_mutexattr_setprotocol;
pthread_mutexattr_getprioceiling; pthread_mutexattr_setprioceiling;
pthread_mutex_getprioceiling; pthread_mutex_setprioceiling;
};
GLIBC_PRIVATE {

9
nptl/configure vendored
View File

@ -1,6 +1,5 @@
# This is only to keep the GNU C library configure mechanism happy.
# This is a shell script fragment sourced by the main configure script.
# We have nothing we need to add here.
#
# Perhaps some day we will need a real configuration script for different
# kernel versions or so.
# We're obliged to give here the canonical name that will be used to
# as a subdirectory to search for in other add-ons' sysdeps trees.
libc_add_on_canonical=nptl

View File

@ -305,12 +305,11 @@ struct pthread
/* Resolver state. */
struct __res_state res;
/* If you add fields after the res field above, please adjust
the following macro. */
#define PTHREAD_STRUCT_END_PADDING \
(sizeof (struct pthread) - offsetof (struct pthread, res) \
- sizeof (((struct pthread *) 0)->res))
/* This member must be last. */
char end_padding[];
#define PTHREAD_STRUCT_END_PADDING \
(sizeof (struct pthread) - offsetof (struct pthread, end_padding))
} __attribute ((aligned (TCB_ALIGNMENT)));

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Low level locking macros used in NPTL implementation. Stub version.
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* ISO C raise function for libpthread.
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.

View File

@ -66,15 +66,24 @@ enum
PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP
= PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP
= PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_ADAPTIVE_NP
= PTHREAD_MUTEX_ROBUST_PRIVATE_NP | PTHREAD_MUTEX_ADAPTIVE_NP,
PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP = 32,
PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP = 64
};
#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT 16
#define PTHREAD_MUTEX_PRIO_CEILING_MASK 0x00ff0000
/* Flags in mutex attr. */
#define PTHREAD_MUTEXATTR_FLAG_ROBUST 0x40000000
#define PTHREAD_MUTEXATTR_FLAG_PSHARED 0x80000000
#define PTHREAD_MUTEXATTR_PROTOCOL_SHIFT 28
#define PTHREAD_MUTEXATTR_PROTOCOL_MASK 0x30000000
#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT 16
#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK 0x00ff0000
#define PTHREAD_MUTEXATTR_FLAG_ROBUST 0x40000000
#define PTHREAD_MUTEXATTR_FLAG_PSHARED 0x80000000
#define PTHREAD_MUTEXATTR_FLAG_BITS \
(PTHREAD_MUTEXATTR_FLAG_ROBUST | PTHREAD_MUTEXATTR_FLAG_PSHARED)
(PTHREAD_MUTEXATTR_FLAG_ROBUST | PTHREAD_MUTEXATTR_FLAG_PSHARED \
| PTHREAD_MUTEXATTR_PROTOCOL_MASK | PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
/* Bits used in robust mutex implementation. */

View File

@ -1,6 +1,7 @@
/* Examine __jmp_buf for unwinding frames. m68k version.
/* Get current priority ceiling of pthread_mutex_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -17,9 +18,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <setjmp.h>
#include <pthreadP.h>
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
int
pthread_mutex_getprioceiling (mutex, prioceiling)
const pthread_mutex_t *mutex;
int *prioceiling;
{
*prioceiling = (mutex->__data.__kind & PTHREAD_MUTEX_PRIO_CEILING_MASK)
>> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
return 0;
}

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -46,6 +46,11 @@ __pthread_mutex_init (mutex, mutexattr)
if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0
&& (imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_PSHARED) != 0)
return ENOTSUP;
// XXX For now we don't support priority inherited or priority protected
// XXX mutexes.
if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK)
!= (PTHREAD_PRIO_NONE << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT))
return ENOTSUP;
/* Clear the whole variable. */
memset (mutex, '\0', __SIZEOF_PTHREAD_MUTEX_T);
@ -54,6 +59,27 @@ __pthread_mutex_init (mutex, mutexattr)
mutex->__data.__kind = imutexattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS;
if ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0)
mutex->__data.__kind |= PTHREAD_MUTEX_ROBUST_PRIVATE_NP;
switch ((imutexattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK)
>> PTHREAD_MUTEXATTR_PROTOCOL_SHIFT)
{
case PTHREAD_PRIO_INHERIT:
mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP;
break;
case PTHREAD_PRIO_PROTECT:
mutex->__data.__kind |= PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP;
if (PTHREAD_MUTEX_PRIO_CEILING_MASK
== PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
mutex->__data.__kind |= (imutexattr->mutexkind
& PTHREAD_MUTEXATTR_PRIO_CEILING_MASK);
else
mutex->__data.__kind |= ((imutexattr->mutexkind
& PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
>> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT)
<< PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
break;
default:
break;
}
/* Default values: mutex not used yet. */
// mutex->__count = 0; already done by memset

View File

@ -0,0 +1,55 @@
/* Set current priority ceiling of pthread_mutex_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
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. */
#include <errno.h>
#include <pthreadP.h>
int
pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling)
pthread_mutex_t *mutex;
int prioceiling;
int *old_ceiling;
{
/* The low bits of __kind aren't ever changed after pthread_mutex_init,
so we don't need a lock yet. */
if ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP) == 0)
return EINVAL;
if (prioceiling < 0 || __builtin_expect (prioceiling > 255, 0))
return EINVAL;
/* XXX This needs to lock with TID, but shouldn't obey priority protect
protocol. */
/* lll_xxx_mutex_lock (mutex->__data.__lock); */
if (old_ceiling != NULL)
*old_ceiling = (mutex->__data.__kind & PTHREAD_MUTEX_PRIO_CEILING_MASK)
>> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
int newkind = (mutex->__data.__kind & ~PTHREAD_MUTEX_PRIO_CEILING_MASK);
mutex->__data.__kind = newkind
| (prioceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT);
/* XXX This needs to unlock the above special kind of lock. */
/* lll_xxx_mutex_unlock (mutex->__data.__lock); */
return 0;
}

View File

@ -0,0 +1,37 @@
/* Get priority ceiling setting from pthread_mutexattr_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
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. */
#include <pthreadP.h>
int
pthread_mutexattr_getprioceiling (attr, prioceiling)
const pthread_mutexattr_t *attr;
int *prioceiling;
{
const struct pthread_mutexattr *iattr;
iattr = (const struct pthread_mutexattr *) attr;
*prioceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
>> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT);
return 0;
}

View File

@ -1,7 +1,7 @@
/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
/* Get priority protocol setting from pthread_mutexattr_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -18,25 +18,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <standalone.h>
#include <pthreadP.h>
/* This file is only required when a "bare" board is configured. */
/* These routines provide console IO routines for your embedded target. */
int
_Console_Putc (ch)
char ch;
pthread_mutexattr_getprotocol (attr, protocol)
const pthread_mutexattr_t *attr;
int *protocol;
{
/* eat the character */
const struct pthread_mutexattr *iattr;
iattr = (const struct pthread_mutexattr *) attr;
*protocol = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK)
>> PTHREAD_MUTEXATTR_PROTOCOL_SHIFT);
return 0;
}
int
_Console_Getc (poll)
int poll;
{
/* boring user, never types anything */
return -1;
}

View File

@ -0,0 +1,39 @@
/* Change priority ceiling setting in pthread_mutexattr_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
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. */
#include <errno.h>
#include <pthreadP.h>
int
pthread_mutexattr_setprioceiling (attr, prioceiling)
pthread_mutexattr_t *attr;
int prioceiling;
{
if (prioceiling < 0 || __builtin_expect (prioceiling > 255, 0))
return EINVAL;
struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr;
iattr->mutexkind = ((iattr->mutexkind & ~PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
| (prioceiling << PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT));
return 0;
}

View File

@ -1,6 +1,7 @@
/* brk system call for Linux/m68k.
Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
/* Change priority protocol setting in pthread_mutexattr_t.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -18,31 +19,23 @@
02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
#include <pthreadP.h>
void *__curbrk = 0;
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux/x86 ELF
dynamic linker. Sigh. */
weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
pthread_mutexattr_setprotocol (attr, protocol)
pthread_mutexattr_t *attr;
int protocol;
{
void *newbrk;
if (protocol != PTHREAD_PRIO_NONE
&& protocol != PTHREAD_PRIO_INHERIT
&& __builtin_expect (protocol != PTHREAD_PRIO_PROTECT, 0))
return EINVAL;
INTERNAL_SYSCALL_DECL (err);
newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
__curbrk = newbrk;
struct pthread_mutexattr *iattr = (struct pthread_mutexattr *) attr;
if (newbrk < addr)
{
__set_errno (ENOMEM);
return -1;
}
iattr->mutexkind = ((iattr->mutexkind & ~PTHREAD_MUTEXATTR_PROTOCOL_MASK)
| (protocol << PTHREAD_MUTEXATTR_PROTOCOL_SHIFT));
return 0;
}
weak_alias (__brk, brk)

View File

@ -1,25 +0,0 @@
# Copyright (C) 2005 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.
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
ifeq ($(subdir),nptl)
libpthread-sysdep_routines += nptl-sysdep
endif

View File

@ -1,2 +0,0 @@
/* Pull in __syscall_error. */
#include <sysdep.S>

View File

@ -1,37 +0,0 @@
/* Copyright (C) 2005 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. */
#include <sys/asm.h>
#include <sysdep.h>
#include <sgidefs.h>
ENTRY (pthread_spin_lock)
.set push
#if _MIPS_SIM == _ABIO32
.set mips2
#endif
1: ll a2, 0(a0)
li a1, 1
bnez a2, 1b
sc a1, 0(a0)
beqz a1, 1b
MIPS_SYNC
.set pop
li v0, 0
ret
PSEUDO_END (pthread_spin_lock)

View File

@ -1,41 +0,0 @@
/* Copyright (C) 2005 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. */
#include <sys/asm.h>
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
#include <sgidefs.h>
ENTRY (pthread_spin_trylock)
.set push
#if _MIPS_SIM == _ABIO32
.set mips2
#endif
ll a2, 0(a0)
li a1, 1
bnez a2, 1f
sc a1, 0(a0)
beqz a1, 1f
MIPS_SYNC
.set pop
li v0, 0
ret
1: li v0, EBUSY
ret
PSEUDO_END (pthread_spin_trylock)

View File

@ -1,11 +0,0 @@
#include <sysdep.h>
#include <tls.h>
--
-- Abuse tls.h macros to derive offsets relative to the thread register.
#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
PID_OFFSET thread_offsetof (pid)
TID_OFFSET thread_offsetof (tid)

View File

@ -1,161 +0,0 @@
/* Definition for thread-local data handling. NPTL/MIPS version.
Copyright (C) 2005 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. */
#ifndef _TLS_H
#define _TLS_H 1
#include <dl-sysdep.h>
#ifndef __ASSEMBLER__
# include <stdbool.h>
# include <stddef.h>
# include <stdint.h>
/* Type for the dtv. */
typedef union dtv
{
size_t counter;
struct
{
void *val;
bool is_static;
} pointer;
} dtv_t;
/* Note: rd must be $v1 to be ABI-conformant. */
# define READ_THREAD_POINTER() \
({ void *__result; \
asm volatile (".set\tpush\n\t.set\tmips32r2\n\t" \
"rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result)); \
__result; })
#else /* __ASSEMBLER__ */
# include <tcb-offsets.h>
# define READ_THREAD_POINTER(rd) \
.set push; \
.set mips32r2; \
rdhwr rd, $29; \
.set pop
#endif /* __ASSEMBLER__ */
/* We require TLS support in the tools. */
#ifndef HAVE_TLS_SUPPORT
# error "TLS support is required."
#endif
/* Signal that TLS support is available. */
#define USE_TLS 1
#ifndef __ASSEMBLER__
/* Get system call information. */
# include <sysdep.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
typedef struct
{
dtv_t *dtv;
void *private;
} tcbhead_t;
/* This is the size of the initial TCB. Because our TCB is before the thread
pointer, we don't need this. */
# define TLS_INIT_TCB_SIZE 0
/* Alignment requirements for the initial TCB. */
# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size of the TCB. Because our TCB is before the thread
pointer, we don't need this. */
# define TLS_TCB_SIZE 0
/* Alignment requirements for the TCB. */
# define TLS_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size we need before TCB - actually, it includes the TCB. */
# define TLS_PRE_TCB_SIZE \
(sizeof (struct pthread) \
+ ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
/* The thread pointer (in hardware register $29) points to the end of
the TCB + 0x7000, as for PowerPC. The pthread_descr structure is
immediately in front of the TCB. */
# define TLS_TCB_OFFSET 0x7000
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */
# define INSTALL_DTV(tcbp, dtvp) \
(((tcbhead_t *) (tcbp))[-1].dtv = (dtvp) + 1)
/* Install new dtv for current thread. */
# define INSTALL_NEW_DTV(dtv) \
(THREAD_DTV() = (dtv))
/* Return dtv of given thread descriptor. */
# define GET_DTV(tcbp) \
(((tcbhead_t *) (tcbp))[-1].dtv)
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
({ INTERNAL_SYSCALL_DECL (err); \
long result_var; \
result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
(char *) (tcbp) + TLS_TCB_OFFSET); \
INTERNAL_SYSCALL_ERROR_P (result_var, err) \
? "unknown error" : NULL; })
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
(((tcbhead_t *) (READ_THREAD_POINTER () - TLS_TCB_OFFSET))[-1].dtv)
/* Return the thread descriptor for the current thread. */
# define THREAD_SELF \
((struct pthread *) (READ_THREAD_POINTER () \
- TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
/* Magic for libthread_db to know how to do THREAD_SELF. */
# define DB_THREAD_SELF \
CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
/* Access to data in the thread descriptor is easy. */
# define THREAD_GETMEM(descr, member) \
descr->member
# define THREAD_GETMEM_NC(descr, member, idx) \
descr->member[idx]
# define THREAD_SETMEM(descr, member, value) \
descr->member = (value)
# define THREAD_SETMEM_NC(descr, member, idx, value) \
descr->member[idx] = (value)
/* l_tls_offset == 0 is perfectly valid on MIPS, so we have to use some
different value to mean unset l_tls_offset. */
# define NO_TLS_OFFSET -1
#endif /* __ASSEMBLER__ */
#endif /* tls.h */

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 2002,2003,2004,2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -18,7 +18,6 @@
# 02111-1307 USA.
ifeq ($(subdir),csu)
CFLAGS-libc-start.c += -I../nptl
routines += unwind-resume
shared-only-routines += unwind-resume
CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
@ -31,7 +30,6 @@ endif
ifeq ($(subdir),rt)
librt-sysdep_routines += timer_routines librt-cancellation rt-unwind-resume
librt-shared-only-routines += rt-unwind-resume
CPPFLAGS-timer_routines.c = -I../nptl
CFLAGS-librt-cancellation.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables

View File

@ -1 +1,2 @@
nptl
nptl_db

View File

@ -71,6 +71,17 @@ enum
#endif
#ifdef __USE_UNIX98
/* Mutex protocols. */
enum
{
PTHREAD_PRIO_NONE,
PTHREAD_PRIO_INHERIT,
PTHREAD_PRIO_PROTECT
};
#endif
/* Mutex initializers. */
#if __WORDSIZE == 64
# define PTHREAD_MUTEX_INITIALIZER \
@ -711,6 +722,22 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW;
#ifdef __USE_UNIX98
/* Get the priority ceiling of MUTEX. */
extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
__restrict __mutex,
int *__restrict __prioceiling)
__THROW;
/* Set the priority ceiling of MUTEX to PRIOCEILING, return old
priority ceiling value in *OLD_CEILING. */
extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
int __prioceiling,
int *__restrict __old_ceiling)
__THROW;
#endif
#ifdef __USE_GNU
/* Declare the state protected by MUTEX as consistent. */
extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW;
@ -745,6 +772,26 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
PTHREAD_MUTEX_DEFAULT). */
extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
__THROW;
/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __protocol) __THROW;
/* Set the mutex protocol attribute in *ATTR to PROTOCOL (either
PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */
extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
int __protocol) __THROW;
/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __prioceiling)
__THROW;
/* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */
extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
int __prioceiling) __THROW;
#endif
#ifdef __USE_GNU

View File

@ -22,6 +22,7 @@
# include <signal.h>
# include <sysdep.h>
# include <pthread.h>
# include <limits.h>
# define aio_start_notify_thread __aio_start_notify_thread
# define aio_create_helper_thread __aio_create_helper_thread

View File

@ -1,2 +1,9 @@
#define RESET_PID
#include <sysdeps/unix/sysv/linux/alpha/clone.S>
/* We want an #include_next, but we are the main source file.
So, #include ourselves and in that incarnation we can use #include_next. */
#ifndef INCLUDED_SELF
# define INCLUDED_SELF
# include <clone.S>
#else
# define RESET_PID
# include_next <clone.S>
#endif

View File

@ -201,13 +201,14 @@ __lll_mutex_unlock (int *futex)
static inline void __attribute__ ((always_inline))
__lll_robust_mutex_unlock (int *futex)
__lll_robust_mutex_unlock (int *futex, int mask)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val & FUTEX_WAITERS, 0))
if (__builtin_expect (val & mask, 0))
lll_futex_wake (futex, 1);
}
#define lll_robust_mutex_unlock(futex) __lll_robust_mutex_unlock(&(futex))
#define lll_robust_mutex_unlock(futex) \
__lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
static inline void __attribute__ ((always_inline))

View File

@ -1,2 +1,9 @@
#define RESET_PID
#include <sysdeps/unix/sysv/linux/i386/clone.S>
/* We want an #include_next, but we are the main source file.
So, #include ourselves and in that incarnation we can use #include_next. */
#ifndef INCLUDED_SELF
# define INCLUDED_SELF
# include <clone.S>
#else
# define RESET_PID
# include_next <clone.S>
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
/* Copyright (C) 1999,2002,2004,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
@ -16,10 +16,17 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <tcb-offsets.h>
/* We want an #include_next, but we are the main source file.
So, #include ourselves and in that incarnation we can use #include_next. */
#ifndef INCLUDED_SELF
# define INCLUDED_SELF
# include <vfork.S>
#else
# include <tcb-offsets.h>
/* Save the PID value. */
#define SAVE_PID \
# define SAVE_PID \
movl %gs:PID, %edx; \
movl %edx, %eax; \
negl %eax; \
@ -28,11 +35,11 @@
1: movl %eax, %gs:PID
/* Restore the old PID value in the parent. */
#define RESTORE_PID \
# define RESTORE_PID \
testl %eax, %eax; \
je 1f; \
movl %edx, %gs:PID; \
1:
#include <sysdeps/unix/sysv/linux/i386/vfork.S>
# include_next <vfork.S>
#endif

View File

@ -1,2 +1,9 @@
#define RESET_PID
#include <sysdeps/unix/sysv/linux/ia64/clone2.S>
/* We want an #include_next, but we are the main source file.
So, #include ourselves and in that incarnation we can use #include_next. */
#ifndef INCLUDED_SELF
# define INCLUDED_SELF
# include <clone2.S>
#else
# define RESET_PID
# include_next <clone2.S>
#endif

View File

@ -120,7 +120,7 @@ extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
if (atomic_compare_and_exchange_bool_acq (__futex, id, 0) != 0) \
__val = __lll_robust_lock_wait (__futex); \
__val; \
}))
})
#define lll_robust_mutex_lock(futex, id) __lll_robust_mutex_lock (&(futex), id)
@ -142,7 +142,7 @@ extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
if (atomic_compare_and_exchange_bool_acq (__futex, __id, 0) != 0) \
__val = __lll_robust_lock_wait (__futex); \
__val; \
}))
})
#define lll_robust_mutex_cond_lock(futex, id) \
__lll_robust_mutex_cond_lock (&(futex), id)
@ -174,7 +174,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
if (atomic_compare_and_exchange_bool_acq (__futex, id, 0) != 0) \
__val = __lll_robust_timedlock_wait (__futex, abstime); \
__val; \
}))
})
#define lll_robust_mutex_timedlock(futex, abstime, id) \
__lll_robust_mutex_timedlock (&(futex), abstime, id)

View File

@ -1,202 +0,0 @@
/* Machine-specific pthread type layouts. MIPS version.
Copyright (C) 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. */
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
#if _MIPS_SIM == _ABI64
# define __SIZEOF_PTHREAD_ATTR_T 56
# define __SIZEOF_PTHREAD_MUTEX_T 40
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 32
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#else
# define __SIZEOF_PTHREAD_ATTR_T 36
# define __SIZEOF_PTHREAD_MUTEX_T 24
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 32
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#endif
/* Thread identifiers. The structure of the attribute type is
deliberately not exposed. */
typedef unsigned long int pthread_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align;
} pthread_attr_t;
/* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
#if _MIPS_SIM == _ABI64
unsigned int __nusers;
#endif
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
#if _MIPS_SIM == _ABI64
int __spins;
struct __pthread_mutex_s *__next;
struct __pthread_mutex_s *__prev;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
unsigned int __nusers;
__extension__ union
{
int __spins;
struct __pthread_mutex_s *__next;
};
#endif
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
int __align;
} pthread_mutexattr_t;
/* Data structure for conditional variable handling. The structure of
the attribute type is deliberately not exposed. */
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_CONDATTR_T];
int __align;
} pthread_condattr_t;
/* Keys for thread-specific data */
typedef unsigned int pthread_key_t;
/* Once-only execution */
typedef int pthread_once_t;
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Data structure for read-write lock variable handling. The
structure of the attribute type is deliberately not exposed. */
typedef union
{
# if _MIPS_SIM == _ABI64
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __pad1;
unsigned long int __pad2;
unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
} __data;
# else
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
int __writer;
} __data;
# endif
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
long int __align;
} pthread_rwlockattr_t;
#endif
#ifdef __USE_XOPEN2K
/* POSIX spinlock data type. */
typedef volatile int pthread_spinlock_t;
/* POSIX barriers data type. The structure of the type is
deliberately not exposed. */
typedef union
{
char __size[__SIZEOF_PTHREAD_BARRIER_T];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
int __align;
} pthread_barrierattr_t;
#endif
#endif /* bits/pthreadtypes.h */

View File

@ -1,40 +0,0 @@
/* Copyright (C) 2002, 2005 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. */
#ifndef _SEMAPHORE_H
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
#if _MIPS_SIM == _ABI64
# define __SIZEOF_SEM_T 32
#else
# define __SIZEOF_SEM_T 16
#endif
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
/* Maximum value the semaphore can have. */
#define SEM_VALUE_MAX (2147483647)
typedef union
{
char __size[__SIZEOF_SEM_T];
long int __align;
} sem_t;

View File

@ -1,2 +0,0 @@
#define RESET_PID
#include <sysdeps/unix/sysv/linux/mips/clone.S>

View File

@ -1,24 +0,0 @@
/* Copyright (C) 2005 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. */
/* Value passed to 'clone' for initialization of the thread register. */
#define TLS_VALUE ((void *) (pd) \
+ TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
/* Get the real implementation. */
#include <nptl/sysdeps/pthread/createthread.c>

Some files were not shown because too many files have changed in this diff Show More