From 036dfd44bcc8ed8e97dcd9c763f61d3b59796941 Mon Sep 17 00:00:00 2001 From: joseph Date: Wed, 6 Nov 2013 23:03:08 +0000 Subject: Merge changes between r24305 and r24468 from /fsf/trunk. git-svn-id: svn://svn.eglibc.org/trunk@24469 7b3dc134-2b1b-0410-93df-9e9f96275f8d --- libc/ChangeLog | 278 +++ libc/INSTALL | 2 +- libc/Makeconfig | 8 +- libc/Makefile | 8 +- libc/NEWS | 37 +- libc/aclocal.m4 | 6 +- libc/benchtests/exp-inputs | 581 ++++++ libc/benchtests/pow-inputs | 503 +++++ libc/bits/predefs.h | 30 - libc/config.h.in | 6 +- libc/configure | 4 +- libc/configure.ac | 2172 ++++++++++++++++++++ libc/configure.in | 2172 -------------------- libc/elf/rtld.c | 8 +- libc/include/stdc-predef.h | 24 +- libc/libidn/ChangeLog | 6 + libc/libidn/configure | 2 +- libc/libidn/configure.ac | 11 + libc/libidn/configure.in | 11 - libc/locale/iso-639.def | 8 +- libc/locale/locarchive.h | 2 + libc/locale/programs/localedef.c | 2 +- libc/locale/programs/localedef.h | 6 +- libc/locale/programs/locarchive.c | 27 +- libc/locale/programs/locfile.c | 1 + libc/localedata/ChangeLog | 115 ++ libc/localedata/SUPPORTED | 1 + libc/localedata/locales/anp_IN | 205 ++ libc/localedata/locales/ja_JP | 7 +- libc/localedata/locales/ka_GE | 9 +- libc/localedata/locales/kk_KZ | 7 +- libc/localedata/locales/kl_GL | 6 + libc/localedata/locales/kn_IN | 7 +- libc/localedata/locales/ko_KR | 7 +- libc/localedata/locales/kok_IN | 4 + libc/localedata/locales/ks_IN | 6 + libc/localedata/locales/ku_TR | 9 +- libc/localedata/locales/kw_GB | 7 +- libc/localedata/locales/ky_KG | 7 +- libc/localedata/locales/lg_UG | 7 +- libc/localedata/locales/lij_IT | 4 + libc/localedata/locales/lt_LT | 7 +- libc/localedata/locales/lv_LV | 7 +- libc/localedata/locales/mag_IN | 5 +- libc/localedata/locales/mai_IN | 5 +- libc/localedata/locales/mg_MG | 6 + libc/localedata/locales/mhr_RU | 4 + libc/localedata/locales/mi_NZ | 6 + libc/localedata/locales/ml_IN | 7 +- libc/localedata/locales/mni_IN | 5 +- libc/localedata/locales/mr_IN | 7 +- libc/localedata/locales/ms_MY | 7 +- libc/localedata/locales/mt_MT | 7 +- libc/localedata/locales/nb_NO | 7 +- libc/localedata/locales/ne_NP | 7 +- libc/localedata/locales/nhn_MX | 5 +- libc/localedata/locales/niu_NU | 2 + libc/localedata/locales/niu_NZ | 2 + libc/localedata/locales/nl_AW | 3 + libc/localedata/locales/nl_BE | 4 +- libc/localedata/locales/nn_NO | 6 + libc/localedata/locales/nr_ZA | 5 +- libc/localedata/locales/oc_FR | 9 +- libc/localedata/locales/or_IN | 6 + libc/localedata/locales/os_RU | 7 +- libc/localedata/locales/pa_IN | 7 +- libc/localedata/locales/pa_PK | 6 + libc/localedata/locales/pl_PL | 7 +- libc/localedata/locales/ps_AF | 55 +- libc/localedata/locales/pt_BR | 7 +- libc/localedata/locales/pt_PT | 7 +- libc/localedata/locales/quz_PE | 5 +- libc/localedata/locales/ru_RU | 7 +- libc/localedata/locales/ru_UA | 7 +- libc/localedata/locales/sa_IN | 7 +- libc/localedata/locales/sat_IN | 5 +- libc/localedata/locales/sc_IT | 7 +- libc/localedata/locales/sd_IN | 7 +- libc/localedata/locales/sd_IN@devanagari | 6 + libc/localedata/locales/se_NO | 7 +- libc/localedata/locales/si_LK | 6 + libc/localedata/locales/sk_SK | 7 +- libc/localedata/locales/sl_SI | 7 +- libc/localedata/locales/sq_AL | 7 +- libc/localedata/locales/sq_MK | 9 +- libc/localedata/locales/ss_ZA | 5 +- libc/localedata/locales/st_ZA | 5 +- libc/localedata/locales/sv_SE | 4 +- libc/localedata/locales/sw_KE | 6 +- libc/localedata/locales/sw_TZ | 6 +- libc/localedata/locales/szl_PL | 5 +- libc/localedata/locales/ta_IN | 7 +- libc/localedata/locales/ta_LK | 6 + libc/localedata/locales/te_IN | 8 +- libc/localedata/locales/tg_TJ | 7 +- libc/localedata/locales/tl_PH | 7 +- libc/localedata/locales/tn_ZA | 5 +- libc/localedata/locales/tr_CY | 4 +- libc/localedata/locales/tr_TR | 4 +- libc/localedata/locales/ts_ZA | 5 +- libc/localedata/locales/tt_RU | 7 +- libc/localedata/locales/tt_RU@iqtelif | 7 +- libc/localedata/locales/ug_CN | 21 +- libc/localedata/locales/unm_US | 6 +- libc/localedata/locales/ur_IN | 7 +- libc/localedata/locales/ur_PK | 7 +- libc/localedata/locales/uz_UZ | 9 +- libc/localedata/locales/uz_UZ@cyrillic | 9 +- libc/localedata/locales/ve_ZA | 8 +- libc/localedata/locales/vi_VN | 7 +- libc/localedata/locales/wa_BE | 9 +- libc/localedata/locales/wal_ET | 5 +- libc/localedata/locales/wo_SN | 7 +- libc/localedata/locales/xh_ZA | 3 +- libc/localedata/locales/yi_US | 9 +- libc/localedata/locales/yue_HK | 4 + libc/localedata/locales/zh_HK | 3 + libc/localedata/locales/zh_SG | 4 +- libc/malloc/Makefile | 2 +- libc/malloc/hooks.c | 8 + libc/malloc/malloc.c | 51 +- libc/malloc/tst-memalign.c | 15 + libc/malloc/tst-posix_memalign.c | 10 + libc/manual/crypt.texi | 10 +- libc/manual/install.texi | 2 +- libc/manual/llio.texi | 4 +- libc/manual/maint.texi | 8 +- libc/manual/math.texi | 2 +- libc/manual/memory.texi | 6 +- libc/manual/pattern.texi | 7 +- libc/manual/socket.texi | 8 +- libc/nptl/ChangeLog | 9 + libc/nptl/sysdeps/pthread/configure | 2 +- libc/nptl/sysdeps/pthread/configure.ac | 49 + libc/nptl/sysdeps/pthread/configure.in | 49 - libc/nptl/sysdeps/x86_64/configure | 2 +- libc/nptl/sysdeps/x86_64/configure.ac | 23 + libc/nptl/sysdeps/x86_64/configure.in | 23 - libc/nscd/Makefile | 2 +- libc/nss/nss_files/files-XXX.c | 59 +- libc/ports/ChangeLog | 12 +- libc/ports/ChangeLog.aarch64 | 6 + libc/ports/ChangeLog.alpha | 9 + libc/ports/ChangeLog.am33 | 6 + libc/ports/ChangeLog.arm | 20 + libc/ports/ChangeLog.hppa | 13 + libc/ports/ChangeLog.ia64 | 13 + libc/ports/ChangeLog.m68k | 6 + libc/ports/ChangeLog.microblaze | 6 + libc/ports/ChangeLog.mips | 12 + libc/ports/ChangeLog.tile | 9 + libc/ports/README | 4 +- libc/ports/sysdeps/alpha/configure | 2 +- libc/ports/sysdeps/alpha/configure.ac | 6 + libc/ports/sysdeps/alpha/configure.in | 6 - libc/ports/sysdeps/arm/armv7/configure | 2 +- libc/ports/sysdeps/arm/armv7/configure.ac | 12 + libc/ports/sysdeps/arm/armv7/configure.in | 12 - libc/ports/sysdeps/arm/bits/predefs.h | 35 - libc/ports/sysdeps/arm/configure | 2 +- libc/ports/sysdeps/arm/configure.ac | 46 + libc/ports/sysdeps/arm/configure.in | 46 - libc/ports/sysdeps/arm/preconfigure | 4 +- libc/ports/sysdeps/arm/preconfigure.ac | 58 + libc/ports/sysdeps/arm/preconfigure.in | 58 - libc/ports/sysdeps/hppa/configure | 2 +- libc/ports/sysdeps/hppa/configure.ac | 66 + libc/ports/sysdeps/hppa/configure.in | 66 - libc/ports/sysdeps/ia64/configure | 2 +- libc/ports/sysdeps/ia64/configure.ac | 6 + libc/ports/sysdeps/ia64/configure.in | 6 - libc/ports/sysdeps/mips/configure | 2 +- libc/ports/sysdeps/mips/configure.ac | 15 + libc/ports/sysdeps/mips/configure.in | 15 - .../sysdeps/unix/sysv/linux/aarch64/configure | 2 +- .../sysdeps/unix/sysv/linux/aarch64/configure.ac | 17 + .../sysdeps/unix/sysv/linux/aarch64/configure.in | 17 - libc/ports/sysdeps/unix/sysv/linux/alpha/configure | 2 +- .../sysdeps/unix/sysv/linux/alpha/configure.ac | 5 + .../sysdeps/unix/sysv/linux/alpha/configure.in | 5 - libc/ports/sysdeps/unix/sysv/linux/am33/configure | 2 +- .../sysdeps/unix/sysv/linux/am33/configure.ac | 4 + .../sysdeps/unix/sysv/linux/am33/configure.in | 4 - libc/ports/sysdeps/unix/sysv/linux/arm/configure | 4 +- .../ports/sysdeps/unix/sysv/linux/arm/configure.ac | 6 + .../ports/sysdeps/unix/sysv/linux/arm/configure.in | 6 - .../sysdeps/unix/sysv/linux/arm/nptl/configure | 2 +- .../sysdeps/unix/sysv/linux/arm/nptl/configure.ac | 8 + .../sysdeps/unix/sysv/linux/arm/nptl/configure.in | 8 - libc/ports/sysdeps/unix/sysv/linux/ia64/configure | 2 +- .../sysdeps/unix/sysv/linux/ia64/configure.ac | 4 + .../sysdeps/unix/sysv/linux/ia64/configure.in | 4 - libc/ports/sysdeps/unix/sysv/linux/m68k/configure | 2 +- .../sysdeps/unix/sysv/linux/m68k/configure.ac | 10 + .../sysdeps/unix/sysv/linux/m68k/configure.in | 10 - .../sysdeps/unix/sysv/linux/microblaze/configure | 2 +- .../unix/sysv/linux/microblaze/configure.ac | 4 + .../unix/sysv/linux/microblaze/configure.in | 4 - libc/ports/sysdeps/unix/sysv/linux/mips/configure | 2 +- .../sysdeps/unix/sysv/linux/mips/configure.ac | 99 + .../sysdeps/unix/sysv/linux/mips/configure.in | 99 - .../sysdeps/unix/sysv/linux/mips/mips64/configure | 2 +- .../unix/sysv/linux/mips/mips64/configure.ac | 5 + .../unix/sysv/linux/mips/mips64/configure.in | 5 - libc/ports/sysdeps/unix/sysv/linux/tile/configure | 2 +- .../sysdeps/unix/sysv/linux/tile/configure.ac | 4 + .../sysdeps/unix/sysv/linux/tile/configure.in | 4 - .../sysdeps/unix/sysv/linux/tile/tilegx/configure | 2 +- .../unix/sysv/linux/tile/tilegx/configure.ac | 4 + .../unix/sysv/linux/tile/tilegx/configure.in | 4 - libc/posix/glob.c | 5 + libc/posix/tst-gnuglob.c | 10 +- libc/rt/tst-shm.c | 8 + libc/stdio-common/Makefile | 1 + libc/stdio-common/tst-sscanf.c | 34 + libc/stdio-common/vfscanf.c | 2 + libc/stdlib/div.c | 22 - libc/stdlib/ldiv.c | 22 - libc/stdlib/lldiv.c | 22 - libc/sunrpc/rpc_main.c | 3 + libc/sysdeps/gnu/configure | 2 +- libc/sysdeps/gnu/configure.ac | 47 + libc/sysdeps/gnu/configure.in | 47 - libc/sysdeps/i386/configure | 2 +- libc/sysdeps/i386/configure.ac | 93 + libc/sysdeps/i386/configure.in | 93 - libc/sysdeps/ieee754/dbl-64/sincos32.c | 14 +- libc/sysdeps/ieee754/ldbl-opt/configure | 2 +- libc/sysdeps/ieee754/ldbl-opt/configure.ac | 19 + libc/sysdeps/ieee754/ldbl-opt/configure.in | 19 - libc/sysdeps/mach/configure | 2 +- libc/sysdeps/mach/configure.ac | 126 ++ libc/sysdeps/mach/configure.in | 126 -- libc/sysdeps/mach/hurd/configure | 2 +- libc/sysdeps/mach/hurd/configure.ac | 31 + libc/sysdeps/mach/hurd/configure.in | 31 - libc/sysdeps/posix/getaddrinfo.c | 33 +- libc/sysdeps/powerpc/configure | 2 +- libc/sysdeps/powerpc/configure.ac | 21 + libc/sysdeps/powerpc/configure.in | 21 - libc/sysdeps/powerpc/powerpc32/configure | 2 +- libc/sysdeps/powerpc/powerpc32/configure.ac | 32 + libc/sysdeps/powerpc/powerpc32/configure.in | 32 - libc/sysdeps/powerpc/powerpc64/configure | 2 +- libc/sysdeps/powerpc/powerpc64/configure.ac | 42 + libc/sysdeps/powerpc/powerpc64/configure.in | 42 - libc/sysdeps/powerpc/powerpc64/power7/stpcpy.S | 24 + libc/sysdeps/powerpc/powerpc64/power7/strcpy.S | 274 +++ libc/sysdeps/powerpc/powerpc64/stpcpy.S | 99 +- libc/sysdeps/powerpc/powerpc64/strcpy.S | 144 +- libc/sysdeps/s390/s390-32/configure | 2 +- libc/sysdeps/s390/s390-32/configure.ac | 6 + libc/sysdeps/s390/s390-32/configure.in | 6 - libc/sysdeps/s390/s390-64/configure | 2 +- libc/sysdeps/s390/s390-64/configure.ac | 6 + libc/sysdeps/s390/s390-64/configure.in | 6 - libc/sysdeps/sh/configure | 2 +- libc/sysdeps/sh/configure.ac | 6 + libc/sysdeps/sh/configure.in | 6 - libc/sysdeps/sparc/configure | 2 +- libc/sysdeps/sparc/configure.ac | 59 + libc/sysdeps/sparc/configure.in | 59 - libc/sysdeps/sparc/sparc32/fpu/s_fdim.S | 3 +- libc/sysdeps/unix/sysv/linux/configure | 2 +- libc/sysdeps/unix/sysv/linux/configure.ac | 215 ++ libc/sysdeps/unix/sysv/linux/configure.in | 215 -- libc/sysdeps/unix/sysv/linux/powerpc/configure | 2 +- libc/sysdeps/unix/sysv/linux/powerpc/configure.ac | 37 + libc/sysdeps/unix/sysv/linux/powerpc/configure.in | 37 - libc/sysdeps/unix/sysv/linux/shm_open.c | 14 +- libc/sysdeps/x86_64/configure | 2 +- libc/sysdeps/x86_64/configure.ac | 57 + libc/sysdeps/x86_64/configure.in | 57 - libc/sysdeps/x86_64/preconfigure | 2 +- libc/sysdeps/x86_64/preconfigure.ac | 20 + libc/sysdeps/x86_64/preconfigure.in | 20 - libc/time/strptime_l.c | 6 +- libc/time/tst-strptime.c | 1 + libc/time/tzfile.c | 26 +- 279 files changed, 6556 insertions(+), 4037 deletions(-) delete mode 100644 libc/bits/predefs.h create mode 100644 libc/configure.ac delete mode 100644 libc/configure.in create mode 100644 libc/libidn/configure.ac delete mode 100644 libc/libidn/configure.in create mode 100644 libc/localedata/locales/anp_IN create mode 100644 libc/nptl/sysdeps/pthread/configure.ac delete mode 100644 libc/nptl/sysdeps/pthread/configure.in create mode 100644 libc/nptl/sysdeps/x86_64/configure.ac delete mode 100644 libc/nptl/sysdeps/x86_64/configure.in create mode 100644 libc/ports/sysdeps/alpha/configure.ac delete mode 100644 libc/ports/sysdeps/alpha/configure.in create mode 100644 libc/ports/sysdeps/arm/armv7/configure.ac delete mode 100644 libc/ports/sysdeps/arm/armv7/configure.in delete mode 100644 libc/ports/sysdeps/arm/bits/predefs.h create mode 100644 libc/ports/sysdeps/arm/configure.ac delete mode 100644 libc/ports/sysdeps/arm/configure.in create mode 100644 libc/ports/sysdeps/arm/preconfigure.ac delete mode 100644 libc/ports/sysdeps/arm/preconfigure.in create mode 100644 libc/ports/sysdeps/hppa/configure.ac delete mode 100644 libc/ports/sysdeps/hppa/configure.in create mode 100644 libc/ports/sysdeps/ia64/configure.ac delete mode 100644 libc/ports/sysdeps/ia64/configure.in create mode 100644 libc/ports/sysdeps/mips/configure.ac delete mode 100644 libc/ports/sysdeps/mips/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/alpha/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/alpha/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/am33/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/am33/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/arm/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/arm/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/ia64/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/ia64/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/m68k/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/m68k/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/mips/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/mips/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/tile/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/tile/configure.in create mode 100644 libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.ac delete mode 100644 libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.in create mode 100644 libc/sysdeps/gnu/configure.ac delete mode 100644 libc/sysdeps/gnu/configure.in create mode 100644 libc/sysdeps/i386/configure.ac delete mode 100644 libc/sysdeps/i386/configure.in create mode 100644 libc/sysdeps/ieee754/ldbl-opt/configure.ac delete mode 100644 libc/sysdeps/ieee754/ldbl-opt/configure.in create mode 100644 libc/sysdeps/mach/configure.ac delete mode 100644 libc/sysdeps/mach/configure.in create mode 100644 libc/sysdeps/mach/hurd/configure.ac delete mode 100644 libc/sysdeps/mach/hurd/configure.in create mode 100644 libc/sysdeps/powerpc/configure.ac delete mode 100644 libc/sysdeps/powerpc/configure.in create mode 100644 libc/sysdeps/powerpc/powerpc32/configure.ac delete mode 100644 libc/sysdeps/powerpc/powerpc32/configure.in create mode 100644 libc/sysdeps/powerpc/powerpc64/configure.ac delete mode 100644 libc/sysdeps/powerpc/powerpc64/configure.in create mode 100644 libc/sysdeps/powerpc/powerpc64/power7/stpcpy.S create mode 100644 libc/sysdeps/powerpc/powerpc64/power7/strcpy.S create mode 100644 libc/sysdeps/s390/s390-32/configure.ac delete mode 100644 libc/sysdeps/s390/s390-32/configure.in create mode 100644 libc/sysdeps/s390/s390-64/configure.ac delete mode 100644 libc/sysdeps/s390/s390-64/configure.in create mode 100644 libc/sysdeps/sh/configure.ac delete mode 100644 libc/sysdeps/sh/configure.in create mode 100644 libc/sysdeps/sparc/configure.ac delete mode 100644 libc/sysdeps/sparc/configure.in create mode 100644 libc/sysdeps/unix/sysv/linux/configure.ac delete mode 100644 libc/sysdeps/unix/sysv/linux/configure.in create mode 100644 libc/sysdeps/unix/sysv/linux/powerpc/configure.ac delete mode 100644 libc/sysdeps/unix/sysv/linux/powerpc/configure.in create mode 100644 libc/sysdeps/x86_64/configure.ac delete mode 100644 libc/sysdeps/x86_64/configure.in create mode 100644 libc/sysdeps/x86_64/preconfigure.ac delete mode 100644 libc/sysdeps/x86_64/preconfigure.in diff --git a/libc/ChangeLog b/libc/ChangeLog index cb3651ac8..3b65d5a7b 100644 --- a/libc/ChangeLog +++ b/libc/ChangeLog @@ -1,3 +1,281 @@ +2013-11-06 David S. Miller + + [BZ #15985] + * sysdeps/sparc/sparc32/fpu/s_fdim.S (__fdim): Do not use fnegd + on pre-v9 cpus, use a fnegs+fmovs sequence instead. + +2013-11-06 Will Newton + + * manual/memory.texi (Malloc Examples): Remove register + keyword from examples. + +2013-11-04 Chris Leonard + + * locale/iso-639.def: Correct Walaita (wal) and add Unami Delaware (unm). + +2013-11-04 Joseph Myers + + * include/stdc-predef.h [__GCC_IEC_559] (__STDC_IEC_559__): Define + depending on [__GCC_IEC_559 > 0]. + [__GCC_IEC_559_COMPLEX] (__STDC_IEC_559_COMPLEX__): Define + depending on [__GCC_IEC_559_COMPLEX > 0]. + +2013-11-03 Chris Leonard + + * locale/iso-639.def: Add Quechua, Southern (quz) and Silesian (szl) + to iso-639.def. + +2013-11-03 Ondřej Bílka + + * elf/rtld.c: Remove unused NONTLS_INIT_TP. + +2013-11-01 Ondřej Bílka + + [BZ #16112] + * malloc/malloc (malloc_info): Do not handle first bin as + special case. + +2013-11-01 Chris Leonard + + * locale/iso-639.def: Add Central Nahuatl (nhn). + +2013-11-01 Bruno Haible + + [BZ #7003] + * manual/math.texi (BSD Random): Specify range upper bound as + in POSIX. + +2013-10-31 Chris Leonard + + * locale/iso-639.def: Add Meadow Mari (mhr). + +2013-10-31 Ondřej Bílka + + [BZ #14752], [BZ #15763] + * sysdeps/unix/sysv/linux/shm_open.c (shm_open, shm_unlink): + Validate name. + * rt/tst_shm.c: Add test for escaping directory. + +2013-10-31 Andreas Schwab + + [BZ #15917] + * stdio-common/vfscanf.c (_IO_vfwscanf): Handle leading '0' not + followed by 'x' as part of digit sequence. + * stdio-common/tst-sscanf.c (double_tests2): New tests. + +2013-10-31 Marc-Antoine Perennou + + [BZ #16037] + * configure.ac: allow GNU Make 4.0 and greater. + * configure: Regenerated. + +2013-10-30 Will Newton + + [BZ #16038] + * malloc/hooks.c (memalign_check): Limit alignment to the + maximum representable power of two. + * malloc/malloc.c (__libc_memalign): Likewise. + * malloc/tst-memalign.c (do_test): Add test for very + large alignment values. + * malloc/tst-posix_memalign.c (do_test): Likewise. + +2013-10-30 Ondřej Bílka + + [BZ #11087] + * malloc/malloc.c (sysmalloc): Compute statistics atomically. + (munmap_chunk): Likewise. + (mremap_chunk): Likewise. + +2013-10-30 Ondřej Bílka + + [BZ #15799] + * stdlib/div.c (div): Remove obsolete code. + * stdlib/ldiv.c (ldiv): Likewise. + * stdlib/lldiv.c (lldiv): Likewise. + +2013-10-30 Siddhesh Poyarekar + + [BZ #16071] + * nss/nss_files/files-XXX.c (get_contents_ret): New + enumerator. + (get_contents): New function. + (internal_getent): Use it. Expand size of LINEBUFLEN. + +2013-10-30 Mike Frysinger + + * configure.in: Moved to ... + * configure.ac: ... here. Change reference to configure.in + to configure.ac. + * sysdeps/arm/preconfigure.ac: ... here. + configure.in to configure.ac. + * sysdeps/gnu/configure.in: Moved to ... + * sysdeps/gnu/configure.ac: ... here. + * sysdeps/i386/configure.in: Moved to ... + * sysdeps/i386/configure.ac: ... here. + * sysdeps/ieee754/ldbl-opt/configure.in: Moved to ... + * sysdeps/ieee754/ldbl-opt/configure.ac: ... here. + * sysdeps/mach/configure.in: Moved to ... + * sysdeps/mach/configure.ac: ... here. + * sysdeps/mach/hurd/configure.in: Moved to ... + * sysdeps/mach/hurd/configure.ac: ... here. + * sysdeps/powerpc/configure.in: Moved to ... + * sysdeps/powerpc/configure.ac: ... here. + * sysdeps/powerpc/powerpc32/configure.in: Moved to ... + * sysdeps/powerpc/powerpc32/configure.ac: ... here. + * sysdeps/powerpc/powerpc64/configure.in: Moved to ... + * sysdeps/powerpc/powerpc64/configure.ac: ... here. + * sysdeps/s390/s390-32/configure.in: Moved to ... + * sysdeps/s390/s390-32/configure.ac: ... here. + * sysdeps/s390/s390-64/configure.in: Moved to ... + * sysdeps/s390/s390-64/configure.ac: ... here. + * sysdeps/sh/configure.in: Moved to ... + * sysdeps/sh/configure.ac: ... here. + * sysdeps/sparc/configure.in: Moved to ... + * sysdeps/sparc/configure.ac: ... here. + * sysdeps/unix/sysv/linux/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/configure.ac: ... here. + * sysdeps/unix/sysv/linux/powerpc/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/powerpc/configure.ac: ... here. + * sysdeps/x86_64/configure.in: Moved to ... + * sysdeps/x86_64/configure.ac: ... here. + * sysdeps/x86_64/preconfigure.in: Moved to ... + * sysdeps/x86_64/preconfigure.ac: ... here. + * aclocal.m4: Change reference to configure.in to configure.ac. + * config.h.in: Likewise. + * manual/install.texi: Likewise. + * manual/maint.texi: Likewise. + * Makefile: Likewise. + * malloc/Makefile: Likewise. + * nscd/Makefile: Likewise. + * Makeconfig: Change reference to configure.in and + preconfigure.in to configure.ac and preconfigure.ac + respectively. + * INSTALL: Regenerated. + * configure: Likewise. + * sysdeps/gnu/configure: Likewise. + * sysdeps/i386/configure: Likewise. + * sysdeps/ieee754/ldbl-opt/configure: Likewise. + * sysdeps/mach/configure: Likewise. + * sysdeps/mach/hurd/configure: Likewise. + * sysdeps/powerpc/configure: Likewise. + * sysdeps/powerpc/powerpc32/configure: Likewise. + * sysdeps/powerpc/powerpc64/configure: Likewise. + * sysdeps/s390/s390-32/configure: Likewise. + * sysdeps/s390/s390-64/configure: Likewise. + * sysdeps/sh/configure: Likewise. + * sysdeps/sparc/configure: Likewise. + * sysdeps/unix/sysv/linux/configure: Likewise. + * sysdeps/unix/sysv/linux/powerpc/configure: Likewise. + * sysdeps/x86_64/configure: Likewise. + * sysdeps/x86_64/preconfigure: Likewise. + +2013-10-29 Andreas Schwab + + * stdio-common/Makefile (tst-swscanf-ENV): Define. + +2013-10-28 Siddhesh Poyarekar + + * benchtests/pow-inputs: Add new inputs. + + * benchtests/exp-inputs: Add new inputs. + + * sysdeps/ieee754/dbl-64/sincos32.c (__sin32): Consolidate + conditional check for return value. + (__cos32): Likewise. + +2013-10-26 Adhemerval Zanella + + * sysdeps/powerpc/powerpc64/strcpy.S (strcpy): Add word load/store + to provide a boost for large inputs with word alignment. + * sysdeps/powerpc/powerpc64/stpcpy.S (__stpcpy): Rewrite + implementation based on optimized PPC64 strcpy. + * sysdeps/powerpc/powerpc64/power7/strcpy.S: New file: optimized + strcpy for PPC64/POWER7 based on both doubleword and word load/store. + * sysdeps/powerpc/powerpc64/power7/stpcpy.S: New file: optimized + stpcpy for PPC64/POWER7 based on PPC64/POWER7 strcpy. + +2013-10-25 Ondřej Bílka + + [BZ #2801] + * manual/socket.texi (Host Names): Fix gethostbyname_r example. + +2013-10-25 Ondřej Bílka + + [BZ #14876] + * time/strptime_l.c (__strptime_internal): 14876 Read timezone entry. + * time/tst-strptime.c (day_tests): Add testcase. + +2013-10-25 Ondřej Bílka + + [BZ #14029] + * manual/pattern.texi: Acknowledge that fnmatch can fail. + +2013-10-25 Fabrice Bauzac + + [BZ #16074] + * manual/llio.texi (Memory-mapped I/O): Indicate that mmap returns + MAP_FAILED on error. + +2013-10-25 Siddhesh Poyarekar + + [BZ #16072] + * sysdeps/posix/getaddrinfo.c (gethosts): Allocate tmpbuf on + heap for large requests. + +2013-10-25 Aurelien Jarno + + [BZ #9954] + * sysdeps/posix/getaddrinfo.c (rfc3484_sort): do not assign native + result if the result has no associated interface. + * sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect + interface for all 127.X.Y.Z addresses. + +2013-10-24 Chris Leonard + + * locale/iso-639.def: Add Ligurian (lij) + +2013-10-21 Ondřej Bílka + + [BZ #15825] + * sunrpc/rpc_main.c: Document rpcgen -5. + +2013-10-19 Michael Stahl + + * elf/rtld.c (do_preload): Print the reason why preloading failed. + +2013-10-19 Ondřej Bílka + + [BZ #10278] + * posix/glob.c: Match only directories when trailing slash is present. + * posix/tst-gnuglob.c (my_opendir): Do not open files. + (main): Add testcase. + +2013-10-19 Ondřej Bílka + + [BZ #15670] + * time/tzfile.c (__tzfile_read): Replace alloca with malloc. + +2013-10-18 Carlos O'Donell + + * manual/crypt.texi (Cryptographic Functions): Using SunRPC and + AUTH_DES will prevent FIPS 140-2 compliance. Add vindex for + AUTH_DES and cindex for FIPS 140-2. + (DES Encryption): Add cindex FIPS 46-3. + + * locale/locarchive.h (struct locarhandle): Add fname. + * locale/programs/localedef.c (main): Pass ARGV[remaining] + if an optional argument was specified to --list-archive, + otherwise NULL. + * locale/programs/locarchive.c (show_archive_content): Take new + argument fname and pass it via ah.fname to open_archive. + * locale/programs/localedef.h: Update decl. + (open_archive): If AH->fname is non-null, open that file + rather than the default file name, and don't ignore ENOENT. + (create_archive): Set AH.fname to NULL. + (delete_locales_from_archive): Likewise. + (add_locales_to_archive): Likewise. + * locale/programs/locfile.c (write_all_categories): Likewise. + 2013-10-18 Joseph Myers Aldy Hernandez diff --git a/libc/INSTALL b/libc/INSTALL index 9d55fccca..ec960ad2a 100644 --- a/libc/INSTALL +++ b/libc/INSTALL @@ -380,7 +380,7 @@ build the GNU C Library: should definitely upgrade `sed'. -If you change any of the `configure.in' files you will also need +If you change any of the `configure.ac' files you will also need * GNU `autoconf' 2.53 or higher diff --git a/libc/Makeconfig b/libc/Makeconfig index dc9363c4c..36ba506cd 100644 --- a/libc/Makeconfig +++ b/libc/Makeconfig @@ -88,16 +88,16 @@ $(common-objpfx)config.status: $(..)version.h $(..)configure \ $(wildcard $(dir)/Implies) \ $(patsubst %.in,%,\ $(firstword $(wildcard \ - $(addprefix $(dir)/,configure configure.in))))) \ + $(addprefix $(dir)/,configure configure.ac))))) \ $(patsubst %.in,%,\ - $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.in)) \ + $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.ac)) \ $(patsubst %.in,%,\ $(foreach add-on,$(add-ons),\ $(firstword $(wildcard \ $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\ - configure configure.in))) \ + configure configure.ac))) \ $(wildcard $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\ - sysdeps/*/preconfigure sysdeps/*/preconfigure.in)))) + sysdeps/*/preconfigure sysdeps/*/preconfigure.ac)))) @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; \ diff --git a/libc/Makefile b/libc/Makefile index 1ff2a785b..96cfd10fe 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -38,9 +38,9 @@ chmod a-w$(patsubst %,$(comma)a+x,$(filter .,$(@D))) $@.new mv -f $@.new $@ endef -configure: configure.in aclocal.m4; $(autoconf-it) -%/configure: %/configure.in aclocal.m4; $(autoconf-it) -%/preconfigure: %/preconfigure.in aclocal.m4; $(autoconf-it) +configure: configure.ac aclocal.m4; $(autoconf-it) +%/configure: %/configure.ac aclocal.m4; $(autoconf-it) +%/preconfigure: %/preconfigure.ac aclocal.m4; $(autoconf-it) endif # $(AUTOCONF) = no @@ -59,7 +59,7 @@ endif # $(AUTOCONF) = no $(addprefix install-, no-libc.a bin lib data headers others) headers := limits.h values.h features.h gnu-versions.h bits/libc-lock.h \ - bits/xopen_lim.h gnu/libc-version.h stdc-predef.h bits/predefs.h + bits/xopen_lim.h gnu/libc-version.h stdc-predef.h echo-headers: subdir_echo-headers diff --git a/libc/NEWS b/libc/NEWS index 9e32ba5e2..bb1db5b0a 100644 --- a/libc/NEWS +++ b/libc/NEWS @@ -9,13 +9,15 @@ Version 2.19 * The following bugs are resolved with this release: - 156, 431, 832, 13028, 13982, 13985, 14155, 14547, 14699, 14910, 15048, - 15218, 15277, 15308, 15362, 15400, 15427, 15522, 15531, 15532, 15608, - 15609, 15610, 15632, 15640, 15672, 15680, 15681, 15723, 15734, 15735, - 15736, 15748, 15749, 15754, 15760, 15764, 15797, 15844, 15847, 15849, - 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893, - 15895, 15897, 15905, 15909, 15919, 15921, 15923, 15939, 15948, 15963, - 15966, 15988, 16032, 16034, 16036, 16041. + 156, 431, 832, 2801, 7003, 9954, 10278, 11087, 13028, 13982, 13985, + 14029, 14155, 14547, 14699, 14752, 14876, 14910, 15048, 15218, 15277, + 15308, 15362, 15400, 15427, 15522, 15531, 15532, 15608, 15609, 15610, + 15632, 15640, 15670, 15672, 15680, 15681, 15723, 15734, 15735, 15736, + 15748, 15749, 15754, 15760, 15763, 15764, 15797, 15799, 15825, 15844, + 15847, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, + 15892, 15893, 15895, 15897, 15905, 15909, 15917, 15919, 15921, 15923, + 15939, 15948, 15963, 15966, 15985, 15988, 16032, 16034, 16036, 16037, + 16041, 16071, 16072, 16074, 16078, 16112. * CVE-2012-4412 The strcoll implementation caches indices and rules for large collation sequences to optimize multiple passes. This cache @@ -44,8 +46,11 @@ Version 2.19 heap when passed very large allocation size values (Bugzilla #15855, #15856, #15857). -* New locales: ak_GH, cmn_TW, hak_TW, lzh_TW, nan_TW, quz_PE, pap_AW, pap_CW, - ar_SS. +* CVE-2013-4458 Stack overflow in getaddrinfo with large number of results + for AF_INET6 has been fixed (Bugzilla #16072). + +* New locales: ak_GH, anp_IN, ar_SS, cmn_TW, hak_TW, lzh_TW, nan_TW, pap_AW, + pap_CW, quz_PE * Substantially revised locales: gd_GB, ht_HT @@ -60,6 +65,18 @@ Version 2.19 command-line options to generate locales for a different system from that for which the C library was built. +* Binary locale files now only depend on the endianness of the system for + which they are generated and not on other properties of that system. As a + consequence, binary files generated with new localedef may be incompatible + with old versions of the GNU C Library, and binary files generated with + old localedef may be incompatible with this version of the GNU C Library, + in the following circumstances: + + + Locale files may be incompatible on m68k systems. + + + Locale archive files (but not separate files for individual locales) may + be incompatible on systems where plain "char" is signed. + * The configure option --disable-versioning has been removed. Builds with --disable-versioning had not worked for several years. @@ -69,6 +86,8 @@ Version 2.19 * SystemTap probes for malloc have been introduced. * Support for powerpc64le has been added. + +* The soft-float powerpc port now supports e500 processors. Version 2.18 diff --git a/libc/aclocal.m4 b/libc/aclocal.m4 index 64351d0a0..bc48586dc 100644 --- a/libc/aclocal.m4 +++ b/libc/aclocal.m4 @@ -9,8 +9,8 @@ m4_defn([AC_AUTOCONF_VERSION]) ), [63])])dnl dnl dnl We define the macro GLIBC_PROVIDES to do an AC_PROVIDE for each macro -dnl which appears in configure.in before the sysdep configure scripts are run. -dnl Each sysdep configure.in does GLIBC_PROVIDES first, to avoid any +dnl which appears in configure.ac before the sysdep configure scripts are run. +dnl Each sysdep configure.ac does GLIBC_PROVIDES first, to avoid any dnl AC_REQUIREs or AC_BEFOREs duplicating their code. dnl define([GLIBC_PROVIDES], [dnl @@ -39,7 +39,7 @@ dnl Ripped out of AS_INIT, which does more cruft we do not want. m4_wrap([m4_divert_pop([BODY])[]]) m4_divert_push([BODY])[]dnl dnl End of ripped out of AS_INIT. -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! define([_AC_LANG], [C])dnl ])dnl dnl diff --git a/libc/benchtests/exp-inputs b/libc/benchtests/exp-inputs index 593ad7c74..aff3fb42f 100644 --- a/libc/benchtests/exp-inputs +++ b/libc/benchtests/exp-inputs @@ -1,8 +1,589 @@ ## args: double ## ret: double ## includes: math.h +0x1.6200315ce81efp9 +0x1.0000000031579p0 +0x1.000000009b551p0 +0x1.000000067ace6p0 +0x1.6200315ad0fc0p9 +0x1.0000000000060p0 +0x1.00000004237a7p0 +0x1.6200315ad0fb2p9 +0x1.0000000054ac1p0 +0x1.6200315c98bcdp9 +0x1.0000000002d96p0 +0x1.0000000000038p256 +0x1.6200315ad0fafp9 +0x1.6200315d680ecp9 +0x1.0000000000042p0 +0x1.0000000000048p256 +0x1.6200315ad0fbcp9 +0x1.000000000000dp256 +0x1.000000000001ep256 +0x1.0000000000015p256 +0x1.0000000000018p-256 +0x1.000000000002ep0 +0x1.000000000004ep-256 +0x1.000000000001dp-256 +0x1.6200315ad0fb4p9 +0x1.00000002ca5f8p0 +0x1.0000000000017p256 +0x1.0000000000022p0 +0x1.0000000000059p256 +0x1.0000000000028p0 +0x1.6200315ad0fa7p9 +0x1.000000048059cp0 +0x1.0000000000023p256 +0x1.000000000003ap-256 +0x1.0000000000022p-256 +0x1.6200315f211bep9 +0x1.000000000002ep-256 +0x1.0000000000041p256 +0x1.0000000000042p-256 +0x1.6200315ad0fcfp9 +0x1.6200315ad0fd7p9 +0x1.000000004bd6fp0 +0x1.000000000000dp-256 +0x1.6200315ad0fb7p9 +0x1.000000000001fp0 +0x1.0000000000024p-256 +0x1.0000000000058p256 +0x1.6200315ad0fc5p9 +0x1.620030025fbe9p9 +0x1.000000000003dp-256 +0x1.000000000003fp-256 +0x1.0000000000009p256 +0x1.00000005c7304p0 +0x1.0000000000045p-256 +0x1.0000000000011p-256 +0x1.0000000000033p-256 +0x1.0000000000036p256 +0x1.0000000000059p-256 +0x1.0000000000001p-256 +0x1.0000000000052p-256 +0x1.000000045baafp0 +0x1.0000000000032p0 +0x1.00000004a5089p0 +0x1.00000005edb68p0 +0x1.6200315ad0fd1p9 +0x1.0000000080d5bp0 +0x1.0000000000038p0 +0x1.6200315ad0fdbp9 +0x1.000000000005fp256 +0x1.0000000291b1ep0 +0x1.6200315af4bedp9 +0x1.0000000000031p-256 +0x1.6200315aea99bp9 +0x1.00000005ab569p0 +0x1.6200315d47b24p9 +0x1.6200315ad0fd9p9 +0x1.000000000003bp256 +0x1.6200315d31eb9p9 +0x1.000000059a297p0 +0x1.0000000000011p256 +0x1.0000000000021p-256 +0x1.0000000000041p-256 +0x1.0000000000049p0 +0x1.00000006857afp0 +0x1.6200315ceb300p9 +0x1.000000000003bp-256 +0x1.6200315bcaec3p9 +0x1.0000000000018p256 +0x1.00000002f3b77p0 +0x1.6200315ad0fb5p9 +0x1.0000000000027p-256 +0x1.000000054447dp0 +0x1.6200315e84846p9 +0x1.0000000172fefp0 +0x1.00000001c8808p0 +0x1.0000000000003p256 +0x1.000000000003ep-256 +0x1.00000002ed36ep0 +0x1.000000000002ap0 +0x1.00000002ae08bp0 +0x1.000000000005dp-256 +0x1.0000000000063p256 +0x1.000000000003ep0 +0x1.0000000000037p256 +0x1.6200315ad0fb6p9 +0x1.000000000005ep0 +0x1.000000000002ap256 +0x1.0000000000056p256 +0x1.0000000266056p0 +0x1.6200315ad0fdap9 +0x1.000000000002dp0 +0x1.000000000004cp0 +0x1.6200315ad0fb8p9 +0x1.0000000000039p0 +0x1.000000000002ap-256 +0x1.6200315ad0fa5p9 +0x1.0000000000035p256 +0x1.000000000005ep256 +0x1.000000000004cp-256 +0x1.0000000000039p256 +0x1.000000055574fp0 +0x1.0000000000033p256 +0x1.6200315ad0fc2p9 +0x1.62003001fc398p9 +0x1.000000000004ap-256 +0x1.000000000001ap256 +0x1.000000005d813p0 +0x1.6200315ad0fe4p9 +0x1.0000000000030p-256 +0x1.0000000000020p-256 +0x1.0000000066565p0 +0x1.0000000000029p-256 +0x1.6200315ad0fc7p9 +0x1.000000049e880p0 +0x1.0000000609903p0 +0x1.00000005e309fp0 +0x1.0000000000013p256 +0x1.0000000000026p0 +0x1.000000000002dp-256 +0x1.6200315ad0fbdp9 +0x1.000000000000fp256 +0x1.00000001a9d52p0 +0x1.000000000002cp256 +0x1.0000000479d93p0 +0x1.0000000000016p256 +0x1.00000001d7d63p0 +0x1.6200315bd5b13p9 +0x1.00000001097e9p0 +0x1.0000000000030p0 +0x1.6200315d37392p9 +0x1.6200315ad0fe0p9 +0x1.6200315ba6119p9 +0x1.000000000003ep256 +0x1.00000000e87eap0 +0x1.0000000000002p256 +0x1.00000006501c2p0 +0x1.000000000004bp256 +0x1.620030022b98ap9 +0x1.000000000003fp0 +0x1.00000002d0e01p0 +0x1.00000001f6819p0 +0x1.0000000000020p256 +0x1.0000000000021p0 +0x1.000000000005cp256 +0x1.6200315ad0faep9 +0x1.6200315c61515p9 +0x1.0000000000008p256 +0x1.0000000000056p-256 +0x1.00000004f2923p0 +0x1.000000000001ep0 +0x1.0000000000028p256 +0x1.000000000004fp256 +0x1.000000000002cp-256 +0x1.0000000000025p0 +0x1.6200315e1215ap9 +0x1.6200315ad0fb3p9 +0x1.6200315e921dap9 +0x1.6200315ad0fd6p9 +0x1.0000000000049p256 +0x1.000000000004dp256 +0x1.0000000000042p256 +0x1.0000000000051p0 +0x1.6200315d83129p9 +0x1.0000000690278p0 +0x1.0000000000036p0 +0x1.0000000000026p256 +0x1.000000000005fp-256 +0x1.000000000000cp256 +0x1.0000000000007p256 +0x1.000000050a3fep0 +0x1.000000000001fp-256 +0x1.000000000002ep256 +0x1.000000000004ep256 +0x1.6200315f00e77p9 +0x1.6200315ad0fd2p9 +0x1.6200315d4ee5bp9 +0x1.00000004552a6p0 +0x1.6200315ad0fe3p9 +0x1.000000003a2cbp0 +0x1.6200315ad0fdfp9 +0x1.00000002b4894p0 +0x1.0000000000022p256 +0x1.000000023a58ep0 +0x1.6200315ad0fd8p9 +0x1.0000000000029p256 +0x1.6200315efe051p9 +0x1.0000000205d74p0 +0x1.0000000000045p256 +0x1.6200315ad0fb0p9 +0x1.6200315d77cc5p9 +0x1.000000065ac8bp0 +0x1.0000000000037p0 +0x1.6200315ad0fbfp9 +0x1.6200315dacc95p9 +0x1.000000000002fp-256 +0x1.000000000000ep256 +0x1.00000006bf05cp0 +0x1.0000000000051p256 +0x1.0000000000062p0 +0x1.0000000000031p256 +0x1.6200315be943dp9 +0x1.000000000005bp0 +0x1.0000000000045p0 +0x1.6200315e08505p9 +0x1.000000000001bp256 +0x1.0000000000005p256 +0x1.000000000005dp256 +0x1.6200315ad0fc9p9 +0x1.6200315e97676p9 +0x1.0000000000024p0 +0x1.0000000000003p-256 +0x1.6200315ad0fd4p9 +0x1.6200315ee2c3bp9 +0x1.0000000000020p0 +0x1.6200315ad0fdcp9 +0x1.0000000000053p-256 +0x1.000000000004bp-256 +0x1.6200315cafb6ep9 +0x1.000000000003ap256 +0x1.0000000000013p-256 +0x1.0000000000060p256 +0x1.6200315ad0fd3p9 +0x1.0000000000009p-256 +0x1.000000000005cp-256 +0x1.00000000acff5p0 +0x1.000000000004dp0 +0x1.0000000000050p256 +0x1.6200315e34fc6p9 +0x1.0000000000044p-256 +0x1.000000000002dp256 +0x1.0000000000062p256 +0x1.6200315bf4442p9 +0x1.6200315ad0fabp9 +0x1.000000000003cp0 +0x1.0000000000019p256 +0x1.000000000000cp-256 +0x1.000000000000bp-256 +0x1.0000000000063p0 +0x1.000000000003cp256 +0x1.0000000000061p-256 +0x1.6200315ad0fb1p9 +0x1.00000006456f9p0 +0x1.6200315ad0fb9p9 +0x1.6200315ad0fccp9 +0x1.6200315ad0fd5p9 +0x1.6200315ad0fd0p9 +0x1.0000000353687p0 +0x1.6200315ad0facp9 +0x1.000000000005bp256 +0x1.6200315e8bb51p9 +0x1.6200315d73094p9 +0x1.000000027bdbap0 +0x1.000000006f2b7p0 +0x1.0000000000057p0 +0x1.0000000298327p0 +0x1.000000019a7f7p0 +0x1.6200315b7b9ddp9 +0x1.000000041cf9ep0 +0x1.0000000000040p256 +0x1.0000000000059p0 +0x1.6200315ad0fe2p9 +0x1.0000000000056p0 +0x1.0000000000034p-256 +0x1.6200315cf49aep9 +0x1.0000000000017p-256 +0x1.000000000bae8p0 +0x1.6200315ad0fc1p9 +0x1.00000004c336dp0 +0x1.0000000000032p256 +0x1.6200315ae9fb5p9 +0x1.000000000004cp256 +0x1.0000000000057p-256 +0x1.0000000000035p-256 +0x1.6200315d4d455p9 42 +0x1.6200315ad0fa8p9 +0x1.00000002502f2p0 +0x1.6200315ad0fa3p9 +0x1.000000000005dp0 +0x1.0000000000012p-256 +0x1.0000000000006p256 +0x1.0000000000028p-256 +0x1.0000000000044p256 +0x1.000000000004ap0 +0x1.00000000927ffp0 +0x1.0000000000044p0 +0x1.00000006f8909p0 +0x1.6200315ad0fc8p9 +0x1.0000000000061p0 +0x1.000000012a7e8p0 +0x1.000000000000fp-256 +0x1.6200315b6f0a0p9 +0x1.00000001b92adp0 +0x1.000000000005ep-256 +0x1.6200315d436fep9 +0x1.000000004301dp0 +0x1.0000000000023p0 +0x1.000000000005ap0 +0x1.6200315e7189ap9 +0x1.0000000000033p0 +0x1.6200315c19f20p9 +0x1.0000000000040p-256 +0x1.0000000000031p0 +0x1.0000000000027p0 +0x1.6200315d1dfeap9 +0x1.0000000588fc5p0 +0x1.000000015ad42p0 +0x1.6200300248616p9 +0x1.0000000000021p256 +0x1.6200315ad0fcap9 +0x1.6200315ad0fbbp9 +0x1.6200315ad0fbep9 +0x1.0000000000052p0 +0x1.0000000000016p-256 +0x1.0000000000005p-256 +0x1.0000000000046p256 +0x1.000000000003cp-256 +0x1.0000000000054p0 +0x1.000000034ce7ep0 +0x1.0000000000050p-256 +0x1.000000000002fp256 +0x1.6200315f2a44bp9 +0x1.6200315ad0fa2p9 +0x1.6200315f53addp9 +0x1.0000000000043p256 +0x1.000000000002bp0 +0x1.6200315b9a51fp9 +0x1.62003002148e6p9 +0x1.0000000000039p-256 +0x1.0000000000023p-256 +0x1.00000006d45eep0 +0x1.000000000002cp0 +0x1.0000000000055p256 +0x1.000000000000ap256 +0x1.0000000000010p-256 +0x1.0000000000047p-256 +0x1.000000000002fp0 +0x1.0000000000001p256 +0x1.000000040ff8cp0 +0x1.0000000121a96p0 +0x1.6200315c8b9bcp9 +0x1.000000000001cp-256 +0x1.0000000000063p-256 +0x1.0000000000006p-256 +0x1.000000000001ap-256 +0x1.6200300247b12p9 +0x1.0000000000046p0 +0x1.0000000000036p-256 +0x1.00000004bcb64p0 +0x1.0000000000032p-256 +0x1.0000000000057p256 +0x1.6200315e03518p9 +0x1.00000005331abp0 +0x1.000000000001ep-256 +0x1.6200315f76ad3p9 +0x1.000000000004dp-256 +0x1.000000000003bp0 +0x1.00000005b6032p0 +0x1.0000000000007p-256 +0x1.6200315ad0fc4p9 +0x1.0000000000051p-256 +0x1.000000000005cp0 +0x1.6200315ad0fc6p9 +0x1.0000000100a97p0 +0x1.0000000000040p0 +0x1.000000000004fp0 +0x1.000000000003dp0 +0x1.0000000000027p256 +0x1.0000000000000p-256 +0x1.6200315b10d8dp9 +0x1.0000000000060p-256 +0x1.6200315ad0fcdp9 +0x1.6200315ad0fa4p9 +0x1.6200315d07f8ep9 +0x1.000000000001bp-256 +0x1.0000000000041p0 +0x1.6200315ad0fe1p9 +0x1.0000000000053p0 +0x1.00000003168edp0 +0x1.0000000000000p256 +0x1.0000000000002p-256 +0x1.6200315bd4cecp9 +0x1.0000000000047p256 +0x1.6200315b2b8adp9 +0x1.000000000002bp256 +0x1.0000000000055p-256 +0x1.000000000004ap256 +0x1.00000006c9b25p0 +0x1.0000000000054p-256 +0x1.0000000000047p0 +0x1.6200315d8ee5dp9 +0x1.6200315b74b4cp9 +0x1.000000000005ap256 +0x1.0000000000043p-256 +0x1.0000000000055p0 +0x1.0000000000019p-256 +0x1.000000031d0f6p0 +0x1.00000006ede40p0 +0x1.00000002152cfp0 +0x1.6200315f61210p9 +0x1.6200315ad0fadp9 +0x1.000000044ea9dp0 +0x1.0000000000050p0 +0x1.0000000000024p256 +0x1.000000022b033p0 +0x1.0000000000043p0 +0x1.000000000001fp256 +0x1.0000000000034p0 +0x1.0000000000025p-256 +0x1.0000000000034p256 +0x1.000000000001dp0 +0x1.000000000005ap-256 +0x1.6200315ad0fddp9 +0x1.0000000577cf3p0 +0x1.000000051b6d0p0 +0x1.00000006143ccp0 +0x1.0000000000010p256 +0x1.000000061ee95p0 +0x1.6200315c3eed5p9 +0x1.00000000dfa98p0 +0x1.0000000000049p-256 +0x1.0000000000052p256 +0x1.0000000000053p256 +0x1.000000000005bp-256 +0x1.000000000000ep-256 +0x1.6200315e8ca3cp9 +0x1.6200315ad0faap9 +0x1.0000000142a95p0 +0x1.6200315ad0fcep9 +0x1.6200315ad0fcbp9 +0x1.6200315ef86c6p9 +0x1.0000000000026p-256 +0x1.6200315ed1587p9 +0x1.000000067021dp0 +0x1.00000001e72bep0 +0x1.6200315ad0fbap9 +0x1.00000000d6d46p0 +0x1.0000000000058p0 +0x1.00000000a42a3p0 +0x1.6200315b50c42p9 +0x1.6200315c4ee10p9 +0x1.0000000416795p0 +0x1.0000000000014p-256 +0x1.0000000000037p-256 +0x1.6200315ad0fa6p9 +0x1.0000000000004p-256 +0x1.0000000000054p256 +0x1.000000018254ap0 +0x1.6200315dc2365p9 +0x1.0000000000015p-256 +0x1.000000000004fp-256 +0x1.0000000665754p0 +0x1.0000000000046p-256 +0x1.6200315b2ba38p9 +0x1.000000000002bp-256 +0x1.6200315ba202ep9 +0x1.0000000000008p-256 +0x1.0000000359e90p0 +0x1.00000004dae48p0 +0x1.000000000001cp256 +0x1.0000000000062p-256 +0x1.0000000000048p0 +0x1.000000000003fp256 +0x1.6200315bcd48bp9 +0x1.6200315ad0fa9p9 +0x1.0000000000030p256 +0x1.6200315d64448p9 +0x1.0000000089aadp0 +0x1.6200315f0aa29p9 +0x1.00000005d1dcdp0 +0x1.6200315ad0fdep9 +0x1.0000000000061p256 +0x1.0000000000058p-256 +0x1.0000000000012p256 +0x1.000000000005fp0 +0x1.000000000003ap0 +0x1.000000000000bp256 +0x1.000000000004bp0 +0x1.0000000000038p-256 +0x1.0000000000029p0 +0x1.0000000000025p256 +0x1.000000000001dp256 +0x1.0000000000004p256 +0x1.6200315e2240ep9 +0x1.6200315ad0fc3p9 +0x1.6200315b2bbc3p9 +0x1.0000000000014p256 +0x1.0000000078009p0 +0x1.000000000003dp256 +0x1.6200315db488fp9 +0x1.000000000000ap-256 +0x1.000000000004ep0 +0x1.0000000000035p0 +0x1.0000000000048p-256 +# Slow path with computation in 144 bit precision. +# Implemented in: sysdeps/ieee754/dbl-64/mpexp.c +## name: 144bits +0x1.0000000002d96p0 +0x1.000000000bae8p0 +0x1.0000000031579p0 +0x1.000000003a2cbp0 +0x1.000000004301dp0 +0x1.000000004bd6fp0 +0x1.0000000054ac1p0 +0x1.000000005d813p0 +0x1.00000005ab569p0 +0x1.00000005b6032p0 +0x1.00000005c7304p0 +0x1.00000005d1dcdp0 +0x1.00000005e309fp0 +0x1.00000005edb68p0 +0x1.0000000609903p0 +0x1.00000006143ccp0 +0x1.000000061ee95p0 +0x1.00000006456f9p0 +0x1.00000006501c2p0 +0x1.000000065ac8bp0 +0x1.0000000665754p0 +0x1.000000067021dp0 +0x1.000000067ace6p0 +0x1.00000006857afp0 +0x1.0000000690278p0 +0x1.00000006bf05cp0 +0x1.00000006c9b25p0 +0x1.00000006d45eep0 +0x1.00000006ede40p0 +0x1.00000006f8909p0 +0x1.62003000076d2p9 +0x1.6200300017e2cp9 +0x1.6200300023ffbp9 +0x1.620030002b135p9 +0x1.6200300030a8bp9 +0x1.620030003123fp9 +0x1.62003000652b3p9 +0x1.620030007bf4ap9 +0x1.6200300081a79p9 +0x1.6200300090289p9 +0x1.620030009dcbbp9 +0x1.62003000c07cep9 +0x1.62003000ee5dbp9 +0x1.62003000fa646p9 +0x1.62003000fe2cap9 +0x1.6200300125996p9 +0x1.6200300130865p9 +0x1.6200300133673p9 +0x1.6200300136fdfp9 +0x1.6200300150360p9 +0x1.620030016c416p9 +0x1.6200315ee2c3bp9 +0x1.6200315ef86c6p9 +0x1.6200315efe051p9 +0x1.6200315f00e77p9 +0x1.6200315f0aa29p9 +0x1.6200315f211bep9 +0x1.6200315f2a44bp9 +0x1.6200315f53addp9 +0x1.6200315f61210p9 +0x1.6200315f76ad3p9 # Slowest path with computation in 768 bit precision. # Implemented in: sysdeps/ieee754/dbl-64/mpexp.c ## name: 768bits 708.00096423260981737257679924368858 +0x1.00000027f5496p0 +0x1.0000015853da7p0 +0x1.0000098e5e007p0 +0x1.0000099a1ac59p0 diff --git a/libc/benchtests/pow-inputs b/libc/benchtests/pow-inputs index 96b1b6c2a..78f8ac73d 100644 --- a/libc/benchtests/pow-inputs +++ b/libc/benchtests/pow-inputs @@ -2,7 +2,510 @@ ## ret: double ## includes: math.h 42.0, 42.0 +-0x1.086f771a2b37bp696, 0x1.592b453fe869fp-81 +0x1.19eb12518e61bp-217, 0x1.c87753325f271p59 +0x1.5c68b7b390060p-869, -0x1.0000000000000p-64 +0x1.d96cb2cd196ebp3, 0x1.0000000000000p-64 +-0x1.f7cb93ee0ba9bp-238, 0x1.b7f046c622df6p691 +0x1.5cf5307b64e94p-233, 0x1.4499d7e88a731p124 +0x1.58bc610fde155p756, -0x1.0000000000000p-64 +0x1.11e4c61e2489ep9, 0x1.f3ddd0aadf9e9p94 +0x1.064765103f18ap-245, 0x1.a413811779c11p89 +-0x1.a26e540b1b5e0p77, 0x1.5987a1b0f6368p897 +0x1.465db461ffd24p681, -0x1.0000000000000p-64 +-0x1.b986d646b93b4p-100, -0x1.936ff2a7c8adep-420 +0x1.af0d371d0a43dp-197, 0x1.f185f2aba0958p217 +0x1.13ce451492820p115, -0x1.1598c3d54c625p81 +0x1.d5ec14b6de205p-604, -0x1.0000000000000p-64 +0x1.cf8ad6a495d19p-100, 0x1.8d2563e08105dp7 +0x1.1a7d3100f9ef4p-636, -0x1.0000000000000p-64 +-0x1.6dd9a7d0122f5p421, 0x1.199895f013a09p49 +0x1.b892e5125d7d1p-345, 0x1.0000000000000p-64 +0x1.5dfa7063ce092p996, 0x1.0000000000000p-64 +0x1.9e7d74cdbf190p512, -0x1.3d1b5206e8127p237 +0x1.b941e202e240dp-325, -0x1.0000000000000p-64 +-0x1.fbe85766fae96p-463, 0x1.91c903c89b075p85 +0x1.eab5553bcdfbap-957, 0x1.ab0a06811189cp90 +0x1.4c2c90f483a09p917, -0x1.0000000000000p-64 +0x1.014bc72248db8p439, -0x1.e1bef116ca6d9p112 +-0x1.6733d0746880bp-316, 0x1.8a34e6c887c39p-107 +-0x1.5a9b05cc4e1c4p461, -0x1.88d2560562b17p-798 +0x1.9690663e74e47p967, -0x1.0000000000000p-64 +-0x1.125986687c812p-159, -0x1.bd3236342d0f4p550 +0x1.3d6422e5177bep-951, 0x1.3878a292f55d9p226 +-0x1.9922669366d2dp590, -0x1.ae14d63976e00p-684 +0x1.d838c66e05cc9p256, 0x1.0000000000000p-64 +0x1.c319328022c2cp890, -0x1.4a627098d6e49p170 +0x1.0deee25028507p461, 0x1.310f343ce0281p94 +0x1.279923dac3d31p147, 0x1.0000000000000p-64 +0x1.e27fe364ee0b4p963, -0x1.107d33f004629p245 +-0x1.8160e4b7efcecp833, -0x1.9612560bf9302p-472 +-0x1.7814633c7452bp-821, -0x1.d36af1ef2c42fp636 +0x1.bac865bccd66ep113, -0x1.454be507db267p19 +0x1.c75b53051ead0p-931, -0x1.0000000000000p-64 +-0x1.cab4e5935aeaep318, -0x1.6794550b87520p-257 +0x1.088056b5fbc0dp-459, 0x1.0000000000000p-64 +0x1.1f8eb28937183p748, -0x1.b2a940cf17bc0p217 +0x1.ba85352faba13p-796, -0x1.0000000000000p-64 +0x1.1d3984c620975p460, 0x1.0000000000000p-64 +0x1.37acd13a9ea78p1019, 0x1.0000000000000p-64 +0x1.0e9d041b054d3p-411, 0x1.0000000000000p-64 +0x1.a156c095ec992p102, -0x1.46f561fd1fda9p98 +-0x1.273ca2d449455p471, -0x1.fa6c92046c475p-860 +-0x1.7b475167ae88ep-116, -0x1.eba627003ccc5p-339 +0x1.2996c344cf7dcp-564, 0x1.21df51e88e157p161 +-0x1.7d29f253d3e79p636, -0x1.8e30a1ba55f7fp77 +0x1.99ffe6fb747bep1003, -0x1.8b1047a0ed3b3p67 +0x1.248c46b353471p251, -0x1.3aa8631084564p8 +-0x1.500c56dfd8fa0p-869, 0x1.819212336e2afp-523 +0x1.012185cb5e155p-672, 0x1.dcbc907d906f0p203 +0x1.964221fe0b0c5p-260, -0x1.0000000000000p-64 +-0x1.172f10899cbcep669, 0x1.e4e656fea6c19p663 +0x1.e356e63b681dep989, -0x1.dd9d772868663p41 +0x1.ccd0118265376p287, -0x1.22ae0058250b6p184 +0x1.3de177d6762ebp742, -0x1.ebc180d571e12p58 +0x1.04caa30a223c6p-294, 0x1.0000000000000p-64 +-0x1.e0ffa63b800fcp-938, 0x1.0a2c229973ed9p149 +0x1.e0ffa63b800fcp-938, 0x1.0a2c229973ed9p149 +0x1.d43815bff9e7dp-685, 0x1.825755f8cae4bp168 +0x1.fe3b21bec8806p456, 0x1.0000000000000p-64 +0x1.b26d766ab1f27p-162, 0x1.184f242e49092p249 +-0x1.1c70d750f61abp-899, 0x1.e3f3e7ec803dap759 +0x1.220fe763e4353p897, 0x1.6a6f650adecc0p141 +0x1.d6f7716723825p-58, 0x1.0000000000000p-64 +0x1.2b0242282c767p308, 0x1.c9dd84f859214p104 +0x1.7d0ee4b3bb946p-563, -0x1.9d1683c6f5c5ap226 +-0x1.8547b5d202937p967, -0x1.14e58570b43a5p-765 +-0x1.568636c53d51fp-638, 0x1.164257f3ab632p-455 +0x1.6d7936f1f5553p-435, 0x1.8f26767f92ccbp147 +0x1.7c18551f15775p147, -0x1.0000000000000p-64 +-0x1.f2ac8209992fbp-965, 0x1.5faaf4ec0340cp-236 +-0x1.f57620fa5afd6p-69, -0x1.096166fce916ep-683 +-0x1.5054f3c0b1320p-215, 0x1.8c01c0a19db1bp-285 +0x1.e41e64f79a6a9p404, 0x1.0000000000000p-64 +0x1.71fc41e25fe85p-413, 0x1.4acb80e80f0b2p214 +0x1.fbf477dec9138p-661, 0x1.0000000000000p-64 +0x1.7575c7cd67604p498, 0x1.0000000000000p-64 +-0x1.f4dd41d434b62p-205, -0x1.981f66551fd64p805 +0x1.76ac564847250p-870, -0x1.0000000000000p-64 +0x1.bb0e222493e31p-632, 0x1.16ad202a7c871p27 +-0x1.079a76db55d95p-974, -0x1.19d4717967203p-409 +0x1.68a7c79597132p-227, 0x1.6c3871ff9ad60p195 +0x1.4961c76e0940cp271, -0x1.0000000000000p-64 +0x1.04cf75ca8337cp-273, -0x1.0000000000000p-64 +0x1.4fffe4a25f260p152, -0x1.a0e3a7e58a0d3p149 +0x1.c125c40bb88b6p-281, 0x1.bedf8672d605fp215 +0x1.bcd59440339b5p67, -0x1.d225c2cc02d3bp60 +0x1.670e80ab2399bp-841, 0x1.887061c29e4afp131 +0x1.7c6ef76479beep839, -0x1.0f72a2967e041p98 +0x1.272f8550905f7p-961, 0x1.21a6d4787c14cp190 +0x1.0a33d4e39655cp-424, 0x1.4dafa3da87794p162 +0x1.a34e21945e568p-641, 0x1.3a0a05d61f5e4p119 +-0x1.b57493dffe1c3p68, -0x1.8e19843fbbd1ep515 +0x1.a8ce11ea61121p248, -0x1.7b2376aa515e8p115 +-0x1.5feca3ddab161p-509, 0x1.3e0c341715e1cp217 +0x1.6695a0cf6063fp-689, 0x1.1852d463ea98ep37 +0x1.9367127039f77p-293, 0x1.adbe75323caaap47 +0x1.6ad5c2f704166p-336, -0x1.9bf7b7271daefp100 +0x1.6791a1f6e89bap-845, 0x1.07e4c362cf895p92 +-0x1.20d7f6086ddb2p143, 0x1.687a7454403f4p337 +-0x1.9bd727a165453p-810, 0x1.742fe1f2bf2dbp-551 +0x1.40c3b16a0dba0p438, -0x1.67a872ec62dadp90 +0x1.5e0ab0f983abfp629, -0x1.0000000000000p-64 +0x1.c929a231173cfp844, -0x1.f25c7501c8144p116 +-0x1.410ad6057e935p204, 0x1.bdb5a3d649e74p-928 +0x1.9f222254cab3fp-817, -0x1.0000000000000p-64 +0x1.7f7d22b44403fp1007, -0x1.2299d752e308dp177 +0x1.41f824f624f36p511, -0x1.0000000000000p-64 +0x1.9fbb158e5d5dfp-525, 0x1.f803767193e3fp31 +-0x1.e6a1216cab6d4p-260, 0x1.100d3600b5996p935 +-0x1.dd23855d0cc3ep1003, 0x1.3411e38397aaep-158 +-0x1.3a9e0585f7979p-827, -0x1.db64725e35a3cp-259 +0x1.ce93a02ba2924p866, 0x1.0000000000000p-64 +0x1.445bf157156d4p-100, 0x1.0000000000000p-64 +-0x1.ba1ca38fc92ebp-848, -0x1.9270247b4b009p-609 +-0x1.5ac2b6a0c0476p-172, -0x1.595d419d9babdp-399 +-0x1.94f2b24fd7b65p839, -0x1.a42b466df80e1p519 +0x1.bf66704c603f1p-859, 0x1.430eb110359f6p-63 +0x1.e9ccb07667b5fp-435, 0x1.e7cec7c8e2138p229 +-0x1.bcd59440339b5p67, -0x1.d225c2cc02d3bp60 +0x1.a5e7c0a9c79d2p-503, -0x1.0000000000000p-64 +0x1.91aa125544e6ep681, -0x1.0000000000000p-64 +0x1.5371f5af7cd6ep-628, 0x1.078a57c0c5e30p147 +-0x1.2890a668b0252p-207, 0x1.ec956130d1ea0p411 +0x1.70f496a3b1319p-183, 0x1.9f04e4dd9dee0p159 +-0x1.ab4c0689a295cp375, 0x1.ec1627c9f2374p-617 +-0x1.390d459924f44p-348, -0x1.8e36a55756005p481 +0x1.c1b483579742ap101, 0x1.a05a357f2d54fp236 +0x1.d0a84005691b7p763, -0x1.68f840a20c734p60 +0x1.f32d34d1fffd4p-40, 0x1.fc09869af26f1p131 +-0x1.e693e5dbee2e0p207, 0x1.2301f18cd9d27p817 +0x1.1f72a3d4f7881p-764, 0x1.4617565381163p177 +-0x1.7f69c3aee139ep-648, 0x1.1f42e1d53ae48p597 +-0x1.adc7f1f9fdc02p38, -0x1.a07af4087ad66p1011 +-0x1.923d01b1c3960p-276, 0x1.2c6710910e47ap889 +0x1.6b60a2accafe3p977, -0x1.78f4404c514b7p170 +-0x1.0a2a3540be5a3p302, 0x1.3259b15ad5075p-333 +-0x1.11e4c61e2489ep9, 0x1.f3ddd0aadf9e9p94 +0x1.e02943925b096p-651, 0x1.3e5010a3be270p137 +0x1.9887e07a7b4bdp-835, -0x1.0000000000000p-64 +0x1.fb9fd6c57d283p-969, -0x1.eb21f1c75479dp195 +0x1.55fb70ae2db62p-910, 0x1.b77402b5190d5p10 +-0x1.38b1775c225eep723, 0x1.7595a59a7ba8dp901 +0x1.fbdc30f777a6ap649, -0x1.ea19f696739e0p183 +0x1.c2b5309403401p760, -0x1.0000000000000p-64 +-0x1.3d6de154feafep496, -0x1.9763760be8c9dp-161 +0x1.1c0a33e2b3719p-116, -0x1.0000000000000p-64 +0x1.06b1024b8b4bap471, -0x1.cd9f24d503076p59 +-0x1.6d0d67d7d2ad2p627, 0x1.35c77413a4d2fp190 +-0x1.881467b6c56d5p-194, -0x1.465995072de7cp707 +0x1.1147d4d59a3a5p-952, -0x1.0000000000000p-64 +-0x1.c319328022c2cp890, -0x1.4a627098d6e49p170 +0x1.993864ddbc05dp562, 0x1.0000000000000p-64 +0x1.f9abd78250a64p633, -0x1.f104e2772f8cep141 +-0x1.4d87f27b51978p-916, 0x1.073e35dc85a96p-1003 +0x1.1e8e0347dd99bp278, 0x1.0000000000000p-64 +0x1.7fbfc71fde6edp891, -0x1.0000000000000p-64 +-0x1.ae86836ca4d83p659, -0x1.5153616fefc6ap-61 +0x1.0452d237e1de7p-518, 0x1.296675c74320cp87 +0x1.12fc06ee54ac1p615, -0x1.0000000000000p-64 +0x1.887c234a8cc63p-708, 0x1.ae5fb57f66c84p175 +0x1.4978c021c25cbp-130, -0x1.115a65f48b23cp80 +-0x1.a1e733c9fd87fp552, 0x1.cef7045a6012ap811 +0x1.f98611b7c6a51p538, -0x1.0000000000000p-64 +-0x1.858f201dffc93p26, 0x1.6a110485981d4p-285 +0x1.84297333218cep712, 0x1.497396c926ddfp73 +0x1.12c3e319b6a54p-783, 0x1.0000000000000p-64 +-0x1.8ee011da43d65p-879, 0x1.7b6cf1473438ep670 +-0x1.4978c021c25cbp-130, -0x1.115a65f48b23cp80 +0x1.f057a19099427p-736, 0x1.0000000000000p-64 +0x1.407a2417c0b48p413, -0x1.90cbb0161a8c6p12 +0x1.04f492d848a39p-816, 0x1.ec7fb651e4df9p225 +-0x1.5290f79114db5p-971, -0x1.feede687f8cf3p-101 +0x1.fb0cc227fae39p-669, 0x1.924f06f662685p143 +-0x1.7d10c2a023848p734, -0x1.86a912207d0c3p757 +-0x1.5ebd0337bf9f3p945, 0x1.cb53f1b618ab5p465 +0x1.cef8d3cce5e81p531, -0x1.0000000000000p-64 +0x1.cdc7962fdc900p51, 0x1.0000000000000p-64 +-0x1.04f492d848a39p-816, 0x1.ec7fb651e4df9p225 +-0x1.23221091a234fp828, -0x1.b08e262c8eca5p972 +0x1.bc16f113ad6ebp-101, 0x1.7c8311241b744p169 +0x1.e1c163876ccdcp843, -0x1.0000000000000p-64 +0x1.3daea5a429d79p-639, 0x1.0000000000000p-64 +0x1.e99204b546e58p215, -0x1.0000000000000p-64 +-0x1.950493326e8b2p679, 0x1.fdc874cefc875p-615 +0x1.016dd4fb0abd2p853, -0x1.c82dd72b4ab44p102 +0x1.d0f6737fbcdbbp-353, 0x1.081a8002b8e53p211 +0x1.f1d1f5c67bb5ap-321, 0x1.d64ec22c49552p176 +-0x1.8a60721e2686ap880, -0x1.936f75de69956p-750 +0x1.8368e4ed700bbp-57, 0x1.0000000000000p-64 +-0x1.7c5d037e915cep538, -0x1.aa30914f141e5p-886 +-0x1.9ff485cb26fa7p227, 0x1.82c1703140ceep465 +-0x1.bc56157fec778p-542, -0x1.898e228074677p-385 +0x1.eb16d56eb1d78p-224, 0x1.393ef32f107adp205 +-0x1.10bf71d60a4d1p-524, 0x1.335ac0ca90f62p1004 +0x1.392bc7ade8723p528, -0x1.50ea12907473fp21 +0x1.a26d44e3b408fp-896, 0x1.beda15a2a2799p129 +0x1.6d0d67d7d2ad2p627, 0x1.35c77413a4d2fp190 +-0x1.47a744db0c087p689, -0x1.0445309d5d5bdp-205 +0x1.0d3c074692057p781, -0x1.885716d3dcfbap146 +0x1.5feca3ddab161p-509, 0x1.3e0c341715e1cp217 +0x1.001af5dcc9beep589, 0x1.0000000000000p-64 +0x1.0b0f700297c73p388, 0x1.0000000000000p-64 +-0x1.4591e2de659a7p796, 0x1.4ab1a273f0697p736 +0x1.1e68964b6cc85p6, -0x1.d50762f9e9ce4p59 +0x1.40a7f08b7509dp-373, 0x1.6784b7c373049p207 +0x1.c43b310d38279p-924, 0x1.d4b5d23a0b96dp239 +0x1.421436f55761ep-12, 0x1.320481b0055a7p227 +-0x1.135fa0f337e6ep856, -0x1.ed172226e05edp335 +-0x1.d0a84005691b7p763, -0x1.68f840a20c734p60 +-0x1.6153c39025700p908, -0x1.87eff6801054cp257 +0x1.ad64258a1c8aep201, -0x1.eb202553cc800p129 +0x1.09a810c8ff945p866, -0x1.0000000000000p-64 +0x1.d14433f742c09p-360, 0x1.f4ff819b628ddp21 +0x1.0c04a59d1fa4fp562, 0x1.66b354392a531p134 +-0x1.84297333218cep712, 0x1.497396c926ddfp73 +-0x1.fb9fd6c57d283p-969, -0x1.eb21f1c75479dp195 +0x1.dd87e7279e72bp748, -0x1.0000000000000p-64 +0x1.e494b3d72a143p612, -0x1.3b94e6aa337a0p-57 +0x1.4a6b277bdabe4p-613, -0x1.0000000000000p-64 +0x1.aa78012aaa9c7p338, 0x1.0000000000000p-64 +-0x1.ab74577adade9p149, -0x1.2057c78ee21ccp31 +0x1.3974c5e1e2049p105, -0x1.d3dbb0fb0baf1p54 +0x1.c83bb023360a9p879, -0x1.0c6922624c625p97 +-0x1.e21c0605b5f2bp-634, 0x1.f28232c2ebba3p-74 +0x1.e61ed69f4f3e5p558, -0x1.0ee6a03187e13p128 +0x1.d32cb4d190af4p-556, -0x1.0000000000000p-64 +0x1.97a202fe3d99bp812, -0x1.12eba5e07e17fp131 +0x1.5cbf140578025p750, -0x1.0000000000000p-64 +0x1.8754d2c071fd1p-796, -0x1.0000000000000p-64 +-0x1.c24a21659e391p874, 0x1.8fca31719d26fp-203 +0x1.db5587ed33e3dp-392, -0x1.0000000000000p-64 +0x1.59b6e3bd2734fp959, -0x1.0000000000000p-64 +-0x1.2f68f32a5979ep367, 0x1.d77b92aecf0f8p-414 +0x1.73e621f69389dp222, -0x1.1235366e0a84bp216 +0x1.076b75274a516p-7, -0x1.0000000000000p-64 +0x1.2505e4b701385p-178, -0x1.0000000000000p-64 +0x1.ae0c974a70a8fp607, 0x1.0000000000000p-64 +0x1.b2c344636c704p595, -0x1.9d1b879d64e7dp213 +-0x1.a6f695e9d29eep-629, 0x1.dad8811e62691p422 +0x1.e5aca4566a08ap234, -0x1.645ed34f63b48p65 +0x1.67faa10de96c9p-929, 0x1.0000000000000p-64 +0x1.503a50f3f36c9p-313, 0x1.a1b537c589279p212 +-0x1.e62711b5b18aap-336, 0x1.176d22b7c6703p-81 +-0x1.78e6d2fb3c6c8p-802, -0x1.4354b70f8d56ap-407 +-0x1.a9b890e6a309bp-974, -0x1.fc73521e05c84p446 +0x1.605c070891e95p751, -0x1.00e8a0f55071cp255 +-0x1.8e249352e8ed4p-690, -0x1.d751a5bb2c420p-254 +0x1.67246027c2465p584, 0x1.3aaa16d492946p178 +0x1.c53735a56d1edp610, -0x1.630662efaf0c6p60 +0x1.d54a131bae182p142, -0x1.a313606a0459dp220 +0x1.38afe5f1ed5b4p-779, 0x1.0000000000000p-64 +0x1.f2aa76462ad42p-982, 0x1.0000000000000p-64 +0x1.e188a166c06b6p45, 0x1.0000000000000p-64 +0x1.fbe85766fae96p-463, 0x1.91c903c89b075p85 +0x1.3342d36ecf081p28, -0x1.0000000000000p-64 +0x1.c2b0a036a1828p719, 0x1.0000000000000p-64 +0x1.ba7f308dc60ddp517, -0x1.b38d014638da6p246 +-0x1.075aa7ba85f42p624, -0x1.a357d32f45a61p-867 +0x1.1fbb4362bf313p995, 0x1.d039c2c0e18bfp-6 +-0x1.150426e803137p622, -0x1.9bafe2efa3e89p39 +-0x1.3f2456d5cba52p116, 0x1.fa9ec45f18306p-389 +0x1.8e58945bd1087p-701, 0x1.0000000000000p-64 +-0x1.ab0ef29932d78p111, 0x1.4313d75c1df97p658 +0x1.ee3e13dd00d34p1016, 0x1.d6b3d3b9034c1p85 +-0x1.7f0bd006c0d62p-324, 0x1.8210646a5ccddp871 +-0x1.c004d2256a5b8p402, -0x1.a01df480fdcb7p98 +-0x1.3717c2e75f865p-749, -0x1.628ab47e4b9c7p-879 +-0x1.dfb414ca1e89fp780, -0x1.b1a6d17b59340p927 +0x1.2bb340a5c99b8p772, -0x1.4cb4a208cd38ap49 +0x1.983d90ffcdc95p-131, 0x1.294857e7a5d9dp66 +0x1.0789a00a3ff0fp-950, -0x1.0000000000000p-64 +0x1.6816c6cd93ea9p112, 0x1.985412f1ac3d6p104 +0x1.3c0e604f8974bp-226, 0x1.0000000000000p-64 +0x1.07acb29e12fc1p687, -0x1.edff80d6b306fp107 +0x1.22c1d3b2c0e45p135, -0x1.9a5dc703e46dbp204 +0x1.ede956a719d56p248, -0x1.80e8e672e144fp156 +-0x1.ff6263662c8fbp-263, 0x1.cf3867b2bac05p652 +0x1.f01e46c129d76p-5, 0x1.00d113cf96023p137 +0x1.45cf928146851p636, 0x1.26b1c5666d711p131 +-0x1.768376c2f7584p563, 0x1.017143ae97b27p545 +-0x1.1f72a3d4f7881p-764, 0x1.4617565381163p177 +0x1.dd9431675dbb5p-114, 0x1.0000000000000p-64 +-0x1.64cc1762105b7p-569, -0x1.2d69b27570067p840 +0x1.bd1077dadd530p235, 0x1.0000000000000p-64 +0x1.0aa166c2b93bdp488, -0x1.48d03430453b8p213 +-0x1.b513845f09747p-331, -0x1.d04e154527b26p685 +0x1.5c97b3a12df62p696, -0x1.e160e008f7d3ap89 +0x1.8eec91bde3d69p-376, -0x1.0000000000000p-64 +0x1.7d29f253d3e79p636, -0x1.8e30a1ba55f7fp77 +0x1.c004d2256a5b8p402, -0x1.a01df480fdcb7p98 +0x1.52b9d41aaa1e9p-589, -0x1.292cb15f1459dp46 +-0x1.ea9ca6fa0919ep-279, -0x1.601e44b6a588cp40 +# pow slow path at 240 bits +# Implemented in sysdeps/ieee754/dbl-64/slowpow.c +## name: 240bits +0x1.01fcd33493ea3p596, -0x1.724bd4e887783p-14 +0x1.032ff59ab34fdp-540, -0x1.61e3632080b87p-24 +0x1.045c337b80f53p304, 0x1.dc3404c30fa69p-56 +0x1.0681338469475p-294, -0x1.3562210f27dfap-51 +0x1.0b55c01eab2a6p-447, -0x1.cd7162fecd483p-48 +0x1.0b74d4b709002p-811, -0x1.0af1478682e96p-50 +0x1.0e4d10f3aabc8p664, 0x1.e2bde3471eaa1p-55 +0x1.110607de11aa5p120, 0x1.dcec269cfd865p-47 +0x1.132aa4cc6f38bp-751, 0x1.366ca7979d9bbp-8 +0x1.138ae6f5a6dadp-680, 0x1.890a0755fce7ap-40 +0x1.1b7b95bdc6400p467, 0x1.ec36f5f75ce4cp-8 +0x1.1c20e7f14086cp-788, 0x1.f22967f8b5d7cp-48 +0x1.278262637b59cp446, -0x1.1aab83169f61cp-10 +0x1.2936f2eb01500p-234, -0x1.aa25c56c7a42ap-51 +0x1.2991068d7df8dp-895, -0x1.e22e0335a6813p-19 +0x1.2a4320a5a4e06p342, 0x1.a60de202d0f39p0 +0x1.2baa57016f98bp445, -0x1.19b39156d7af6p-42 +0x1.3003b731560f2p189, -0x1.d03a35d7809bbp-6 +0x1.3098f631b79b3p322, 0x1.936cf77d12901p-58 +0x1.329f9083895d6p-470, 0x1.c4e0407eac9e1p-60 +0x1.32e62120a48dep-373, 0x1.8c03970ea6143p-15 +0x1.3b69741c89827p-951, 0x1.d7e2d50ab916bp-13 +0x1.46d346d411a30p-451, -0x1.5bed1300261dcp-37 +0x1.48d0870fc99a7p-691, -0x1.4f6541a43b8cdp-5 +0x1.49ae5141ea416p-825, 0x1.cfc4b51dbe592p-24 +0x1.4d1fb5a2a4d73p738, -0x1.d2a54658b1df9p-50 +0x1.4ddb12f9500cbp962, 0x1.48bc1158eb70ap-15 +0x1.4f51d32b02376p758, 0x1.11d1409aaea9fp-27 +0x1.54f723dd63e3bp605, 0x1.6c02f2514de2ap-23 +0x1.5529070b8d631p-489, 0x1.1c3dd76010b92p-37 +0x1.569bf17eb40dfp217, -0x1.8cb97627ae884p-31 +0x1.5e2892c719a5ap817, 0x1.f0e3d4b66e9c0p-11 +0x1.619a049c49284p329, -0x1.0bc7b3735d182p-12 +0x1.62e6745b17235p344, 0x1.86dcb0cd4e584p-39 +0x1.6532120398cb6p374, -0x1.dd57d385dde4ap-56 +0x1.6ab9873394341p712, 0x1.6cec233df7f19p-59 +0x1.6d7c56b0ec1f9p723, -0x1.864ae3aa72d4ap-11 +0x1.6decf38117b3ap-629, 0x1.e1c8b1eaebfbbp-27 +0x1.6f57771705979p518, -0x1.44fbe6fcf4182p-24 +0x1.6f57b14f5f248p880, 0x1.e2554493e7f0cp-2 +0x1.6fee9735004b7p-71, 0x1.8eaf1527d88bep-48 +0x1.7190e00c6cae0p-495, 0x1.705594f79ee43p-33 +0x1.7238a1904c29cp40, 0x1.d454673e675eep-30 +0x1.76aa529cae2a7p-457, -0x1.0652207d202acp-45 +0x1.78e630a117b59p-105, 0x1.ecb1a67d5b9dcp-32 +0x1.7d0976b552b5bp-316, -0x1.9c52a2a02f146p1 +0x1.80a10162f3c9ep-462, 0x1.af6ef1f1d004ep-54 +0x1.8794943d6e34bp-745, -0x1.0c7df064d51e9p-10 +0x1.8a3d749288cbcp-469, 0x1.a9bf9202d914fp-46 +0x1.8da421e64749bp-540, -0x1.494a81df89b6bp-26 +0x1.8e05154795810p247, 0x1.3c04802f44ddcp-47 +0x1.91b9d616c0878p-313, 0x1.a3c9263d26b2ap-30 +0x1.95e973a94d414p-229, 0x1.d83d8244e6566p-28 +0x1.9a3217b4fb0e5p-990, 0x1.82853149b1e30p-42 +0x1.9e2556775fc02p-377, -0x1.a6ec93193a127p-38 +0x1.9e83d7b0c831fp-906, 0x1.6a3485e3e4fe8p-21 +0x1.a51cf0f0f49f7p751, 0x1.07b941a3af664p-12 +0x1.a883c2cef7802p-432, 0x1.b5ee3711a8260p-34 +0x1.aca70602f90f3p205, -0x1.a40d85c2b0ddap-55 +0x1.b118069c4e0f8p133, 0x1.85ed946b41169p0 +0x1.b1ada0a8ca383p-699, 0x1.ddfec76f67c1fp-37 +0x1.b236b6872f638p419, 0x1.fa8f6525758b6p-5 +0x1.b2413258b83b1p892, -0x1.bcea65c80772bp-12 +0x1.b51563dac9885p-571, 0x1.7a1e16e485fdcp-30 +0x1.b5e4833e40f76p-445, 0x1.44e23325bcc3fp-22 +0x1.b6a2168ec3212p-674, -0x1.35bda0265f18bp-30 +0x1.b8dd676727fa1p124, 0x1.3605e6ec76006p-29 +0x1.b95437f961192p-500, 0x1.9276767f94721p-10 +0x1.bb6647f65218ap741, -0x1.b9dd250927a8ap-6 +0x1.bffdf0efb5c4ep-703, 0x1.85fac77188c01p-9 +0x1.c0345583020c9p236, 0x1.de31b044cb918p-37 +0x1.c4b9163604b90p548, 0x1.0a51f116977d3p-17 +0x1.c66ec323be811p-726, -0x1.8829c716f5ddbp-24 +0x1.c69da72348031p-390, 0x1.109f77bb4a2a2p-37 +0x1.c712558c00177p-883, -0x1.9cf047e60fa38p-8 +0x1.c74df6d64da29p-154, -0x1.bdba55e26ef07p2 +0x1.c75fa2c065d1dp731, 0x1.fa827749d723cp-21 +0x1.c8f5b7f54aa5fp-998, 0x1.59fa40e2d7a95p-10 +0x1.c957e3768f0c2p-102, 0x1.0047f59669535p-5 +0x1.ce0615637c099p-737, 0x1.b1795333136d6p-59 +0x1.d1a7872210098p245, -0x1.afd8c410a1918p-16 +0x1.d39ee7b8cae5ep722, 0x1.639a1575eb95cp-56 +0x1.d4b4276a02096p-5, -0x1.7ff8354a6ba9cp-21 +0x1.d500d1daf1bfcp-352, 0x1.e4c7243104fa7p-34 +0x1.d684c68e86321p-661, -0x1.11305765580a9p-13 +0x1.db08f6fcae9f5p-637, -0x1.a8cba163bd1dep-21 +0x1.db09e6535414dp809, -0x1.0b10e70ed8d88p-48 +0x1.e50573d07ecc0p41, 0x1.19ec44b6d99e6p-58 +0x1.e59505ef043e0p926, -0x1.3201c7a1e8882p-62 +0x1.e6b9b28e678a4p546, 0x1.70e042daa89e7p-30 +0x1.e9a4e6bbbf235p-851, -0x1.1d70f7b787412p-21 +0x1.ea68a16e4b7c9p-733, -0x1.ee7f337779825p-34 +0x1.f0e76025ece1cp642, -0x1.bdc0d0d7020d5p-57 +0x1.f1bcb1d70f84bp-568, 0x1.98c5d3b11e934p-21 +0x1.f568146a8c658p240, 0x1.4def9749a6a7ep-44 +0x1.f75bd43867225p-454, 0x1.34b1e5cb0df40p-16 +0x1.fae7a09d10f34p955, -0x1.f7f8439082552p-31 +0x1.fae913d4f952ep-809, -0x1.4b649402fce63p-6 +0x1.fe6d725408f24p484, -0x1.25f4f6441d2e4p-12 +0x1.ff6393f9150ccp-718, 0x1.a0cb50a9bf2f3p-31 # pow slowest path at 768 bits # Implemented in sysdeps/ieee754/dbl-64/slowpow.c ## name: 768bits 1.0000000000000020, 1.5 +0x1.006777b4b61dep843, -0x1.67e3145491872p-1 +0x1.0477a5cfb1972p-402, 0x1.8742e7a1ce99dp-1 +0x1.0827a160ab475p-239, 0x1.fcae51d2d997dp-1 +0x1.083723672b1a4p-204, 0x1.baddc57f1404cp-2 +0x1.0b39f4b2f5c4fp-546, 0x1.7d02a31183f36p-1 +0x1.0e2d62ea9d078p-68, 0x1.8afb43919ece2p3 +0x1.0fedd1fd9bdc5p-1011, 0x1.c0ce64b178832p-6 +0x1.10b984764821ep724, -0x1.36e872083e630p-4 +0x1.12424342d99bbp686, -0x1.f8d4e18b1b309p-5 +0x1.1335f40a059c7p1014, -0x1.5818e19224448p-2 +0x1.14185484cbdb2p-780, 0x1.23f8d7d596280p-4 +0x1.14f5b49e12b8fp-751, 0x1.522c717bca3eap0 +0x1.15fe345b21e2bp399, -0x1.0a09061cd1de9p-1 +0x1.17c3e75436530p104, -0x1.ef30d09c541e9p0 +0x1.1e5296bbfeea7p747, -0x1.f68df5996bfedp-1 +0x1.1efdd081a8d35p-90, 0x1.7c7d10d98a3c9p-1 +0x1.203101f62452ap317, -0x1.3be834bfd34fap-1 +0x1.29cb8617add92p968, -0x1.9cbe73f892a16p-6 +0x1.2d75353d5df74p719, -0x1.e2f317d7b2c01p-1 +0x1.2f08247664913p592, -0x1.35ab9793384a5p-2 +0x1.2ff58217e86d7p725, -0x1.2c98b6be067ccp-2 +0x1.3113614c8b9e1p159, -0x1.fc2f4279c8cbep-1 +0x1.3115402118c24p134, -0x1.d435f65f0eefcp1 +0x1.32e5a1ba96cdap52, -0x1.f7d8248930c17p-1 +0x1.346f712d4c234p78, -0x1.830235fa4eb2cp3 +0x1.35ea84ad8b4fap742, -0x1.728dd1bc7d70cp-3 +0x1.36b91497c147ep579, -0x1.b7e7b0d1ad44dp-2 +0x1.3752c6b5da9e6p351, -0x1.2a00f003acdd1p-1 +0x1.3bccb31761b21p-193, 0x1.bdd7b5da189c8p1 +0x1.42c0b561c10bep-850, 0x1.dcdee5de63ebcp-3 +0x1.4520f56ca1422p-471, 0x1.348c312c9f319p-1 +0x1.46e7406c8e11ep546, -0x1.876f67bed28c4p0 +0x1.4ba3f35d2f4afp-333, 0x1.6e39f0895a072p-3 +0x1.4cb3303ab8786p-838, 0x1.fe88a032de46ap-1 +0x1.4d61505a36a60p234, -0x1.45c3e271db1fep1 +0x1.4fcff0e946b1ep909, -0x1.90fa07de4eea5p-1 +0x1.5172c6b32f2aep293, -0x1.fb0fa58fc74abp-2 +0x1.51e4b4afeb58ap-2, 0x1.f184d702a5f4bp3 +0x1.5212b31c06068p306, -0x1.e8e5c1b09f30dp-2 +0x1.55c7413fbdd0cp-168, 0x1.68687102fa0b8p-3 +0x1.5975f5580b29cp361, -0x1.cda627a0b0899p-3 +0x1.5b3d77ff20607p-694, 0x1.95877099718f5p-4 +0x1.5b85e6f45d26fp763, -0x1.b727a35d92656p-4 +0x1.5c83b2d038766p-984, 0x1.4232c330c81b9p-1 +0x1.5ec6e7e275af2p773, -0x1.8da470ca7dd62p-1 +0x1.60b0e6123149bp-743, 0x1.25a696ab5fc09p-4 +0x1.6567f1ab52caap-769, 0x1.ff57c1e78cc81p-3 +0x1.689cb423d7ec7p95, -0x1.71d3f5a46c36fp-2 +0x1.69e2a022e3db6p-672, 0x1.209f77b27f146p-1 +0x1.6a6bb05202fd0p-621, 0x1.bc1f316194126p-5 +0x1.72b181bf25fd7p303, -0x1.629be448db4f7p1 +0x1.7667d46544feap887, -0x1.e92ef7681c985p-3 +0x1.776f45edc5aa6p967, -0x1.8b34366de0584p-3 +0x1.77d4e3169e8fdp889, -0x1.7159c5a0e440ep-4 +0x1.792c56f01b25ep-474, 0x1.45237144dc76dp-2 +0x1.7c4d814b67ce3p-30, 0x1.32f4217aa69bfp2 +0x1.7fec1487cd8c2p-790, 0x1.373ec1a13952fp-4 +0x1.8280e15921e7bp-544, 0x1.17f4d1f294f23p-2 +0x1.8be4858d98288p395, -0x1.8ecf7076c1cadp-3 +0x1.8c1a3651b2a3cp251, -0x1.fe464693b592fp-1 +0x1.95b8339b15437p-805, 0x1.c590d48f70e09p-4 +0x1.9ea712eab015cp643, -0x1.9f9a2005cd04dp-2 +0x1.9ec010ebb0fb4p966, -0x1.322de55e2f27dp-3 +0x1.a055b4cacfb90p692, -0x1.45a6d0302680bp-4 +0x1.a2541721f7549p508, -0x1.46b5008fed93ap0 +0x1.aa4ea2a62e6d3p146, -0x1.4948a7f0b9447p-2 +0x1.aeab6627bd7fep-883, 0x1.e334b6e331bcfp-4 +0x1.afc9062dd5d6cp285, -0x1.704640b7e8a60p0 +0x1.b2e0e5768b8a4p700, -0x1.e3cc63841415cp-1 +0x1.b44dd7483ff8fp762, -0x1.376275f0c7542p0 +0x1.b461c649ef81fp-297, 0x1.757d3606ad420p-2 +0x1.b47177acf880bp162, -0x1.dbc2c7336fcdcp-3 +0x1.b5d597a5647bep312, -0x1.0d87f0669fd98p-3 +0x1.b5f5f6894898fp824, -0x1.aeec9752febccp-2 +0x1.b78b84a583db6p711, -0x1.443983558960ap-1 +0x1.ba15f474f95a7p250, -0x1.9d46c49adf4ecp1 +0x1.ba6e74fdcaafap685, -0x1.c69a403d3e719p-3 +0x1.c14ed18d4eb53p652, -0x1.231bb32f82a5fp-1 +0x1.c44727ecf4620p-965, 0x1.c61391aad6567p-6 +0x1.c492c6882ec27p-423, 0x1.6bb9123ab40fdp-1 +0x1.c525d219db143p-681, 0x1.5e10738bb6aefp-5 +0x1.ca9510663b619p878, -0x1.8966f1a726428p-2 +0x1.d2d4d70d57384p-769, 0x1.eec5e348f3c65p-5 +0x1.d3275243b3fd2p-203, 0x1.a56f87acf7afbp1 +0x1.d5d3022665384p-509, 0x1.d4f984b477a34p-5 +0x1.dabf72e2c886fp642, -0x1.e930d581ea0c3p-3 +0x1.daffa04064cf7p799, -0x1.b944c271f477bp-1 +0x1.db25c4ae37695p710, -0x1.ff84b0c08defdp-3 +0x1.dc06652f06a70p-689, 0x1.f2eb368dd304ap-3 +0x1.e09726def851ap-784, 0x1.8d62918b2f6a5p-5 +0x1.e1561576de8f5p-470, 0x1.983137f5396b2p-2 +0x1.e5e4c7891da9bp-871, 0x1.5775130263654p-5 +0x1.eca182884f17fp-295, 0x1.af55d3375f461p-3 +0x1.f1c172bc4f401p-360, 0x1.f40476496c282p-4 +0x1.f244722a51df2p548, -0x1.20f7a2f2fc3e8p-2 +0x1.f422f159f235bp126, -0x1.339620de97b69p1 +0x1.f43463d9cef16p-845, 0x1.2c364792462fep-3 +0x1.f8b79758182dap-884, 0x1.ed6174093fca4p-6 +0x1.fa5c677254961p133, -0x1.c91962524971ep-1 +0x1.ff0544adacb78p649, -0x1.6c17c3a7210e2p-1 diff --git a/libc/bits/predefs.h b/libc/bits/predefs.h deleted file mode 100644 index 4dc4900a9..000000000 --- a/libc/bits/predefs.h +++ /dev/null @@ -1,30 +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. */ - -#ifndef _PREDEFS_H -#define _PREDEFS_H - -#ifndef _STDC_PREDEF_H -# error "Never use directly; include instead." -#endif - -/* We do support the IEC 559 math functionality, real and complex. */ -#define __STDC_IEC_559__ 1 -#define __STDC_IEC_559_COMPLEX__ 1 - -#endif /* predefs.h */ diff --git a/libc/config.h.in b/libc/config.h.in index 0ee1ec6f5..f6151c55b 100644 --- a/libc/config.h.in +++ b/libc/config.h.in @@ -201,13 +201,13 @@ They are used only in miscellaneous generator programs, not in compiling libc itself. */ -/* sysdeps/generic/configure.in */ +/* sysdeps/generic/configure.ac */ #undef HAVE_PSIGNAL -/* sysdeps/unix/configure.in */ +/* sysdeps/unix/configure.ac */ #undef HAVE_STRERROR -/* sysdeps/unix/common/configure.in */ +/* sysdeps/unix/common/configure.ac */ #undef HAVE_SYS_SIGLIST #undef HAVE__SYS_SIGLIST #undef HAVE__CTYPE_ diff --git a/libc/configure b/libc/configure index deab3950b..81cad5ed6 100755 --- a/libc/configure +++ b/libc/configure @@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.79* | 3.[89]*) + 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -5171,7 +5171,7 @@ $as_echo_n "checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works... " >&6; } if ${libc_cv_autoconf_works+:} false; then : $as_echo_n "(cached) " >&6 else - if (cd $srcdir; $AUTOCONF $ACFLAGS configure.in > /dev/null 2>&1); then + if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then libc_cv_autoconf_works=yes else libc_cv_autoconf_works=no diff --git a/libc/configure.ac b/libc/configure.ac new file mode 100644 index 000000000..a246508d8 --- /dev/null +++ b/libc/configure.ac @@ -0,0 +1,2172 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Note we do not use AC_PREREQ here! See aclocal.m4 for what we use instead. +AC_INIT([GNU C Library], [(see version.h)], [http://sourceware.org/bugzilla/], [glibc]) +AC_CONFIG_SRCDIR([include/features.h]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_AUX_DIR([scripts]) + +ACX_PKGVERSION([EGLIBC]) +ACX_BUGURL([http://www.eglibc.org/issues/]) +AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], + [Package description]) +AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], + [Bug reporting address]) + +# Glibc should not depend on any header files +AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], + [m4_divert_text([DEFAULTS], + [ac_includes_default='/* none */'])]) + +# We require GCC, and by default use its preprocessor. Override AC_PROG_CPP +# here to work around the Autoconf issue discussed in +# . +AC_DEFUN([AC_PROG_CPP], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_ARG_VAR([CPP], [C preprocessor])dnl +_AC_ARG_VAR_CPPFLAGS()dnl +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + CPP="$CC -E" +fi +AC_SUBST(CPP)dnl +])# AC_PROG_CPP + +# We require GCC. Override _AC_PROG_CC_C89 here to work around the Autoconf +# issue discussed in +# . +AC_DEFUN([_AC_PROG_CC_C89], [[$1]]) + +dnl This is here so we can set $subdirs directly based on configure fragments. +AC_CONFIG_SUBDIRS() + +AC_CANONICAL_HOST + +AC_PROG_CC +if test $host != $build; then + AC_CHECK_PROGS(BUILD_CC, gcc cc) +fi +AC_SUBST(cross_compiling) +AC_PROG_CPP +# We need the C++ compiler only for testing. +AC_PROG_CXX +AC_CHECK_TOOL(READELF, readelf, false) + +if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then + AC_MSG_ERROR([you must configure in a separate build directory]) +fi + +# This will get text that should go into config.make. +config_vars= + +# Check for a --with-gd argument and set libgd-LDFLAGS in config.make. +AC_ARG_WITH([gd], + AC_HELP_STRING([--with-gd=DIR], + [find libgd include dir and library with prefix DIR]), + [dnl +case "$with_gd" in +yes|''|no) ;; +*) libgd_include="-I$withval/include" + libgd_ldflags="-L$withval/lib" ;; +esac +]) +AC_ARG_WITH([gd-include], + AC_HELP_STRING([--with-gd-include=DIR], + [find libgd include files in DIR]), + [dnl +case "$with_gd_include" in +''|no) ;; +*) libgd_include="-I$withval" ;; +esac +]) +AC_ARG_WITH([gd-lib], + AC_HELP_STRING([--with-gd-lib=DIR], + [find libgd library files in DIR]), + [dnl +case "$with_gd_lib" in +''|no) ;; +*) libgd_ldflags="-L$withval" ;; +esac +]) + +if test -n "$libgd_include"; then + config_vars="$config_vars +CFLAGS-memusagestat.c = $libgd_include" +fi +if test -n "$libgd_ldflags"; then + config_vars="$config_vars +libgd-LDFLAGS = $libgd_ldflags" +fi + +dnl Arguments to specify presence of other packages/features. +AC_ARG_WITH([fp], + AC_HELP_STRING([--with-fp], + [if using floating-point hardware @<:@default=yes@:>@]), + [with_fp=$withval], + [with_fp=yes]) +AC_SUBST(with_fp) +AC_ARG_WITH([binutils], + AC_HELP_STRING([--with-binutils=PATH], + [specify location of binutils (as and ld)]), + [path_binutils=$withval], + [path_binutils='']) +AC_ARG_WITH([selinux], + AC_HELP_STRING([--with-selinux], + [if building with SELinux support]), + [with_selinux=$withval], + [with_selinux=auto]) + +AC_ARG_WITH([headers], + AC_HELP_STRING([--with-headers=PATH], + [location of system headers to use + (for example /usr/src/linux/include) + @<:@default=compiler default@:>@]), + [sysheaders=$withval], + [sysheaders='']) +AC_SUBST(sysheaders) + +AC_SUBST(use_default_link) +AC_ARG_WITH([default-link], + AC_HELP_STRING([--with-default-link], + [do not use explicit linker scripts]), + [use_default_link=$withval], + [use_default_link=default]) + +AC_ARG_ENABLE([sanity-checks], + AC_HELP_STRING([--disable-sanity-checks], + [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]), + [enable_sanity=$enableval], + [enable_sanity=yes]) + +AC_ARG_ENABLE([shared], + AC_HELP_STRING([--enable-shared], + [build shared library @<:@default=yes if GNU ld@:>@]), + [shared=$enableval], + [shared=yes]) +AC_ARG_ENABLE([profile], + AC_HELP_STRING([--enable-profile], + [build profiled library @<:@default=no@:>@]), + [profile=$enableval], + [profile=no]) + +AC_ARG_ENABLE([oldest-abi], + AC_HELP_STRING([--enable-oldest-abi=ABI], + [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]), + [oldest_abi=$enableval], + [oldest_abi=no]) +if test "$oldest_abi" = yes || test "$oldest_abi" = no; then + oldest_abi=default +else + AC_DEFINE_UNQUOTED(GLIBC_OLDEST_ABI, "$oldest_abi") +fi +AC_SUBST(oldest_abi) + +AC_ARG_ENABLE([hardcoded-path-in-tests], + AC_HELP_STRING([--enable-hardcoded-path-in-tests], + [hardcode newly built glibc path in tests @<:@default=no@:>@]), + [hardcoded_path_in_tests=$enableval], + [hardcoded_path_in_tests=no]) +AC_SUBST(hardcoded_path_in_tests) + +AC_ARG_ENABLE([stackguard-randomization], + AC_HELP_STRING([--enable-stackguard-randomization], + [initialize __stack_chk_guard canary with a random number at program start]), + [enable_stackguard_randomize=$enableval], + [enable_stackguard_randomize=no]) +if test "$enable_stackguard_randomize" = yes; then + AC_DEFINE(ENABLE_STACKGUARD_RANDOMIZE) +fi + +AC_ARG_ENABLE([lock-elision], + AC_HELP_STRING([--enable-lock-elision[=yes/no]], + [Enable lock elision for pthread mutexes by default]), + [enable_lock_elision=$enableval], + [enable_lock_elision=no]) +if test "$enable_lock_elision" = yes ; then + AC_DEFINE(ENABLE_LOCK_ELISION) +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]), + , [enable_add_ons=yes]) + +AC_ARG_ENABLE([hidden-plt], + AC_HELP_STRING([--disable-hidden-plt], + [do not hide internal function calls to avoid PLT]), + [hidden=$enableval], + [hidden=yes]) +if test "x$hidden" = xno; then + AC_DEFINE(NO_HIDDEN) +fi + +AC_ARG_ENABLE([bind-now], + AC_HELP_STRING([--enable-bind-now], + [disable lazy relocations in DSOs]), + [bindnow=$enableval], + [bindnow=no]) +AC_SUBST(bindnow) + +dnl On some platforms we cannot use dynamic loading. We must provide +dnl static NSS modules. +AC_ARG_ENABLE([static-nss], + AC_HELP_STRING([--enable-static-nss], + [build static NSS modules @<:@default=no@:>@]), + [static_nss=$enableval], + [static_nss=no]) +dnl Enable static NSS also if we build no shared objects. +if test x"$static_nss" = xyes || test x"$shared" = xno; then + static_nss=yes + AC_DEFINE(DO_STATIC_NSS) +fi + +AC_ARG_ENABLE([force-install], + AC_HELP_STRING([--disable-force-install], + [don't force installation of files from this package, even if they are older than the installed files]), + [force_install=$enableval], + [force_install=yes]) +AC_SUBST(force_install) + +dnl On some platforms we allow dropping compatibility with all kernel +dnl versions. +AC_ARG_ENABLE([kernel], + AC_HELP_STRING([--enable-kernel=VERSION], + [compile for compatibility with kernel not older than VERSION]), + [minimum_kernel=$enableval], + []) +dnl Prevent unreasonable values. +if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then + # Better nothing than this. + minimum_kernel="" +else + if test "$minimum_kernel" = current; then + minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel= + fi +fi + +dnl For the development we sometimes want gcc to issue even more warnings. +dnl This is not the default since many of the extra warnings are not +dnl appropriate. +AC_ARG_ENABLE([all-warnings], + AC_HELP_STRING([--enable-all-warnings], + [enable all useful warnings gcc can issue]), + [all_warnings=$enableval], + []) +AC_SUBST(all_warnings) + +AC_ARG_ENABLE([multi-arch], + AC_HELP_STRING([--enable-multi-arch], + [enable single DSO with optimizations for multiple architectures]), + [multi_arch=$enableval], + [multi_arch=default]) + +AC_ARG_ENABLE([nss-crypt], + AC_HELP_STRING([--enable-nss-crypt], + [enable libcrypt to use nss]), + [nss_crypt=$enableval], + [nss_crypt=no]) +if test x$nss_crypt = xyes; then + nss_includes=-I$(nss-config --includedir 2>/dev/null) + if test $? -ne 0; then + AC_MSG_ERROR([cannot find include directory with nss-config]) + fi + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $nss_includes" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([typedef int PRBool; +#include +#include +void f (void) { NSSLOW_Init (); }])], + libc_cv_nss_crypt=yes, + AC_MSG_ERROR([ +cannot find NSS headers with lowlevel hash function interfaces])) + old_LIBS="$LIBS" + LIBS="$LIBS -lfreebl3" + AC_LINK_IFELSE([AC_LANG_PROGRAM([typedef int PRBool; +#include +#include ], + [NSSLOW_Init();])], + libc_cv_nss_crypt=yes, + AC_MSG_ERROR([ +cannot link program using lowlevel NSS hash functions])) + CFLAGS="$old_CFLAGS" + LIBS="$old_LIBS" +else + libc_cv_nss_crypt=no +fi +AC_SUBST(libc_cv_nss_crypt) + + +AC_ARG_ENABLE([obsolete-rpc], + AC_HELP_STRING([--enable-obsolete-rpc], + [build and install the obsolete RPC code for link-time usage]), + [link_obsolete_rpc=$enableval], + [link_obsolete_rpc=no]) +AC_SUBST(link_obsolete_rpc) + +if test "$link_obsolete_rpc" = yes; then + AC_DEFINE(LINK_OBSOLETE_RPC) +fi + +AC_ARG_ENABLE([systemtap], + [AS_HELP_STRING([--enable-systemtap], + [enable systemtap static probe points @<:@default=no@:>@])], + [systemtap=$enableval], + [systemtap=no]) +if test "x$systemtap" != xno; then + AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl + old_CFLAGS="$CFLAGS" + CFLAGS="-std=gnu99 $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include +void foo (int i, void *p) +{ + asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) "" + :: STAP_PROBE_ASM_OPERANDS (2, i, p)); +}]])], [libc_cv_sdt=yes], [libc_cv_sdt=no]) + CFLAGS="$old_CFLAGS"]) + if test $libc_cv_sdt = yes; then + AC_DEFINE([USE_STAP_PROBE]) + elif test "x$systemtap" != xauto; then + AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support]) + fi +fi + +AC_ARG_ENABLE([build-nscd], + [AS_HELP_STRING([--disable-build-nscd], + [disable building and installing the nscd daemon])], + [build_nscd=$enableval], + [build_nscd=default]) +AC_SUBST(build_nscd) + +# Note the use of $use_nscd is near the bottom of the file. +AC_ARG_ENABLE([nscd], + [AS_HELP_STRING([--disable-nscd], + [library functions will not contact the nscd daemon])], + [use_nscd=$enableval], + [use_nscd=yes]) + +AC_ARG_ENABLE([pt_chown], + [AS_HELP_STRING([--enable-pt_chown], + [Enable building and installing pt_chown])], + [build_pt_chown=$enableval], + [build_pt_chown=no]) +AC_SUBST(build_pt_chown) +if test "$build_pt_chown" = yes; then + AC_DEFINE(HAVE_PT_CHOWN) +fi + +# The way shlib-versions is used to generate soversions.mk uses a +# fairly simplistic model for name recognition that can't distinguish +# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os +# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can +# tell. This doesn't get used much beyond that, so it's fairly safe. +case "$host_os" in +linux*) + ;; +gnu*) + host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'` + ;; +esac + +# We keep the original values in `$config_*' and never modify them, so we +# can write them unchanged into config.make. Everything else uses +# $machine, $vendor, and $os, and changes them whenever convenient. +config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os + +# Don't allow vendor == "unknown" +test "$config_vendor" = unknown && config_vendor= +config_os="`echo $config_os | sed 's/^unknown-//'`" + +# Some configurations imply other options. +elf=yes + +# The configure fragment of an add-on port can modify these to supplement +# or override the table in the case statement below. No fragment should +# ever change the config_* variables, however. +machine=$config_machine +vendor=$config_vendor +os=$config_os +base_os='' + +# config.guess on some IBM machines says `rs6000' instead of `powerpc'. +# Unify this here. +if test "$machine" = rs6000; then + machine="powerpc" +fi + +# Braindead PowerPC box with absolutely no FPU. +case "$machine-$host_os" in + powerpc*-*soft) + with_fp=no + ;; +esac + +submachine= +AC_ARG_WITH([cpu], + AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]), + [dnl + case "$withval" in + yes|'') AC_MSG_ERROR([--with-cpu requires an argument]) ;; + no) ;; + *) submachine="$withval" ;; + esac +]) + +dnl Let sysdeps/*/preconfigure act here, like they can in add-ons. +LIBC_PRECONFIGURE([$srcdir], [for sysdeps]) + +# 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 +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 + for f in $add_ons; do + # Some sanity checks + case "$f" in + crypt) + AC_MSG_ERROR([ +*** It seems that you're using an old \`crypt' add-on. crypt is now +*** part of glibc and using the old add-on will not work with this +*** release. Start again with fresh sources and without the old +*** \`crypt' add-on.]) + ;; + localedata) + AC_MSG_ERROR([ +*** It seems that you're using an old \`localedata' add-on. localedata +*** is now part of glibc and using the old add-on will not work with +*** this release. Start again with fresh sources and without the old +*** \`localedata' add-on.]) + ;; + esac + done + + # Now source each add-on's configure fragment. + # The fragments can use $srcdir/$libc_add_on to find themselves, + # and test $add_ons_automatic to see if they were explicitly requested. + # A fragment can clear (or even change) $libc_add_on to affect + # whether it goes into the list to be actually used in the build. + use_add_ons= + for libc_add_on in $add_ons; do + # 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= + libc_add_on_config_subdirs= + 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 + for d in $libc_add_on_config_subdirs; do + case "$d" in + /*) AC_MSG_ERROR(dnl +fragment uses absolute path in \$libc_add_on_config_subdirs) ;; + esac + if test ! -d "$libc_add_on_srcdir/$d"; then + AC_MSG_ERROR(fragment wants to configure missing directory $d) + fi + case "$libc_add_on" in + /*) AC_MSG_ERROR(dnl +relative path required for add-on using \$libc_add_on_config_subdirs) ;; + esac + subdirs="$subdirs $libc_add_on/$d" + done + } + fi + if test -n "$libc_add_on"; then + LIBC_PRECONFIGURE([$libc_add_on_srcdir], [add-on $libc_add_on for]) + use_add_ons="$use_add_ons $libc_add_on" + add_ons_pfx="$add_ons_pfx $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) + + +### +### I put this here to prevent those annoying emails from people who cannot +### read and try to compile glibc on unsupported platforms. --drepper +### +### By using the undocumented --enable-hacker-mode option for configure +### one can skip this test to make the configuration not fail for unsupported +### platforms. +### +if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then + case "$machine-$host_os" in + *-linux* | *-gnu*) + ;; + *) + echo "*** The GNU C library is currently not available for this platform." + echo "*** So far nobody cared to port it and if there is no volunteer it" + echo "*** might never happen. So, if you have interest to see glibc on" + echo "*** this platform visit" + echo "*** http://www.gnu.org/software/libc/porting.html" + echo "*** and join the group of porters" + exit 1 + ;; + esac +fi + +dnl We need to use [ and ] for other purposes for a while now. +changequote(,)dnl +# Expand the configuration machine name into a subdirectory by architecture +# type and particular chip. If an add-on configure fragment already set +# base_machine, we don't change it. +test -n "$base_machine" || case "$machine" in +i[4567]86) base_machine=i386 machine=i386/$machine ;; +powerpc64*) base_machine=powerpc machine=powerpc/powerpc64 ;; +powerpc*) base_machine=powerpc machine=powerpc/powerpc32 ;; +s390) base_machine=s390 machine=s390/s390-32 ;; +s390x) base_machine=s390 machine=s390/s390-64 ;; +sh3*) base_machine=sh machine=sh/sh3 ;; +sh4*) base_machine=sh machine=sh/sh4 ;; +sparc | sparcv[67]) + base_machine=sparc machine=sparc/sparc32 ;; +sparcv8 | supersparc | hypersparc) + base_machine=sparc machine=sparc/sparc32/sparcv8 ;; +sparcv8plus | sparcv8plusa | sparcv9) + base_machine=sparc machine=sparc/sparc32/sparcv9 ;; +sparcv8plusb | sparcv9b) + base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;; +sparcv9v) + base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;; +sparcv9v2) + base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v2 ;; +sparc64) + base_machine=sparc machine=sparc/sparc64 ;; +sparc64b) + base_machine=sparc machine=sparc/sparc64/sparcv9b ;; +sparc64v) + base_machine=sparc machine=sparc/sparc64/sparcv9v ;; +sparc64v2) + base_machine=sparc machine=sparc/sparc64/sparcv9v2 ;; +*) base_machine=$machine ;; +esac +changequote([,])dnl +AC_SUBST(base_machine) + +if test "$base_machine" = "i386"; then + AC_DEFINE(USE_REGPARMS) +fi + +# For the multi-arch option we need support in the assembler & linker. +AC_CACHE_CHECK([for assembler and linker STT_GNU_IFUNC support], + libc_cv_ld_gnu_indirect_function, [dnl +cat > conftest.S <&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + # Do a link to see if the backend supports IFUNC relocs. + $READELF -r conftest 1>&AS_MESSAGE_LOG_FD + LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { + libc_cv_ld_gnu_indirect_function=yes + } +fi +rm -f conftest*]) + +AC_MSG_CHECKING(whether .text pseudo-op must be used) +AC_CACHE_VAL(libc_cv_dot_text, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_dot_text=.text +fi +rm -f conftest*]) +if test -z "$libc_cv_dot_text"; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(yes) +fi + +if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then + if test x"$multi_arch" = xyes; then + AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support]) + else + multi_arch=no + fi +fi +multi_arch_d= +if test x"$multi_arch" != xno; then + multi_arch_d=/multiarch +fi + +# Compute the list of sysdep directories for this configuration. +# This can take a while to compute. +sysdep_dir=$srcdir/sysdeps +AC_MSG_CHECKING(sysdep dirs) +dnl We need to use [ and ] for other purposes for a while now. +changequote(,)dnl +# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. +os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" + +test "x$base_os" != x || case "$os" in +gnu*) + base_os=mach/hurd ;; +linux*) + base_os=unix/sysv ;; +esac + +# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. +tail=$os +ostry=$os +while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do + ostry="$ostry /$o" + tail=$o +done +o=`echo $tail | sed 's/[0-9]*$//'` +if test $o != $tail; then + ostry="$ostry /$o" +fi +# For linux-gnu, try linux-gnu, then linux. +o=`echo $tail | sed 's/-.*$//'` +if test $o != $tail; then + ostry="$ostry /$o" +fi + +# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix. +base= +tail=$base_os +while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do + set $b + base="$base /$1" + tail="$2" +done + +# For sparc/sparc32, try sparc/sparc32 and then sparc. +mach= +tail=$machine${submachine:+/$submachine} +while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do + set $m + # Prepend the machine's FPU directory unless --without-fp. + if test "$with_fp" = yes; then + maybe_fpu=/fpu + else + maybe_fpu=/nofpu + fi + # For each machine term, try it with and then without /multiarch. + for try_fpu in $maybe_fpu ''; do + for try_multi in $multi_arch_d ''; do + mach="$mach /$1$try_fpu$try_multi" + done + done + tail="$2" +done + +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= +for b in $base ''; do + for m0 in $mach ''; do + for v in /$vendor ''; do + test "$v" = / && continue + for o in /$ostry ''; do + test "$o" = / && continue + for m in $mach ''; do + for d in $add_ons_pfx ''; do + for a in $add_ons_sfx ''; do + try_suffix="$m0$b$v$o$m" + if test -n "$try_suffix"; then + try_srcdir="${srcdir}/" + case "$d" in + /*) try_srcdir= ;; + esac + try="${d}sysdeps$try_suffix$a" + test -n "$enable_debug_configure" && + echo "$0 [DEBUG]: try $try" >&2 + 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 + done + done + done + done + done +done + +# If the assembler supports gnu_indirect_function symbol type and the +# architecture supports multi-arch, we enable multi-arch by default. +case $sysnames_add_ons$sysnames in +*"$multi_arch_d"*) + ;; +*) + test x"$multi_arch" = xdefault && multi_arch=no + ;; +esac +if test x"$multi_arch" != xno; then + AC_DEFINE(USE_MULTIARCH) +fi +AC_SUBST(multi_arch) + +if test -z "$os_used" && test "$os" != none; then + AC_MSG_ERROR(Operating system $os is not supported.) +fi +if test -z "$machine_used" && test "$machine" != none; then + AC_MSG_ERROR(The $machine is not supported.) +fi +if test -z "$submachine_used" && test -n "$submachine"; then + AC_MSG_ERROR(The $submachine subspecies of $host_cpu is not supported.) +fi +AC_SUBST(submachine) + +# We have now validated the configuration. + +# Expand the list of system names into a full list of directories +# from each element's parent name and Implies file (if present). +set $sysnames +names= +while test $# -gt 0; do + name=$1 + shift + + case " $names " in *" $name "*) + # Already in the list. + continue + esac + + # Report each name as we discover it, so there is no long pause in output. + echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD + + name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'` + + case $name in + /*) xsrcdir= ;; + *) xsrcdir=$srcdir/ ;; + esac + test -n "$enable_debug_configure" && + echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2 + + for implies_file in Implies Implies-before Implies-after; do + implies_type=`echo $implies_file | sed s/-/_/` + eval ${implies_type}= + if test -f $xsrcdir$name/$implies_file; then + # Collect more names from the `Implies' file (removing comments). + implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" + for x in $implied_candidate; do + found=no + if test -d $xsrcdir$name_base/$x; then + eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" + found=yes + fi + for d in $add_ons_pfx ''; do + try="${d}sysdeps/$x" + case $d in + /*) try_srcdir= ;; + *) try_srcdir=$srcdir/ ;; + esac + test -n "$enable_debug_configure" && + echo "[DEBUG]: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + eval "${implies_type}=\"\$${implies_type} \$try\"" + found=yes + case "$sysnames_add_ons" in + *" $d "*) ;; + *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; + esac + fi + done + if test $found = no; then + AC_MSG_WARN($name/$implies_file specifies nonexistent $x) + fi + done + fi + done + + # Add NAME to the list of names. + names="$names $name" + + # Find the parent of NAME, using the empty string if it has none. +changequote(,)dnl + parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" +changequote([,])dnl + + test -n "$enable_debug_configure" && + echo "[DEBUG]: $name Implies='$Implies' rest='$*' parent='$parent' \ +Implies_before='$Implies_before' Implies_after='$Implies_after'" >&2 + + # Add the names implied by NAME, and NAME's parent (if it has one), to + # the list of names to be processed (the argument list). We prepend the + # implied names to the list and append the parent. We want implied + # directories to come before further directories inferred from the + # configuration components; this ensures that for sysv4, unix/common + # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*) + # after sysv4). + sysnames="`echo $Implies $* $Implies_before $parent $Implies_after`" + test -n "$sysnames" && set $sysnames +done + +# Add the default directories. +default_sysnames="sysdeps/generic" +sysnames="$names $default_sysnames" +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. + +AC_PROG_INSTALL +if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then + # The makefiles need to use a different form to find it in $srcdir. + INSTALL='\$(..)./scripts/install-sh -c' +fi +AC_PROG_LN_S + +LIBC_PROG_BINUTILS + +# Accept binutils 2.20 or newer. +AC_CHECK_PROG_VER(AS, $AS, --version, + [GNU assembler.* \([0-9]*\.[0-9.]*\)], + [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as") +AC_CHECK_PROG_VER(LD, $LD, --version, + [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], + [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld") + +# These programs are version sensitive. +AC_CHECK_TOOL_PREFIX +AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, + [version \([egcygnustpi-]*[0-9.]*\)], [4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ], + critic_missing="$critic_missing gcc") +AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], + [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + +AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], + [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*], + MSGFMT=: aux_missing="$aux_missing msgfmt") +AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], + [4.[5-9]*|4.[1-9][0-9]*|[5-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") +AC_CHECK_PROG_VER(SED, sed, --version, + [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") +AC_CHECK_PROG_VER(AWK, gawk, --version, + [GNU Awk[^0-9]*\([0-9][0-9.]*\)], + [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk") + +AC_CHECK_TOOL(NM, nm, false) + +AC_CHECK_PROGS(AUTOCONF, autoconf, no) +case "x$AUTOCONF" in +xno|x|x:) AUTOCONF=no ;; +*) + AC_CACHE_CHECK(dnl +whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl + if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then + libc_cv_autoconf_works=yes + else + libc_cv_autoconf_works=no + fi]) + test $libc_cv_autoconf_works = yes || AUTOCONF=no + ;; +esac +if test "x$AUTOCONF" = xno; then + aux_missing="$aux_missing autoconf" +fi + +test -n "$critic_missing" && AC_MSG_ERROR([ +*** These critical programs are missing or too old:$critic_missing +*** Check the INSTALL file for required versions.]) + +test -n "$aux_missing" && AC_MSG_WARN([ +*** These auxiliary programs are missing or incompatible versions:$aux_missing +*** some features will be disabled. +*** Check the INSTALL file for required versions.]) + +# if using special system headers, find out the compiler's sekrit +# header directory and add that to the list. NOTE: Only does the right +# thing on a system that doesn't need fixincludes. (Not presently a problem.) +if test -n "$sysheaders"; then + SYSINCLUDES=-nostdinc + for d in include include-fixed; do + i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && + SYSINCLUDES="$SYSINCLUDES -isystem $i" + done + SYSINCLUDES="$SYSINCLUDES \ +-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + CXX_SYSINCLUDES= + for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \ + | sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do + test "x$cxxheaders" != x && + CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders" + done + fi +fi +AC_SUBST(SYSINCLUDES) +AC_SUBST(CXX_SYSINCLUDES) + +# Test if LD_LIBRARY_PATH contains the notation for the current directory +# since this would lead to problems installing/building glibc. +# LD_LIBRARY_PATH contains the current directory if one of the following +# is true: +# - one of the terminals (":" and ";") is the first or last sign +# - two terminals occur directly after each other +# - the path contains an element with a dot in it +AC_MSG_CHECKING(LD_LIBRARY_PATH variable) +changequote(,)dnl +case ${LD_LIBRARY_PATH} in + [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) + ld_library_path_setting="contains current directory" + ;; + *) + ld_library_path_setting="ok" + ;; +esac +changequote([,])dnl +AC_MSG_RESULT($ld_library_path_setting) +if test "$ld_library_path_setting" != "ok"; then +AC_MSG_ERROR([ +*** LD_LIBRARY_PATH shouldn't contain the current directory when +*** building glibc. Please change the environment variable +*** and run configure again.]) +fi + +AC_CACHE_CHECK(whether GCC supports -static-libgcc, libc_cv_gcc_static_libgcc, [dnl +if $CC -v -static-libgcc 2>&1 | grep 'unrecognized option.*static-libgcc' >/dev/null; then + libc_cv_gcc_static_libgcc= +else + libc_cv_gcc_static_libgcc=-static-libgcc +fi]) +AC_SUBST(libc_cv_gcc_static_libgcc) + +AC_PATH_PROG(BASH_SHELL, bash, no) +if test "$BASH_SHELL" != no && + $BASH_SHELL -c 'test "$BASH_VERSINFO" \ + && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then + libc_cv_have_bash2=yes +else + libc_cv_have_bash2=no +fi +AC_SUBST(libc_cv_have_bash2) + +dnl We need a ksh compatible shell for tzselect. +if test "$BASH_SHELL" = no; then + AC_PATH_PROG(KSH, ksh, no) + if test "$KSH" = no; then + libc_cv_have_ksh=no + else + libc_cv_have_ksh=yes + fi +else + KSH="$BASH_SHELL" + AC_SUBST(KSH) + libc_cv_have_ksh=yes +fi +AC_SUBST(libc_cv_have_ksh) + +AC_PATH_PROG(PERL, perl, no) +if test "$PERL" != no && + (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then + PERL=no +fi +AC_PATH_PROG(INSTALL_INFO, install-info, no, + $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin) +AC_PATH_PROG(BISON, bison, no, $PATH:/usr/local/bin:/usr/bin:/bin) + +AC_CACHE_CHECK(for libc-friendly stddef.h, libc_cv_friendly_stddef, [dnl +AC_TRY_COMPILE(dnl +[#define __need_size_t +#define __need_wchar_t +#include +#define __need_NULL +#include ], [size_t size; wchar_t wchar; +#ifdef offsetof +#error stddef.h ignored __need_* +#endif +if (&size == NULL || &wchar == NULL) abort ();], + libc_cv_friendly_stddef=yes, + libc_cv_friendly_stddef=no)]) +if test $libc_cv_friendly_stddef = yes; then + config_vars="$config_vars +override stddef.h = # The installed seems to be libc-friendly." +fi + +AC_CACHE_CHECK(whether we need to use -P to assemble .S files, + libc_cv_need_minus_P, [dnl +cat > conftest.S <&AS_MESSAGE_LOG_FD); then + libc_cv_need_minus_P=no +else + libc_cv_need_minus_P=yes +fi +rm -f conftest*]) +if test $libc_cv_need_minus_P = yes; then + config_vars="$config_vars +asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives." +fi + +AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl +cat > conftest.s < conftest1.c <<\EOF +extern int glibc_conftest_frobozz; +void _start() { glibc_conftest_frobozz = 1; } +EOF +if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ + -nostartfiles -nostdlib \ + -o conftest conftest.s conftest1.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + libc_cv_asm_set_directive=yes +else + libc_cv_asm_set_directive=no +fi +rm -f conftest*]) +if test $libc_cv_asm_set_directive = yes; then + AC_DEFINE(HAVE_ASM_SET_DIRECTIVE) +fi + +AC_CACHE_CHECK(for assembler gnu_unique_object symbol type, + libc_cv_asm_unique_object, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + libc_cv_asm_unique_object=yes +else + libc_cv_asm_unique_object=no +fi +rm -f conftest*]) +if test $libc_cv_asm_unique_object = yes; then + AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT) +fi + +AC_CACHE_CHECK(for .previous assembler directive, + libc_cv_asm_previous_directive, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_previous_directive=yes +else + libc_cv_asm_previous_directive=no +fi +rm -f conftest*]) +if test $libc_cv_asm_previous_directive = yes; then + AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE) +else + AC_CACHE_CHECK(for .popsection assembler directive, + libc_cv_asm_popsection_directive, [dnl + cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_popsection_directive=yes + else + libc_cv_asm_popsection_directive=no + fi + rm -f conftest*]) + if test $libc_cv_asm_popsection_directive = yes; then + AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE) + fi +fi +AC_CACHE_CHECK(for .protected and .hidden assembler directive, + libc_cv_asm_protected_directive, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_protected_directive=yes +else + AC_MSG_ERROR(assembler support for symbol visibility is required) +fi +rm -f conftest*]) + +if test $libc_cv_asm_protected_directive = yes; then + AC_CACHE_CHECK(whether __attribute__((visibility())) is supported, + libc_cv_visibility_attribute, + [cat > conftest.c <&AS_MESSAGE_LOG_FD); then + if grep '\.hidden.*foo' conftest.s >/dev/null; then + if grep '\.protected.*bar' conftest.s >/dev/null; then + libc_cv_visibility_attribute=yes + fi + fi + fi + rm -f conftest.{c,s} + ]) + if test $libc_cv_visibility_attribute != yes; then + AC_MSG_ERROR(compiler support for visibility attribute is required) + fi +fi + +if test $libc_cv_visibility_attribute = yes; then + AC_CACHE_CHECK(for broken __attribute__((visibility())), + libc_cv_broken_visibility_attribute, + [cat > conftest.c <&AS_MESSAGE_LOG_FD); then +changequote(,)dnl + if grep '\.hidden[ _]foo' conftest.s >/dev/null; then +changequote([,])dnl + libc_cv_broken_visibility_attribute=no + fi + fi + rm -f conftest.c conftest.s + ]) + if test $libc_cv_broken_visibility_attribute = yes; then + AC_MSG_ERROR(working compiler support for visibility attribute is required) + fi +fi + +AC_CACHE_CHECK(for broken __attribute__((alias())), + libc_cv_broken_alias_attribute, + [cat > conftest.c <&AS_MESSAGE_LOG_FD); then + if grep 'xyzzy' conftest.s >/dev/null && + grep 'abccb' conftest.s >/dev/null; then + libc_cv_broken_alias_attribute=no + fi + fi + rm -f conftest.c conftest.s + ]) +if test $libc_cv_broken_alias_attribute = yes; then + AC_MSG_ERROR(working alias attribute support required) +fi + +if test $libc_cv_visibility_attribute = yes; then + AC_CACHE_CHECK(whether to put _rtld_local into .sdata section, + libc_cv_have_sdata_section, + [echo "int i;" > conftest.c + libc_cv_have_sdata_section=no + if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ + | grep '\.sdata' >/dev/null; then + libc_cv_have_sdata_section=yes + fi + rm -f conftest.c conftest.so + ]) + if test $libc_cv_have_sdata_section = yes; then + AC_DEFINE(HAVE_SDATA_SECTION) + fi +fi + +AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + libc_cv_initfini_array, [dnl +LIBC_TRY_LINK_STATIC([ +int foo (void) { return 1; } +int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; +], + [if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then + libc_cv_initfini_array=yes + else + libc_cv_initfini_array=no + fi], + [libc_cv_initfini_array=no]) +]) +if test $libc_cv_initfini_array != yes; then + AC_MSG_ERROR([Need linker with .init_array/.fini_array support.]) +fi + +AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer, + libc_cv_ctors_header, [dnl + libc_cv_ctors_header=yes + LIBC_TRY_LINK_STATIC([ +__attribute__ ((constructor)) void ctor (void) { asm (""); } +__attribute__ ((destructor)) void dtor (void) { asm (""); } +], + [dnl + AS_IF([$READELF -WS conftest$ac_exeext | $AWK ' + { gsub(/\@<:@ */, "@<:@") } + $2 == ".ctors" || $2 == ".dtors" { + size = strtonum("0x" $6) + align = strtonum("0x" $NF) + seen@<:@$2@:>@ = 1 + stub@<:@$2@:>@ = size == align * 2 + } + END { + ctors_ok = !seen@<:@".ctors"@:>@ || stub@<:@".ctors"@:>@ + dtors_ok = !seen@<:@".dtors"@:>@ || stub@<:@".dtors"@:>@ + exit ((ctors_ok && dtors_ok) ? 0 : 1) + } + '], [libc_cv_ctors_header=no]) + ], [dnl + AC_MSG_ERROR([missing __attribute__ ((constructor)) support??]) + ]) +]) +if test $libc_cv_ctors_header = no; then + AC_DEFINE(NO_CTORS_DTORS_SECTIONS) +fi + +AC_CACHE_CHECK(for libunwind-support in compiler, + libc_cv_cc_with_libunwind, [ + cat > conftest.c <&1 >/dev/null | grep ' -lunwind ' >/dev/null; then + libc_cv_cc_with_libunwind=yes + else + libc_cv_cc_with_libunwind=no + fi + rm -f conftest*]) +AC_SUBST(libc_cv_cc_with_libunwind) +if test $libc_cv_cc_with_libunwind = yes; then + AC_DEFINE(HAVE_CC_WITH_LIBUNWIND) +fi + +LIBC_LINKER_FEATURE([-z nodelete], [-Wl,--enable-new-dtags,-z,nodelete], + [libc_cv_z_nodelete=yes], + [AC_MSG_ERROR(linker with -z nodelete support required)]) + +LIBC_LINKER_FEATURE([-z nodlopen], [-Wl,--enable-new-dtags,-z,nodlopen], + [libc_cv_z_nodlopen=yes], + [AC_MSG_ERROR(linker with -z nodlopen support required)]) + +LIBC_LINKER_FEATURE([-z initfirst], [-Wl,--enable-new-dtags,-z,initfirst], + [libc_cv_z_initfirst=yes], + [AC_MSG_ERROR(linker with -z initfirst support required)]) + +# Add-on fragments can set these for other machines. +libc_commonpagesize=${libc_commonpagesize:-no} +libc_relro_required=${libc_relro_required:-no} +case "$base_machine" in + i[[34567]]86 | x86_64 | powerpc* | s390*) + libc_commonpagesize=0x1000 + libc_relro_required=yes + ;; + sparc*) + libc_commonpagesize=0x2000 + libc_relro_required=yes + ;; +esac + +if test $libc_commonpagesize != no; then + AC_CACHE_CHECK(for -z relro option, + libc_cv_z_relro, [dnl + libc_cv_z_relro=no + AC_LANG_CONFTEST([AC_LANG_SOURCE([[ +int _start (void) { return 42; } +extern void _exit (int); +/* Since these pointers are const, they should go in rodata. + Since they refer to functions that have to be resolved by + dynamic linking, they should instead go in RELRO data. */ +const void *const relro[] = { &_start, &_exit, 0 }; +/* GNU ld fails to produce RELRO data when it's very small and there is no + normal writable data following it, or if only uninitialized (.bss) data + follows it, or only very small writable data. */ +int data[0x10000] = { 1, }; +]])]) + cat > conftest.awk <<\EOF +BEGIN { + result = "no" + commonpagesize = strtonum(commonpagesize) +} +{ print "LINE:", $0 > "/dev/stderr" } +$1 == "GNU_RELRO" { + vaddr = strtonum($3) + memsz = strtonum($6) + end = vaddr + memsz + printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \ + vaddr, memsz, end, commonpagesize > "/dev/stderr" + result = (end % commonpagesize == 0) ? "yes" : "broken" +} +END { print result } +EOF + AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -fPIC -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,-z,relro 1>&AS_MESSAGE_LOG_FD]) && + AC_TRY_COMMAND([$READELF -Wl conftest.so > conftest.ph]) && + AC_TRY_COMMAND([ + $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk + conftest.ph > conftest.cps + ]) && + libc_cv_z_relro=`cat conftest.cps 2>&AS_MESSAGE_LOG_FD` + rm -f conftest*]) + if { test "x$libc_relro_required" = xyes && + test "x$libc_cv_z_relro" != xyes + } + then + AC_MSG_ERROR(linker with -z relro support required) + fi +else + AC_MSG_WARN([missing architecture parameter to check for working -z relro]) +fi + +AC_CACHE_CHECK(for -Bgroup option, + libc_cv_Bgroup, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) +then + libc_cv_Bgroup=yes +else + libc_cv_Bgroup=no +fi +rm -f conftest*]) +AC_SUBST(libc_cv_Bgroup) + +ASFLAGS_config= +AC_CACHE_CHECK(whether --noexecstack is desirable for .S files, + libc_cv_as_noexecstack, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) \ + && grep .note.GNU-stack conftest.s >/dev/null \ + && AC_TRY_COMMAND([${CC-cc} $ASFLAGS -Wa,--noexecstack + -c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD]) +then + libc_cv_as_noexecstack=yes +else + libc_cv_as_noexecstack=no +fi +rm -f conftest*]) +if test $libc_cv_as_noexecstack = yes; then + ASFLAGS_config="$ASFLAGS_config -Wa,--noexecstack" +fi +AC_SUBST(ASFLAGS_config) + +AC_CACHE_CHECK(for -z combreloc, + libc_cv_z_combreloc, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) +then +dnl The following test is a bit weak. We must use a tool which can test +dnl cross-platform since the gcc used can be a cross compiler. Without +dnl introducing new options this is not easily doable. Instead use a tool +dnl which always is cross-platform: readelf. To detect whether -z combreloc +dnl look for a section named .rel.dyn. + if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no + fi +else + libc_cv_z_combreloc=no +fi +rm -f conftest*]) +if test "$libc_cv_z_combreloc" = yes; then + AC_DEFINE(HAVE_Z_COMBRELOC) +fi +AC_SUBST(libc_cv_z_combreloc) + +LIBC_LINKER_FEATURE([-z execstack], [-Wl,-z,execstack], + [libc_cv_z_execstack=yes], [libc_cv_z_execstack=no]) +AC_SUBST(libc_cv_z_execstack) + +AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl +LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no]) +]) + +AC_SUBST(libc_cv_fpie) + +AC_CACHE_CHECK(for --hash-style option, + libc_cv_hashstyle, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) +then + libc_cv_hashstyle=yes +else + libc_cv_hashstyle=no +fi +rm -f conftest*]) +AC_SUBST(libc_cv_hashstyle) + +# The linker's default -shared behavior is good enough if it +# does these things that our custom linker scripts ensure that +# all allocated NOTE sections come first. +if test "$use_default_link" = default; then + AC_CACHE_CHECK([for sufficient default -shared layout], + libc_cv_use_default_link, [dnl + libc_cv_use_default_link=no + cat > conftest.s <<\EOF + .section .note.a,"a",%note + .balign 4 + .long 4,4,9 + .string "GNU" + .string "foo" + .section .note.b,"a",%note + .balign 4 + .long 4,4,9 + .string "GNU" + .string "bar" +EOF + if AC_TRY_COMMAND([dnl + ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&AS_MESSAGE_LOG_FD]) && + ac_try=`$READELF -S conftest.so | sed -n \ + ['${x;p;} + s/^ *\[ *[1-9][0-9]*\] *\([^ ][^ ]*\) *\([^ ][^ ]*\) .*$/\2 \1/ + t a + b + : a + H']` + then + libc_seen_a=no libc_seen_b=no + set -- $ac_try + while test $# -ge 2 -a "$1" = NOTE; do + case "$2" in + .note.a) libc_seen_a=yes ;; + .note.b) libc_seen_b=yes ;; + esac + shift 2 + done + case "$libc_seen_a$libc_seen_b" in + yesyes) + libc_cv_use_default_link=yes + ;; + *) + echo >&AS_MESSAGE_LOG_FD "\ +$libc_seen_a$libc_seen_b from: +$ac_try" + ;; + esac + fi + rm -f conftest*]) + use_default_link=$libc_cv_use_default_link +fi + +AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl +if libc_cv_output_format=` +${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD` +then + : +else + libc_cv_output_format= +fi +test -n "$libc_cv_output_format" || libc_cv_output_format=unknown]) +AC_SUBST(libc_cv_output_format) + +AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) +then + libc_cv_fno_toplevel_reorder=yes +else + libc_cv_fno_toplevel_reorder=no +fi +rm -f conftest*]) +if test $libc_cv_fno_toplevel_reorder = yes; then + fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors" +else + fno_unit_at_a_time=-fno-unit-at-a-time +fi +AC_SUBST(fno_unit_at_a_time) + +AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl +LIBC_TRY_CC_OPTION([$CFLAGS $CPPFLAGS -Werror -fstack-protector], + [libc_cv_ssp=yes], + [libc_cv_ssp=no]) +]) +AC_SUBST(libc_cv_ssp) + +AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl +cat > conftest.c <&AS_MESSAGE_LOG_FD]) +then + libc_cv_gnu89_inline=yes +else + libc_cv_gnu89_inline=no +fi +rm -f conftest*]) +if test $libc_cv_gnu89_inline = yes; then + gnu89_inline=-fgnu89-inline +else + gnu89_inline= +fi +AC_SUBST(gnu89_inline) + +AC_CACHE_CHECK(whether cc puts quotes around section names, + libc_cv_have_section_quotes, + [cat > conftest.c </dev/null; then + libc_cv_have_section_quotes=yes + else + libc_cv_have_section_quotes=no + fi + else + libc_cv_have_section_quotes=unknown + fi + rm -f conftest.{c,s} + ]) +if test $libc_cv_have_section_quotes = yes; then + AC_DEFINE(HAVE_SECTION_QUOTES) +fi + +AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive, + [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_weak_directive=yes +else + libc_cv_asm_weak_directive=no +fi +rm -f conftest*]) + +if test $libc_cv_asm_weak_directive = no; then + AC_CACHE_CHECK(for assembler .weakext directive, + libc_cv_asm_weakext_directive, + [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_weakext_directive=yes + else + libc_cv_asm_weakext_directive=no + fi + rm -f conftest*]) + +fi # no .weak + +if test $libc_cv_asm_weak_directive = yes; then + AC_DEFINE(HAVE_ASM_WEAK_DIRECTIVE) +elif test $libc_cv_asm_weakext_directive = yes; then + AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE) +fi + +AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl +case $machine in + sparc/sparc64*) cfi_offset=2047;; + *) cfi_offset=0;; +esac +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_cfi_directives=yes +else + libc_cv_asm_cfi_directives=no +fi +rm -f conftest*]) +if test $libc_cv_asm_cfi_directives = yes; then + AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES) +fi + +AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl +cat > conftest.c <<\EOF +_start () {} +int __eh_pc; +__throw () {} +EOF +dnl No \ in command here because it ends up inside ''. +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -nostdlib -nostartfiles -Wl,--no-whole-archive + -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then + libc_cv_ld_no_whole_archive=yes +else + libc_cv_ld_no_whole_archive=no +fi +rm -f conftest*]) +if test $libc_cv_ld_no_whole_archive = no; then + AC_MSG_ERROR([support for --no-whole-archive is needed]) +fi + +AC_CACHE_CHECK(for gcc -fexceptions, libc_cv_gcc_exceptions, [dnl +cat > conftest.c <<\EOF +_start () {} +int __eh_pc; +__throw () {} +EOF +dnl No \ in command here because it ends up inside ''. +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -nostdlib -nostartfiles -fexceptions + -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then + libc_cv_gcc_exceptions=yes +else + libc_cv_gcc_exceptions=no +fi +rm -f conftest*]) +if test $libc_cv_gcc_exceptions = yes; then + exceptions=-fexceptions +fi +AC_SUBST(exceptions)dnl + +if test "$host_cpu" = powerpc ; then +# Check for a bug present in at least versions 2.8.x of GCC +# and versions 1.0.x of EGCS. +AC_CACHE_CHECK(whether clobbering cr0 causes problems,libc_cv_c_asmcr0_bug,[dnl +AC_TRY_COMPILE([int tester(int x) { asm ("" : : : "cc"); return x & 123; }],, + libc_cv_c_asmcr0_bug='no', + libc_cv_c_asmcr0_bug='yes')]) +if test "$libc_cv_c_asmcr0_bug" != 'no'; then + AC_DEFINE(BROKEN_PPC_ASM_CR0) +fi +fi + +AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl +cat > conftest.c <<\EOF +void zero (void *x) +{ + __builtin_memset (x, 0, 1000); +} +EOF +dnl +if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null]); +then + libc_cv_gcc_builtin_memset=no +else + libc_cv_gcc_builtin_memset=yes +fi +rm -f conftest* ]) +if test "$libc_cv_gcc_builtin_memset" = yes ; then + AC_DEFINE(HAVE_BUILTIN_MEMSET) +fi + +AC_CACHE_CHECK(for redirection of built-in functions, libc_cv_gcc_builtin_redirection, [dnl +cat > conftest.c <<\EOF +extern char *strstr (const char *, const char *) __asm ("my_strstr"); +char *foo (const char *a, const char *b) +{ + return __builtin_strstr (a, b); +} +EOF +dnl +if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null]); +then + libc_cv_gcc_builtin_redirection=yes +else + libc_cv_gcc_builtin_redirection=no +fi +rm -f conftest* ]) +if test "$libc_cv_gcc_builtin_redirection" = no; then + AC_MSG_ERROR([support for the symbol redirection needed]) +fi + +dnl Check whether the compiler supports the __thread keyword. +AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread, +[cat > conftest.c <<\EOF +__thread int a = 42; +EOF +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then + libc_cv_gcc___thread=yes +else + libc_cv_gcc___thread=no +fi +rm -f conftest*]) +if test "$libc_cv_gcc___thread" = no; then + AC_MSG_ERROR([support for the __thread keyword is required]) +fi + +dnl Check whether the compiler supports the tls_model attribute. +AC_CACHE_CHECK([for tls_model attribute], libc_cv_gcc_tls_model_attr, [dnl +cat > conftest.c <<\EOF +extern __thread int a __attribute__((tls_model ("initial-exec"))); +EOF +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then + libc_cv_gcc_tls_model_attr=yes +else + libc_cv_gcc_tls_model_attr=no +fi +rm -f conftest*]) +if test "$libc_cv_gcc_tls_model_attr" = no; then + AC_MSG_ERROR([support for the tls_model attribute is required]) +fi + +dnl Determine how to disable generation of FMA instructions. +AC_CACHE_CHECK([for compiler option to disable generation of FMA instructions], + libc_cv_cc_nofma, [dnl +libc_cv_cc_nofma= +for opt in -ffp-contract=off -mno-fused-madd; do + LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break]) +done]) +AC_SUBST(libc_cv_cc_nofma) + +if test -n "$submachine"; then + AC_CACHE_CHECK([for compiler option for CPU variant], + libc_cv_cc_submachine, [dnl + libc_cv_cc_submachine=no + for opt in "-march=$submachine" "-mcpu=$submachine"; do + LIBC_TRY_CC_OPTION([$opt], [ + libc_cv_cc_submachine="$opt" + break], []) + done]) + if test "x$libc_cv_cc_submachine" = xno; then + AC_MSG_ERROR([${CC-cc} does not support $submachine]) + fi +fi +AC_SUBST(libc_cv_cc_submachine) + +AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \ +__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl +cat > conftest.c <], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no) + CFLAGS="$old_CFLAGS" + LDFLAGS="$old_LDFLAGS" + LIBS="$old_LIBS" +else + LIBGD=no +fi +AC_MSG_RESULT($LIBGD) +AC_SUBST(LIBGD) + +# SELinux detection +if test x$with_selinux = xno ; then + have_selinux=no; +else + # See if we have the SELinux library + AC_CHECK_LIB(selinux, is_selinux_enabled, + have_selinux=yes, have_selinux=no) + # See if we have the SELinux header with the NSCD permissions in it. + if test x$have_selinux = xyes ; then + AC_MSG_CHECKING([for NSCD Flask permissions in selinux/av_permissions.h]) + AC_TRY_COMPILE([#include ], + [#ifdef NSCD__SHMEMHOST + return 0; + #else + #error NSCD__SHMEMHOST not defined + #endif], + have_selinux=yes, have_selinux=no) + AC_MSG_RESULT($have_selinux) + fi + + if test x$with_selinux = xyes ; then + if test x$have_selinux = xno ; then + AC_MSG_ERROR([SELinux explicitly required, but sufficiently recent SELinux library not found]) + fi + fi +fi +# Check if we're building with SELinux support. +if test "x$have_selinux" = xyes; then + AC_DEFINE(HAVE_SELINUX, 1, [SELinux support]) + + # See if we have the libaudit library + AC_CHECK_LIB(audit, audit_log_user_avc_message, + have_libaudit=yes, have_libaudit=no) + if test "x$have_libaudit" = xyes; then + AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support]) + fi + AC_SUBST(have_libaudit) + + # See if we have the libcap library + AC_CHECK_LIB(cap, cap_init, have_libcap=yes, have_libcap=no) + if test "x$have_libcap" = xyes; then + AC_DEFINE(HAVE_LIBCAP, 1, [SELinux libcap support]) + fi + AC_SUBST(have_libcap) +fi +AC_SUBST(have_selinux) + +dnl check for the size of 'long double'. +AC_CHECK_SIZEOF(long double, 0) +sizeof_long_double=$ac_cv_sizeof_long_double +AC_SUBST(sizeof_long_double) + +CPPUNDEFS= +dnl Check for silly hacked compilers predefining _FORTIFY_SOURCE. +dnl Since we are building the implementations of the fortified functions here, +dnl having the macro defined interacts very badly. +AC_CACHE_CHECK([for _FORTIFY_SOURCE predefine], libc_cv_predef_fortify_source, +[AC_TRY_COMPILE([], [ +#ifdef _FORTIFY_SOURCE +# error bogon +#endif], + [libc_cv_predef_fortify_source=no], + [libc_cv_predef_fortify_source=yes])]) +if test $libc_cv_predef_fortify_source = yes; then + CPPUNDEFS="${CPPUNDEFS:+$CPPUNDEFS }-U_FORTIFY_SOURCE" +fi +AC_SUBST(CPPUNDEFS) + +dnl Check for silly hacked compilers inserting -fstack-protector. +dnl This breaks badly for the early startup code we compile, since +dnl the compiled code can refer to a magic machine-dependent location +dnl for the canary value before we have sufficient setup for that to +dnl work. It's also questionable to build all of libc with this flag +dnl even when you're doing that for most applications you build, since +dnl libc's code is so heavily-used and performance-sensitive. If we +dnl ever really want to make that work, it should be enabled explicitly +dnl in the libc build, not inherited from implicit compiler settings. +AC_CACHE_CHECK([whether $CC implicitly enables -fstack-protector], + libc_cv_predef_stack_protector, [ +AC_TRY_COMPILE([extern void foobar (char *);], + [char large_array[2048]; foobar (large_array);], [ +libc_undefs=`$NM -u conftest.o | + LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \ + 2>&AS_MESSAGE_LOG_FD` || { + AC_MSG_ERROR([confusing output from $NM -u]) +} +echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'" +# On some architectures, there are architecture-specific undefined +# symbols (resolved by the linker), so filter out unknown symbols. +# This will fail to produce the correct result if the compiler +# defaults to -fstack-protector but this produces an undefined symbol +# other than __stack_chk_fail. However, compilers like that have not +# been encountered in practice. +libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'` +case "$libc_undefs" in +foobar) libc_cv_predef_stack_protector=no ;; +'__stack_chk_fail +foobar') libc_cv_predef_stack_protector=yes ;; +*) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;; +esac], + [AC_MSG_ERROR([test compilation failed])]) +]) +libc_extra_cflags= +if test $libc_cv_predef_stack_protector = yes; then + libc_extra_cflags=-fno-stack-protector +fi +AC_SUBST(libc_extra_cflags) + +### End of automated tests. +### Now run sysdeps configure fragments. + +# They also can set these variables. +use_ldconfig=no +ldd_rewrite_script=no +libc_cv_sysconfdir=$sysconfdir +libc_cv_localstatedir=$localstatedir +libc_cv_gcc_unwind_find_fde=no +libc_cv_idn=no + +# Iterate over all the sysdep directories we will use, running their +# configure fragments. +for dir in $sysnames; do + case $dir in + /*) dest=$dir ;; + *) dest=$srcdir/$dir ;; + esac + if test -r $dest/configure; then + AC_MSG_RESULT(running configure fragment for $dir) + . $dest/configure + fi +done + +if test x$libc_cv_gcc_unwind_find_fde = xyes; then + AC_DEFINE(EXPORT_UNWIND_FIND_FDE) +fi +AC_SUBST(libc_cv_gcc_unwind_find_fde) + +# A sysdeps configure fragment can reset this if IFUNC is not actually +# usable even though the assembler knows how to generate the symbol type. +if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then + AC_DEFINE(HAVE_IFUNC) +fi + +# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps +# configure fragment can override the value to prevent this AC_DEFINE. +AC_SUBST(use_nscd) +if test "x$use_nscd" != xno; then + AC_DEFINE([USE_NSCD]) +fi +if test "x$build_nscd" = xdefault; then + build_nscd=$use_nscd +fi + +# Test for old glibc 2.0.x headers so that they can be removed properly +# Search only in includedir. +AC_MSG_CHECKING(for old glibc 2.0.x headers) +if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" +then + old_glibc_headers=yes +else + old_glibc_headers=no +fi +AC_MSG_RESULT($old_glibc_headers) +if test ${old_glibc_headers} = yes; then + AC_MSG_WARN(*** During \"make install\" old headers from glibc 2.0.x will) + AC_MSG_WARN(*** be removed.) +fi +AC_SUBST(old_glibc_headers) + +AC_SUBST(libc_cv_slibdir) +AC_SUBST(libc_cv_rtlddir) +AC_SUBST(libc_cv_localedir) +AC_SUBST(libc_cv_sysconfdir) +AC_SUBST(libc_cv_localstatedir) +AC_SUBST(libc_cv_rootsbindir) +AC_SUBST(libc_cv_forced_unwind) + +if test x$use_ldconfig = xyes; then + AC_DEFINE(USE_LDCONFIG) +fi +AC_SUBST(use_ldconfig) +AC_SUBST(ldd_rewrite_script) + +AC_SUBST(static) +AC_SUBST(shared) + +AC_CACHE_CHECK([whether -fPIC is default], libc_cv_pic_default, +[libc_cv_pic_default=yes +cat > conftest.c <&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then + libc_cv_pic_default=no +fi +rm -f conftest.*]) +AC_SUBST(libc_cv_pic_default) + +AC_SUBST(profile) +AC_SUBST(static_nss) + +AC_SUBST(DEFINES) + +dnl See sysdeps/mach/configure.ac for this variable. +AC_SUBST(mach_interface_list) + +VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h` +RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h` +AC_SUBST(VERSION) +AC_SUBST(RELEASE) + +AC_CONFIG_FILES([config.make Makefile]) +AC_CONFIG_COMMANDS([default],[[ +case $CONFIG_FILES in *config.make*) +echo "$config_vars" >> config.make;; +esac +test -d bits || mkdir bits]],[[config_vars='$config_vars']]) +AC_OUTPUT diff --git a/libc/configure.in b/libc/configure.in deleted file mode 100644 index ffc8490a1..000000000 --- a/libc/configure.in +++ /dev/null @@ -1,2172 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Note we do not use AC_PREREQ here! See aclocal.m4 for what we use instead. -AC_INIT([GNU C Library], [(see version.h)], [http://sourceware.org/bugzilla/], [glibc]) -AC_CONFIG_SRCDIR([include/features.h]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_AUX_DIR([scripts]) - -ACX_PKGVERSION([EGLIBC]) -ACX_BUGURL([http://www.eglibc.org/issues/]) -AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], - [Package description]) -AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], - [Bug reporting address]) - -# Glibc should not depend on any header files -AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], - [m4_divert_text([DEFAULTS], - [ac_includes_default='/* none */'])]) - -# We require GCC, and by default use its preprocessor. Override AC_PROG_CPP -# here to work around the Autoconf issue discussed in -# . -AC_DEFUN([AC_PROG_CPP], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_ARG_VAR([CPP], [C preprocessor])dnl -_AC_ARG_VAR_CPPFLAGS()dnl -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - CPP="$CC -E" -fi -AC_SUBST(CPP)dnl -])# AC_PROG_CPP - -# We require GCC. Override _AC_PROG_CC_C89 here to work around the Autoconf -# issue discussed in -# . -AC_DEFUN([_AC_PROG_CC_C89], [[$1]]) - -dnl This is here so we can set $subdirs directly based on configure fragments. -AC_CONFIG_SUBDIRS() - -AC_CANONICAL_HOST - -AC_PROG_CC -if test $host != $build; then - AC_CHECK_PROGS(BUILD_CC, gcc cc) -fi -AC_SUBST(cross_compiling) -AC_PROG_CPP -# We need the C++ compiler only for testing. -AC_PROG_CXX -AC_CHECK_TOOL(READELF, readelf, false) - -if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then - AC_MSG_ERROR([you must configure in a separate build directory]) -fi - -# This will get text that should go into config.make. -config_vars= - -# Check for a --with-gd argument and set libgd-LDFLAGS in config.make. -AC_ARG_WITH([gd], - AC_HELP_STRING([--with-gd=DIR], - [find libgd include dir and library with prefix DIR]), - [dnl -case "$with_gd" in -yes|''|no) ;; -*) libgd_include="-I$withval/include" - libgd_ldflags="-L$withval/lib" ;; -esac -]) -AC_ARG_WITH([gd-include], - AC_HELP_STRING([--with-gd-include=DIR], - [find libgd include files in DIR]), - [dnl -case "$with_gd_include" in -''|no) ;; -*) libgd_include="-I$withval" ;; -esac -]) -AC_ARG_WITH([gd-lib], - AC_HELP_STRING([--with-gd-lib=DIR], - [find libgd library files in DIR]), - [dnl -case "$with_gd_lib" in -''|no) ;; -*) libgd_ldflags="-L$withval" ;; -esac -]) - -if test -n "$libgd_include"; then - config_vars="$config_vars -CFLAGS-memusagestat.c = $libgd_include" -fi -if test -n "$libgd_ldflags"; then - config_vars="$config_vars -libgd-LDFLAGS = $libgd_ldflags" -fi - -dnl Arguments to specify presence of other packages/features. -AC_ARG_WITH([fp], - AC_HELP_STRING([--with-fp], - [if using floating-point hardware @<:@default=yes@:>@]), - [with_fp=$withval], - [with_fp=yes]) -AC_SUBST(with_fp) -AC_ARG_WITH([binutils], - AC_HELP_STRING([--with-binutils=PATH], - [specify location of binutils (as and ld)]), - [path_binutils=$withval], - [path_binutils='']) -AC_ARG_WITH([selinux], - AC_HELP_STRING([--with-selinux], - [if building with SELinux support]), - [with_selinux=$withval], - [with_selinux=auto]) - -AC_ARG_WITH([headers], - AC_HELP_STRING([--with-headers=PATH], - [location of system headers to use - (for example /usr/src/linux/include) - @<:@default=compiler default@:>@]), - [sysheaders=$withval], - [sysheaders='']) -AC_SUBST(sysheaders) - -AC_SUBST(use_default_link) -AC_ARG_WITH([default-link], - AC_HELP_STRING([--with-default-link], - [do not use explicit linker scripts]), - [use_default_link=$withval], - [use_default_link=default]) - -AC_ARG_ENABLE([sanity-checks], - AC_HELP_STRING([--disable-sanity-checks], - [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]), - [enable_sanity=$enableval], - [enable_sanity=yes]) - -AC_ARG_ENABLE([shared], - AC_HELP_STRING([--enable-shared], - [build shared library @<:@default=yes if GNU ld@:>@]), - [shared=$enableval], - [shared=yes]) -AC_ARG_ENABLE([profile], - AC_HELP_STRING([--enable-profile], - [build profiled library @<:@default=no@:>@]), - [profile=$enableval], - [profile=no]) - -AC_ARG_ENABLE([oldest-abi], - AC_HELP_STRING([--enable-oldest-abi=ABI], - [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]), - [oldest_abi=$enableval], - [oldest_abi=no]) -if test "$oldest_abi" = yes || test "$oldest_abi" = no; then - oldest_abi=default -else - AC_DEFINE_UNQUOTED(GLIBC_OLDEST_ABI, "$oldest_abi") -fi -AC_SUBST(oldest_abi) - -AC_ARG_ENABLE([hardcoded-path-in-tests], - AC_HELP_STRING([--enable-hardcoded-path-in-tests], - [hardcode newly built glibc path in tests @<:@default=no@:>@]), - [hardcoded_path_in_tests=$enableval], - [hardcoded_path_in_tests=no]) -AC_SUBST(hardcoded_path_in_tests) - -AC_ARG_ENABLE([stackguard-randomization], - AC_HELP_STRING([--enable-stackguard-randomization], - [initialize __stack_chk_guard canary with a random number at program start]), - [enable_stackguard_randomize=$enableval], - [enable_stackguard_randomize=no]) -if test "$enable_stackguard_randomize" = yes; then - AC_DEFINE(ENABLE_STACKGUARD_RANDOMIZE) -fi - -AC_ARG_ENABLE([lock-elision], - AC_HELP_STRING([--enable-lock-elision[=yes/no]], - [Enable lock elision for pthread mutexes by default]), - [enable_lock_elision=$enableval], - [enable_lock_elision=no]) -if test "$enable_lock_elision" = yes ; then - AC_DEFINE(ENABLE_LOCK_ELISION) -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]), - , [enable_add_ons=yes]) - -AC_ARG_ENABLE([hidden-plt], - AC_HELP_STRING([--disable-hidden-plt], - [do not hide internal function calls to avoid PLT]), - [hidden=$enableval], - [hidden=yes]) -if test "x$hidden" = xno; then - AC_DEFINE(NO_HIDDEN) -fi - -AC_ARG_ENABLE([bind-now], - AC_HELP_STRING([--enable-bind-now], - [disable lazy relocations in DSOs]), - [bindnow=$enableval], - [bindnow=no]) -AC_SUBST(bindnow) - -dnl On some platforms we cannot use dynamic loading. We must provide -dnl static NSS modules. -AC_ARG_ENABLE([static-nss], - AC_HELP_STRING([--enable-static-nss], - [build static NSS modules @<:@default=no@:>@]), - [static_nss=$enableval], - [static_nss=no]) -dnl Enable static NSS also if we build no shared objects. -if test x"$static_nss" = xyes || test x"$shared" = xno; then - static_nss=yes - AC_DEFINE(DO_STATIC_NSS) -fi - -AC_ARG_ENABLE([force-install], - AC_HELP_STRING([--disable-force-install], - [don't force installation of files from this package, even if they are older than the installed files]), - [force_install=$enableval], - [force_install=yes]) -AC_SUBST(force_install) - -dnl On some platforms we allow dropping compatibility with all kernel -dnl versions. -AC_ARG_ENABLE([kernel], - AC_HELP_STRING([--enable-kernel=VERSION], - [compile for compatibility with kernel not older than VERSION]), - [minimum_kernel=$enableval], - []) -dnl Prevent unreasonable values. -if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then - # Better nothing than this. - minimum_kernel="" -else - if test "$minimum_kernel" = current; then - minimum_kernel=`uname -r 2>/dev/null` || minimum_kernel= - fi -fi - -dnl For the development we sometimes want gcc to issue even more warnings. -dnl This is not the default since many of the extra warnings are not -dnl appropriate. -AC_ARG_ENABLE([all-warnings], - AC_HELP_STRING([--enable-all-warnings], - [enable all useful warnings gcc can issue]), - [all_warnings=$enableval], - []) -AC_SUBST(all_warnings) - -AC_ARG_ENABLE([multi-arch], - AC_HELP_STRING([--enable-multi-arch], - [enable single DSO with optimizations for multiple architectures]), - [multi_arch=$enableval], - [multi_arch=default]) - -AC_ARG_ENABLE([nss-crypt], - AC_HELP_STRING([--enable-nss-crypt], - [enable libcrypt to use nss]), - [nss_crypt=$enableval], - [nss_crypt=no]) -if test x$nss_crypt = xyes; then - nss_includes=-I$(nss-config --includedir 2>/dev/null) - if test $? -ne 0; then - AC_MSG_ERROR([cannot find include directory with nss-config]) - fi - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $nss_includes" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([typedef int PRBool; -#include -#include -void f (void) { NSSLOW_Init (); }])], - libc_cv_nss_crypt=yes, - AC_MSG_ERROR([ -cannot find NSS headers with lowlevel hash function interfaces])) - old_LIBS="$LIBS" - LIBS="$LIBS -lfreebl3" - AC_LINK_IFELSE([AC_LANG_PROGRAM([typedef int PRBool; -#include -#include ], - [NSSLOW_Init();])], - libc_cv_nss_crypt=yes, - AC_MSG_ERROR([ -cannot link program using lowlevel NSS hash functions])) - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" -else - libc_cv_nss_crypt=no -fi -AC_SUBST(libc_cv_nss_crypt) - - -AC_ARG_ENABLE([obsolete-rpc], - AC_HELP_STRING([--enable-obsolete-rpc], - [build and install the obsolete RPC code for link-time usage]), - [link_obsolete_rpc=$enableval], - [link_obsolete_rpc=no]) -AC_SUBST(link_obsolete_rpc) - -if test "$link_obsolete_rpc" = yes; then - AC_DEFINE(LINK_OBSOLETE_RPC) -fi - -AC_ARG_ENABLE([systemtap], - [AS_HELP_STRING([--enable-systemtap], - [enable systemtap static probe points @<:@default=no@:>@])], - [systemtap=$enableval], - [systemtap=no]) -if test "x$systemtap" != xno; then - AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl - old_CFLAGS="$CFLAGS" - CFLAGS="-std=gnu99 $CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include -void foo (int i, void *p) -{ - asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) "" - :: STAP_PROBE_ASM_OPERANDS (2, i, p)); -}]])], [libc_cv_sdt=yes], [libc_cv_sdt=no]) - CFLAGS="$old_CFLAGS"]) - if test $libc_cv_sdt = yes; then - AC_DEFINE([USE_STAP_PROBE]) - elif test "x$systemtap" != xauto; then - AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support]) - fi -fi - -AC_ARG_ENABLE([build-nscd], - [AS_HELP_STRING([--disable-build-nscd], - [disable building and installing the nscd daemon])], - [build_nscd=$enableval], - [build_nscd=default]) -AC_SUBST(build_nscd) - -# Note the use of $use_nscd is near the bottom of the file. -AC_ARG_ENABLE([nscd], - [AS_HELP_STRING([--disable-nscd], - [library functions will not contact the nscd daemon])], - [use_nscd=$enableval], - [use_nscd=yes]) - -AC_ARG_ENABLE([pt_chown], - [AS_HELP_STRING([--enable-pt_chown], - [Enable building and installing pt_chown])], - [build_pt_chown=$enableval], - [build_pt_chown=no]) -AC_SUBST(build_pt_chown) -if test "$build_pt_chown" = yes; then - AC_DEFINE(HAVE_PT_CHOWN) -fi - -# The way shlib-versions is used to generate soversions.mk uses a -# fairly simplistic model for name recognition that can't distinguish -# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os -# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can -# tell. This doesn't get used much beyond that, so it's fairly safe. -case "$host_os" in -linux*) - ;; -gnu*) - host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'` - ;; -esac - -# We keep the original values in `$config_*' and never modify them, so we -# can write them unchanged into config.make. Everything else uses -# $machine, $vendor, and $os, and changes them whenever convenient. -config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os - -# Don't allow vendor == "unknown" -test "$config_vendor" = unknown && config_vendor= -config_os="`echo $config_os | sed 's/^unknown-//'`" - -# Some configurations imply other options. -elf=yes - -# The configure fragment of an add-on port can modify these to supplement -# or override the table in the case statement below. No fragment should -# ever change the config_* variables, however. -machine=$config_machine -vendor=$config_vendor -os=$config_os -base_os='' - -# config.guess on some IBM machines says `rs6000' instead of `powerpc'. -# Unify this here. -if test "$machine" = rs6000; then - machine="powerpc" -fi - -# Braindead PowerPC box with absolutely no FPU. -case "$machine-$host_os" in - powerpc*-*soft) - with_fp=no - ;; -esac - -submachine= -AC_ARG_WITH([cpu], - AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]), - [dnl - case "$withval" in - yes|'') AC_MSG_ERROR([--with-cpu requires an argument]) ;; - no) ;; - *) submachine="$withval" ;; - esac -]) - -dnl Let sysdeps/*/preconfigure act here, like they can in add-ons. -LIBC_PRECONFIGURE([$srcdir], [for sysdeps]) - -# 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 -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 - for f in $add_ons; do - # Some sanity checks - case "$f" in - crypt) - AC_MSG_ERROR([ -*** It seems that you're using an old \`crypt' add-on. crypt is now -*** part of glibc and using the old add-on will not work with this -*** release. Start again with fresh sources and without the old -*** \`crypt' add-on.]) - ;; - localedata) - AC_MSG_ERROR([ -*** It seems that you're using an old \`localedata' add-on. localedata -*** is now part of glibc and using the old add-on will not work with -*** this release. Start again with fresh sources and without the old -*** \`localedata' add-on.]) - ;; - esac - done - - # Now source each add-on's configure fragment. - # The fragments can use $srcdir/$libc_add_on to find themselves, - # and test $add_ons_automatic to see if they were explicitly requested. - # A fragment can clear (or even change) $libc_add_on to affect - # whether it goes into the list to be actually used in the build. - use_add_ons= - for libc_add_on in $add_ons; do - # 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= - libc_add_on_config_subdirs= - 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 - for d in $libc_add_on_config_subdirs; do - case "$d" in - /*) AC_MSG_ERROR(dnl -fragment uses absolute path in \$libc_add_on_config_subdirs) ;; - esac - if test ! -d "$libc_add_on_srcdir/$d"; then - AC_MSG_ERROR(fragment wants to configure missing directory $d) - fi - case "$libc_add_on" in - /*) AC_MSG_ERROR(dnl -relative path required for add-on using \$libc_add_on_config_subdirs) ;; - esac - subdirs="$subdirs $libc_add_on/$d" - done - } - fi - if test -n "$libc_add_on"; then - LIBC_PRECONFIGURE([$libc_add_on_srcdir], [add-on $libc_add_on for]) - use_add_ons="$use_add_ons $libc_add_on" - add_ons_pfx="$add_ons_pfx $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) - - -### -### I put this here to prevent those annoying emails from people who cannot -### read and try to compile glibc on unsupported platforms. --drepper -### -### By using the undocumented --enable-hacker-mode option for configure -### one can skip this test to make the configuration not fail for unsupported -### platforms. -### -if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then - case "$machine-$host_os" in - *-linux* | *-gnu*) - ;; - *) - echo "*** The GNU C library is currently not available for this platform." - echo "*** So far nobody cared to port it and if there is no volunteer it" - echo "*** might never happen. So, if you have interest to see glibc on" - echo "*** this platform visit" - echo "*** http://www.gnu.org/software/libc/porting.html" - echo "*** and join the group of porters" - exit 1 - ;; - esac -fi - -dnl We need to use [ and ] for other purposes for a while now. -changequote(,)dnl -# Expand the configuration machine name into a subdirectory by architecture -# type and particular chip. If an add-on configure fragment already set -# base_machine, we don't change it. -test -n "$base_machine" || case "$machine" in -i[4567]86) base_machine=i386 machine=i386/$machine ;; -powerpc64*) base_machine=powerpc machine=powerpc/powerpc64 ;; -powerpc*) base_machine=powerpc machine=powerpc/powerpc32 ;; -s390) base_machine=s390 machine=s390/s390-32 ;; -s390x) base_machine=s390 machine=s390/s390-64 ;; -sh3*) base_machine=sh machine=sh/sh3 ;; -sh4*) base_machine=sh machine=sh/sh4 ;; -sparc | sparcv[67]) - base_machine=sparc machine=sparc/sparc32 ;; -sparcv8 | supersparc | hypersparc) - base_machine=sparc machine=sparc/sparc32/sparcv8 ;; -sparcv8plus | sparcv8plusa | sparcv9) - base_machine=sparc machine=sparc/sparc32/sparcv9 ;; -sparcv8plusb | sparcv9b) - base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9b ;; -sparcv9v) - base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v ;; -sparcv9v2) - base_machine=sparc machine=sparc/sparc32/sparcv9/sparcv9v2 ;; -sparc64) - base_machine=sparc machine=sparc/sparc64 ;; -sparc64b) - base_machine=sparc machine=sparc/sparc64/sparcv9b ;; -sparc64v) - base_machine=sparc machine=sparc/sparc64/sparcv9v ;; -sparc64v2) - base_machine=sparc machine=sparc/sparc64/sparcv9v2 ;; -*) base_machine=$machine ;; -esac -changequote([,])dnl -AC_SUBST(base_machine) - -if test "$base_machine" = "i386"; then - AC_DEFINE(USE_REGPARMS) -fi - -# For the multi-arch option we need support in the assembler & linker. -AC_CACHE_CHECK([for assembler and linker STT_GNU_IFUNC support], - libc_cv_ld_gnu_indirect_function, [dnl -cat > conftest.S <&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then - # Do a link to see if the backend supports IFUNC relocs. - $READELF -r conftest 1>&AS_MESSAGE_LOG_FD - LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || { - libc_cv_ld_gnu_indirect_function=yes - } -fi -rm -f conftest*]) - -AC_MSG_CHECKING(whether .text pseudo-op must be used) -AC_CACHE_VAL(libc_cv_dot_text, [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_dot_text=.text -fi -rm -f conftest*]) -if test -z "$libc_cv_dot_text"; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(yes) -fi - -if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then - if test x"$multi_arch" = xyes; then - AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support]) - else - multi_arch=no - fi -fi -multi_arch_d= -if test x"$multi_arch" != xno; then - multi_arch_d=/multiarch -fi - -# Compute the list of sysdep directories for this configuration. -# This can take a while to compute. -sysdep_dir=$srcdir/sysdeps -AC_MSG_CHECKING(sysdep dirs) -dnl We need to use [ and ] for other purposes for a while now. -changequote(,)dnl -# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. -os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" - -test "x$base_os" != x || case "$os" in -gnu*) - base_os=mach/hurd ;; -linux*) - base_os=unix/sysv ;; -esac - -# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. -tail=$os -ostry=$os -while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do - ostry="$ostry /$o" - tail=$o -done -o=`echo $tail | sed 's/[0-9]*$//'` -if test $o != $tail; then - ostry="$ostry /$o" -fi -# For linux-gnu, try linux-gnu, then linux. -o=`echo $tail | sed 's/-.*$//'` -if test $o != $tail; then - ostry="$ostry /$o" -fi - -# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix. -base= -tail=$base_os -while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do - set $b - base="$base /$1" - tail="$2" -done - -# For sparc/sparc32, try sparc/sparc32 and then sparc. -mach= -tail=$machine${submachine:+/$submachine} -while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do - set $m - # Prepend the machine's FPU directory unless --without-fp. - if test "$with_fp" = yes; then - maybe_fpu=/fpu - else - maybe_fpu=/nofpu - fi - # For each machine term, try it with and then without /multiarch. - for try_fpu in $maybe_fpu ''; do - for try_multi in $multi_arch_d ''; do - mach="$mach /$1$try_fpu$try_multi" - done - done - tail="$2" -done - -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= -for b in $base ''; do - for m0 in $mach ''; do - for v in /$vendor ''; do - test "$v" = / && continue - for o in /$ostry ''; do - test "$o" = / && continue - for m in $mach ''; do - for d in $add_ons_pfx ''; do - for a in $add_ons_sfx ''; do - try_suffix="$m0$b$v$o$m" - if test -n "$try_suffix"; then - try_srcdir="${srcdir}/" - case "$d" in - /*) try_srcdir= ;; - esac - try="${d}sysdeps$try_suffix$a" - test -n "$enable_debug_configure" && - echo "$0 [DEBUG]: try $try" >&2 - 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 - done - done - done - done - done -done - -# If the assembler supports gnu_indirect_function symbol type and the -# architecture supports multi-arch, we enable multi-arch by default. -case $sysnames_add_ons$sysnames in -*"$multi_arch_d"*) - ;; -*) - test x"$multi_arch" = xdefault && multi_arch=no - ;; -esac -if test x"$multi_arch" != xno; then - AC_DEFINE(USE_MULTIARCH) -fi -AC_SUBST(multi_arch) - -if test -z "$os_used" && test "$os" != none; then - AC_MSG_ERROR(Operating system $os is not supported.) -fi -if test -z "$machine_used" && test "$machine" != none; then - AC_MSG_ERROR(The $machine is not supported.) -fi -if test -z "$submachine_used" && test -n "$submachine"; then - AC_MSG_ERROR(The $submachine subspecies of $host_cpu is not supported.) -fi -AC_SUBST(submachine) - -# We have now validated the configuration. - -# Expand the list of system names into a full list of directories -# from each element's parent name and Implies file (if present). -set $sysnames -names= -while test $# -gt 0; do - name=$1 - shift - - case " $names " in *" $name "*) - # Already in the list. - continue - esac - - # Report each name as we discover it, so there is no long pause in output. - echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD - - name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'` - - case $name in - /*) xsrcdir= ;; - *) xsrcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2 - - for implies_file in Implies Implies-before Implies-after; do - implies_type=`echo $implies_file | sed s/-/_/` - eval ${implies_type}= - if test -f $xsrcdir$name/$implies_file; then - # Collect more names from the `Implies' file (removing comments). - implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" - for x in $implied_candidate; do - found=no - if test -d $xsrcdir$name_base/$x; then - eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" - found=yes - fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "[DEBUG]: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - eval "${implies_type}=\"\$${implies_type} \$try\"" - found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - done - if test $found = no; then - AC_MSG_WARN($name/$implies_file specifies nonexistent $x) - fi - done - fi - done - - # Add NAME to the list of names. - names="$names $name" - - # Find the parent of NAME, using the empty string if it has none. -changequote(,)dnl - parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" -changequote([,])dnl - - test -n "$enable_debug_configure" && - echo "[DEBUG]: $name Implies='$Implies' rest='$*' parent='$parent' \ -Implies_before='$Implies_before' Implies_after='$Implies_after'" >&2 - - # Add the names implied by NAME, and NAME's parent (if it has one), to - # the list of names to be processed (the argument list). We prepend the - # implied names to the list and append the parent. We want implied - # directories to come before further directories inferred from the - # configuration components; this ensures that for sysv4, unix/common - # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*) - # after sysv4). - sysnames="`echo $Implies $* $Implies_before $parent $Implies_after`" - test -n "$sysnames" && set $sysnames -done - -# Add the default directories. -default_sysnames="sysdeps/generic" -sysnames="$names $default_sysnames" -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. - -AC_PROG_INSTALL -if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then - # The makefiles need to use a different form to find it in $srcdir. - INSTALL='\$(..)./scripts/install-sh -c' -fi -AC_PROG_LN_S - -LIBC_PROG_BINUTILS - -# Accept binutils 2.20 or newer. -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as") -AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld") - -# These programs are version sensitive. -AC_CHECK_TOOL_PREFIX -AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - [version \([egcygnustpi-]*[0-9.]*\)], [4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ], - critic_missing="$critic_missing gcc") -AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], - [3.79* | 3.[89]*], critic_missing="$critic_missing make") - -AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], - [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*], - MSGFMT=: aux_missing="$aux_missing msgfmt") -AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], - [4.[5-9]*|4.[1-9][0-9]*|[5-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") -AC_CHECK_PROG_VER(SED, sed, --version, - [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") -AC_CHECK_PROG_VER(AWK, gawk, --version, - [GNU Awk[^0-9]*\([0-9][0-9.]*\)], - [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk") - -AC_CHECK_TOOL(NM, nm, false) - -AC_CHECK_PROGS(AUTOCONF, autoconf, no) -case "x$AUTOCONF" in -xno|x|x:) AUTOCONF=no ;; -*) - AC_CACHE_CHECK(dnl -whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl - if (cd $srcdir; $AUTOCONF $ACFLAGS configure.in > /dev/null 2>&1); then - libc_cv_autoconf_works=yes - else - libc_cv_autoconf_works=no - fi]) - test $libc_cv_autoconf_works = yes || AUTOCONF=no - ;; -esac -if test "x$AUTOCONF" = xno; then - aux_missing="$aux_missing autoconf" -fi - -test -n "$critic_missing" && AC_MSG_ERROR([ -*** These critical programs are missing or too old:$critic_missing -*** Check the INSTALL file for required versions.]) - -test -n "$aux_missing" && AC_MSG_WARN([ -*** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features will be disabled. -*** Check the INSTALL file for required versions.]) - -# if using special system headers, find out the compiler's sekrit -# header directory and add that to the list. NOTE: Only does the right -# thing on a system that doesn't need fixincludes. (Not presently a problem.) -if test -n "$sysheaders"; then - SYSINCLUDES=-nostdinc - for d in include include-fixed; do - i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && - SYSINCLUDES="$SYSINCLUDES -isystem $i" - done - SYSINCLUDES="$SYSINCLUDES \ --isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" - if test -n "$CXX"; then - CXX_SYSINCLUDES= - for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \ - | sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do - test "x$cxxheaders" != x && - CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders" - done - fi -fi -AC_SUBST(SYSINCLUDES) -AC_SUBST(CXX_SYSINCLUDES) - -# Test if LD_LIBRARY_PATH contains the notation for the current directory -# since this would lead to problems installing/building glibc. -# LD_LIBRARY_PATH contains the current directory if one of the following -# is true: -# - one of the terminals (":" and ";") is the first or last sign -# - two terminals occur directly after each other -# - the path contains an element with a dot in it -AC_MSG_CHECKING(LD_LIBRARY_PATH variable) -changequote(,)dnl -case ${LD_LIBRARY_PATH} in - [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) - ld_library_path_setting="contains current directory" - ;; - *) - ld_library_path_setting="ok" - ;; -esac -changequote([,])dnl -AC_MSG_RESULT($ld_library_path_setting) -if test "$ld_library_path_setting" != "ok"; then -AC_MSG_ERROR([ -*** LD_LIBRARY_PATH shouldn't contain the current directory when -*** building glibc. Please change the environment variable -*** and run configure again.]) -fi - -AC_CACHE_CHECK(whether GCC supports -static-libgcc, libc_cv_gcc_static_libgcc, [dnl -if $CC -v -static-libgcc 2>&1 | grep 'unrecognized option.*static-libgcc' >/dev/null; then - libc_cv_gcc_static_libgcc= -else - libc_cv_gcc_static_libgcc=-static-libgcc -fi]) -AC_SUBST(libc_cv_gcc_static_libgcc) - -AC_PATH_PROG(BASH_SHELL, bash, no) -if test "$BASH_SHELL" != no && - $BASH_SHELL -c 'test "$BASH_VERSINFO" \ - && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then - libc_cv_have_bash2=yes -else - libc_cv_have_bash2=no -fi -AC_SUBST(libc_cv_have_bash2) - -dnl We need a ksh compatible shell for tzselect. -if test "$BASH_SHELL" = no; then - AC_PATH_PROG(KSH, ksh, no) - if test "$KSH" = no; then - libc_cv_have_ksh=no - else - libc_cv_have_ksh=yes - fi -else - KSH="$BASH_SHELL" - AC_SUBST(KSH) - libc_cv_have_ksh=yes -fi -AC_SUBST(libc_cv_have_ksh) - -AC_PATH_PROG(PERL, perl, no) -if test "$PERL" != no && - (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then - PERL=no -fi -AC_PATH_PROG(INSTALL_INFO, install-info, no, - $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin) -AC_PATH_PROG(BISON, bison, no, $PATH:/usr/local/bin:/usr/bin:/bin) - -AC_CACHE_CHECK(for libc-friendly stddef.h, libc_cv_friendly_stddef, [dnl -AC_TRY_COMPILE(dnl -[#define __need_size_t -#define __need_wchar_t -#include -#define __need_NULL -#include ], [size_t size; wchar_t wchar; -#ifdef offsetof -#error stddef.h ignored __need_* -#endif -if (&size == NULL || &wchar == NULL) abort ();], - libc_cv_friendly_stddef=yes, - libc_cv_friendly_stddef=no)]) -if test $libc_cv_friendly_stddef = yes; then - config_vars="$config_vars -override stddef.h = # The installed seems to be libc-friendly." -fi - -AC_CACHE_CHECK(whether we need to use -P to assemble .S files, - libc_cv_need_minus_P, [dnl -cat > conftest.S <&AS_MESSAGE_LOG_FD); then - libc_cv_need_minus_P=no -else - libc_cv_need_minus_P=yes -fi -rm -f conftest*]) -if test $libc_cv_need_minus_P = yes; then - config_vars="$config_vars -asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives." -fi - -AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl -cat > conftest.s < conftest1.c <<\EOF -extern int glibc_conftest_frobozz; -void _start() { glibc_conftest_frobozz = 1; } -EOF -if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ - -nostartfiles -nostdlib \ - -o conftest conftest.s conftest1.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then - libc_cv_asm_set_directive=yes -else - libc_cv_asm_set_directive=no -fi -rm -f conftest*]) -if test $libc_cv_asm_set_directive = yes; then - AC_DEFINE(HAVE_ASM_SET_DIRECTIVE) -fi - -AC_CACHE_CHECK(for assembler gnu_unique_object symbol type, - libc_cv_asm_unique_object, [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then - libc_cv_asm_unique_object=yes -else - libc_cv_asm_unique_object=no -fi -rm -f conftest*]) -if test $libc_cv_asm_unique_object = yes; then - AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT) -fi - -AC_CACHE_CHECK(for .previous assembler directive, - libc_cv_asm_previous_directive, [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_previous_directive=yes -else - libc_cv_asm_previous_directive=no -fi -rm -f conftest*]) -if test $libc_cv_asm_previous_directive = yes; then - AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE) -else - AC_CACHE_CHECK(for .popsection assembler directive, - libc_cv_asm_popsection_directive, [dnl - cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_popsection_directive=yes - else - libc_cv_asm_popsection_directive=no - fi - rm -f conftest*]) - if test $libc_cv_asm_popsection_directive = yes; then - AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE) - fi -fi -AC_CACHE_CHECK(for .protected and .hidden assembler directive, - libc_cv_asm_protected_directive, [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_protected_directive=yes -else - AC_MSG_ERROR(assembler support for symbol visibility is required) -fi -rm -f conftest*]) - -if test $libc_cv_asm_protected_directive = yes; then - AC_CACHE_CHECK(whether __attribute__((visibility())) is supported, - libc_cv_visibility_attribute, - [cat > conftest.c <&AS_MESSAGE_LOG_FD); then - if grep '\.hidden.*foo' conftest.s >/dev/null; then - if grep '\.protected.*bar' conftest.s >/dev/null; then - libc_cv_visibility_attribute=yes - fi - fi - fi - rm -f conftest.{c,s} - ]) - if test $libc_cv_visibility_attribute != yes; then - AC_MSG_ERROR(compiler support for visibility attribute is required) - fi -fi - -if test $libc_cv_visibility_attribute = yes; then - AC_CACHE_CHECK(for broken __attribute__((visibility())), - libc_cv_broken_visibility_attribute, - [cat > conftest.c <&AS_MESSAGE_LOG_FD); then -changequote(,)dnl - if grep '\.hidden[ _]foo' conftest.s >/dev/null; then -changequote([,])dnl - libc_cv_broken_visibility_attribute=no - fi - fi - rm -f conftest.c conftest.s - ]) - if test $libc_cv_broken_visibility_attribute = yes; then - AC_MSG_ERROR(working compiler support for visibility attribute is required) - fi -fi - -AC_CACHE_CHECK(for broken __attribute__((alias())), - libc_cv_broken_alias_attribute, - [cat > conftest.c <&AS_MESSAGE_LOG_FD); then - if grep 'xyzzy' conftest.s >/dev/null && - grep 'abccb' conftest.s >/dev/null; then - libc_cv_broken_alias_attribute=no - fi - fi - rm -f conftest.c conftest.s - ]) -if test $libc_cv_broken_alias_attribute = yes; then - AC_MSG_ERROR(working alias attribute support required) -fi - -if test $libc_cv_visibility_attribute = yes; then - AC_CACHE_CHECK(whether to put _rtld_local into .sdata section, - libc_cv_have_sdata_section, - [echo "int i;" > conftest.c - libc_cv_have_sdata_section=no - if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ - | grep '\.sdata' >/dev/null; then - libc_cv_have_sdata_section=yes - fi - rm -f conftest.c conftest.so - ]) - if test $libc_cv_have_sdata_section = yes; then - AC_DEFINE(HAVE_SDATA_SECTION) - fi -fi - -AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, - libc_cv_initfini_array, [dnl -LIBC_TRY_LINK_STATIC([ -int foo (void) { return 1; } -int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; -], - [if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then - libc_cv_initfini_array=yes - else - libc_cv_initfini_array=no - fi], - [libc_cv_initfini_array=no]) -]) -if test $libc_cv_initfini_array != yes; then - AC_MSG_ERROR([Need linker with .init_array/.fini_array support.]) -fi - -AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer, - libc_cv_ctors_header, [dnl - libc_cv_ctors_header=yes - LIBC_TRY_LINK_STATIC([ -__attribute__ ((constructor)) void ctor (void) { asm (""); } -__attribute__ ((destructor)) void dtor (void) { asm (""); } -], - [dnl - AS_IF([$READELF -WS conftest$ac_exeext | $AWK ' - { gsub(/\@<:@ */, "@<:@") } - $2 == ".ctors" || $2 == ".dtors" { - size = strtonum("0x" $6) - align = strtonum("0x" $NF) - seen@<:@$2@:>@ = 1 - stub@<:@$2@:>@ = size == align * 2 - } - END { - ctors_ok = !seen@<:@".ctors"@:>@ || stub@<:@".ctors"@:>@ - dtors_ok = !seen@<:@".dtors"@:>@ || stub@<:@".dtors"@:>@ - exit ((ctors_ok && dtors_ok) ? 0 : 1) - } - '], [libc_cv_ctors_header=no]) - ], [dnl - AC_MSG_ERROR([missing __attribute__ ((constructor)) support??]) - ]) -]) -if test $libc_cv_ctors_header = no; then - AC_DEFINE(NO_CTORS_DTORS_SECTIONS) -fi - -AC_CACHE_CHECK(for libunwind-support in compiler, - libc_cv_cc_with_libunwind, [ - cat > conftest.c <&1 >/dev/null | grep ' -lunwind ' >/dev/null; then - libc_cv_cc_with_libunwind=yes - else - libc_cv_cc_with_libunwind=no - fi - rm -f conftest*]) -AC_SUBST(libc_cv_cc_with_libunwind) -if test $libc_cv_cc_with_libunwind = yes; then - AC_DEFINE(HAVE_CC_WITH_LIBUNWIND) -fi - -LIBC_LINKER_FEATURE([-z nodelete], [-Wl,--enable-new-dtags,-z,nodelete], - [libc_cv_z_nodelete=yes], - [AC_MSG_ERROR(linker with -z nodelete support required)]) - -LIBC_LINKER_FEATURE([-z nodlopen], [-Wl,--enable-new-dtags,-z,nodlopen], - [libc_cv_z_nodlopen=yes], - [AC_MSG_ERROR(linker with -z nodlopen support required)]) - -LIBC_LINKER_FEATURE([-z initfirst], [-Wl,--enable-new-dtags,-z,initfirst], - [libc_cv_z_initfirst=yes], - [AC_MSG_ERROR(linker with -z initfirst support required)]) - -# Add-on fragments can set these for other machines. -libc_commonpagesize=${libc_commonpagesize:-no} -libc_relro_required=${libc_relro_required:-no} -case "$base_machine" in - i[[34567]]86 | x86_64 | powerpc* | s390*) - libc_commonpagesize=0x1000 - libc_relro_required=yes - ;; - sparc*) - libc_commonpagesize=0x2000 - libc_relro_required=yes - ;; -esac - -if test $libc_commonpagesize != no; then - AC_CACHE_CHECK(for -z relro option, - libc_cv_z_relro, [dnl - libc_cv_z_relro=no - AC_LANG_CONFTEST([AC_LANG_SOURCE([[ -int _start (void) { return 42; } -extern void _exit (int); -/* Since these pointers are const, they should go in rodata. - Since they refer to functions that have to be resolved by - dynamic linking, they should instead go in RELRO data. */ -const void *const relro[] = { &_start, &_exit, 0 }; -/* GNU ld fails to produce RELRO data when it's very small and there is no - normal writable data following it, or if only uninitialized (.bss) data - follows it, or only very small writable data. */ -int data[0x10000] = { 1, }; -]])]) - cat > conftest.awk <<\EOF -BEGIN { - result = "no" - commonpagesize = strtonum(commonpagesize) -} -{ print "LINE:", $0 > "/dev/stderr" } -$1 == "GNU_RELRO" { - vaddr = strtonum($3) - memsz = strtonum($6) - end = vaddr + memsz - printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \ - vaddr, memsz, end, commonpagesize > "/dev/stderr" - result = (end % commonpagesize == 0) ? "yes" : "broken" -} -END { print result } -EOF - AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c - -nostartfiles -nostdlib - -Wl,-z,relro 1>&AS_MESSAGE_LOG_FD]) && - AC_TRY_COMMAND([$READELF -Wl conftest.so > conftest.ph]) && - AC_TRY_COMMAND([ - $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk - conftest.ph > conftest.cps - ]) && - libc_cv_z_relro=`cat conftest.cps 2>&AS_MESSAGE_LOG_FD` - rm -f conftest*]) - if { test "x$libc_relro_required" = xyes && - test "x$libc_cv_z_relro" != xyes - } - then - AC_MSG_ERROR(linker with -z relro support required) - fi -else - AC_MSG_WARN([missing architecture parameter to check for working -z relro]) -fi - -AC_CACHE_CHECK(for -Bgroup option, - libc_cv_Bgroup, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then - libc_cv_Bgroup=yes -else - libc_cv_Bgroup=no -fi -rm -f conftest*]) -AC_SUBST(libc_cv_Bgroup) - -ASFLAGS_config= -AC_CACHE_CHECK(whether --noexecstack is desirable for .S files, - libc_cv_as_noexecstack, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) \ - && grep .note.GNU-stack conftest.s >/dev/null \ - && AC_TRY_COMMAND([${CC-cc} $ASFLAGS -Wa,--noexecstack - -c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD]) -then - libc_cv_as_noexecstack=yes -else - libc_cv_as_noexecstack=no -fi -rm -f conftest*]) -if test $libc_cv_as_noexecstack = yes; then - ASFLAGS_config="$ASFLAGS_config -Wa,--noexecstack" -fi -AC_SUBST(ASFLAGS_config) - -AC_CACHE_CHECK(for -z combreloc, - libc_cv_z_combreloc, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then -dnl The following test is a bit weak. We must use a tool which can test -dnl cross-platform since the gcc used can be a cross compiler. Without -dnl introducing new options this is not easily doable. Instead use a tool -dnl which always is cross-platform: readelf. To detect whether -z combreloc -dnl look for a section named .rel.dyn. - if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no - fi -else - libc_cv_z_combreloc=no -fi -rm -f conftest*]) -if test "$libc_cv_z_combreloc" = yes; then - AC_DEFINE(HAVE_Z_COMBRELOC) -fi -AC_SUBST(libc_cv_z_combreloc) - -LIBC_LINKER_FEATURE([-z execstack], [-Wl,-z,execstack], - [libc_cv_z_execstack=yes], [libc_cv_z_execstack=no]) -AC_SUBST(libc_cv_z_execstack) - -AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl -LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no]) -]) - -AC_SUBST(libc_cv_fpie) - -AC_CACHE_CHECK(for --hash-style option, - libc_cv_hashstyle, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then - libc_cv_hashstyle=yes -else - libc_cv_hashstyle=no -fi -rm -f conftest*]) -AC_SUBST(libc_cv_hashstyle) - -# The linker's default -shared behavior is good enough if it -# does these things that our custom linker scripts ensure that -# all allocated NOTE sections come first. -if test "$use_default_link" = default; then - AC_CACHE_CHECK([for sufficient default -shared layout], - libc_cv_use_default_link, [dnl - libc_cv_use_default_link=no - cat > conftest.s <<\EOF - .section .note.a,"a",%note - .balign 4 - .long 4,4,9 - .string "GNU" - .string "foo" - .section .note.b,"a",%note - .balign 4 - .long 4,4,9 - .string "GNU" - .string "bar" -EOF - if AC_TRY_COMMAND([dnl - ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&AS_MESSAGE_LOG_FD]) && - ac_try=`$READELF -S conftest.so | sed -n \ - ['${x;p;} - s/^ *\[ *[1-9][0-9]*\] *\([^ ][^ ]*\) *\([^ ][^ ]*\) .*$/\2 \1/ - t a - b - : a - H']` - then - libc_seen_a=no libc_seen_b=no - set -- $ac_try - while test $# -ge 2 -a "$1" = NOTE; do - case "$2" in - .note.a) libc_seen_a=yes ;; - .note.b) libc_seen_b=yes ;; - esac - shift 2 - done - case "$libc_seen_a$libc_seen_b" in - yesyes) - libc_cv_use_default_link=yes - ;; - *) - echo >&AS_MESSAGE_LOG_FD "\ -$libc_seen_a$libc_seen_b from: -$ac_try" - ;; - esac - fi - rm -f conftest*]) - use_default_link=$libc_cv_use_default_link -fi - -AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl -if libc_cv_output_format=` -${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD` -then - : -else - libc_cv_output_format= -fi -test -n "$libc_cv_output_format" || libc_cv_output_format=unknown]) -AC_SUBST(libc_cv_output_format) - -AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then - libc_cv_fno_toplevel_reorder=yes -else - libc_cv_fno_toplevel_reorder=no -fi -rm -f conftest*]) -if test $libc_cv_fno_toplevel_reorder = yes; then - fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors" -else - fno_unit_at_a_time=-fno-unit-at-a-time -fi -AC_SUBST(fno_unit_at_a_time) - -AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl -LIBC_TRY_CC_OPTION([$CFLAGS $CPPFLAGS -Werror -fstack-protector], - [libc_cv_ssp=yes], - [libc_cv_ssp=no]) -]) -AC_SUBST(libc_cv_ssp) - -AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then - libc_cv_gnu89_inline=yes -else - libc_cv_gnu89_inline=no -fi -rm -f conftest*]) -if test $libc_cv_gnu89_inline = yes; then - gnu89_inline=-fgnu89-inline -else - gnu89_inline= -fi -AC_SUBST(gnu89_inline) - -AC_CACHE_CHECK(whether cc puts quotes around section names, - libc_cv_have_section_quotes, - [cat > conftest.c </dev/null; then - libc_cv_have_section_quotes=yes - else - libc_cv_have_section_quotes=no - fi - else - libc_cv_have_section_quotes=unknown - fi - rm -f conftest.{c,s} - ]) -if test $libc_cv_have_section_quotes = yes; then - AC_DEFINE(HAVE_SECTION_QUOTES) -fi - -AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive, - [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_weak_directive=yes -else - libc_cv_asm_weak_directive=no -fi -rm -f conftest*]) - -if test $libc_cv_asm_weak_directive = no; then - AC_CACHE_CHECK(for assembler .weakext directive, - libc_cv_asm_weakext_directive, - [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_weakext_directive=yes - else - libc_cv_asm_weakext_directive=no - fi - rm -f conftest*]) - -fi # no .weak - -if test $libc_cv_asm_weak_directive = yes; then - AC_DEFINE(HAVE_ASM_WEAK_DIRECTIVE) -elif test $libc_cv_asm_weakext_directive = yes; then - AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE) -fi - -AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl -case $machine in - sparc/sparc64*) cfi_offset=2047;; - *) cfi_offset=0;; -esac -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_cfi_directives=yes -else - libc_cv_asm_cfi_directives=no -fi -rm -f conftest*]) -if test $libc_cv_asm_cfi_directives = yes; then - AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES) -fi - -AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl -cat > conftest.c <<\EOF -_start () {} -int __eh_pc; -__throw () {} -EOF -dnl No \ in command here because it ends up inside ''. -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then - libc_cv_ld_no_whole_archive=yes -else - libc_cv_ld_no_whole_archive=no -fi -rm -f conftest*]) -if test $libc_cv_ld_no_whole_archive = no; then - AC_MSG_ERROR([support for --no-whole-archive is needed]) -fi - -AC_CACHE_CHECK(for gcc -fexceptions, libc_cv_gcc_exceptions, [dnl -cat > conftest.c <<\EOF -_start () {} -int __eh_pc; -__throw () {} -EOF -dnl No \ in command here because it ends up inside ''. -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -nostdlib -nostartfiles -fexceptions - -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD]); then - libc_cv_gcc_exceptions=yes -else - libc_cv_gcc_exceptions=no -fi -rm -f conftest*]) -if test $libc_cv_gcc_exceptions = yes; then - exceptions=-fexceptions -fi -AC_SUBST(exceptions)dnl - -if test "$host_cpu" = powerpc ; then -# Check for a bug present in at least versions 2.8.x of GCC -# and versions 1.0.x of EGCS. -AC_CACHE_CHECK(whether clobbering cr0 causes problems,libc_cv_c_asmcr0_bug,[dnl -AC_TRY_COMPILE([int tester(int x) { asm ("" : : : "cc"); return x & 123; }],, - libc_cv_c_asmcr0_bug='no', - libc_cv_c_asmcr0_bug='yes')]) -if test "$libc_cv_c_asmcr0_bug" != 'no'; then - AC_DEFINE(BROKEN_PPC_ASM_CR0) -fi -fi - -AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl -cat > conftest.c <<\EOF -void zero (void *x) -{ - __builtin_memset (x, 0, 1000); -} -EOF -dnl -if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null]); -then - libc_cv_gcc_builtin_memset=no -else - libc_cv_gcc_builtin_memset=yes -fi -rm -f conftest* ]) -if test "$libc_cv_gcc_builtin_memset" = yes ; then - AC_DEFINE(HAVE_BUILTIN_MEMSET) -fi - -AC_CACHE_CHECK(for redirection of built-in functions, libc_cv_gcc_builtin_redirection, [dnl -cat > conftest.c <<\EOF -extern char *strstr (const char *, const char *) __asm ("my_strstr"); -char *foo (const char *a, const char *b) -{ - return __builtin_strstr (a, b); -} -EOF -dnl -if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null]); -then - libc_cv_gcc_builtin_redirection=yes -else - libc_cv_gcc_builtin_redirection=no -fi -rm -f conftest* ]) -if test "$libc_cv_gcc_builtin_redirection" = no; then - AC_MSG_ERROR([support for the symbol redirection needed]) -fi - -dnl Check whether the compiler supports the __thread keyword. -AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread, -[cat > conftest.c <<\EOF -__thread int a = 42; -EOF -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then - libc_cv_gcc___thread=yes -else - libc_cv_gcc___thread=no -fi -rm -f conftest*]) -if test "$libc_cv_gcc___thread" = no; then - AC_MSG_ERROR([support for the __thread keyword is required]) -fi - -dnl Check whether the compiler supports the tls_model attribute. -AC_CACHE_CHECK([for tls_model attribute], libc_cv_gcc_tls_model_attr, [dnl -cat > conftest.c <<\EOF -extern __thread int a __attribute__((tls_model ("initial-exec"))); -EOF -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then - libc_cv_gcc_tls_model_attr=yes -else - libc_cv_gcc_tls_model_attr=no -fi -rm -f conftest*]) -if test "$libc_cv_gcc_tls_model_attr" = no; then - AC_MSG_ERROR([support for the tls_model attribute is required]) -fi - -dnl Determine how to disable generation of FMA instructions. -AC_CACHE_CHECK([for compiler option to disable generation of FMA instructions], - libc_cv_cc_nofma, [dnl -libc_cv_cc_nofma= -for opt in -ffp-contract=off -mno-fused-madd; do - LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break]) -done]) -AC_SUBST(libc_cv_cc_nofma) - -if test -n "$submachine"; then - AC_CACHE_CHECK([for compiler option for CPU variant], - libc_cv_cc_submachine, [dnl - libc_cv_cc_submachine=no - for opt in "-march=$submachine" "-mcpu=$submachine"; do - LIBC_TRY_CC_OPTION([$opt], [ - libc_cv_cc_submachine="$opt" - break], []) - done]) - if test "x$libc_cv_cc_submachine" = xno; then - AC_MSG_ERROR([${CC-cc} does not support $submachine]) - fi -fi -AC_SUBST(libc_cv_cc_submachine) - -AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \ -__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl -cat > conftest.c <], [gdImagePng (0, 0)], LIBGD=yes, LIBGD=no) - CFLAGS="$old_CFLAGS" - LDFLAGS="$old_LDFLAGS" - LIBS="$old_LIBS" -else - LIBGD=no -fi -AC_MSG_RESULT($LIBGD) -AC_SUBST(LIBGD) - -# SELinux detection -if test x$with_selinux = xno ; then - have_selinux=no; -else - # See if we have the SELinux library - AC_CHECK_LIB(selinux, is_selinux_enabled, - have_selinux=yes, have_selinux=no) - # See if we have the SELinux header with the NSCD permissions in it. - if test x$have_selinux = xyes ; then - AC_MSG_CHECKING([for NSCD Flask permissions in selinux/av_permissions.h]) - AC_TRY_COMPILE([#include ], - [#ifdef NSCD__SHMEMHOST - return 0; - #else - #error NSCD__SHMEMHOST not defined - #endif], - have_selinux=yes, have_selinux=no) - AC_MSG_RESULT($have_selinux) - fi - - if test x$with_selinux = xyes ; then - if test x$have_selinux = xno ; then - AC_MSG_ERROR([SELinux explicitly required, but sufficiently recent SELinux library not found]) - fi - fi -fi -# Check if we're building with SELinux support. -if test "x$have_selinux" = xyes; then - AC_DEFINE(HAVE_SELINUX, 1, [SELinux support]) - - # See if we have the libaudit library - AC_CHECK_LIB(audit, audit_log_user_avc_message, - have_libaudit=yes, have_libaudit=no) - if test "x$have_libaudit" = xyes; then - AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support]) - fi - AC_SUBST(have_libaudit) - - # See if we have the libcap library - AC_CHECK_LIB(cap, cap_init, have_libcap=yes, have_libcap=no) - if test "x$have_libcap" = xyes; then - AC_DEFINE(HAVE_LIBCAP, 1, [SELinux libcap support]) - fi - AC_SUBST(have_libcap) -fi -AC_SUBST(have_selinux) - -dnl check for the size of 'long double'. -AC_CHECK_SIZEOF(long double, 0) -sizeof_long_double=$ac_cv_sizeof_long_double -AC_SUBST(sizeof_long_double) - -CPPUNDEFS= -dnl Check for silly hacked compilers predefining _FORTIFY_SOURCE. -dnl Since we are building the implementations of the fortified functions here, -dnl having the macro defined interacts very badly. -AC_CACHE_CHECK([for _FORTIFY_SOURCE predefine], libc_cv_predef_fortify_source, -[AC_TRY_COMPILE([], [ -#ifdef _FORTIFY_SOURCE -# error bogon -#endif], - [libc_cv_predef_fortify_source=no], - [libc_cv_predef_fortify_source=yes])]) -if test $libc_cv_predef_fortify_source = yes; then - CPPUNDEFS="${CPPUNDEFS:+$CPPUNDEFS }-U_FORTIFY_SOURCE" -fi -AC_SUBST(CPPUNDEFS) - -dnl Check for silly hacked compilers inserting -fstack-protector. -dnl This breaks badly for the early startup code we compile, since -dnl the compiled code can refer to a magic machine-dependent location -dnl for the canary value before we have sufficient setup for that to -dnl work. It's also questionable to build all of libc with this flag -dnl even when you're doing that for most applications you build, since -dnl libc's code is so heavily-used and performance-sensitive. If we -dnl ever really want to make that work, it should be enabled explicitly -dnl in the libc build, not inherited from implicit compiler settings. -AC_CACHE_CHECK([whether $CC implicitly enables -fstack-protector], - libc_cv_predef_stack_protector, [ -AC_TRY_COMPILE([extern void foobar (char *);], - [char large_array[2048]; foobar (large_array);], [ -libc_undefs=`$NM -u conftest.o | - LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \ - 2>&AS_MESSAGE_LOG_FD` || { - AC_MSG_ERROR([confusing output from $NM -u]) -} -echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'" -# On some architectures, there are architecture-specific undefined -# symbols (resolved by the linker), so filter out unknown symbols. -# This will fail to produce the correct result if the compiler -# defaults to -fstack-protector but this produces an undefined symbol -# other than __stack_chk_fail. However, compilers like that have not -# been encountered in practice. -libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'` -case "$libc_undefs" in -foobar) libc_cv_predef_stack_protector=no ;; -'__stack_chk_fail -foobar') libc_cv_predef_stack_protector=yes ;; -*) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;; -esac], - [AC_MSG_ERROR([test compilation failed])]) -]) -libc_extra_cflags= -if test $libc_cv_predef_stack_protector = yes; then - libc_extra_cflags=-fno-stack-protector -fi -AC_SUBST(libc_extra_cflags) - -### End of automated tests. -### Now run sysdeps configure fragments. - -# They also can set these variables. -use_ldconfig=no -ldd_rewrite_script=no -libc_cv_sysconfdir=$sysconfdir -libc_cv_localstatedir=$localstatedir -libc_cv_gcc_unwind_find_fde=no -libc_cv_idn=no - -# Iterate over all the sysdep directories we will use, running their -# configure fragments. -for dir in $sysnames; do - case $dir in - /*) dest=$dir ;; - *) dest=$srcdir/$dir ;; - esac - if test -r $dest/configure; then - AC_MSG_RESULT(running configure fragment for $dir) - . $dest/configure - fi -done - -if test x$libc_cv_gcc_unwind_find_fde = xyes; then - AC_DEFINE(EXPORT_UNWIND_FIND_FDE) -fi -AC_SUBST(libc_cv_gcc_unwind_find_fde) - -# A sysdeps configure fragment can reset this if IFUNC is not actually -# usable even though the assembler knows how to generate the symbol type. -if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then - AC_DEFINE(HAVE_IFUNC) -fi - -# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps -# configure fragment can override the value to prevent this AC_DEFINE. -AC_SUBST(use_nscd) -if test "x$use_nscd" != xno; then - AC_DEFINE([USE_NSCD]) -fi -if test "x$build_nscd" = xdefault; then - build_nscd=$use_nscd -fi - -# Test for old glibc 2.0.x headers so that they can be removed properly -# Search only in includedir. -AC_MSG_CHECKING(for old glibc 2.0.x headers) -if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" -then - old_glibc_headers=yes -else - old_glibc_headers=no -fi -AC_MSG_RESULT($old_glibc_headers) -if test ${old_glibc_headers} = yes; then - AC_MSG_WARN(*** During \"make install\" old headers from glibc 2.0.x will) - AC_MSG_WARN(*** be removed.) -fi -AC_SUBST(old_glibc_headers) - -AC_SUBST(libc_cv_slibdir) -AC_SUBST(libc_cv_rtlddir) -AC_SUBST(libc_cv_localedir) -AC_SUBST(libc_cv_sysconfdir) -AC_SUBST(libc_cv_localstatedir) -AC_SUBST(libc_cv_rootsbindir) -AC_SUBST(libc_cv_forced_unwind) - -if test x$use_ldconfig = xyes; then - AC_DEFINE(USE_LDCONFIG) -fi -AC_SUBST(use_ldconfig) -AC_SUBST(ldd_rewrite_script) - -AC_SUBST(static) -AC_SUBST(shared) - -AC_CACHE_CHECK([whether -fPIC is default], libc_cv_pic_default, -[libc_cv_pic_default=yes -cat > conftest.c <&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then - libc_cv_pic_default=no -fi -rm -f conftest.*]) -AC_SUBST(libc_cv_pic_default) - -AC_SUBST(profile) -AC_SUBST(static_nss) - -AC_SUBST(DEFINES) - -dnl See sysdeps/mach/configure.in for this variable. -AC_SUBST(mach_interface_list) - -VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h` -RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h` -AC_SUBST(VERSION) -AC_SUBST(RELEASE) - -AC_CONFIG_FILES([config.make Makefile]) -AC_CONFIG_COMMANDS([default],[[ -case $CONFIG_FILES in *config.make*) -echo "$config_vars" >> config.make;; -esac -test -d bits || mkdir bits]],[[config_vars='$config_vars']]) -AC_OUTPUT diff --git a/libc/elf/rtld.c b/libc/elf/rtld.c index 8e8eafa94..da92966d5 100644 --- a/libc/elf/rtld.c +++ b/libc/elf/rtld.c @@ -817,8 +817,8 @@ do_preload (char *fname, struct link_map *main_map, const char *where) if (__builtin_expect (err_str != NULL, 0)) { _dl_error_printf ("\ -ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n", - fname, where); +ERROR: ld.so: object '%s' from %s cannot be preloaded (%s): ignored.\n", + fname, where, err_str); /* No need to call free, this is still before the libc's malloc is used. */ } @@ -2218,10 +2218,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", _dl_start_profile (); } -#ifndef NONTLS_INIT_TP -# define NONTLS_INIT_TP do { } while (0) -#endif - if (!was_tls_init_tp_called && GL(dl_tls_max_dtv_idx) > 0) ++GL(dl_tls_generation); diff --git a/libc/include/stdc-predef.h b/libc/include/stdc-predef.h index 4de839d70..f8cb2cb97 100644 --- a/libc/include/stdc-predef.h +++ b/libc/include/stdc-predef.h @@ -26,8 +26,28 @@ explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ -/* Define __STDC_IEC_559__ and other similar macros. */ -#include +/* glibc's intent is to support the IEC 559 math functionality, real + and complex. If the GCC (4.9 and later) predefined macros + specifying compiler intent are available, use them to determine + whether the overall intent is to support these features; otherwise, + presume an older compiler has intent to support these features and + define these macros by default. */ + +#ifdef __GCC_IEC_559 +# if __GCC_IEC_559 > 0 +# define __STDC_IEC_559__ 1 +# endif +#else +# define __STDC_IEC_559__ 1 +#endif + +#ifdef __GCC_IEC_559_COMPLEX +# if __GCC_IEC_559_COMPLEX > 0 +# define __STDC_IEC_559_COMPLEX__ 1 +# endif +#else +# define __STDC_IEC_559_COMPLEX__ 1 +#endif /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) / Unicode 6.0. */ diff --git a/libc/libidn/ChangeLog b/libc/libidn/ChangeLog index 46ebd1fa9..e8130bb5b 100644 --- a/libc/libidn/ChangeLog +++ b/libc/libidn/ChangeLog @@ -1,3 +1,9 @@ +2013-10-30 Mike Frysinger + + * configure.in: Moved to ... + * configure.ac: ... here. + * configure: Regenerated. + 2013-08-29 Ondřej Bílka * stringprep.c: Fix typos. diff --git a/libc/libidn/configure b/libc/libidn/configure index 39ed16352..8195663d9 100644 --- a/libc/libidn/configure +++ b/libc/libidn/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! libc_add_on_canonical= diff --git a/libc/libidn/configure.ac b/libc/libidn/configure.ac new file mode 100644 index 000000000..16740ffb9 --- /dev/null +++ b/libc/libidn/configure.ac @@ -0,0 +1,11 @@ +dnl glibc configure fragment for libidn add-on +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +libc_add_on_canonical= + +AS_IF([test "$shared" = yes], [ + libc_add_on_subdirs=. + + # Get this defined in config.h for main source code to test. + AC_DEFINE([HAVE_LIBIDN]) +], [AC_MSG_WARN([libidn add-on ignored with --disable-shared])]) diff --git a/libc/libidn/configure.in b/libc/libidn/configure.in deleted file mode 100644 index 16740ffb9..000000000 --- a/libc/libidn/configure.in +++ /dev/null @@ -1,11 +0,0 @@ -dnl glibc configure fragment for libidn add-on -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -libc_add_on_canonical= - -AS_IF([test "$shared" = yes], [ - libc_add_on_subdirs=. - - # Get this defined in config.h for main source code to test. - AC_DEFINE([HAVE_LIBIDN]) -], [AC_MSG_WARN([libidn add-on ignored with --disable-shared])]) diff --git a/libc/locale/iso-639.def b/libc/locale/iso-639.def index 83cd7643a..249b6e2d1 100644 --- a/libc/locale/iso-639.def +++ b/libc/locale/iso-639.def @@ -86,6 +86,7 @@ DEFINE_LANGUAGE_CODE3 ("Caucasian (Other)", cau, cau) DEFINE_LANGUAGE_CODE3 ("Cebuano", ceb, ceb) DEFINE_LANGUAGE_CODE3 ("Celtic (Other)", cel, cel) DEFINE_LANGUAGE_CODE3 ("Central American Indian (Other)", cai, cai) +DEFINE_LANGUAGE_CODE3 ("Central Nahuatl", nhn, nhn) DEFINE_LANGUAGE_CODE3 ("Central Sama", sml, sml) DEFINE_LANGUAGE_CODE3 ("Chagatai", chg, chg) DEFINE_LANGUAGE_CODE3 ("Chamic languages", cmc, cmc) @@ -271,6 +272,7 @@ DEFINE_LANGUAGE_CODE ("Lao", lo, lao, lao) DEFINE_LANGUAGE_CODE ("Latin", la, lat, lat) DEFINE_LANGUAGE_CODE ("Latvian", lv, lav, lav) DEFINE_LANGUAGE_CODE3 ("Lezghian", lez, lez) +DEFINE_LANGUAGE_CODE3 ("Ligurian", lij, lij) DEFINE_LANGUAGE_CODE ("Limburgan; Limburger; Limburgish", li, lim, lim) DEFINE_LANGUAGE_CODE ("Lingala", ln, lin, lin) DEFINE_LANGUAGE_CODE3 ("Literary Chinese", lzh, lzh) @@ -310,6 +312,7 @@ DEFINE_LANGUAGE_CODE ("Marshallese", mh, mah, mah) DEFINE_LANGUAGE_CODE3 ("Marwari", mwr, mwr) DEFINE_LANGUAGE_CODE3 ("Masai", mas, mas) DEFINE_LANGUAGE_CODE3 ("Mayan languages", myn, myn) +DEFINE_LANGUAGE_CODE3 ("Meadow Mari", mhr, mhr) DEFINE_LANGUAGE_CODE3 ("Mende", men, men) DEFINE_LANGUAGE_CODE3 ("Mi'kmaq; Micmac", mic, mic) DEFINE_LANGUAGE_CODE3 ("Minangkabau", min, min) @@ -383,6 +386,7 @@ DEFINE_LANGUAGE_CODE3 ("Provençal, Old (to 1500)", pro, pro) DEFINE_LANGUAGE_CODE3 ("Pu-Xian Chinese", cpx, cpx) DEFINE_LANGUAGE_CODE ("Pushto", ps, pus, pus) DEFINE_LANGUAGE_CODE ("Quechua", qu, que, que) +DEFINE_LANGUAGE_CODE3 ("Quechua, Southern", quz, quz) DEFINE_LANGUAGE_CODE ("Raeto-Romance", rm, roh, roh) DEFINE_LANGUAGE_CODE3 ("Rajasthani", raj, raj) DEFINE_LANGUAGE_CODE3 ("Rapanui", rap, rap) @@ -415,6 +419,7 @@ DEFINE_LANGUAGE_CODE3 ("Sicilian", scn, scn) DEFINE_LANGUAGE_CODE3 ("Sidamo", sid, sid) DEFINE_LANGUAGE_CODE3 ("Sign Languages", sgn, sgn) DEFINE_LANGUAGE_CODE3 ("Siksika", bla, bla) +DEFINE_LANGUAGE_CODE3 ("Silesian", szl, szl) DEFINE_LANGUAGE_CODE ("Sindhi", sd, snd, snd) DEFINE_LANGUAGE_CODE ("Sinhala; Sinhalese", si, sin, sin) DEFINE_LANGUAGE_CODE3 ("Sino-Tibetan (Other)", sit, sit) @@ -481,6 +486,7 @@ DEFINE_LANGUAGE_CODE3 ("Ugaritic", uga, uga) DEFINE_LANGUAGE_CODE ("Uighur; Uyghur", ug, uig, uig) DEFINE_LANGUAGE_CODE ("Ukrainian", uk, ukr, ukr) DEFINE_LANGUAGE_CODE3 ("Umbundu", umb, umb) +DEFINE_LANGUAGE_CODE3 ("Unami Delaware", unm, unm) DEFINE_LANGUAGE_CODE3 ("Undetermined", und, und) DEFINE_LANGUAGE_CODE3 ("Upper Sorbian", hsb, hsb) DEFINE_LANGUAGE_CODE ("Urdu", ur, urd, urd) @@ -492,7 +498,7 @@ DEFINE_LANGUAGE_CODE ("Volapük", vo, vol, vol) DEFINE_LANGUAGE_CODE3 ("Votic", vot, vot) DEFINE_LANGUAGE_CODE3 ("Wakashan languages", wak, wak) DEFINE_LANGUAGE_CODE3 ("Walser", wae, wae) -DEFINE_LANGUAGE_CODE3 ("Walamo", wal, wal) +DEFINE_LANGUAGE_CODE3 ("Walaita", wal, wal) DEFINE_LANGUAGE_CODE ("Walloon", wa, wln, wln) DEFINE_LANGUAGE_CODE3 ("Waray", war, war) DEFINE_LANGUAGE_CODE3 ("Washo", was, was) diff --git a/libc/locale/locarchive.h b/libc/locale/locarchive.h index f2d84771a..fec3b1a4f 100644 --- a/libc/locale/locarchive.h +++ b/libc/locale/locarchive.h @@ -80,6 +80,8 @@ struct locrecent struct locarhandle { + /* Full path to the locale archive file. */ + const char *fname; int fd; void *addr; size_t mmaped; diff --git a/libc/locale/programs/localedef.c b/libc/locale/programs/localedef.c index 51927173a..8b94ba066 100644 --- a/libc/locale/programs/localedef.c +++ b/libc/locale/programs/localedef.c @@ -212,7 +212,7 @@ main (int argc, char *argv[]) /* Handle a few special cases. */ if (list_archive) - show_archive_content (verbose); + show_archive_content (remaining > 1 ? argv[remaining] : NULL, verbose); if (add_to_archive) return add_locales_to_archive (argc - remaining, &argv[remaining], replace_archive); diff --git a/libc/locale/programs/localedef.h b/libc/locale/programs/localedef.h index e010c7298..5a05a2e38 100644 --- a/libc/locale/programs/localedef.h +++ b/libc/locale/programs/localedef.h @@ -170,7 +170,9 @@ extern int add_locales_to_archive (size_t nlist, char *list[], bool replace); /* Removed named locales from archive. */ extern int delete_locales_from_archive (size_t nlist, char *list[]); -/* List content of locale archive. */ -extern void show_archive_content (int verbose) __attribute__ ((noreturn)); +/* List content of locale archive. If FNAME is non-null use that as + the locale archive to list, otherwise the default. */ +extern void show_archive_content (const char *fname, + int verbose) __attribute__ ((noreturn)); #endif /* localedef.h */ diff --git a/libc/locale/programs/locarchive.c b/libc/locale/programs/locarchive.c index e2a30b568..e796865a7 100644 --- a/libc/locale/programs/locarchive.c +++ b/libc/locale/programs/locarchive.c @@ -223,6 +223,7 @@ create_archive (const char *archivefname, struct locarhandle *ah) _("cannot change mode of new locale archive")); } + ah->fname = NULL; ah->fd = fd; ah->mmap_base = mmap_base; ah->mmap_len = mmap_len; @@ -562,11 +563,17 @@ open_archive (struct locarhandle *ah, bool readonly) struct locarhead head; int retry = 0; size_t prefix_len = output_prefix ? strlen (output_prefix) : 0; - char archivefname[prefix_len + sizeof (ARCHIVE_NAME)]; + char default_fname[prefix_len + sizeof (ARCHIVE_NAME)]; + char *archivefname = ah->fname; - if (output_prefix) - memcpy (archivefname, output_prefix, prefix_len); - strcpy (archivefname + prefix_len, ARCHIVE_NAME); + /* If ah has a non-NULL fname open that otherwise open the default. */ + if (archivefname == NULL) + { + archivefname = default_fname; + if (output_prefix) + memcpy (archivefname, output_prefix, prefix_len); + strcpy (archivefname + prefix_len, ARCHIVE_NAME); + } while (1) { @@ -574,8 +581,11 @@ open_archive (struct locarhandle *ah, bool readonly) fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR); if (fd == -1) { - /* Maybe the file does not yet exist. */ - if (errno == ENOENT) + /* Maybe the file does not yet exist? If we are opening + the default locale archive we ignore the failure and + list an empty archive, otherwise we print an error + and exit. */ + if (errno == ENOENT && archivefname == default_fname) { if (readonly) { @@ -1329,6 +1339,7 @@ add_locales_to_archive (nlist, list, replace) /* Open the archive. This call never returns if we cannot successfully open the archive. */ + ah.fname = NULL; open_archive (&ah, false); while (nlist-- > 0) @@ -1528,6 +1539,7 @@ delete_locales_from_archive (nlist, list) /* Open the archive. This call never returns if we cannot successfully open the archive. */ + ah.fname = NULL; open_archive (&ah, false); head = ah.addr; @@ -1617,7 +1629,7 @@ dataentcmp (const void *a, const void *b) void -show_archive_content (int verbose) +show_archive_content (const char *fname, int verbose) { struct locarhandle ah; struct locarhead *head; @@ -1627,6 +1639,7 @@ show_archive_content (int verbose) /* Open the archive. This call never returns if we cannot successfully open the archive. */ + ah.fname = fname; open_archive (&ah, true); head = ah.addr; diff --git a/libc/locale/programs/locfile.c b/libc/locale/programs/locfile.c index f12ca0725..73bbe11c3 100644 --- a/libc/locale/programs/locfile.c +++ b/libc/locale/programs/locfile.c @@ -343,6 +343,7 @@ write_all_categories (struct localedef_t *definitions, /* Open the archive. This call never returns if we cannot successfully open the archive. */ + ah.fname = NULL; open_archive (&ah, false); if (add_locale_to_archive (&ah, locname, to_archive, true) != 0) diff --git a/libc/localedata/ChangeLog b/libc/localedata/ChangeLog index b87cc98f4..e493d9d3e 100644 --- a/libc/localedata/ChangeLog +++ b/libc/localedata/ChangeLog @@ -1,3 +1,118 @@ +2013-11-04 Chris Leonard + + * locales/unm_US: Adjust language-code fields of LC_ADDRESS. + * locales/wal_ET: Likewise. + +2013-11-03 Chris Leonard + + * locales/quz_PE: Adjust language-code fields of LC_ADDRESS. + * locales/szl_PL: Likewise. + * locales/ta_IN: Likewise. + * locales/ta_LK: Likewise. + * locales/te_IN: Likewise. + * locales/tg_TJ: Likewise. + * locales/tl_PH: Likewise. + * locales/tn_ZA: Likewise. + * locales/tr_CY: Likewise. + * locales/tr_TR: Likewise. + * locales/ts_ZA: Likewise. + * locales/tt_RU: Likewise. + * locales/tt_RU@iqtelif: Likewise. + * locales/ug_CN: Likewise. + * locales/ur_IN: Likewise. + * locales/ur_PK: Likewise. + * locales/uz_UZ: Likewise. + * locales/uz_UZ@cyrillic: Likewise. + * locales/ve_ZA: Likewise. + * locales/vi_VN: Likewise. + * locales/wa_BE: Likewise. + * locales/wal_ET: Likewise. + * locales/wo_SN: Likewise. + * locales/xh_ZA: Likewise. + * locales/yi_US: Likewise. + * locales/yue_HK: Likewise. + * locales/zh_HK: Likewise. + * locales/zh_SG: Likewise. + +2013-11-03 Chris Leonard + + * locales/pa_IN: Adjust language-code fields of LC_ADDRESS. + * locales/pa_PK: Likewise. + * locales/pl_PL: Likewise. + * locales/ps_AF: Likewise. + * locales/pt_BR: Likewise. + * locales/pt_PT: Likewise. + * locales/ru_RU: Likewise. + * locales/ru_UA: Likewise. + * locales/sa_IN: Likewise. + * locales/sat_IN: Likewise. + * locales/sc_IT: Likewise. + * locales/sd_IN: Likewise. + * locales/sd_IN@devanagari: Likewise. + * locales/se_NO: Likewise. + * locales/si_LK: Likewise. + * locales/sk_SK: Likewise. + * locales/sl_SI: Likewise. + * locales/sq_AL: Likewise. + * locales/sq_MK: Likewise. + * locales/ss_ZA: Likewise. + * locales/st_ZA: Likewise. + * locales/sv_SE: Likewise. + * locales/sw_KE: Likewise. + * locales/sw_TZ: Likewise. + +2013-11-01 Chris Leonard + + * locales/nb_NO: Adjust language-code fields of LC_ADDRESS. + * locales/ne_NP: Likewise. + * locales/nhn_MX: Likewise. + * locales/niu_NU: Likewise. + * locales/niu_NZ: Likewise. + * locales/nl_AW: Likewise. + * locales/nl_BE: Likewise. + * locales/nn_NO: Likewise. + * locales/nr_ZA: Likewise. + * locales/oc_FR: Likewise. + * locales/or_IN: Likewise. + * locales/os_RU: Likewise. + +2013-10-31 Chris Leonard + + * locales/mag_IN: Adjust language-code fields of LC_ADDRESS. + * locales/mai_IN: Likewise. + * locales/mg_MG: Likewise. + * locales/mhr_RU: Likewise. + * locales/mi_NZ: Likewise. + * locales/ml_IN: Likewise. + * locales/mni_IN: Likewise. + * locales/mr_IN: Likewise. + * locales/ms_MY: Likewise. + * locales/mt_MT: Likewise. + +2013-10-29 Chris Leonard + + [BZ #16078] + * locales/anp_IN: New locale for anp_IN. + * SUPPORTED: Add anp_IN. + +2013-10-24 Chris Leonard + + * locales/ja_JP: Adjust language-code fields of LC_ADDRESS. + * locales/ka_GE: Likewise. + * locales/kk_KZ: Likewise. + * locales/kl_GL: Likewise. + * locales/kn_IN: Likewise. + * locales/ko_KR: Likewise. + * locales/kok_IN: Likewise. + * locales/ks_IN: Likewise. + * locales/ku_TR: Likewise. + * locales/kw_GB: Likewise. + * locales/ky_KG: Likewise. + * locales/lg_UG: Likewise. + * locales/lij_IT: Likewise. + * locales/lt_LT: Likewise. + * locales/lv_LV: Likewise. + 2013-10-13 Chris Leonard * locales/he_IL: Adjust language-code fields of LC_ADDRESS. diff --git a/libc/localedata/SUPPORTED b/libc/localedata/SUPPORTED index 9fde294a8..25dfca306 100644 --- a/libc/localedata/SUPPORTED +++ b/libc/localedata/SUPPORTED @@ -12,6 +12,7 @@ ak_GH/UTF-8 \ am_ET/UTF-8 \ an_ES.UTF-8/UTF-8 \ an_ES/ISO-8859-15 \ +anp_IN/UTF-8 \ ar_AE.UTF-8/UTF-8 \ ar_AE/ISO-8859-6 \ ar_BH.UTF-8/UTF-8 \ diff --git a/libc/localedata/locales/anp_IN b/libc/localedata/locales/anp_IN new file mode 100644 index 000000000..c2400643c --- /dev/null +++ b/libc/localedata/locales/anp_IN @@ -0,0 +1,205 @@ +comment_char % +escape_char / + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Angika language locale for India. +% +% Contributed by Dr Amrendra, Sangeeta Kumari , +% Rajesh Ranjan , Pravin Satpute +% and Chris Leonard +% +% This file is a part of GNU C Library (glibc) and contains locale data. The +% Free Software Foundation does not claim any copyright interest in the +% locale data contained in this file. The foregoing does not affect the +% license of GNU C Library (glibc) as a whole. It does not exempt you from the +% conditions of the license if your use would otherwise be governed by +% that license. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +LC_IDENTIFICATION +title "Angika language locale for India" +source "" +address "" +contact "" +email "bhashaghar@googlegroups.com" +tel "" +fax "" +language "Angika" +territory "India" +revision "1.0" +date "2013-10-24" +% +category "anp_IN:2013";LC_IDENTIFICATION +category "anp_IN:2013";LC_CTYPE +category "anp_IN:2013";LC_COLLATE +category "anp_IN:2013";LC_TIME +category "anp_IN:2013";LC_NUMERIC +category "anp_IN:2013";LC_MONETARY +category "anp_IN:2013";LC_MESSAGES +category "anp_IN:2013";LC_PAPER +category "anp_IN:2013";LC_NAME +category "anp_IN:2013";LC_ADDRESS +category "anp_IN:2013";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "hi_IN" +END LC_CTYPE + +LC_COLLATE +copy "hi_IN" +END LC_COLLATE + +LC_MONETARY +copy "hi_IN" +END LC_MONETARY + + +LC_NUMERIC +copy "hi_IN" +END LC_NUMERIC + + +LC_TIME +% This is the POSIX Locale definition for the LC_TIME category. +% These are generated based on XML base Locale definition file +% for IBM Class for Unicode/Java +% +% Abbreviated weekday names (%a) +% रवि; सोम; मंगल; बुध; बृहस्पति; शुक्र; शनि +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Full weekday names (%A) +% रविवार; सोमवार; मंगलवार; बुधवार; बृहस्पतिवार; शुक्रवार; शनिवार +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Abbreviated month names (%b) +% जन; फर; मार्च; अप्रै; मई; जून; जुल; अग; सित; अक्टू; नव; दिस +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Full month names (%B) +% जनवरी; फरवरी; मार्च; अप्रैल; मई; जून; जुलाई; अगस्त; सितंबर; अक्टूबर; नवंबर; दिसंबर +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + ""% +% +% Equivalent of AM PM +% पूर्वाह्न; अपराह्न +am_pm "";/ + "" +% +% Appropriate date and time representation +% %A %d %b %Y%I:%M:%S %Z +d_t_fmt "/ +/ +" +% +% Appropriate date representation +% %A %d %b %Y +d_fmt "/ +" +% +% Appropriate time representation +% %I:%M:%S %Z +t_fmt "/ +" +% +% Appropriate 12 h time representation (%r) +t_fmt_ampm "/ +" +% +date_fmt "/ +/ +" +END LC_TIME + + +LC_MESSAGES +% ^[yY].* +yesexpr "" +% ^[nN].* +noexpr "" +END LC_MESSAGES + + +LC_PAPER +copy "hi_IN" +END LC_PAPER + + +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the +% LC_NAME category. +% +name_fmt "/ +" +name_gen "" +% श्री +name_mr "" +% श्रीमती +name_mrs "" +% कुमारी +name_miss "" +% कुमार +name_ms "" +END LC_NAME + + +LC_ADDRESS +postal_fmt "/ +" +country_ab2 "" +country_ab3 "" +country_num 356 +% IND +country_car "" +% anp +lang_term "" +% anp +lang_lib "" +END LC_ADDRESS + + +LC_TELEPHONE +copy "hi_IN" +END LC_TELEPHONE + + +LC_MEASUREMENT +measurement 1 +END LC_MEASUREMENT diff --git a/libc/localedata/locales/ja_JP b/libc/localedata/locales/ja_JP index ee2e7f3be..53b11e997 100644 --- a/libc/localedata/locales/ja_JP +++ b/libc/localedata/locales/ja_JP @@ -15044,7 +15044,12 @@ country_ab3 "" country_num 392 % J country_car "" - +% ja +lang_ab "" +% jpn +lang_term "" +% jpn +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ka_GE b/libc/localedata/locales/ka_GE index 5577c5453..0b7114260 100644 --- a/libc/localedata/locales/ka_GE +++ b/libc/localedata/locales/ka_GE @@ -48,9 +48,12 @@ country_num 268 country_car "" country_isbn "99928" % lang_name FIXME Georgian in Georgian -lang_ab "ka" -lang_term "kat" -lang_lib "geo" +% ka +lang_ab "" +% kat +lang_term "" +% geo +lang_lib "" END LC_ADDRESS LC_COLLATE diff --git a/libc/localedata/locales/kk_KZ b/libc/localedata/locales/kk_KZ index 2f4994da6..9fe04881a 100644 --- a/libc/localedata/locales/kk_KZ +++ b/libc/localedata/locales/kk_KZ @@ -263,5 +263,10 @@ postal_fmt "/ " % KZ country_car "" - +% kk +lang_ab "" +% kaz +lang_term "" +% kaz +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/kl_GL b/libc/localedata/locales/kl_GL index 5bd305d94..217ba6bf9 100644 --- a/libc/localedata/locales/kl_GL +++ b/libc/localedata/locales/kl_GL @@ -145,4 +145,10 @@ country_ab3 "" country_num 304 % GRO country_car "" +% kl +lang_ab "" +% kal +lang_term "" +% kal +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/kn_IN b/libc/localedata/locales/kn_IN index ce0a1ade6..aa6ea38b2 100644 --- a/libc/localedata/locales/kn_IN +++ b/libc/localedata/locales/kn_IN @@ -221,7 +221,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% kn +lang_ab "" +% kan +lang_term "" +% kan +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ko_KR b/libc/localedata/locales/ko_KR index 97d9b1656..fea519eb9 100644 --- a/libc/localedata/locales/ko_KR +++ b/libc/localedata/locales/ko_KR @@ -6249,5 +6249,10 @@ country_ab3 "" country_num 410 % ROK country_car "" - +% ko +lang_ab "" +% kor +lang_term "" +% kor +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/kok_IN b/libc/localedata/locales/kok_IN index c17887c2b..fb7aa9e6e 100644 --- a/libc/localedata/locales/kok_IN +++ b/libc/localedata/locales/kok_IN @@ -198,6 +198,10 @@ country_ab3 "" country_num 356 % IND country_car "" +% kok +lang_term "" +% kok +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ks_IN b/libc/localedata/locales/ks_IN index bdaf57dc0..ad6eafef7 100644 --- a/libc/localedata/locales/ks_IN +++ b/libc/localedata/locales/ks_IN @@ -199,6 +199,12 @@ country_ab3 "" country_num 356 % IND country_car "" +% ks +lang_ab "" +% kas +lang_term "" +% kas +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ku_TR b/libc/localedata/locales/ku_TR index 3fff19ccb..ddd671d97 100644 --- a/libc/localedata/locales/ku_TR +++ b/libc/localedata/locales/ku_TR @@ -210,7 +210,10 @@ country_isbn 975 country_car "" % "kurdi" lang_name "" -lang_ab "ku" -lang_term "kur" -lang_lib "kur" +% ku +lang_ab "" +% kur +lang_term "" +% kur +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/kw_GB b/libc/localedata/locales/kw_GB index a7c03b9b7..35b21e50b 100644 --- a/libc/localedata/locales/kw_GB +++ b/libc/localedata/locales/kw_GB @@ -166,5 +166,10 @@ country_ab3 "" country_num 826 % GB country_car "" - +% kw +lang_ab "" +% cor +lang_term "" +% cor +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ky_KG b/libc/localedata/locales/ky_KG index 2702ad31f..107b2a43c 100644 --- a/libc/localedata/locales/ky_KG +++ b/libc/localedata/locales/ky_KG @@ -206,5 +206,10 @@ country_ab3 "" %country_num 643 % KS country_car "" - +% ky +lang_ab "" +% kir +lang_term "" +% kir +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/lg_UG b/libc/localedata/locales/lg_UG index 0248145a4..f75e07ba2 100644 --- a/libc/localedata/locales/lg_UG +++ b/libc/localedata/locales/lg_UG @@ -332,5 +332,10 @@ country_ab3 "" country_num 800 % EAU country_car "" - +% lg +lang_ab "" +% lug +lang_term "" +% lug +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/lij_IT b/libc/localedata/locales/lij_IT index 0d7e4586e..647528011 100644 --- a/libc/localedata/locales/lij_IT +++ b/libc/localedata/locales/lij_IT @@ -131,4 +131,8 @@ country_ab3 "" country_num 380 % I country_car "" +% lij +lang_term "" +% lij +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/lt_LT b/libc/localedata/locales/lt_LT index 659a45d6c..49aff858e 100644 --- a/libc/localedata/locales/lt_LT +++ b/libc/localedata/locales/lt_LT @@ -2234,5 +2234,10 @@ country_ab3 "" country_num 440 % LT country_car "" - +% lt +lang_ab "" +% lit +lang_term "" +% lit +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/lv_LV b/libc/localedata/locales/lv_LV index ae9de9b46..4ae623cfa 100644 --- a/libc/localedata/locales/lv_LV +++ b/libc/localedata/locales/lv_LV @@ -2226,5 +2226,10 @@ country_ab3 "" country_num 428 % LV country_car "" - +% lv +lang_ab "" +% lav +lang_term "" +% lav +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mag_IN b/libc/localedata/locales/mag_IN index 4510776da..098002ee8 100644 --- a/libc/localedata/locales/mag_IN +++ b/libc/localedata/locales/mag_IN @@ -163,7 +163,10 @@ country_ab3 "" country_num 356 % IND country_car "" - +% mag +lang_term "" +% mag +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mai_IN b/libc/localedata/locales/mai_IN index 30108990b..7d01817a8 100644 --- a/libc/localedata/locales/mai_IN +++ b/libc/localedata/locales/mai_IN @@ -79,7 +79,10 @@ country_ab3 "" country_num 356 % IND country_car "" - +% mai +lang_term "" +% mai +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mg_MG b/libc/localedata/locales/mg_MG index 159a4a206..14a8658de 100644 --- a/libc/localedata/locales/mg_MG +++ b/libc/localedata/locales/mg_MG @@ -180,4 +180,10 @@ country_ab3 "" country_num 450 % RM country_car "" +% mg +lang_ab "" +% mlg +lang_term "" +% mlg +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mhr_RU b/libc/localedata/locales/mhr_RU index b636aab16..7fa34f30c 100644 --- a/libc/localedata/locales/mhr_RU +++ b/libc/localedata/locales/mhr_RU @@ -161,4 +161,8 @@ country_ab3 "" country_num 643 % RUS country_car "" +% mhr +lang_term "" +% mhr +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mi_NZ b/libc/localedata/locales/mi_NZ index a32ece45a..d4cf2a37e 100644 --- a/libc/localedata/locales/mi_NZ +++ b/libc/localedata/locales/mi_NZ @@ -170,6 +170,12 @@ country_ab3 "" country_num 554 % NZ country_car "" +% mi +lang_ab "" +% mri +lang_term "" +% mao +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/ml_IN b/libc/localedata/locales/ml_IN index cf7b7520a..8dc65f47a 100644 --- a/libc/localedata/locales/ml_IN +++ b/libc/localedata/locales/ml_IN @@ -211,7 +211,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% ml +lang_ab "" +% mal +lang_term "" +% mal +lang_lib "" END LC_ADDRESS % LC_TELEPHONE diff --git a/libc/localedata/locales/mni_IN b/libc/localedata/locales/mni_IN index d7d67860f..d12b782b4 100644 --- a/libc/localedata/locales/mni_IN +++ b/libc/localedata/locales/mni_IN @@ -165,7 +165,10 @@ country_ab3 "" country_num 356 % IND country_car "" - +% mni +lang_term "" +% mni +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mr_IN b/libc/localedata/locales/mr_IN index 11c4e09b2..09b9c3736 100644 --- a/libc/localedata/locales/mr_IN +++ b/libc/localedata/locales/mr_IN @@ -221,7 +221,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% mr +lang_ab "" +% mar +lang_term "" +% mar +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ms_MY b/libc/localedata/locales/ms_MY index 122f13f7c..e8535ace0 100644 --- a/libc/localedata/locales/ms_MY +++ b/libc/localedata/locales/ms_MY @@ -203,7 +203,12 @@ country_ab3 "" country_num 458 % MAL country_car "" - +% ms +lang_ab "" +% msa +lang_term "" +% may +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/mt_MT b/libc/localedata/locales/mt_MT index 7d021b367..61077665f 100644 --- a/libc/localedata/locales/mt_MT +++ b/libc/localedata/locales/mt_MT @@ -292,7 +292,12 @@ country_ab3 "" country_num 470 % M country_car "" - +% mt +lang_ab "" +% mlt +lang_term "" +% mlt +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/nb_NO b/libc/localedata/locales/nb_NO index 66b590f6d..07df38cc8 100644 --- a/libc/localedata/locales/nb_NO +++ b/libc/localedata/locales/nb_NO @@ -243,5 +243,10 @@ country_ab3 "" country_num 578 % N country_car "" - +% nb +lang_ab "" +% nob +lang_term "" +% nob +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ne_NP b/libc/localedata/locales/ne_NP index 7574772cb..9ee000a94 100644 --- a/libc/localedata/locales/ne_NP +++ b/libc/localedata/locales/ne_NP @@ -197,7 +197,12 @@ country_ab3 "" country_num 524 % NEP country_car "" - +% ne +lang_ab "" +% nep +lang_term "" +% nep +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/nhn_MX b/libc/localedata/locales/nhn_MX index 9029fb08f..6534b78a8 100644 --- a/libc/localedata/locales/nhn_MX +++ b/libc/localedata/locales/nhn_MX @@ -150,5 +150,8 @@ country_ab3 "" country_num 484 % MEX country_car "" - +% nhn +lang_term "" +% nhn +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/niu_NU b/libc/localedata/locales/niu_NU index 9b2c4510d..440b497f8 100644 --- a/libc/localedata/locales/niu_NU +++ b/libc/localedata/locales/niu_NU @@ -183,6 +183,8 @@ country_ab3 "" country_num 570 % niu lang_term "" +% niu +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/niu_NZ b/libc/localedata/locales/niu_NZ index 9a7e333af..0afacda7e 100644 --- a/libc/localedata/locales/niu_NZ +++ b/libc/localedata/locales/niu_NZ @@ -185,6 +185,8 @@ country_num 554 country_car "" % niu lang_term "" +% niu +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/nl_AW b/libc/localedata/locales/nl_AW index e9fe8f82e..3da454b65 100644 --- a/libc/localedata/locales/nl_AW +++ b/libc/localedata/locales/nl_AW @@ -85,6 +85,9 @@ postal_fmt "/ country_ab2 "" country_ab3 "" country_num 533 +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/nl_BE b/libc/localedata/locales/nl_BE index a3d72dca0..3d1615b6c 100644 --- a/libc/localedata/locales/nl_BE +++ b/libc/localedata/locales/nl_BE @@ -136,5 +136,7 @@ country_ab3 "" country_num 056 % B country_car "" - +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/nn_NO b/libc/localedata/locales/nn_NO index c9fe73086..b1a829fa6 100644 --- a/libc/localedata/locales/nn_NO +++ b/libc/localedata/locales/nn_NO @@ -161,6 +161,12 @@ country_ab3 "" country_num 578 % N country_car "" +% nn +lang_ab "" +% nno +lang_term "" +% nno +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/nr_ZA b/libc/localedata/locales/nr_ZA index 32c2e693d..62d7567c1 100644 --- a/libc/localedata/locales/nr_ZA +++ b/libc/localedata/locales/nr_ZA @@ -239,9 +239,12 @@ lang_name "" +% nbl lang_term "" +% nbl +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/oc_FR b/libc/localedata/locales/oc_FR index 2a7f83643..dfdc09507 100644 --- a/libc/localedata/locales/oc_FR +++ b/libc/localedata/locales/oc_FR @@ -47,9 +47,12 @@ country_num 250 country_isbn "2" country_car "F" % FIXME lang_name "Occitan" in Occitan ? -lang_ab "oc" -lang_term "oci" -lang_lib "oci" +% oc +lang_ab "" +% oci +lang_term "" +% oci +lang_lib "" END LC_ADDRESS LC_CTYPE diff --git a/libc/localedata/locales/or_IN b/libc/localedata/locales/or_IN index a291cc3ec..15ed7ce4c 100644 --- a/libc/localedata/locales/or_IN +++ b/libc/localedata/locales/or_IN @@ -815,6 +815,12 @@ country_ab3 "" country_num 356 % IND country_car "" +% or +lang_ab "" +% ori +lang_term "" +% ori +lang_lib "" END LC_ADDRESS %%%%%%%%%%%%% diff --git a/libc/localedata/locales/os_RU b/libc/localedata/locales/os_RU index fe66c2864..91743dd65 100644 --- a/libc/localedata/locales/os_RU +++ b/libc/localedata/locales/os_RU @@ -176,5 +176,10 @@ country_ab3 "" country_num 643 % RUS country_car "" - +% os +lang_ab "" +% oss +lang_term "" +% oss +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/pa_IN b/libc/localedata/locales/pa_IN index 2c4d503cd..a3f8ef475 100644 --- a/libc/localedata/locales/pa_IN +++ b/libc/localedata/locales/pa_IN @@ -210,7 +210,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% pa +lang_ab "" +% pan +lang_term "" +% pan +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/pa_PK b/libc/localedata/locales/pa_PK index 95543d913..122113aa9 100644 --- a/libc/localedata/locales/pa_PK +++ b/libc/localedata/locales/pa_PK @@ -179,6 +179,12 @@ country_ab3 "" country_num 586 % PK country_car "" +% pa +lang_ab "" +% pan +lang_term "" +% pan +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/pl_PL b/libc/localedata/locales/pl_PL index 9a4b1ba9d..143161453 100644 --- a/libc/localedata/locales/pl_PL +++ b/libc/localedata/locales/pl_PL @@ -2235,5 +2235,10 @@ country_ab3 "" country_num 616 % PL country_car "" - +% pl +lang_ab "" +% pol +lang_term "" +% pol +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ps_AF b/libc/localedata/locales/ps_AF index 7f686abbb..87ce5a6ed 100644 --- a/libc/localedata/locales/ps_AF +++ b/libc/localedata/locales/ps_AF @@ -29,18 +29,18 @@ LC_IDENTIFICATION revision "0.2" date "2009-01-16" - category "ps_AF:2007";LC_IDENTIFICATION - category "ps_AF:2007";LC_CTYPE - category "ps_AF:2007";LC_COLLATE - category "ps_AF:2007";LC_TIME - category "ps_AF:2007";LC_NUMERIC - category "ps_AF:2007";LC_MONETARY - category "ps_AF:2007";LC_MESSAGES - category "ps_AF:2007";LC_MEASUREMENT - category "ps_AF:2007";LC_PAPER - category "ps_AF:2007";LC_NAME - category "ps_AF:2007";LC_ADDRESS - category "ps_AF:2007";LC_TELEPHONE +category "ps_AF:2007";LC_IDENTIFICATION +category "ps_AF:2007";LC_CTYPE +category "ps_AF:2007";LC_COLLATE +category "ps_AF:2007";LC_TIME +category "ps_AF:2007";LC_NUMERIC +category "ps_AF:2007";LC_MONETARY +category "ps_AF:2007";LC_MESSAGES +category "ps_AF:2007";LC_MEASUREMENT +category "ps_AF:2007";LC_PAPER +category "ps_AF:2007";LC_NAME +category "ps_AF:2007";LC_ADDRESS +category "ps_AF:2007";LC_TELEPHONE END LC_IDENTIFICATION LC_CTYPE @@ -248,27 +248,26 @@ LC_NAME END LC_NAME LC_ADDRESS - postal_fmt "/ +postal_fmt "/ / / / " - country_name "/ +country_name "/ " - %country_post "" % FIXME: Not confirmed. - country_ab2 "" - country_ab3 "" - country_num 004 - country_car "" - - %country_isbn "" % Unfortunately not yet assigned :-( - % Since to date there is no ISBN agency working - % in Afghanistan. - - lang_name "" - lang_ab "" - lang_term "" - lang_lib "" +%country_post "" % FIXME: Not confirmed. +country_ab2 "" +country_ab3 "" +country_num 004 +country_car "" + +%country_isbn "" % Unfortunately not yet assigned :-( +% Since to date there is no ISBN agency working in Afghanistan. + +lang_name "" +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/pt_BR b/libc/localedata/locales/pt_BR index c93909562..acc9897fd 100644 --- a/libc/localedata/locales/pt_BR +++ b/libc/localedata/locales/pt_BR @@ -157,5 +157,10 @@ country_ab3 "" country_num 076 % BR country_car "" - +% pt +lang_ab "" +% por +lang_term "" +% por +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/pt_PT b/libc/localedata/locales/pt_PT index 7e443032b..7417b3457 100644 --- a/libc/localedata/locales/pt_PT +++ b/libc/localedata/locales/pt_PT @@ -158,5 +158,10 @@ country_ab3 "" country_num 620 % P country_car "" - +% pt +lang_ab "" +% por +lang_term "" +% por +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/quz_PE b/libc/localedata/locales/quz_PE index efc5a0077..6521fec8b 100644 --- a/libc/localedata/locales/quz_PE +++ b/libc/localedata/locales/quz_PE @@ -170,7 +170,10 @@ country_ab3 "" country_num 604 % PE country_car "" - +% quz +lang_term "" +% quz +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/ru_RU b/libc/localedata/locales/ru_RU index 1c7e8069e..0cb3a119b 100644 --- a/libc/localedata/locales/ru_RU +++ b/libc/localedata/locales/ru_RU @@ -188,5 +188,10 @@ country_ab3 "" country_num 643 % RUS country_car "" - +% ru +lang_ab "" +% rus +lang_term "" +% rus +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ru_UA b/libc/localedata/locales/ru_UA index ef689d583..676424933 100644 --- a/libc/localedata/locales/ru_UA +++ b/libc/localedata/locales/ru_UA @@ -179,5 +179,10 @@ country_ab3 "" country_num 804 % UA country_car "" - +% ru +lang_ab "" +% rus +lang_term "" +% rus +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sa_IN b/libc/localedata/locales/sa_IN index efcb6de1d..41651ca55 100644 --- a/libc/localedata/locales/sa_IN +++ b/libc/localedata/locales/sa_IN @@ -237,7 +237,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% sa +lang_ab "" +% san +lang_term "" +% san +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sat_IN b/libc/localedata/locales/sat_IN index 57fb383f1..b334b8823 100644 --- a/libc/localedata/locales/sat_IN +++ b/libc/localedata/locales/sat_IN @@ -179,7 +179,10 @@ country_ab3 "" country_num 356 % IND country_car "" - +% sat +lang_term "" +% sat +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sc_IT b/libc/localedata/locales/sc_IT index 8ff00a02e..065ad6165 100644 --- a/libc/localedata/locales/sc_IT +++ b/libc/localedata/locales/sc_IT @@ -142,5 +142,10 @@ country_ab3 "" country_num 380 % I country_car "" - +% sc +lang_ab "" +% srd +lang_term "" +% srd +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sd_IN b/libc/localedata/locales/sd_IN index cc0de5b54..866cc8db8 100644 --- a/libc/localedata/locales/sd_IN +++ b/libc/localedata/locales/sd_IN @@ -194,7 +194,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% sd +lang_ab "" +% snd +lang_term "" +% snd +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sd_IN@devanagari b/libc/localedata/locales/sd_IN@devanagari index e275eb627..66b1f9e6d 100644 --- a/libc/localedata/locales/sd_IN@devanagari +++ b/libc/localedata/locales/sd_IN@devanagari @@ -194,6 +194,12 @@ country_ab3 "" country_num 356 % IND country_car "" +% sd +lang_ab "" +% snd +lang_term "" +% snd +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/se_NO b/libc/localedata/locales/se_NO index 6bbf280dc..53ee33fe5 100644 --- a/libc/localedata/locales/se_NO +++ b/libc/localedata/locales/se_NO @@ -316,5 +316,10 @@ country_ab3 "" country_num 578 % N country_car "" - +% se +lang_ab "" +% sme +lang_term "" +% sme +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/si_LK b/libc/localedata/locales/si_LK index f600ab710..cc75c49a6 100644 --- a/libc/localedata/locales/si_LK +++ b/libc/localedata/locales/si_LK @@ -200,6 +200,12 @@ country_ab3 "" country_num 144 % CL country_car "" +% si +lang_ab "" +% sin +lang_term "" +% sin +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sk_SK b/libc/localedata/locales/sk_SK index bf3f6a414..8ba797a4f 100644 --- a/libc/localedata/locales/sk_SK +++ b/libc/localedata/locales/sk_SK @@ -226,5 +226,10 @@ country_ab3 "" country_num 703 % SK country_car "" - +% sk +lang_ab "" +% slk +lang_term "" +% slo +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sl_SI b/libc/localedata/locales/sl_SI index 3808e63e8..353933eb0 100644 --- a/libc/localedata/locales/sl_SI +++ b/libc/localedata/locales/sl_SI @@ -2225,5 +2225,10 @@ country_ab3 "" country_num 705 % SLO country_car "" - +% sl +lang_ab "" +% slv +lang_term "" +% slv +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sq_AL b/libc/localedata/locales/sq_AL index 2d3253279..09873c020 100644 --- a/libc/localedata/locales/sq_AL +++ b/libc/localedata/locales/sq_AL @@ -334,7 +334,12 @@ country_ab3 "" country_num 008 % AL country_car "" - +% sq +lang_ab "" +% sqi +lang_term "" +% alb +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sq_MK b/libc/localedata/locales/sq_MK index caa250acf..7bac02ee9 100644 --- a/libc/localedata/locales/sq_MK +++ b/libc/localedata/locales/sq_MK @@ -102,9 +102,12 @@ country_car "" country_num 807 country_isbn "9989" % lang_name "" -% lang_ab "" -% lang_term "" -% lang_lib "" +% sq +lang_ab "" +% sqi +lang_term "" +% alb +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ss_ZA b/libc/localedata/locales/ss_ZA index 19cb7413b..d33683c15 100644 --- a/libc/localedata/locales/ss_ZA +++ b/libc/localedata/locales/ss_ZA @@ -243,9 +243,12 @@ lang_name "" % ISO 639 two and three letter language names % see http://www.loc.gov/standards/iso639-2/englangn.html -% "ss", ssw" +% ss lang_ab "" +% ssw lang_term "" +% ssw +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/st_ZA b/libc/localedata/locales/st_ZA index 67e356cf7..c29bb7d49 100644 --- a/libc/localedata/locales/st_ZA +++ b/libc/localedata/locales/st_ZA @@ -240,9 +240,12 @@ country_car "" % ISO 639 two and three letter language names % see http://www.loc.gov/standards/iso639-2/englangn.html -% "st", "sot" +% st lang_ab "" +% sot lang_term "" +% sot +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/sv_SE b/libc/localedata/locales/sv_SE index d7ebdd8f6..d0e59864b 100644 --- a/libc/localedata/locales/sv_SE +++ b/libc/localedata/locales/sv_SE @@ -219,5 +219,7 @@ country_ab3 "" country_num 752 % S country_car "" - +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/sw_KE b/libc/localedata/locales/sw_KE index 0037161ba..de91d37a5 100644 --- a/libc/localedata/locales/sw_KE +++ b/libc/localedata/locales/sw_KE @@ -157,7 +157,11 @@ country_car "" % Kiswahili lang_name "" % sw -lang_ab "" +lang_ab "" +% swa +lang_term "" +% swa +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/sw_TZ b/libc/localedata/locales/sw_TZ index 05a48731b..1ae73fb07 100644 --- a/libc/localedata/locales/sw_TZ +++ b/libc/localedata/locales/sw_TZ @@ -108,7 +108,11 @@ country_car "" % Kiswahili lang_name "" % sw -lang_ab "" +lang_ab "" +% swa +lang_term "" +% swa +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/szl_PL b/libc/localedata/locales/szl_PL index 3147ede4c..3323430f6 100644 --- a/libc/localedata/locales/szl_PL +++ b/libc/localedata/locales/szl_PL @@ -217,5 +217,8 @@ country_ab3 "" country_num 616 % PL country_car "" - +% szl +lang_term "" +% szl +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ta_IN b/libc/localedata/locales/ta_IN index 39212839d..75f63249b 100644 --- a/libc/localedata/locales/ta_IN +++ b/libc/localedata/locales/ta_IN @@ -206,7 +206,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% ta +lang_ab "" +% tam +lang_term "" +% tam +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ta_LK b/libc/localedata/locales/ta_LK index ae6f5d5c8..7051e3be7 100644 --- a/libc/localedata/locales/ta_LK +++ b/libc/localedata/locales/ta_LK @@ -89,4 +89,10 @@ country_ab3 "" country_num 144 % CL country_car "" +% ta +lang_ab "" +% tam +lang_term "" +% tam +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/te_IN b/libc/localedata/locales/te_IN index e9865f5ac..f2ab1b67e 100644 --- a/libc/localedata/locales/te_IN +++ b/libc/localedata/locales/te_IN @@ -224,8 +224,12 @@ country_num 356 % IND country_car "" lang_name "" -lang_ab "te" -lang_term "tel" +% te +lang_ab "" +% tel +lang_term "" +% tel +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/tg_TJ b/libc/localedata/locales/tg_TJ index 03c36d2a6..3350881db 100644 --- a/libc/localedata/locales/tg_TJ +++ b/libc/localedata/locales/tg_TJ @@ -227,7 +227,12 @@ country_ab3 "" country_num 762 % TJ country_car "" - +% tg +lang_ab "" +% tgk +lang_term "" +% tgk +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/tl_PH b/libc/localedata/locales/tl_PH index 27993e8d4..ae30aeea5 100644 --- a/libc/localedata/locales/tl_PH +++ b/libc/localedata/locales/tl_PH @@ -169,7 +169,12 @@ country_ab3 "" country_num 608 % RP country_car "" - +% tl +lang_ab "" +% tgl +lang_term "" +% tgl +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/tn_ZA b/libc/localedata/locales/tn_ZA index a3f36db29..1a3fd8256 100644 --- a/libc/localedata/locales/tn_ZA +++ b/libc/localedata/locales/tn_ZA @@ -246,9 +246,12 @@ lang_name "" % ISO 639 two and three letter language names % see http://www.loc.gov/standards/iso639-2/englangn.html -% "tn", "tsn" +% tn lang_ab "" +% tsn lang_term "" +% tsn +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/tr_CY b/libc/localedata/locales/tr_CY index daeffc1b9..1c2c3f313 100644 --- a/libc/localedata/locales/tr_CY +++ b/libc/localedata/locales/tr_CY @@ -105,9 +105,9 @@ country_ab2 "" country_ab3 "" % Turkish lang_name "" -% tr +% tur lang_term "" -% tr +% tur lang_lib "" %tr lang_ab "" diff --git a/libc/localedata/locales/tr_TR b/libc/localedata/locales/tr_TR index 867e66fc8..189363320 100644 --- a/libc/localedata/locales/tr_TR +++ b/libc/localedata/locales/tr_TR @@ -3594,9 +3594,9 @@ country_ab2 "" country_ab3 "" % Turkish lang_name "" -% tr +% tur lang_term "" -% tr +% tur lang_lib "" %tr lang_ab "" diff --git a/libc/localedata/locales/ts_ZA b/libc/localedata/locales/ts_ZA index 010cba2d3..c7b56435e 100644 --- a/libc/localedata/locales/ts_ZA +++ b/libc/localedata/locales/ts_ZA @@ -240,9 +240,12 @@ lang_name "" % ISO 639 two and three letter language names % see http://www.loc.gov/standards/iso639-2/englangn.html -% "ts", "tso" +% ts lang_ab "" +% tso lang_term "" +% tso +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/tt_RU b/libc/localedata/locales/tt_RU index f5e1b7588..520c6eb1f 100644 --- a/libc/localedata/locales/tt_RU +++ b/libc/localedata/locales/tt_RU @@ -317,7 +317,12 @@ LC_ADDRESS postal_fmt "???" % RUS country_car "" - +% tt +lang_ab "" +% tat +lang_term "" +% tat +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/tt_RU@iqtelif b/libc/localedata/locales/tt_RU@iqtelif index b6c40b3ec..4aac6365c 100644 --- a/libc/localedata/locales/tt_RU@iqtelif +++ b/libc/localedata/locales/tt_RU@iqtelif @@ -175,7 +175,12 @@ country_ab3 "" country_num 643 % RUS country_car "" - +% tt +lang_ab "" +% tat +lang_term "" +% tat +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/ug_CN b/libc/localedata/locales/ug_CN index c4e0a9ac1..462f42bc9 100644 --- a/libc/localedata/locales/ug_CN +++ b/libc/localedata/locales/ug_CN @@ -311,6 +311,23 @@ LC_NAME % to be fixed copy "zh_CN" END LC_NAME -LC_ADDRESS % to be fixed -copy "zh_CN" +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +country_name "" +%country_post "FIXME" +country_ab2 "" +country_ab3 "" +country_num 156 +%country_car "FIXME" +country_isbn "" +% ug +lang_ab "" +% uig +lang_term "" +% uig +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/unm_US b/libc/localedata/locales/unm_US index ddd049363..a04188ec1 100644 --- a/libc/localedata/locales/unm_US +++ b/libc/localedata/locales/unm_US @@ -153,8 +153,10 @@ country_car "" country_isbn 0 % lang_name "" % lang_ab "" -% lang_term "" -% lang_lib "" +% unm +lang_term "" +% unm +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/ur_IN b/libc/localedata/locales/ur_IN index 366ad5ff4..85e19bfc0 100644 --- a/libc/localedata/locales/ur_IN +++ b/libc/localedata/locales/ur_IN @@ -178,7 +178,12 @@ country_ab3 "" country_num 356 % IND country_car "" - +% ur +lang_ab "" +% urd +lang_term "" +% urd +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ur_PK b/libc/localedata/locales/ur_PK index 9c91b5a12..ec1ee3b50 100644 --- a/libc/localedata/locales/ur_PK +++ b/libc/localedata/locales/ur_PK @@ -197,7 +197,12 @@ country_ab3 "" country_num 586 % PK country_car "" - +% ur +lang_ab "" +% urd +lang_term "" +% urd +lang_lib "" END LC_ADDRESS LC_TELEPHONE diff --git a/libc/localedata/locales/uz_UZ b/libc/localedata/locales/uz_UZ index 375e4ac62..5a272a1ea 100644 --- a/libc/localedata/locales/uz_UZ +++ b/libc/localedata/locales/uz_UZ @@ -317,7 +317,10 @@ country_num 860 % UZ country_car "" lang_name "" -lang_ab "uz" -lang_term "uzb" -lang_lib "uzb" +% uz +lang_ab "" +% uzb +lang_term "" +% uzb +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/uz_UZ@cyrillic b/libc/localedata/locales/uz_UZ@cyrillic index 4a34eacfc..c7cf51fd4 100644 --- a/libc/localedata/locales/uz_UZ@cyrillic +++ b/libc/localedata/locales/uz_UZ@cyrillic @@ -317,7 +317,10 @@ country_num 860 %country_isbn "" country_car "" lang_name "" -lang_ab "" -lang_term "" -lang_lib "" +% uz +lang_ab "" +% uzb +lang_term "" +% uzb +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/ve_ZA b/libc/localedata/locales/ve_ZA index b7cf30347..43a9aed4b 100644 --- a/libc/localedata/locales/ve_ZA +++ b/libc/localedata/locales/ve_ZA @@ -243,12 +243,12 @@ lang_name "" % ISO 639 two and three letter language names % see http://www.loc.gov/standards/iso639-2/englangn.html -% "ve", "ven", :ven" +% ve lang_ab "" +% ven lang_term "" -% FIXME there seems to be an error with the following but am unable to -% determine what as it works correctly in other locale files -% lang_lib "" +% ven +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/vi_VN b/libc/localedata/locales/vi_VN index e372ae07c..c1b9e8621 100644 --- a/libc/localedata/locales/vi_VN +++ b/libc/localedata/locales/vi_VN @@ -338,7 +338,12 @@ country_ab3 "" country_num 704 % VN country_car "" - +% vi +lang_ab "" +% vie +lang_term "" +% vie +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/wa_BE b/libc/localedata/locales/wa_BE index d0d4dbff2..8ca9cd8af 100644 --- a/libc/localedata/locales/wa_BE +++ b/libc/localedata/locales/wa_BE @@ -46,9 +46,12 @@ country_isbn "2" % B country_car "" lang_name "" -lang_ab "wa" -lang_term "wln" -lang_lib "wln" +% wa +lang_ab "" +% wln +lang_term "" +% wln +lang_lib "" END LC_ADDRESS LC_CTYPE diff --git a/libc/localedata/locales/wal_ET b/libc/localedata/locales/wal_ET index 0c93f26cf..8408a629d 100644 --- a/libc/localedata/locales/wal_ET +++ b/libc/localedata/locales/wal_ET @@ -4,7 +4,7 @@ escape_char / %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% Sidama language locale for Ethiopia. +% Walaita language locale for Ethiopia. % % Charset: UTF-8 % @@ -113,9 +113,6 @@ country_car "" lang_name "" lang_term "" lang_lib "" - - -% END LC_ADDRESS diff --git a/libc/localedata/locales/wo_SN b/libc/localedata/locales/wo_SN index d593f1f59..3841e0f06 100644 --- a/libc/localedata/locales/wo_SN +++ b/libc/localedata/locales/wo_SN @@ -178,6 +178,11 @@ country_ab3 "" country_num 450 % SN country_car "" - +% wo +lang_ab "" +% wol +lang_term "" +% wol +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/xh_ZA b/libc/localedata/locales/xh_ZA index f0f56ed4f..3277ca1a6 100644 --- a/libc/localedata/locales/xh_ZA +++ b/libc/localedata/locales/xh_ZA @@ -13,7 +13,7 @@ comment_char % % 0.2 (2004-11-02): % 2004-11-01 Dwayne Bailey % - Change all contact information -% - d_t_fmt, date_fmt cahnged day number %e to %-e to remove +% - d_t_fmt, date_fmt changed day number %e to %-e to remove % space padding in day. % - Remove .* from yes/noexpr % 2004-03-30 Dwayne Bailey @@ -235,6 +235,7 @@ country_car "" % see http://www.loc.gov/standards/iso639-2/englangn.html lang_ab "" lang_term "" +lang_lib "" % Representation of postal addresses (minus the addressee's name) in South % Africa. (Ignored for now) diff --git a/libc/localedata/locales/yi_US b/libc/localedata/locales/yi_US index 586b12db9..46136fbaf 100644 --- a/libc/localedata/locales/yi_US +++ b/libc/localedata/locales/yi_US @@ -52,9 +52,12 @@ country_car "" % FIXME Check which isbn for Yiddish in USA country_isbn "0" lang_name "" -lang_ab "yi" -lang_term "yid" -lang_lib "yid" +% yi +lang_ab "" +% yid +lang_term "" +% yid +lang_lib "" END LC_ADDRESS LC_CTYPE diff --git a/libc/localedata/locales/yue_HK b/libc/localedata/locales/yue_HK index 4bd7fe105..fdd15280c 100644 --- a/libc/localedata/locales/yue_HK +++ b/libc/localedata/locales/yue_HK @@ -151,6 +151,10 @@ country_ab3 "" country_num 344 country_isbn "" lang_name "" +% yue +lang_term "" +% yue +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/zh_HK b/libc/localedata/locales/zh_HK index 1674d816f..6c7d793f5 100644 --- a/libc/localedata/locales/zh_HK +++ b/libc/localedata/locales/zh_HK @@ -184,6 +184,9 @@ postal_fmt "/ country_ab2 "" country_ab3 "" country_num 344 +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS diff --git a/libc/localedata/locales/zh_SG b/libc/localedata/locales/zh_SG index dc29268a5..cf7a2f6ea 100644 --- a/libc/localedata/locales/zh_SG +++ b/libc/localedata/locales/zh_SG @@ -196,7 +196,9 @@ country_ab3 "" country_num 702 % SGP country_car "" - +lang_ab "" +lang_term "" +lang_lib "" END LC_ADDRESS diff --git a/libc/malloc/Makefile b/libc/malloc/Makefile index 9ca8edf67..cdf55c85d 100644 --- a/libc/malloc/Makefile +++ b/libc/malloc/Makefile @@ -86,7 +86,7 @@ install-bin-script += memusage generated += memusagestat memusage extra-objs += memusagestat.o -# The configure.in check for libgd and its headers did not use $SYSINCLUDES. +# The configure.ac check for libgd and its headers did not use $SYSINCLUDES. # The directory specified by --with-headers usually contains only the basic # kernel interface headers, not something like libgd. So the simplest thing # is to presume that the standard system headers will be ok for this file. diff --git a/libc/malloc/hooks.c b/libc/malloc/hooks.c index 3f663bb6b..1dbe93f38 100644 --- a/libc/malloc/hooks.c +++ b/libc/malloc/hooks.c @@ -361,6 +361,14 @@ memalign_check(size_t alignment, size_t bytes, const void *caller) if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL); if (alignment < MINSIZE) alignment = MINSIZE; + /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a + power of 2 and will cause overflow in the check below. */ + if (alignment > SIZE_MAX / 2 + 1) + { + __set_errno (EINVAL); + return 0; + } + /* Check for overflow. */ if (bytes > SIZE_MAX - alignment - MINSIZE) { diff --git a/libc/malloc/malloc.c b/libc/malloc/malloc.c index 1a18c3f5f..897c43a39 100644 --- a/libc/malloc/malloc.c +++ b/libc/malloc/malloc.c @@ -2253,7 +2253,6 @@ static void* sysmalloc(INTERNAL_SIZE_T nb, mstate av) mchunkptr remainder; /* remainder from allocation */ unsigned long remainder_size; /* its size */ - unsigned long sum; /* for updating stats */ size_t pagemask = GLRO(dl_pagesize) - 1; bool tried_mmap = false; @@ -2325,12 +2324,12 @@ static void* sysmalloc(INTERNAL_SIZE_T nb, mstate av) /* update statistics */ - if (++mp_.n_mmaps > mp_.max_n_mmaps) - mp_.max_n_mmaps = mp_.n_mmaps; + int new = atomic_exchange_and_add (&mp_.n_mmaps, 1) + 1; + atomic_max (&mp_.max_n_mmaps, new); - sum = mp_.mmapped_mem += size; - if (sum > (unsigned long)(mp_.max_mmapped_mem)) - mp_.max_mmapped_mem = sum; + unsigned long sum; + sum = atomic_exchange_and_add(&mp_.mmapped_mem, size) + size; + atomic_max (&mp_.max_mmapped_mem, sum); check_chunk(av, p); @@ -2780,8 +2779,8 @@ munmap_chunk(mchunkptr p) return; } - mp_.n_mmaps--; - mp_.mmapped_mem -= total_size; + atomic_decrement (&mp_.n_mmaps); + atomic_add (&mp_.mmapped_mem, -total_size); /* If munmap failed the process virtual memory address space is in a bad shape. Just leave the block hanging around, the process will @@ -2822,10 +2821,10 @@ mremap_chunk(mchunkptr p, size_t new_size) assert((p->prev_size == offset)); set_head(p, (new_size - offset)|IS_MMAPPED); - mp_.mmapped_mem -= size + offset; - mp_.mmapped_mem += new_size; - if ((unsigned long)mp_.mmapped_mem > (unsigned long)mp_.max_mmapped_mem) - mp_.max_mmapped_mem = mp_.mmapped_mem; + INTERNAL_SIZE_T new; + new = atomic_exchange_and_add (&mp_.mmapped_mem, new_size - size - offset) + + new_size - size - offset; + atomic_max (&mp_.max_mmapped_mem, new); return p; } @@ -3017,6 +3016,14 @@ __libc_memalign(size_t alignment, size_t bytes) /* Otherwise, ensure that it is at least a minimum chunk size */ if (alignment < MINSIZE) alignment = MINSIZE; + /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a + power of 2 and will cause overflow in the check below. */ + if (alignment > SIZE_MAX / 2 + 1) + { + __set_errno (EINVAL); + return 0; + } + /* Check for overflow. */ if (bytes > SIZE_MAX - alignment - MINSIZE) { @@ -5042,23 +5049,11 @@ malloc_info (int options, FILE *fp) sizes[i].total = sizes[i].count * sizes[i].to; } - mbinptr bin = bin_at (ar_ptr, 1); - struct malloc_chunk *r = bin->fd; - if (r != NULL) - { - while (r != bin) - { - ++sizes[NFASTBINS].count; - sizes[NFASTBINS].total += r->size; - sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size); - sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size); - r = r->fd; - } - nblocks += sizes[NFASTBINS].count; - avail += sizes[NFASTBINS].total; - } - for (size_t i = 2; i < NBINS; ++i) + mbinptr bin; + struct malloc_chunk *r; + + for (size_t i = 1; i < NBINS; ++i) { bin = bin_at (ar_ptr, i); r = bin->fd; diff --git a/libc/malloc/tst-memalign.c b/libc/malloc/tst-memalign.c index 1c5975248..cf48e7ed1 100644 --- a/libc/malloc/tst-memalign.c +++ b/libc/malloc/tst-memalign.c @@ -70,6 +70,21 @@ do_test (void) free (p); + errno = 0; + + /* Test to expose integer overflow in malloc internals from BZ #16038. */ + p = memalign (-1, pagesize); + + save = errno; + + if (p != NULL) + merror ("memalign (-1, pagesize) succeeded."); + + if (p == NULL && save != EINVAL) + merror ("memalign (-1, pagesize) errno is not set correctly"); + + free (p); + /* A zero-sized allocation should succeed with glibc, returning a non-NULL value. */ p = memalign (sizeof (void *), 0); diff --git a/libc/malloc/tst-posix_memalign.c b/libc/malloc/tst-posix_memalign.c index 27c0dd2bd..7f34e37bd 100644 --- a/libc/malloc/tst-posix_memalign.c +++ b/libc/malloc/tst-posix_memalign.c @@ -65,6 +65,16 @@ do_test (void) p = NULL; + /* Test to expose integer overflow in malloc internals from BZ #16038. */ + ret = posix_memalign (&p, -1, pagesize); + + if (ret != EINVAL) + merror ("posix_memalign (&p, -1, pagesize) succeeded."); + + free (p); + + p = NULL; + /* A zero-sized allocation should succeed with glibc, returning zero and setting p to a non-NULL value. */ ret = posix_memalign (&p, sizeof (void *), 0); diff --git a/libc/manual/crypt.texi b/libc/manual/crypt.texi index ef905904c..9c65b9535 100644 --- a/libc/manual/crypt.texi +++ b/libc/manual/crypt.texi @@ -30,8 +30,15 @@ message-digest algorithm that is compatible with modern BSD systems, and the other based on the Data Encryption Standard (DES) that is compatible with Unix systems. +@vindex AUTH_DES +@cindex FIPS 140-2 It also provides support for Secure RPC, and some library functions that -can be used to perform normal DES encryption. +can be used to perform normal DES encryption. The @code{AUTH_DES} +authentication flavor in Secure RPC, as provided by @theglibc{}, +uses DES and does not comply with FIPS 140-2 nor does any other use of DES +within @theglibc{}. It is recommended that Secure RPC should not be used +for systems that need to comply with FIPS 140-2 since all flavors of +encrypted authentication use normal DES. @menu * Legal Problems:: This software can get you locked up, or worse. @@ -203,6 +210,7 @@ header @file{crypt.h}. @node DES Encryption @section DES Encryption +@cindex FIPS 46-3 The Data Encryption Standard is described in the US Government Federal Information Processing Standards (FIPS) 46-3 published by the National Institute of Standards and Technology. The DES has been very thoroughly diff --git a/libc/manual/install.texi b/libc/manual/install.texi index 4ca7b1a1a..aaf27c9e4 100644 --- a/libc/manual/install.texi +++ b/libc/manual/install.texi @@ -413,7 +413,7 @@ should definitely upgrade @code{sed}. @end itemize @noindent -If you change any of the @file{configure.in} files you will also need +If you change any of the @file{configure.ac} files you will also need @itemize @bullet @item diff --git a/libc/manual/llio.texi b/libc/manual/llio.texi index b129cf40b..dd0eaa3cb 100644 --- a/libc/manual/llio.texi +++ b/libc/manual/llio.texi @@ -1226,8 +1226,8 @@ as the included @code{malloc} automatically uses @code{mmap} where appropriate. @end vtable -@code{mmap} returns the address of the new mapping, or @math{-1} for an -error. +@code{mmap} returns the address of the new mapping, or +@code{MAP_FAILED} for an error. Possible errors include: diff --git a/libc/manual/maint.texi b/libc/manual/maint.texi index 0f4b95981..659ceae01 100644 --- a/libc/manual/maint.texi +++ b/libc/manual/maint.texi @@ -316,7 +316,7 @@ This file is a shell script fragment to be run at configuration time. The top-level @file{configure} script uses the shell @code{.} command to read the @file{configure} file in each system-dependent directory chosen, in order. The @file{configure} files are often generated from -@file{configure.in} files using Autoconf. +@file{configure.ac} files using Autoconf. A system-dependent @file{configure} script will usually add things to the shell variables @samp{DEFS} and @samp{config_vars}; see the @@ -329,14 +329,14 @@ shell variable @w{@samp{with_@var{package}}} (with any dashes in just @w{@samp{--with-@var{package}}} (no argument), then it sets @w{@samp{with_@var{package}}} to @samp{yes}. -@item configure.in +@item configure.ac This file is an Autoconf input fragment to be processed into the file @file{configure} in this subdirectory. @xref{Introduction,,, autoconf.info, Autoconf: Generating Automatic Configuration Scripts}, for a description of Autoconf. You should write either @file{configure} -or @file{configure.in}, but not both. The first line of -@file{configure.in} should invoke the @code{m4} macro +or @file{configure.ac}, but not both. The first line of +@file{configure.ac} should invoke the @code{m4} macro @samp{GLIBC_PROVIDES}. This macro does several @code{AC_PROVIDE} calls for Autoconf macros which are used by the top-level @file{configure} script; without this, those macros might be invoked again unnecessarily diff --git a/libc/manual/math.texi b/libc/manual/math.texi index 193d415fb..57cf24f68 100644 --- a/libc/manual/math.texi +++ b/libc/manual/math.texi @@ -1364,7 +1364,7 @@ The prototypes for these functions are in @file{stdlib.h}. @comment BSD @deftypefun {long int} random (void) This function returns the next pseudo-random number in the sequence. -The value returned ranges from @code{0} to @code{RAND_MAX}. +The value returned ranges from @code{0} to @code{2147483647}. @strong{NB:} Temporarily this function was defined to return a @code{int32_t} value to indicate that the return value always contains diff --git a/libc/manual/memory.texi b/libc/manual/memory.texi index 0c3d39efa..a80f87cbf 100644 --- a/libc/manual/memory.texi +++ b/libc/manual/memory.texi @@ -355,7 +355,7 @@ it is: void * xmalloc (size_t size) @{ - register void *value = malloc (size); + void *value = malloc (size); if (value == 0) fatal ("virtual memory exhausted"); return value; @@ -371,7 +371,7 @@ a newly allocated null-terminated string: char * savestring (const char *ptr, size_t len) @{ - register char *value = (char *) xmalloc (len + 1); + char *value = (char *) xmalloc (len + 1); value[len] = '\0'; return (char *) memcpy (value, ptr, len); @} @@ -502,7 +502,7 @@ as @code{xmalloc} does for @code{malloc}: void * xrealloc (void *ptr, size_t size) @{ - register void *value = realloc (ptr, size); + void *value = realloc (ptr, size); if (value == 0) fatal ("Virtual memory exhausted"); return value; diff --git a/libc/manual/pattern.texi b/libc/manual/pattern.texi index 1966f3f14..afd648092 100644 --- a/libc/manual/pattern.texi +++ b/libc/manual/pattern.texi @@ -36,11 +36,8 @@ returns the nonzero value @code{FNM_NOMATCH}. The arguments The argument @var{flags} is a combination of flag bits that alter the details of matching. See below for a list of the defined flags. -In @theglibc{}, @code{fnmatch} cannot experience an ``error''---it -always returns an answer for whether the match succeeds. However, other -implementations of @code{fnmatch} might sometimes report ``errors''. -They would do so by returning nonzero values that are not equal to -@code{FNM_NOMATCH}. +In @theglibc{}, @code{fnmatch} might sometimes report ``errors'' by +returning nonzero values that are not equal to @code{FNM_NOMATCH}. @end deftypefun These are the available flags for the @var{flags} argument: diff --git a/libc/manual/socket.texi b/libc/manual/socket.texi index 25c35c46b..4c7e623b2 100644 --- a/libc/manual/socket.texi +++ b/libc/manual/socket.texi @@ -1307,23 +1307,25 @@ Here's a small example: struct hostent * gethostname (char *host) @{ - struct hostent hostbuf, *hp; + struct hostent *hostbuf, *hp; size_t hstbuflen; char *tmphstbuf; int res; int herr; + hostbuf = malloc (sizeof (struct hostent)); hstbuflen = 1024; - /* Allocate buffer, remember to free it to avoid memory leakage. */ tmphstbuf = malloc (hstbuflen); - while ((res = gethostbyname_r (host, &hostbuf, tmphstbuf, hstbuflen, + while ((res = gethostbyname_r (host, hostbuf, tmphstbuf, hstbuflen, &hp, &herr)) == ERANGE) @{ /* Enlarge the buffer. */ hstbuflen *= 2; tmphstbuf = realloc (tmphstbuf, hstbuflen); @} + + free (tmphstbuf); /* Check for errors. */ if (res || hp == NULL) return NULL; diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog index a08915382..9d04a7b3f 100644 --- a/libc/nptl/ChangeLog +++ b/libc/nptl/ChangeLog @@ -1,3 +1,12 @@ +2013-10-30 Mike Frysinger + + * sysdeps/pthread/configure.in: Moved to ... + * sysdeps/pthread/configure.ac: ... here. + * sysdeps/x86_64/configure.in: Moved to ... + * sysdeps/x86_64/configure.ac: ... here. + * sysdeps/pthread/configure: Regenerated. + * sysdeps/x86_64/configure: Likewise. + 2013-10-04 Maciej W. Rozycki * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure diff --git a/libc/nptl/sysdeps/pthread/configure b/libc/nptl/sysdeps/pthread/configure index 7962ed6fc..239a039e3 100755 --- a/libc/nptl/sysdeps/pthread/configure +++ b/libc/nptl/sysdeps/pthread/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! if test "x$libc_cv_gcc___thread" != xyes; then as_fn_error $? "compiler support for __thread is required" "$LINENO" 5 diff --git a/libc/nptl/sysdeps/pthread/configure.ac b/libc/nptl/sysdeps/pthread/configure.ac new file mode 100644 index 000000000..413af9679 --- /dev/null +++ b/libc/nptl/sysdeps/pthread/configure.ac @@ -0,0 +1,49 @@ +dnl configure fragment for new libpthread implementation. +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +if test "x$libc_cv_gcc___thread" != xyes; then + AC_MSG_ERROR(compiler support for __thread is required) +fi + +if test "x${libc_cv_visibility_attribute}" != xyes || + test "x${libc_cv_broken_visibility_attribute}" != xno; then + AC_MSG_ERROR(working compiler support for visibility attribute is required) +fi + +if test "x$libc_cv_asm_cfi_directives" != xyes; then + dnl We need this only for some architectures. + case "$base_machine" in + i386 | x86_64 | powerpc | s390) + AC_MSG_ERROR(CFI directive support in assembler is required) ;; + *) ;; + esac +fi + +dnl Iff is available, make sure it is the right one and it +dnl contains struct _Unwind_Exception. +AC_CACHE_CHECK(dnl +for forced unwind support, libc_cv_forced_unwind, [dnl +AC_TRY_COMPILE([#include ], [ +struct _Unwind_Exception exc; +struct _Unwind_Context *context; +_Unwind_GetCFA (context)], +libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)]) +if test $libc_cv_forced_unwind = yes; then + AC_DEFINE(HAVE_FORCED_UNWIND) +dnl Check for C cleanup handling. + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -fexceptions" + AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl + AC_TRY_COMPILE([ +extern void some_function (void); +void cl (void *a) { }], [ + int a __attribute__ ((cleanup (cl))); + some_function ()], +libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)]) + CFLAGS="$old_CFLAGS" + if test $libc_cv_c_cleanup = no; then + AC_MSG_ERROR([the compiler must support C cleanup handling]) + fi +else + AC_MSG_ERROR(forced unwind support is required) +fi diff --git a/libc/nptl/sysdeps/pthread/configure.in b/libc/nptl/sysdeps/pthread/configure.in deleted file mode 100644 index 413af9679..000000000 --- a/libc/nptl/sysdeps/pthread/configure.in +++ /dev/null @@ -1,49 +0,0 @@ -dnl configure fragment for new libpthread implementation. -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -if test "x$libc_cv_gcc___thread" != xyes; then - AC_MSG_ERROR(compiler support for __thread is required) -fi - -if test "x${libc_cv_visibility_attribute}" != xyes || - test "x${libc_cv_broken_visibility_attribute}" != xno; then - AC_MSG_ERROR(working compiler support for visibility attribute is required) -fi - -if test "x$libc_cv_asm_cfi_directives" != xyes; then - dnl We need this only for some architectures. - case "$base_machine" in - i386 | x86_64 | powerpc | s390) - AC_MSG_ERROR(CFI directive support in assembler is required) ;; - *) ;; - esac -fi - -dnl Iff is available, make sure it is the right one and it -dnl contains struct _Unwind_Exception. -AC_CACHE_CHECK(dnl -for forced unwind support, libc_cv_forced_unwind, [dnl -AC_TRY_COMPILE([#include ], [ -struct _Unwind_Exception exc; -struct _Unwind_Context *context; -_Unwind_GetCFA (context)], -libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)]) -if test $libc_cv_forced_unwind = yes; then - AC_DEFINE(HAVE_FORCED_UNWIND) -dnl Check for C cleanup handling. - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror -fexceptions" - AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl - AC_TRY_COMPILE([ -extern void some_function (void); -void cl (void *a) { }], [ - int a __attribute__ ((cleanup (cl))); - some_function ()], -libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)]) - CFLAGS="$old_CFLAGS" - if test $libc_cv_c_cleanup = no; then - AC_MSG_ERROR([the compiler must support C cleanup handling]) - fi -else - AC_MSG_ERROR(forced unwind support is required) -fi diff --git a/libc/nptl/sysdeps/x86_64/configure b/libc/nptl/sysdeps/x86_64/configure index 8e5bcacaf..c9dea5a7a 100644 --- a/libc/nptl/sysdeps/x86_64/configure +++ b/libc/nptl/sysdeps/x86_64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .cfi_personality and .cfi_lsda pseudo-ops" >&5 diff --git a/libc/nptl/sysdeps/x86_64/configure.ac b/libc/nptl/sysdeps/x86_64/configure.ac new file mode 100644 index 000000000..0ba0cc372 --- /dev/null +++ b/libc/nptl/sysdeps/x86_64/configure.ac @@ -0,0 +1,23 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/i386. + +AC_CACHE_CHECK([for .cfi_personality and .cfi_lsda pseudo-ops], + libc_cv_asm_cfi_personality, [dnl + cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_cfi_personality=yes + else + libc_cv_asm_cfi_personality=no + fi + rm -f conftest* +]) +if test x"$libc_cv_asm_cfi_personality" != xyes; then + AC_MSG_ERROR([assembler too old, .cfi_personality support missing]) +fi diff --git a/libc/nptl/sysdeps/x86_64/configure.in b/libc/nptl/sysdeps/x86_64/configure.in deleted file mode 100644 index 0ba0cc372..000000000 --- a/libc/nptl/sysdeps/x86_64/configure.in +++ /dev/null @@ -1,23 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/i386. - -AC_CACHE_CHECK([for .cfi_personality and .cfi_lsda pseudo-ops], - libc_cv_asm_cfi_personality, [dnl - cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_cfi_personality=yes - else - libc_cv_asm_cfi_personality=no - fi - rm -f conftest* -]) -if test x"$libc_cv_asm_cfi_personality" != xyes; then - AC_MSG_ERROR([assembler too old, .cfi_personality support missing]) -fi diff --git a/libc/nscd/Makefile b/libc/nscd/Makefile index 535da43d5..cd70c858b 100644 --- a/libc/nscd/Makefile +++ b/libc/nscd/Makefile @@ -67,7 +67,7 @@ endif nscd-modules += selinux selinux-LIBS := -lselinux $(libaudit) $(libcap) -# The configure.in check for libselinux and its headers did not use +# The configure.ac check for libselinux and its headers did not use # $SYSINCLUDES. The directory specified by --with-headers usually # contains only the basic kernel interface headers, not something like # libselinux. So the simplest thing is to presume that the standard diff --git a/libc/nss/nss_files/files-XXX.c b/libc/nss/nss_files/files-XXX.c index 082d1ea2b..b62208c32 100644 --- a/libc/nss/nss_files/files-XXX.c +++ b/libc/nss/nss_files/files-XXX.c @@ -179,8 +179,51 @@ CONCAT(_nss_files_end,ENTNAME) (void) return NSS_STATUS_SUCCESS; } -/* Parsing the database file into `struct STRUCTURE' data structures. */ +typedef enum +{ + gcr_ok = 0, + gcr_error = -1, + gcr_overflow = -2 +} get_contents_ret; + +/* Hack around the fact that fgets only accepts int sizes. */ +static get_contents_ret +get_contents (char *linebuf, size_t len, FILE *stream) +{ + size_t remaining_len = len; + char *curbuf = linebuf; + + do + { + int curlen = ((remaining_len > (size_t) INT_MAX) ? INT_MAX + : remaining_len); + char *p = fgets_unlocked (curbuf, curlen, stream); + + ((unsigned char *) curbuf)[curlen - 1] = 0xff; + + /* EOF or read error. */ + if (p == NULL) + return gcr_error; + + /* Done reading in the line. */ + if (((unsigned char *) curbuf)[curlen - 1] == 0xff) + return gcr_ok; + + /* Drop the terminating '\0'. */ + remaining_len -= curlen - 1; + curbuf += curlen - 1; + } + /* fgets copies one less than the input length. Our last iteration is of + REMAINING_LEN and once that is done, REMAINING_LEN is decremented by + REMAINING_LEN - 1, leaving the result as 1. */ + while (remaining_len > 1); + + /* This means that the current buffer was not large enough. */ + return gcr_overflow; +} + +/* Parsing the database file into `struct STRUCTURE' data structures. */ static enum nss_status internal_getent (struct STRUCTURE *result, char *buffer, size_t buflen, int *errnop H_ERRNO_PROTO @@ -188,7 +231,7 @@ internal_getent (struct STRUCTURE *result, { char *p; struct parser_data *data = (void *) buffer; - int linebuflen = buffer + buflen - data->linebuffer; + size_t linebuflen = buffer + buflen - data->linebuffer; int parse_result; if (buflen < sizeof *data + 2) @@ -200,17 +243,16 @@ internal_getent (struct STRUCTURE *result, do { - /* Terminate the line so that we can test for overflow. */ - ((unsigned char *) data->linebuffer)[linebuflen - 1] = '\xff'; + get_contents_ret r = get_contents (data->linebuffer, linebuflen, stream); - p = fgets_unlocked (data->linebuffer, linebuflen, stream); - if (p == NULL) + if (r == gcr_error) { /* End of file or read error. */ H_ERRNO_SET (HOST_NOT_FOUND); return NSS_STATUS_NOTFOUND; } - else if (((unsigned char *) data->linebuffer)[linebuflen - 1] != 0xff) + + if (r == gcr_overflow) { /* The line is too long. Give the user the opportunity to enlarge the buffer. */ @@ -219,7 +261,8 @@ internal_getent (struct STRUCTURE *result, return NSS_STATUS_TRYAGAIN; } - /* Skip leading blanks. */ + /* Everything OK. Now skip leading blanks. */ + p = data->linebuffer; while (isspace (*p)) ++p; } diff --git a/libc/ports/ChangeLog b/libc/ports/ChangeLog index a1dd8c342..47294712f 100644 --- a/libc/ports/ChangeLog +++ b/libc/ports/ChangeLog @@ -1,13 +1,7 @@ -2013-10-04 Alan Modra +2013-10-30 Mike Frysinger - * sysdeps/ia64/fpu/printf_fphex.c: Adjust for fpnum change. - -2013-09-02 Mike Frysinger - - * sysdeps/unix/sysv/linux/hppa/syscalls.list (fanotify_mark): New - entry. - * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add GLIBC_2.19 and - fanotify_mark. + * README: Change references to preconfigure.in to + preconfigure.ac. 2013-01-02 Joseph Myers diff --git a/libc/ports/ChangeLog.aarch64 b/libc/ports/ChangeLog.aarch64 index cebf5055d..1fd96eed7 100644 --- a/libc/ports/ChangeLog.aarch64 +++ b/libc/ports/ChangeLog.aarch64 @@ -1,3 +1,9 @@ +2013-10-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/aarch64/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/aarch64/configure.ac: ... here. + * sysdeps/unix/sysv/linux/aarch64/configure: Regenerated. + 2013-09-30 Andrew Pinski * sysdeps/unix/sysv/linux/aarch64/sysdep.h (SYSCALL_ERROR_HANDLER): diff --git a/libc/ports/ChangeLog.alpha b/libc/ports/ChangeLog.alpha index 68d430dc3..07f5dfb47 100644 --- a/libc/ports/ChangeLog.alpha +++ b/libc/ports/ChangeLog.alpha @@ -1,3 +1,12 @@ +2013-10-30 Mike Frysinger + + * sysdeps/alpha/configure.in: Moved to ... + * sysdeps/alpha/configure.ac: ... here. + * sysdeps/unix/sysv/linux/alpha/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/alpha/configure.ac: ... here. + * sysdeps/alpha/configure: Regenerated. + * sysdeps/unix/sysv/linux/alpha/configure: Likewise. + 2013-10-12 Yuri Chornoivan * sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S: Fix typos. diff --git a/libc/ports/ChangeLog.am33 b/libc/ports/ChangeLog.am33 index 79bcc0a10..15b7a1b30 100644 --- a/libc/ports/ChangeLog.am33 +++ b/libc/ports/ChangeLog.am33 @@ -1,3 +1,9 @@ +2013-10-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/am33/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/am33/configure.ac: ... here. + * sysdeps/unix/sysv/linux/am33/configure: Regenerated. + 2013-08-29 Ondřej Bílka * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Fix typos. diff --git a/libc/ports/ChangeLog.arm b/libc/ports/ChangeLog.arm index 6707d2ef3..0dfe5c788 100644 --- a/libc/ports/ChangeLog.arm +++ b/libc/ports/ChangeLog.arm @@ -1,3 +1,23 @@ +2013-10-30 Mike Frysinger + + * sysdeps/arm/configure.in: Moved to ... + * sysdeps/arm/configure.ac: ... here. + * sysdeps/arm/preconfigure.in: Moved to ... + * sysdeps/arm/preconfigure.ac: ... here. Change reference to + configure.in to configure.ac. + * sysdeps/arm/preconfigure: Regenerated. + * sysdeps/arm/armv7/configure.in: Moved to ... + * sysdeps/arm/armv7/configure.ac: ... here. + * sysdeps/unix/sysv/linux/arm/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/arm/configure.ac: ... here. Change + reference to preconfigure.in to preconfigure.ac. + * sysdeps/unix/sysv/linux/arm/configure: Regenerated. + * sysdeps/unix/sysv/linux/arm/nptl/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/arm/nptl/configure.ac: ... here. + * sysdeps/arm/configure: Regenerated. + * sysdeps/sysdeps/arm/armv7/configure: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/configure: Likewise. + 2013-10-04 Will Newton * sysdeps/arm/__longjmp.S (NO_THUMB): Remove define. diff --git a/libc/ports/ChangeLog.hppa b/libc/ports/ChangeLog.hppa index 3e7c16221..b7c82131d 100644 --- a/libc/ports/ChangeLog.hppa +++ b/libc/ports/ChangeLog.hppa @@ -1,7 +1,20 @@ +2013-10-30 Mike Frysinger + + * sysdeps/hppa/configure.in: Moved to ... + * sysdeps/hppa/configure.ac: ... here. + * sysdeps/hppa/configure: Regenerated. + 2013-09-11 Andreas Schwab * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (__O_TMPFILE): Define. +2013-09-02 Mike Frysinger + + * sysdeps/unix/sysv/linux/hppa/syscalls.list (fanotify_mark): New + entry. + * sysdeps/unix/sysv/linux/hppa/Versions (libc): Add GLIBC_2.19 and + fanotify_mark. + 2013-08-30 Ondřej Bílka * sysdeps/unix/sysv/linux/hppa/clone.S: Fix typos. diff --git a/libc/ports/ChangeLog.ia64 b/libc/ports/ChangeLog.ia64 index 272f73a1b..1eb0f389c 100644 --- a/libc/ports/ChangeLog.ia64 +++ b/libc/ports/ChangeLog.ia64 @@ -1,3 +1,16 @@ +2013-10-30 Mike Frysinger + + * sysdeps/ia64/configure.in: Moved to ... + * sysdeps/ia64/configure.ac: ... here. + * sysdeps/unix/sysv/linux/ia64/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/ia64/configure.ac: ... here. + * sysdeps/ia64/configure: Regenerated. + * sysdeps/unix/sysv/linux/ia64/configure: Likewise. + +2013-10-04 Alan Modra + + * sysdeps/ia64/fpu/printf_fphex.c: Adjust for fpnum change. + 2013-09-22 Carlos O'Donell [BZ #15754] diff --git a/libc/ports/ChangeLog.m68k b/libc/ports/ChangeLog.m68k index 5bcd94541..327216f5f 100644 --- a/libc/ports/ChangeLog.m68k +++ b/libc/ports/ChangeLog.m68k @@ -1,3 +1,9 @@ +2013-10-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/m68k/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/m68k/configure.ac: ... here. + * sysdeps/unix/sysv/linux/m68k/configure: Regenerated. + 2013-10-08 Andreas Schwab * sysdeps/m68k/start.S [SHARED]: Use PIC. diff --git a/libc/ports/ChangeLog.microblaze b/libc/ports/ChangeLog.microblaze index 92faa0444..d792effa4 100644 --- a/libc/ports/ChangeLog.microblaze +++ b/libc/ports/ChangeLog.microblaze @@ -1,3 +1,9 @@ +2013-10-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/microblaze/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/microblaze/configure.ac: ... here. + * sysdeps/unix/sysv/linux/microblaze/configure: Regenerated. + 2013-06-15 Siddhesh Poyarekar * sysdeps/unix/sysv/linux/microblaze/nptl/libpthread.abilist: diff --git a/libc/ports/ChangeLog.mips b/libc/ports/ChangeLog.mips index eaa6ade59..3382d838f 100644 --- a/libc/ports/ChangeLog.mips +++ b/libc/ports/ChangeLog.mips @@ -1,3 +1,15 @@ +2013-10-30 Mike Frysinger + + * sysdeps/mips/configure.in: Moved to ... + * sysdeps/mips/configure.ac: ... here. + * sysdeps/unix/sysv/linux/mips/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/mips/configure.ac: ... here. + * sysdeps/unix/sysv/linux/mips/mips64/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/mips/mips64/configure.ac: ... here. + * sysdeps/mips/configure: Regenerated. + * sysdeps/unix/sysv/linux/mips/configure: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/configure: Likewise. + 2013-09-26 Steve Ellcey [BZ #15632] diff --git a/libc/ports/ChangeLog.tile b/libc/ports/ChangeLog.tile index dc2e7e412..a0ec89cac 100644 --- a/libc/ports/ChangeLog.tile +++ b/libc/ports/ChangeLog.tile @@ -1,3 +1,12 @@ +2013-10-30 Mike Frysinger + + * sysdeps/unix/sysv/linux/tile/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/tile/configure.ac: ... here. + * sysdeps/unix/sysv/linux/tile/tilegx/configure.in: Moved to ... + * sysdeps/unix/sysv/linux/tile/tilegx/configure.ac: ... here. + * sysdeps/unix/sysv/linux/tile/configure: Regenerated. + * sysdeps/unix/sysv/linux/tile/tilegx/configure: Likewise. + 2013-09-22 Carlos O'Donell [BZ #15754] diff --git a/libc/ports/README b/libc/ports/README index d16b0f0f5..2c73b1e80 100644 --- a/libc/ports/README +++ b/libc/ports/README @@ -24,7 +24,7 @@ rather than the generic ones here. The real source code for any ports is found in the sysdeps/ subdirectories. These should be exactly what would go into the main libc source tree if you were to incorporate it directly. The only exceptions are the files -sysdeps/*/preconfigure and sysdeps/*/preconfigure.in; these are fragments +sysdeps/*/preconfigure and sysdeps/*/preconfigure.ac; these are fragments used by this add-on's configure fragment. The purpose of these is to set $base_machine et al when the main libc configure's defaults are not right for some machine. Everything else can and should be done from a normal @@ -32,7 +32,7 @@ sysdeps/.../configure fragment that is used only when the configuration selects that sysdeps subdirectory. Each port that requires some special treatment before the sysdeps directory list is calculated, should add a sysdeps/CPU/preconfigure file; this can either be written by hand or -generated by Autoconf from sysdeps/CPU/preconfigure.in, and follow the +generated by Autoconf from sysdeps/CPU/preconfigure.ac, and follow the rules for glibc add-on configure fragments. No preconfigure file should do anything on an unrelated configuration, so that disparate ports can be put into a single add-on without interfering with each other. diff --git a/libc/ports/sysdeps/alpha/configure b/libc/ports/sysdeps/alpha/configure index 9c03229df..0403c63fe 100644 --- a/libc/ports/sysdeps/alpha/configure +++ b/libc/ports/sysdeps/alpha/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/alpha. # With required gcc+binutils, we can always access static and hidden diff --git a/libc/ports/sysdeps/alpha/configure.ac b/libc/ports/sysdeps/alpha/configure.ac new file mode 100644 index 000000000..eadc57afe --- /dev/null +++ b/libc/ports/sysdeps/alpha/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/alpha. + +# With required gcc+binutils, we can always access static and hidden +# symbols in a position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/ports/sysdeps/alpha/configure.in b/libc/ports/sysdeps/alpha/configure.in deleted file mode 100644 index eadc57afe..000000000 --- a/libc/ports/sysdeps/alpha/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/alpha. - -# With required gcc+binutils, we can always access static and hidden -# symbols in a position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/ports/sysdeps/arm/armv7/configure b/libc/ports/sysdeps/arm/armv7/configure index a879ffb5a..46e5d52df 100755 --- a/libc/ports/sysdeps/arm/armv7/configure +++ b/libc/ports/sysdeps/arm/armv7/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/arm/armv7. # We need binutils 2.21 to ensure that NEON alignments are assembled correctly. diff --git a/libc/ports/sysdeps/arm/armv7/configure.ac b/libc/ports/sysdeps/arm/armv7/configure.ac new file mode 100644 index 000000000..01e93ecd3 --- /dev/null +++ b/libc/ports/sysdeps/arm/armv7/configure.ac @@ -0,0 +1,12 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/arm/armv7. + +# We need binutils 2.21 to ensure that NEON alignments are assembled correctly. +libc_cv_arm_as_version_ok=yes +AC_CHECK_PROG_VER(AS, $AS, --version, + [GNU assembler.* \([0-9]*\.[0-9.]*\)], + [2.1[0-9][0-9]*|2.2[1-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], libc_cv_arm_as_version_ok=no) + +if test $libc_cv_arm_as_version_ok != yes; then + AC_MSG_ERROR([as version too old, at least 2.21 is required]) +fi diff --git a/libc/ports/sysdeps/arm/armv7/configure.in b/libc/ports/sysdeps/arm/armv7/configure.in deleted file mode 100644 index 01e93ecd3..000000000 --- a/libc/ports/sysdeps/arm/armv7/configure.in +++ /dev/null @@ -1,12 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/arm/armv7. - -# We need binutils 2.21 to ensure that NEON alignments are assembled correctly. -libc_cv_arm_as_version_ok=yes -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[1-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], libc_cv_arm_as_version_ok=no) - -if test $libc_cv_arm_as_version_ok != yes; then - AC_MSG_ERROR([as version too old, at least 2.21 is required]) -fi diff --git a/libc/ports/sysdeps/arm/bits/predefs.h b/libc/ports/sysdeps/arm/bits/predefs.h deleted file mode 100644 index 0f3c5c9f2..000000000 --- a/libc/ports/sysdeps/arm/bits/predefs.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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 _PREDEFS_H -#define _PREDEFS_H - -#ifndef _STDC_PREDEF_H -# error "Never use directly; include instead." -#endif - -/* We do support the IEC 559 math functionality, real and complex, but only - if a VFP coprocessor is present. If we don't have one, we fall back to - software emulation and the functions won't work properly. So in general, - we don't claim to support this functionality. */ -#if defined (__VFP_FP__) && !defined(__SOFTFP__) -#define __STDC_IEC_559__ 1 -#define __STDC_IEC_559_COMPLEX__ 1 -#endif - -#endif /* predefs.h */ diff --git a/libc/ports/sysdeps/arm/configure b/libc/ports/sysdeps/arm/configure index b84b3f69a..d79ef76ec 100644 --- a/libc/ports/sysdeps/arm/configure +++ b/libc/ports/sysdeps/arm/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/arm. #AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/ports/sysdeps/arm/configure.ac b/libc/ports/sysdeps/arm/configure.ac new file mode 100644 index 000000000..d66500b3f --- /dev/null +++ b/libc/ports/sysdeps/arm/configure.ac @@ -0,0 +1,46 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/arm. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +dnl NOTE: This feature was added by the GCC TLS patches. We should test for +dnl it. Until we do, don't define it. +#AC_DEFINE(PI_STATIC_AND_HIDDEN) + +AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported], + [libc_cv_asm_cfi_directive_sections], + [cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_cfi_directive_sections=yes + else + libc_cv_asm_cfi_directive_sections=no + fi + rm -f conftest*]) +if test $libc_cv_asm_cfi_directive_sections != yes; then + AC_MSG_ERROR([need .cfi_sections in this configuration]) +fi + +# We check to see if the compiler and flags are +# selecting the hard-float ABI and if they are then +# we set libc_cv_arm_pcs_vfp to yes which causes +# HAVE_ARM_PCS_VFP to be defined in config.h and +# in include/libc-symbols.h and thus available to +# shlib-versions to select the appropriate name for +# the dynamic linker via %ifdef. +AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], + [libc_cv_arm_pcs_vfp], + [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP + yes + #endif + ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) +if test $libc_cv_arm_pcs_vfp = yes; then + AC_DEFINE(HAVE_ARM_PCS_VFP) + LIBC_CONFIG_VAR([default-abi], [hard]) +else + LIBC_CONFIG_VAR([default-abi], [soft]) +fi diff --git a/libc/ports/sysdeps/arm/configure.in b/libc/ports/sysdeps/arm/configure.in deleted file mode 100644 index d66500b3f..000000000 --- a/libc/ports/sysdeps/arm/configure.in +++ /dev/null @@ -1,46 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/arm. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -dnl NOTE: This feature was added by the GCC TLS patches. We should test for -dnl it. Until we do, don't define it. -#AC_DEFINE(PI_STATIC_AND_HIDDEN) - -AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported], - [libc_cv_asm_cfi_directive_sections], - [cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_cfi_directive_sections=yes - else - libc_cv_asm_cfi_directive_sections=no - fi - rm -f conftest*]) -if test $libc_cv_asm_cfi_directive_sections != yes; then - AC_MSG_ERROR([need .cfi_sections in this configuration]) -fi - -# We check to see if the compiler and flags are -# selecting the hard-float ABI and if they are then -# we set libc_cv_arm_pcs_vfp to yes which causes -# HAVE_ARM_PCS_VFP to be defined in config.h and -# in include/libc-symbols.h and thus available to -# shlib-versions to select the appropriate name for -# the dynamic linker via %ifdef. -AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], - [libc_cv_arm_pcs_vfp], - [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP - yes - #endif - ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) -if test $libc_cv_arm_pcs_vfp = yes; then - AC_DEFINE(HAVE_ARM_PCS_VFP) - LIBC_CONFIG_VAR([default-abi], [hard]) -else - LIBC_CONFIG_VAR([default-abi], [soft]) -fi diff --git a/libc/ports/sysdeps/arm/preconfigure b/libc/ports/sysdeps/arm/preconfigure index 908cd3430..b3124edae 100644 --- a/libc/ports/sysdeps/arm/preconfigure +++ b/libc/ports/sysdeps/arm/preconfigure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local preconfigure fragment for sysdeps/arm case "$machine" in @@ -8,7 +8,7 @@ arm*) # If the compiler enables unwind tables by default, this causes # problems with undefined symbols in -nostdlib link tests. To # avoid this, add -fno-unwind-tables here and remove it in - # sysdeps/unix/sysv/linux/arm/configure.in after those tests have + # sysdeps/unix/sysv/linux/arm/configure.ac after those tests have # been run. if test "${CFLAGS+set}" != "set"; then CFLAGS="-g -O2" diff --git a/libc/ports/sysdeps/arm/preconfigure.ac b/libc/ports/sysdeps/arm/preconfigure.ac new file mode 100644 index 000000000..39c86218a --- /dev/null +++ b/libc/ports/sysdeps/arm/preconfigure.ac @@ -0,0 +1,58 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local preconfigure fragment for sysdeps/arm + +case "$machine" in +arm*) + case $config_os in + linux-gnueabi*) + # If the compiler enables unwind tables by default, this causes + # problems with undefined symbols in -nostdlib link tests. To + # avoid this, add -fno-unwind-tables here and remove it in + # sysdeps/unix/sysv/linux/arm/configure.ac after those tests have + # been run. + if test "${CFLAGS+set}" != "set"; then + CFLAGS="-g -O2" + fi + CFLAGS="$CFLAGS -fno-unwind-tables" + ;; + linux*) + AC_MSG_ERROR([Old ABI no longer supported]) + ;; + esac + + base_machine=arm + # Lets ask the compiler which ARM family we've got + # Unfortunately it doesn't define any flags for implementations + # that you might pass to -mcpu or -mtune + # Note if you add patterns here you must ensure that + # an appropriate directory exists in sysdeps/arm + archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | + sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'` + + case "x$archcppflag" in + x__ARM_ARCH_[89]*__) + machine=armv7 + AC_MSG_NOTICE([Found compiler is configured for something newer than v7 - using v7]) + ;; + + x__ARM_ARCH_7A__) + machine=armv7 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + + x__ARM_ARCH_6T2__) + machine=armv6t2 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + x__ARM_ARCH_6*__) + machine=armv6 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + *) + machine=arm + AC_MSG_WARN([arm/preconfigure: Did not find ARM architecture type; using default]) + ;; + esac + + machine=arm/$machine +esac diff --git a/libc/ports/sysdeps/arm/preconfigure.in b/libc/ports/sysdeps/arm/preconfigure.in deleted file mode 100644 index f8357955e..000000000 --- a/libc/ports/sysdeps/arm/preconfigure.in +++ /dev/null @@ -1,58 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local preconfigure fragment for sysdeps/arm - -case "$machine" in -arm*) - case $config_os in - linux-gnueabi*) - # If the compiler enables unwind tables by default, this causes - # problems with undefined symbols in -nostdlib link tests. To - # avoid this, add -fno-unwind-tables here and remove it in - # sysdeps/unix/sysv/linux/arm/configure.in after those tests have - # been run. - if test "${CFLAGS+set}" != "set"; then - CFLAGS="-g -O2" - fi - CFLAGS="$CFLAGS -fno-unwind-tables" - ;; - linux*) - AC_MSG_ERROR([Old ABI no longer supported]) - ;; - esac - - base_machine=arm - # Lets ask the compiler which ARM family we've got - # Unfortunately it doesn't define any flags for implementations - # that you might pass to -mcpu or -mtune - # Note if you add patterns here you must ensure that - # an appropriate directory exists in sysdeps/arm - archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | - sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'` - - case "x$archcppflag" in - x__ARM_ARCH_[89]*__) - machine=armv7 - AC_MSG_NOTICE([Found compiler is configured for something newer than v7 - using v7]) - ;; - - x__ARM_ARCH_7A__) - machine=armv7 - AC_MSG_NOTICE([Found compiler is configured for $machine]) - ;; - - x__ARM_ARCH_6T2__) - machine=armv6t2 - AC_MSG_NOTICE([Found compiler is configured for $machine]) - ;; - x__ARM_ARCH_6*__) - machine=armv6 - AC_MSG_NOTICE([Found compiler is configured for $machine]) - ;; - *) - machine=arm - AC_MSG_WARN([arm/preconfigure: Did not find ARM architecture type; using default]) - ;; - esac - - machine=arm/$machine -esac diff --git a/libc/ports/sysdeps/hppa/configure b/libc/ports/sysdeps/hppa/configure index 762b668f4..d78e1bcd6 100644 --- a/libc/ports/sysdeps/hppa/configure +++ b/libc/ports/sysdeps/hppa/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler line separator" >&5 $as_echo_n "checking for assembler line separator... " >&6; } diff --git a/libc/ports/sysdeps/hppa/configure.ac b/libc/ports/sysdeps/hppa/configure.ac new file mode 100644 index 000000000..40f33603e --- /dev/null +++ b/libc/ports/sysdeps/hppa/configure.ac @@ -0,0 +1,66 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl The standard hppa assembler uses `;' to start comments and `!' +dnl as a line separator. +AC_CACHE_CHECK(for assembler line separator, + libc_cv_asm_line_sep, [dnl +cat > conftest.s <&AS_MESSAGE_LOG_FD); then + libc_cv_asm_line_sep='!' +else + if test -z "$enable_hacker_mode"; then + echo "*** You need a newer assembler to compile glibc" + rm -f conftest* + exit 1 + fi + libc_cv_asm_line_sep=';' +fi +rm -f conftest*]) +AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) + +# Check for support of thread-local storage handling in assembler and +# linker. +AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl +cat > conftest.s <<\EOF +; Setup tls data +.section ".tdata","awT",@progbits +foo: .data 32 + .text +; Test general dyanmic relocations +test0: + addil LT'foo-$tls_gdidx$, %r19 + ldo RT'foo-$tls_gdidx$(%r1), %r26 + b __tls_get_addr + nop +; Test local dynamic relocations +test1: + addil LT'foo-$tls_ldidx$, %r19 + b __tls_get_addr + ldo RT'foo-$tls_ldidx$(%r1), %r26 + ldo RR'foo-$tls_dtpoff$(%r1), %r25 + ; More variables can be loaded... +; Test initial exec reloctiosn +test2: + mfctl %cr27, %r26 + addil LT'foo-$tls_ieoff$, %r19 + ldw RT'foo-$tls_ieoff$(%r1), %r25 + add %r26, %r25, %r24 +; Test local exec relocations +test3: + mfctl %cr27, %r26 + addil LR'foo-$tls_leoff$, %r26 + ldo RR'foo-$tls_leoff$(%r1), %r25 +; Done all the TLS tests. +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_hppa_tls=yes +else + libc_cv_hppa_tls=no +fi +rm -f conftest*]) +if test $libc_cv_hppa_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi diff --git a/libc/ports/sysdeps/hppa/configure.in b/libc/ports/sysdeps/hppa/configure.in deleted file mode 100644 index 40f33603e..000000000 --- a/libc/ports/sysdeps/hppa/configure.in +++ /dev/null @@ -1,66 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl The standard hppa assembler uses `;' to start comments and `!' -dnl as a line separator. -AC_CACHE_CHECK(for assembler line separator, - libc_cv_asm_line_sep, [dnl -cat > conftest.s <&AS_MESSAGE_LOG_FD); then - libc_cv_asm_line_sep='!' -else - if test -z "$enable_hacker_mode"; then - echo "*** You need a newer assembler to compile glibc" - rm -f conftest* - exit 1 - fi - libc_cv_asm_line_sep=';' -fi -rm -f conftest*]) -AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) - -# Check for support of thread-local storage handling in assembler and -# linker. -AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl -cat > conftest.s <<\EOF -; Setup tls data -.section ".tdata","awT",@progbits -foo: .data 32 - .text -; Test general dyanmic relocations -test0: - addil LT'foo-$tls_gdidx$, %r19 - ldo RT'foo-$tls_gdidx$(%r1), %r26 - b __tls_get_addr - nop -; Test local dynamic relocations -test1: - addil LT'foo-$tls_ldidx$, %r19 - b __tls_get_addr - ldo RT'foo-$tls_ldidx$(%r1), %r26 - ldo RR'foo-$tls_dtpoff$(%r1), %r25 - ; More variables can be loaded... -; Test initial exec reloctiosn -test2: - mfctl %cr27, %r26 - addil LT'foo-$tls_ieoff$, %r19 - ldw RT'foo-$tls_ieoff$(%r1), %r25 - add %r26, %r25, %r24 -; Test local exec relocations -test3: - mfctl %cr27, %r26 - addil LR'foo-$tls_leoff$, %r26 - ldo RR'foo-$tls_leoff$(%r1), %r25 -; Done all the TLS tests. -EOF -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_hppa_tls=yes -else - libc_cv_hppa_tls=no -fi -rm -f conftest*]) -if test $libc_cv_hppa_tls = no; then - AC_MSG_ERROR([the assembler must support TLS]) -fi diff --git a/libc/ports/sysdeps/ia64/configure b/libc/ports/sysdeps/ia64/configure index e1fe62d8c..66b9bac15 100644 --- a/libc/ports/sysdeps/ia64/configure +++ b/libc/ports/sysdeps/ia64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/ia64. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/libc/ports/sysdeps/ia64/configure.ac b/libc/ports/sysdeps/ia64/configure.ac new file mode 100644 index 000000000..4ad04ff2f --- /dev/null +++ b/libc/ports/sysdeps/ia64/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/ia64. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/ports/sysdeps/ia64/configure.in b/libc/ports/sysdeps/ia64/configure.in deleted file mode 100644 index 4ad04ff2f..000000000 --- a/libc/ports/sysdeps/ia64/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/ia64. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/ports/sysdeps/mips/configure b/libc/ports/sysdeps/mips/configure index de8092c97..f3f5d2e00 100644 --- a/libc/ports/sysdeps/mips/configure +++ b/libc/ports/sysdeps/mips/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/mips. diff --git a/libc/ports/sysdeps/mips/configure.ac b/libc/ports/sysdeps/mips/configure.ac new file mode 100644 index 000000000..bcbdaffd9 --- /dev/null +++ b/libc/ports/sysdeps/mips/configure.ac @@ -0,0 +1,15 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/mips. + +dnl No MIPS GCC supports accessing static and hidden symbols in an +dnl position independent way. +dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) + +AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], + libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl +#ifdef __mips_nan2008 +yes +#endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) +if test x$libc_cv_mips_nan2008 = xyes; then + AC_DEFINE(HAVE_MIPS_NAN2008) +fi diff --git a/libc/ports/sysdeps/mips/configure.in b/libc/ports/sysdeps/mips/configure.in deleted file mode 100644 index bcbdaffd9..000000000 --- a/libc/ports/sysdeps/mips/configure.in +++ /dev/null @@ -1,15 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/mips. - -dnl No MIPS GCC supports accessing static and hidden symbols in an -dnl position independent way. -dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) - -AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl -#ifdef __mips_nan2008 -yes -#endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) -if test x$libc_cv_mips_nan2008 = xyes; then - AC_DEFINE(HAVE_MIPS_NAN2008) -fi diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure b/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure index 6b2608acd..20593c7bb 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/aarch64. arch_minimum_kernel=3.7.0 diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.ac new file mode 100644 index 000000000..b09070213 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.ac @@ -0,0 +1,17 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/aarch64. + +arch_minimum_kernel=3.7.0 + +test -n "$libc_cv_slibdir" || +case "$prefix" in + /usr | /usr/) + libc_cv_slibdir="/lib64" + libc_cv_rtlddir="/lib" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; +esac diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in deleted file mode 100644 index b09070213..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/configure.in +++ /dev/null @@ -1,17 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/aarch64. - -arch_minimum_kernel=3.7.0 - -test -n "$libc_cv_slibdir" || -case "$prefix" in - /usr | /usr/) - libc_cv_slibdir="/lib64" - libc_cv_rtlddir="/lib" - if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; - # Locale data can be shared between 32bit and 64bit libraries - libc_cv_localedir='${exec_prefix}/lib/locale' - fi - ;; -esac diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/configure b/libc/ports/sysdeps/unix/sysv/linux/alpha/configure index b5df524c1..9afb5874c 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/alpha # We did historically export the unwinder from glibc. diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.ac new file mode 100644 index 000000000..a8b699665 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.ac @@ -0,0 +1,5 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/alpha + +# We did historically export the unwinder from glibc. +libc_cv_gcc_unwind_find_fde=yes diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.in b/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.in deleted file mode 100644 index a8b699665..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/configure.in +++ /dev/null @@ -1,5 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/alpha - -# We did historically export the unwinder from glibc. -libc_cv_gcc_unwind_find_fde=yes diff --git a/libc/ports/sysdeps/unix/sysv/linux/am33/configure b/libc/ports/sysdeps/unix/sysv/linux/am33/configure index 870c6a792..c916a321c 100755 --- a/libc/ports/sysdeps/unix/sysv/linux/am33/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/am33/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for am33/sysdeps/unix/sysv/linux/am33 arch_minimum_kernel=2.6.25 diff --git a/libc/ports/sysdeps/unix/sysv/linux/am33/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/am33/configure.ac new file mode 100644 index 000000000..43e33f74c --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/am33/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33 + +arch_minimum_kernel=2.6.25 diff --git a/libc/ports/sysdeps/unix/sysv/linux/am33/configure.in b/libc/ports/sysdeps/unix/sysv/linux/am33/configure.in deleted file mode 100644 index 43e33f74c..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/am33/configure.in +++ /dev/null @@ -1,4 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33 - -arch_minimum_kernel=2.6.25 diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/configure b/libc/ports/sysdeps/unix/sysv/linux/arm/configure index f66b15828..71eb19594 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/configure @@ -1,6 +1,6 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/arm. libc_cv_gcc_unwind_find_fde=no -# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in. +# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac. CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/arm/configure.ac new file mode 100644 index 000000000..8e4e20d2b --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/arm. + +libc_cv_gcc_unwind_find_fde=no +# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac. +CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in b/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in deleted file mode 100644 index 8fffe9405..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/arm. - -libc_cv_gcc_unwind_find_fde=no -# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in. -CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure index 518269913..a8c34fa3e 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! libc_cv_gcc_exceptions=yes exceptions=-fexceptions diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.ac new file mode 100644 index 000000000..22f6f4b8f --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.ac @@ -0,0 +1,8 @@ +dnl configure fragment for NPTL and ARM/Linux EABI. +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl The normal configure check for gcc -fexecptions fails because it can't +dnl find __aeabi_unwind_cpp_pr0. Work around this here; our GCC definitely +dnl has -fexceptions. +libc_cv_gcc_exceptions=yes +exceptions=-fexceptions diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in deleted file mode 100644 index 22f6f4b8f..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/configure.in +++ /dev/null @@ -1,8 +0,0 @@ -dnl configure fragment for NPTL and ARM/Linux EABI. -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl The normal configure check for gcc -fexecptions fails because it can't -dnl find __aeabi_unwind_cpp_pr0. Work around this here; our GCC definitely -dnl has -fexceptions. -libc_cv_gcc_exceptions=yes -exceptions=-fexceptions diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/configure b/libc/ports/sysdeps/unix/sysv/linux/ia64/configure index 71323718a..1d4e5d18d 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/ia64/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/ia64 ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.ac new file mode 100644 index 000000000..4fb564721 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/ia64 + +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.in b/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.in deleted file mode 100644 index 4fb564721..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/ia64/configure.in +++ /dev/null @@ -1,4 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/ia64 - -ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/configure b/libc/ports/sysdeps/unix/sysv/linux/m68k/configure index a704dacee..8e955387b 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! case $machine in m68k/coldfire) ;; diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.ac new file mode 100644 index 000000000..c21ca9dd4 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.ac @@ -0,0 +1,10 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +case $machine in +m68k/coldfire) + ;; +*) + libc_cv_gcc_unwind_find_fde=yes + ;; +esac +ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.in b/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.in deleted file mode 100644 index c21ca9dd4..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/configure.in +++ /dev/null @@ -1,10 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -case $machine in -m68k/coldfire) - ;; -*) - libc_cv_gcc_unwind_find_fde=yes - ;; -esac -ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure b/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure index fa7da7393..086638856 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/microblaze. arch_minimum_kernel=2.6.30 diff --git a/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.ac new file mode 100644 index 000000000..f283d3770 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/microblaze. + +arch_minimum_kernel=2.6.30 diff --git a/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.in b/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.in deleted file mode 100644 index f283d3770..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/microblaze/configure.in +++ /dev/null @@ -1,4 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/microblaze. - -arch_minimum_kernel=2.6.30 diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/configure b/libc/ports/sysdeps/unix/sysv/linux/mips/configure index 088210ff9..e8b0d7b15 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/mips. diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/mips/configure.ac new file mode 100644 index 000000000..7087a14a5 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/configure.ac @@ -0,0 +1,99 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/mips. + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #if (_MIPS_SIM != _ABIO32) + #error Not O32 ABI + #endif])], + [libc_mips_abi=o32], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #if (_MIPS_SIM != _ABIN32) + #error Not N32 ABI + #endif])], + [libc_mips_abi=n32], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #if (_MIPS_SIM != _ABI64) + #error Not 64 ABI + #endif])], + [libc_mips_abi=n64], + [])])]) + +if test -z "$libc_mips_abi"; then + AC_MSG_ERROR([could not determine what ABI the compiler is using]) +fi + +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #if !defined(__mips_soft_float) + #error Not soft ABI + #endif])], + [libc_mips_float=soft], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ + #if !defined(__mips_hard_float) + #error Not hard ABI + #endif])], + [libc_mips_float=hard], + [])]) + +if test -z "$libc_mips_float"; then + AC_MSG_ERROR([could not determine if compiler is using hard or soft floating point ABI]) +fi + +AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], + libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl +#ifdef __mips_nan2008 +yes +#endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) + +libc_mips_nan= +if test x"$libc_cv_mips_nan2008" = xyes; then + libc_mips_nan=_2008 +fi + +LIBC_CONFIG_VAR([default-abi], + [${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}]) + +case "$prefix" in +/usr | /usr/) + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, + # and libc_cv_localedir. + test -n "$libc_cv_slibdir" || \ + case $machine in + mips/mips64/n64/* ) + libc_cv_slibdir="/lib64" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + mips/mips64/n32/* ) + libc_cv_slibdir="/lib32" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib32'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + *) + libc_cv_slibdir="/lib" + ;; + esac +esac + +libc_cv_gcc_unwind_find_fde=yes + +if test -z "$arch_minimum_kernel"; then + if test x$libc_cv_mips_nan2008 = xyes; then + # FIXME: Adjust this setting to the actual first upstream kernel + # version to support the 2008 NaN encoding and then remove this + # comment. + arch_minimum_kernel=10.0.0 + fi +fi diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/configure.in b/libc/ports/sysdeps/unix/sysv/linux/mips/configure.in deleted file mode 100644 index 7087a14a5..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/configure.in +++ /dev/null @@ -1,99 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/mips. - -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #if (_MIPS_SIM != _ABIO32) - #error Not O32 ABI - #endif])], - [libc_mips_abi=o32], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #if (_MIPS_SIM != _ABIN32) - #error Not N32 ABI - #endif])], - [libc_mips_abi=n32], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #if (_MIPS_SIM != _ABI64) - #error Not 64 ABI - #endif])], - [libc_mips_abi=n64], - [])])]) - -if test -z "$libc_mips_abi"; then - AC_MSG_ERROR([could not determine what ABI the compiler is using]) -fi - -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #if !defined(__mips_soft_float) - #error Not soft ABI - #endif])], - [libc_mips_float=soft], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #if !defined(__mips_hard_float) - #error Not hard ABI - #endif])], - [libc_mips_float=hard], - [])]) - -if test -z "$libc_mips_float"; then - AC_MSG_ERROR([could not determine if compiler is using hard or soft floating point ABI]) -fi - -AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl -#ifdef __mips_nan2008 -yes -#endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) - -libc_mips_nan= -if test x"$libc_cv_mips_nan2008" = xyes; then - libc_mips_nan=_2008 -fi - -LIBC_CONFIG_VAR([default-abi], - [${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}]) - -case "$prefix" in -/usr | /usr/) - # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. - # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, - # and libc_cv_localedir. - test -n "$libc_cv_slibdir" || \ - case $machine in - mips/mips64/n64/* ) - libc_cv_slibdir="/lib64" - if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; - # Locale data can be shared between 32bit and 64bit libraries - libc_cv_localedir='${exec_prefix}/lib/locale' - fi - ;; - mips/mips64/n32/* ) - libc_cv_slibdir="/lib32" - if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib32'; - # Locale data can be shared between 32bit and 64bit libraries - libc_cv_localedir='${exec_prefix}/lib/locale' - fi - ;; - *) - libc_cv_slibdir="/lib" - ;; - esac -esac - -libc_cv_gcc_unwind_find_fde=yes - -if test -z "$arch_minimum_kernel"; then - if test x$libc_cv_mips_nan2008 = xyes; then - # FIXME: Adjust this setting to the actual first upstream kernel - # version to support the 2008 NaN encoding and then remove this - # comment. - arch_minimum_kernel=10.0.0 - fi -fi diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure index f86f3276a..26bed649d 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.ac new file mode 100644 index 000000000..c137ec555 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.ac @@ -0,0 +1,5 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. + +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in deleted file mode 100644 index c137ec555..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in +++ /dev/null @@ -1,5 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64. - -ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/configure b/libc/ports/sysdeps/unix/sysv/linux/tile/configure index 88b578848..02f6c8c25 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/tile. arch_minimum_kernel=2.6.32 diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/tile/configure.ac new file mode 100644 index 000000000..b983e28be --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/tile. + +arch_minimum_kernel=2.6.32 diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/configure.in b/libc/ports/sysdeps/unix/sysv/linux/tile/configure.in deleted file mode 100644 index b983e28be..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/configure.in +++ /dev/null @@ -1,4 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/tile. - -arch_minimum_kernel=2.6.32 diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure index bfa30f6dc..0a6a63ff9 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/tile/tilegx ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.ac b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.ac new file mode 100644 index 000000000..87d86bd4c --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/tile/tilegx + +ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.in b/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.in deleted file mode 100644 index 87d86bd4c..000000000 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/tilegx/configure.in +++ /dev/null @@ -1,4 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/tile/tilegx - -ldd_rewrite_script=$dir/ldd-rewrite.sed diff --git a/libc/posix/glob.c b/libc/posix/glob.c index 02c8477c6..211c5b980 100644 --- a/libc/posix/glob.c +++ b/libc/posix/glob.c @@ -279,6 +279,11 @@ glob (pattern, flags, errfunc, pglob) return -1; } + /* POSIX requires all slashes to be matched. This means that with + a trailing slash we must match only directories. */ + if (pattern[0] && pattern[strlen (pattern) - 1] == '/') + flags |= GLOB_ONLYDIR; + if (!(flags & GLOB_DOOFFS)) /* Have to do this so `globfree' knows where to start freeing. It also makes all the code that uses gl_offs simpler. */ diff --git a/libc/posix/tst-gnuglob.c b/libc/posix/tst-gnuglob.c index 0c967d0a7..6e42724d0 100644 --- a/libc/posix/tst-gnuglob.c +++ b/libc/posix/tst-gnuglob.c @@ -168,7 +168,7 @@ my_opendir (const char *s) my_DIR *dir; - if (idx == -1) + if (idx == -1 || filesystem[idx].type != DT_DIR) { PRINTF ("my_opendir(\"%s\") == NULL\n", s); return NULL; @@ -358,7 +358,7 @@ test_result (const char *fmt, int flags, glob_t *gl, const char *str[]) break; if (str[inner] == NULL) - errstr = ok ? "" : " *** WRONG"; + errstr = ok ? "" : " *** WRONG"; else errstr = ok ? "" : " * wrong position"; @@ -483,6 +483,12 @@ main (void) "/file1lev1", "/file2lev1"); + test ("*/*/", 0 , 0, + "dir1lev1/dir1lev2/", + "dir1lev1/dir2lev2/", + "dir1lev1/dir3lev2/", + "dir2lev1/dir1lev2/"); + test ("", 0, GLOB_NOMATCH, NULL); test ("", GLOB_NOCHECK, 0, ""); diff --git a/libc/rt/tst-shm.c b/libc/rt/tst-shm.c index f9d5ab009..cb4b1ee76 100644 --- a/libc/rt/tst-shm.c +++ b/libc/rt/tst-shm.c @@ -134,6 +134,14 @@ do_test (void) int status2; struct stat64 st; + fd = shm_open ("/../escaped", O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600); + if (fd != -1) + { + perror ("read file outside of SHMDIR directory"); + return 1; + } + + /* Create the shared memory object. */ fd = shm_open ("/shm-test", O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600); if (fd == -1) diff --git a/libc/stdio-common/Makefile b/libc/stdio-common/Makefile index 83e8fb43f..128747e08 100644 --- a/libc/stdio-common/Makefile +++ b/libc/stdio-common/Makefile @@ -132,6 +132,7 @@ CFLAGS-tst-sprintf.c = -Wno-format tst-sprintf-ENV = LOCPATH=$(common-objpfx)localedata tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata +tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata scanf13-ENV = LOCPATH=$(common-objpfx)localedata bug14-ENV = LOCPATH=$(common-objpfx)localedata diff --git a/libc/stdio-common/tst-sscanf.c b/libc/stdio-common/tst-sscanf.c index 1edb22719..3c34f58a6 100644 --- a/libc/stdio-common/tst-sscanf.c +++ b/libc/stdio-common/tst-sscanf.c @@ -109,6 +109,19 @@ struct test double_tests[] = { L("-inf"), L("%g"), 1 } }; +struct test2 +{ + const CHAR *str; + const CHAR *fmt; + int retval; + char residual; +} double_tests2[] = +{ + { L("0e+0"), L("%g%c"), 1, 0 }, + { L("0xe+0"), L("%g%c"), 2, '+' }, + { L("0x.e+0"), L("%g%c"), 2, '+' }, +}; + int main (void) { @@ -196,5 +209,26 @@ main (void) } } + for (i = 0; i < sizeof (double_tests2) / sizeof (double_tests2[0]); ++i) + { + double dummy; + int ret; + char c = 0; + + if ((ret = SSCANF (double_tests2[i].str, double_tests2[i].fmt, + &dummy, &c)) != double_tests2[i].retval) + { + printf ("double_tests2[%d] returned %d != %d\n", + i, ret, double_tests2[i].retval); + result = 1; + } + else if (ret == 2 && c != double_tests2[i].residual) + { + printf ("double_tests2[%d] stopped at '%c' != '%c'\n", + i, c, double_tests2[i].residual); + result = 1; + } + } + return result; } diff --git a/libc/stdio-common/vfscanf.c b/libc/stdio-common/vfscanf.c index e0f976db7..abaae2dba 100644 --- a/libc/stdio-common/vfscanf.c +++ b/libc/stdio-common/vfscanf.c @@ -1997,6 +1997,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, if (width > 0) --width; } + else + got_digit = 1; } while (1) diff --git a/libc/stdlib/div.c b/libc/stdlib/div.c index 44a30a7ea..0f5569a5d 100644 --- a/libc/stdlib/div.c +++ b/libc/stdlib/div.c @@ -59,27 +59,5 @@ div (numer, denom) result.quot = numer / denom; result.rem = numer % denom; - /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where - NUMER / DENOM is to be computed in infinite precision. In - other words, we should always truncate the quotient towards - zero, never -infinity. Machine division and remainer may - work either way when one or both of NUMER or DENOM is - negative. If only one is negative and QUOT has been - truncated towards -infinity, REM will have the same sign as - DENOM and the opposite sign of NUMER; if both are negative - and QUOT has been truncated towards -infinity, REM will be - positive (will have the opposite sign of NUMER). These are - considered `wrong'. If both are NUM and DENOM are positive, - RESULT will always be positive. This all boils down to: if - NUMER >= 0, but REM < 0, we got the wrong answer. In that - case, to get the right answer, add 1 to QUOT and subtract - DENOM from REM. */ - - if (numer >= 0 && result.rem < 0) - { - ++result.quot; - result.rem -= denom; - } - return result; } diff --git a/libc/stdlib/ldiv.c b/libc/stdlib/ldiv.c index 76d474fc6..a03057fc0 100644 --- a/libc/stdlib/ldiv.c +++ b/libc/stdlib/ldiv.c @@ -27,27 +27,5 @@ ldiv (long int numer, long int denom) result.quot = numer / denom; result.rem = numer % denom; - /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where - NUMER / DENOM is to be computed in infinite precision. In - other words, we should always truncate the quotient towards - zero, never -infinity. Machine division and remainer may - work either way when one or both of NUMER or DENOM is - negative. If only one is negative and QUOT has been - truncated towards -infinity, REM will have the same sign as - DENOM and the opposite sign of NUMER; if both are negative - and QUOT has been truncated towards -infinity, REM will be - positive (will have the opposite sign of NUMER). These are - considered `wrong'. If both are NUM and DENOM are positive, - RESULT will always be positive. This all boils down to: if - NUMER >= 0, but REM < 0, we got the wrong answer. In that - case, to get the right answer, add 1 to QUOT and subtract - DENOM from REM. */ - - if (numer >= 0 && result.rem < 0) - { - ++result.quot; - result.rem -= denom; - } - return result; } diff --git a/libc/stdlib/lldiv.c b/libc/stdlib/lldiv.c index d1202bf9f..0da1a6afc 100644 --- a/libc/stdlib/lldiv.c +++ b/libc/stdlib/lldiv.c @@ -30,27 +30,5 @@ lldiv (numer, denom) result.quot = numer / denom; result.rem = numer % denom; - /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where - NUMER / DENOM is to be computed in infinite precision. In - other words, we should always truncate the quotient towards - zero, never -infinity. Machine division and remainer may - work either way when one or both of NUMER or DENOM is - negative. If only one is negative and QUOT has been - truncated towards -infinity, REM will have the same sign as - DENOM and the opposite sign of NUMER; if both are negative - and QUOT has been truncated towards -infinity, REM will be - positive (will have the opposite sign of NUMER). These are - considered `wrong'. If both are NUM and DENOM are positive, - RESULT will always be positive. This all boils down to: if - NUMER >= 0, but REM < 0, we got the wrong answer. In that - case, to get the right answer, add 1 to QUOT and subtract - DENOM from REM. */ - - if (numer >= 0 && result.rem < 0) - { - ++result.quot; - result.rem -= denom; - } - return result; } diff --git a/libc/sunrpc/rpc_main.c b/libc/sunrpc/rpc_main.c index 0223c9a9f..0a51e2cfa 100644 --- a/libc/sunrpc/rpc_main.c +++ b/libc/sunrpc/rpc_main.c @@ -1442,6 +1442,9 @@ options_usage (FILE *stream, int status) f_print (stream, _("-t\t\tgenerate RPC dispatch table\n")); f_print (stream, _("-T\t\tgenerate code to support RPC dispatch tables\n")); f_print (stream, _("-Y path\t\tdirectory name to find C preprocessor (cpp)\n")); + f_print (stream, _("-5\t\tSysVr4 compatibility mode\n")); + f_print (stream, _("--help\t\tgive this help list\n")); + f_print (stream, _("--version\tprint program version\n")); f_print (stream, _("\n\ For bug reporting instructions, please see:\n\ diff --git a/libc/sysdeps/gnu/configure b/libc/sysdeps/gnu/configure index 70aaa9019..e7f0e4395 100644 --- a/libc/sysdeps/gnu/configure +++ b/libc/sysdeps/gnu/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/gnu. diff --git a/libc/sysdeps/gnu/configure.ac b/libc/sysdeps/gnu/configure.ac new file mode 100644 index 000000000..ce251df0c --- /dev/null +++ b/libc/sysdeps/gnu/configure.ac @@ -0,0 +1,47 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +# Local configure fragment for sysdeps/gnu. + +# The Filesystem Hierarchy Standard prescribes where to place "essential" +# files. I.e., when the installation prefix is "/usr" we have to place +# shared library objects and the configuration files on the root partition +# in /lib and /etc. +case "$prefix" in +/usr | /usr/) + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # Allow earlier configure scripts to handle libc_cv_slibdir, + # libc_cv_rtlddir, libdir, and libc_cv_localedir. + test -n "$libc_cv_slibdir" || \ + case $machine in + sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) + libc_cv_slibdir=/lib64 + case $machine in + s390/s390-64) + libc_cv_rtlddir=/lib + ;; + esac + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + *) + libc_cv_slibdir=/lib + ;; + esac + # Allow the user to override the path with --sysconfdir. + if test "$sysconfdir" = '${prefix}/etc'; then + libc_cv_sysconfdir=/etc + else + libc_cv_sysconfdir=$sysconfdir + fi + # Allow the user to override the path with --localstatedir. + if test "$localstatedir" = '${prefix}/var'; then + libc_cv_localstatedir=/var + else + libc_cv_localstatedir=$localstatedir + fi + libc_cv_rootsbindir=/sbin + ;; +esac diff --git a/libc/sysdeps/gnu/configure.in b/libc/sysdeps/gnu/configure.in deleted file mode 100644 index ce251df0c..000000000 --- a/libc/sysdeps/gnu/configure.in +++ /dev/null @@ -1,47 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -# Local configure fragment for sysdeps/gnu. - -# The Filesystem Hierarchy Standard prescribes where to place "essential" -# files. I.e., when the installation prefix is "/usr" we have to place -# shared library objects and the configuration files on the root partition -# in /lib and /etc. -case "$prefix" in -/usr | /usr/) - # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. - # Allow earlier configure scripts to handle libc_cv_slibdir, - # libc_cv_rtlddir, libdir, and libc_cv_localedir. - test -n "$libc_cv_slibdir" || \ - case $machine in - sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) - libc_cv_slibdir=/lib64 - case $machine in - s390/s390-64) - libc_cv_rtlddir=/lib - ;; - esac - if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; - # Locale data can be shared between 32bit and 64bit libraries - libc_cv_localedir='${exec_prefix}/lib/locale' - fi - ;; - *) - libc_cv_slibdir=/lib - ;; - esac - # Allow the user to override the path with --sysconfdir. - if test "$sysconfdir" = '${prefix}/etc'; then - libc_cv_sysconfdir=/etc - else - libc_cv_sysconfdir=$sysconfdir - fi - # Allow the user to override the path with --localstatedir. - if test "$localstatedir" = '${prefix}/var'; then - libc_cv_localstatedir=/var - else - libc_cv_localstatedir=$localstatedir - fi - libc_cv_rootsbindir=/sbin - ;; -esac diff --git a/libc/sysdeps/i386/configure b/libc/sysdeps/i386/configure index 53b6a619d..5dcc15990 100755 --- a/libc/sysdeps/i386/configure +++ b/libc/sysdeps/i386/configure @@ -29,7 +29,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. # We no longer support i386 since it lacks the atomic instructions diff --git a/libc/sysdeps/i386/configure.ac b/libc/sysdeps/i386/configure.ac new file mode 100644 index 000000000..96ab7b0f5 --- /dev/null +++ b/libc/sysdeps/i386/configure.ac @@ -0,0 +1,93 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/i386. + +# We no longer support i386 since it lacks the atomic instructions +# required to implement NPTL threading. +if test "$config_machine" = i386; then + AC_MSG_ERROR([ +*** ERROR: Support for i386 is deprecated. +*** Please use host i786, i686, i585 or i486. +*** For example: /src/glibc/configure --host=i686-pc-linux-gnu ..."]) +fi + +# The GNU C Library can't be built for i386. There are several reasons for +# this restriction. The primary reason is that i386 lacks the atomic +# operations required to support the current NPTL implementation. While it is +# possible that such atomic operations could be emulated in the kernel to date +# no such work has been done to enable this. Even with NPTL disabled you still +# have no atomic.h implementation. Given the declining use of i386 we disable +# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly +# check for i386, instead we make sure the compiler has support for inlining +# the builtin __sync_val_compare_and_swap. If it does then we should have no +# problem building for i386. +LIBC_COMPILER_BUILTIN_INLINED( + [__sync_val_compare_and_swap], + [int a, b, c; __sync_val_compare_and_swap (&a, b, c);], + [-O0], + [libc_cv_unsupported_i386=no], + [AC_MSG_ERROR([ +*** Building with -march=i386/-mcpu=i386 is not supported. +*** Please use host i786, i686, i586, or i486. +*** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ...])]) + +AC_CHECK_HEADER([cpuid.h], , + [AC_MSG_ERROR([gcc must provide the header])], + [/* No default includes. */]) + +dnl Check if -msse4 works. +AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl +LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) +]) +if test $libc_cv_cc_sse4 = yes; then + AC_DEFINE(HAVE_SSE4_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) + +dnl Check if -Wa,-mtune=i686 works. +AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl +LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], + [libc_cv_as_i686=yes], + [libc_cv_as_i686=no]) +]) +LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) + +dnl Check if -mavx works. +AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl +LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) +]) +if test $libc_cv_cc_avx = yes; then + AC_DEFINE(HAVE_AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) + +dnl Check if -msse2avx works. +AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl +LIBC_TRY_CC_OPTION([-msse2avx], + [libc_cv_cc_sse2avx=yes], + [libc_cv_cc_sse2avx=no]) +]) +if test $libc_cv_cc_sse2avx = yes; then + AC_DEFINE(HAVE_SSE2AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) + +dnl Check if -mfma4 works. +AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl +LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) +]) +if test $libc_cv_cc_fma4 = yes; then + AC_DEFINE(HAVE_FMA4_SUPPORT) +fi +LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) + +dnl Check if -mno-vzeroupper works. +AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl +LIBC_TRY_CC_OPTION([-mno-vzeroupper], + [libc_cv_cc_novzeroupper=yes], + [libc_cv_cc_novzeroupper=no]) +]) +LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/i386/configure.in b/libc/sysdeps/i386/configure.in deleted file mode 100644 index 96ab7b0f5..000000000 --- a/libc/sysdeps/i386/configure.in +++ /dev/null @@ -1,93 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/i386. - -# We no longer support i386 since it lacks the atomic instructions -# required to implement NPTL threading. -if test "$config_machine" = i386; then - AC_MSG_ERROR([ -*** ERROR: Support for i386 is deprecated. -*** Please use host i786, i686, i585 or i486. -*** For example: /src/glibc/configure --host=i686-pc-linux-gnu ..."]) -fi - -# The GNU C Library can't be built for i386. There are several reasons for -# this restriction. The primary reason is that i386 lacks the atomic -# operations required to support the current NPTL implementation. While it is -# possible that such atomic operations could be emulated in the kernel to date -# no such work has been done to enable this. Even with NPTL disabled you still -# have no atomic.h implementation. Given the declining use of i386 we disable -# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly -# check for i386, instead we make sure the compiler has support for inlining -# the builtin __sync_val_compare_and_swap. If it does then we should have no -# problem building for i386. -LIBC_COMPILER_BUILTIN_INLINED( - [__sync_val_compare_and_swap], - [int a, b, c; __sync_val_compare_and_swap (&a, b, c);], - [-O0], - [libc_cv_unsupported_i386=no], - [AC_MSG_ERROR([ -*** Building with -march=i386/-mcpu=i386 is not supported. -*** Please use host i786, i686, i586, or i486. -*** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ...])]) - -AC_CHECK_HEADER([cpuid.h], , - [AC_MSG_ERROR([gcc must provide the header])], - [/* No default includes. */]) - -dnl Check if -msse4 works. -AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl -LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) -]) -if test $libc_cv_cc_sse4 = yes; then - AC_DEFINE(HAVE_SSE4_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) - -dnl Check if -Wa,-mtune=i686 works. -AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl -LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], - [libc_cv_as_i686=yes], - [libc_cv_as_i686=no]) -]) -LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) - -dnl Check if -mavx works. -AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl -LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) -]) -if test $libc_cv_cc_avx = yes; then - AC_DEFINE(HAVE_AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) - -dnl Check if -msse2avx works. -AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl -LIBC_TRY_CC_OPTION([-msse2avx], - [libc_cv_cc_sse2avx=yes], - [libc_cv_cc_sse2avx=no]) -]) -if test $libc_cv_cc_sse2avx = yes; then - AC_DEFINE(HAVE_SSE2AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) - -dnl Check if -mfma4 works. -AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl -LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) -]) -if test $libc_cv_cc_fma4 = yes; then - AC_DEFINE(HAVE_FMA4_SUPPORT) -fi -LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) - -dnl Check if -mno-vzeroupper works. -AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl -LIBC_TRY_CC_OPTION([-mno-vzeroupper], - [libc_cv_cc_novzeroupper=yes], - [libc_cv_cc_novzeroupper=no]) -]) -LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/ieee754/dbl-64/sincos32.c b/libc/sysdeps/ieee754/dbl-64/sincos32.c index f253b8ce8..49aa14895 100644 --- a/libc/sysdeps/ieee754/dbl-64/sincos32.c +++ b/libc/sysdeps/ieee754/dbl-64/sincos32.c @@ -147,10 +147,9 @@ __sin32 (double x, double res, double res1) __dbl_mp (x, &c, p); /* c = x */ __sub (&b, &c, &a, p); /* if a > 0 return min (res, res1), otherwise return max (res, res1). */ - if (a.d[0] > 0) - return (res < res1) ? res : res1; - else - return (res > res1) ? res : res1; + if ((a.d[0] > 0 && res >= res1) || (a.d[0] <= 0 && res <= res1)) + res = res1; + return res; } /* Receive double x and two double results of cos(x) and return result which is @@ -181,10 +180,9 @@ __cos32 (double x, double res, double res1) __dbl_mp (x, &c, p); /* c = x */ __sub (&b, &c, &a, p); /* if a > 0 return max (res, res1), otherwise return min (res, res1). */ - if (a.d[0] > 0) - return (res > res1) ? res : res1; - else - return (res < res1) ? res : res1; + if ((a.d[0] > 0 && res <= res1) || (a.d[0] <= 0 && res >= res1)) + res = res1; + return res; } /* Compute sin() of double-length number (X + DX) as Multi Precision number and diff --git a/libc/sysdeps/ieee754/ldbl-opt/configure b/libc/sysdeps/ieee754/ldbl-opt/configure index 6e69038b9..ad9d77b88 100755 --- a/libc/sysdeps/ieee754/ldbl-opt/configure +++ b/libc/sysdeps/ieee754/ldbl-opt/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/ieee754/ldbl-opt/. diff --git a/libc/sysdeps/ieee754/ldbl-opt/configure.ac b/libc/sysdeps/ieee754/ldbl-opt/configure.ac new file mode 100644 index 000000000..a77fadd1c --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/configure.ac @@ -0,0 +1,19 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/ieee754/ldbl-opt/. + +AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, + libc_cv_mlong_double_128, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -mlong-double-128" +AC_TRY_COMPILE(, [ +#ifndef __LONG_DOUBLE_128__ +# error "compiler did not predefine __LONG_DOUBLE_128__ as expected" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mlong_double_128=yes, + libc_cv_mlong_double_128=no) +CFLAGS="$save_CFLAGS"]) +if test "$libc_cv_mlong_double_128" = no; then + AC_MSG_ERROR([this configuration requires -mlong-double-128 support]) +fi diff --git a/libc/sysdeps/ieee754/ldbl-opt/configure.in b/libc/sysdeps/ieee754/ldbl-opt/configure.in deleted file mode 100644 index a77fadd1c..000000000 --- a/libc/sysdeps/ieee754/ldbl-opt/configure.in +++ /dev/null @@ -1,19 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/ieee754/ldbl-opt/. - -AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, - libc_cv_mlong_double_128, [dnl -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -mlong-double-128" -AC_TRY_COMPILE(, [ -#ifndef __LONG_DOUBLE_128__ -# error "compiler did not predefine __LONG_DOUBLE_128__ as expected" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mlong_double_128=yes, - libc_cv_mlong_double_128=no) -CFLAGS="$save_CFLAGS"]) -if test "$libc_cv_mlong_double_128" = no; then - AC_MSG_ERROR([this configuration requires -mlong-double-128 support]) -fi diff --git a/libc/sysdeps/mach/configure b/libc/sysdeps/mach/configure index 3af372560..61ac7d968 100644 --- a/libc/sysdeps/mach/configure +++ b/libc/sysdeps/mach/configure @@ -65,7 +65,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_preproc -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. diff --git a/libc/sysdeps/mach/configure.ac b/libc/sysdeps/mach/configure.ac new file mode 100644 index 000000000..db85f47ea --- /dev/null +++ b/libc/sysdeps/mach/configure.ac @@ -0,0 +1,126 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +AC_CHECK_TOOL(MIG, mig, MISSING) +if test "x$MIG" = xMISSING; then + AC_MSG_ERROR([cannot find required build tool mig]) +fi +LIBC_CONFIG_VAR([MIG], [$MIG]) + +### Sanity checks for Mach header installation +AC_CHECK_HEADER(mach/mach_types.h,, + [AC_MSG_ERROR([cannot find Mach headers])], -) +AC_CHECK_HEADER(mach/mach_types.defs,, [dnl +AC_MSG_ERROR([cannot find Mach .defs files])], -) + +dnl +dnl mach_TYPE_CHECK(foo_t, bar_t) +dnl +dnl Check if foo_t is defined by . +dnl If not, compile with -Dfoo_t=bar_t. +dnl +AC_DEFUN([mach_TYPE_CHECK], [dnl +AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1, +AC_TRY_COMPILE([#include ], [extern $1 foo;], +libc_cv_mach_$1=$1, libc_cv_mach_$1=$2)) +if test [$]libc_cv_mach_$1 != $1; then + DEFINES="$DEFINES -D$1=$2" +fi]) + +dnl +dnl OSF Mach has renamed these typedefs for some reason. +dnl +mach_TYPE_CHECK(task_t, task_port_t) +mach_TYPE_CHECK(thread_t, thread_port_t) + +dnl +dnl The creation_time field is a GNU Mach addition the other variants lack. +dnl +AC_CACHE_CHECK(for creation_time in task_basic_info, + libc_cv_mach_task_creation_time, [dnl +AC_TRY_COMPILE([#include ], [ +extern struct task_basic_info *i; +long s = i->creation_time.seconds; +], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)]) +if test $libc_cv_mach_task_creation_time = no; then + AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time]) +fi + +dnl +dnl The Darwin variant no longer has +dnl but instead has several constituent .defs files. +dnl In this scenario we will presume there is a +dnl that contains an #include for each constituent header file, +dnl but we don't do a check for that here because in a bare +dnl environment the compile against those headers will fail. +dnl +mach_interface_list= +for ifc in mach mach4 \ + clock clock_priv host_priv host_security ledger lock_set \ + processor processor_set task thread_act vm_map \ + memory_object memory_object_default default_pager \ + i386/mach_i386 \ + ; do + AC_CHECK_HEADER(mach/${ifc}.defs, [dnl + mach_interface_list="$mach_interface_list $ifc"],, -) +done +if test "x$mach_interface_list" = x; then + AC_MSG_ERROR([what manner of Mach is this?]) +fi + +AC_CACHE_CHECK(for host_page_size in mach_host.defs, + libc_cv_mach_host_page_size, [dnl +AC_EGREP_HEADER(host_page_size, mach/mach_host.defs, + libc_cv_mach_host_page_size=yes, + libc_cv_mach_host_page_size=no)]) +if test $libc_cv_mach_host_page_size = yes; then + AC_DEFINE([HAVE_HOST_PAGE_SIZE]) +fi + +AC_CHECK_HEADER(mach/machine/ndr_def.h, [dnl + DEFINES="$DEFINES -DNDR_DEF_HEADER=''"], [dnl +AC_CHECK_HEADER(machine/ndr_def.h, [dnl + DEFINES="$DEFINES -DNDR_DEF_HEADER=''"],, -)], -) + +AC_CACHE_CHECK(for i386_io_perm_modify in mach_i386.defs, + libc_cv_mach_i386_ioports, [dnl +AC_EGREP_HEADER(i386_io_perm_modify, mach/i386/mach_i386.defs, + libc_cv_mach_i386_ioports=yes, + libc_cv_mach_i386_ioports=no)]) +if test $libc_cv_mach_i386_ioports = yes; then + AC_DEFINE([HAVE_I386_IO_PERM_MODIFY]) +fi + +AC_CACHE_CHECK(for i386_set_gdt in mach_i386.defs, + libc_cv_mach_i386_gdt, [dnl +AC_EGREP_HEADER(i386_set_gdt, mach/i386/mach_i386.defs, + libc_cv_mach_i386_gdt=yes, + libc_cv_mach_i386_gdt=no)]) +if test $libc_cv_mach_i386_gdt = yes; then + AC_DEFINE([HAVE_I386_SET_GDT]) +fi + +dnl Swiped from hurd/aclocal.m4 +AC_DEFUN([hurd_MIG_RETCODE], [dnl +# See if mig groks `retcode'. +AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, +[cat > conftest.defs <<\EOF +#include +#include +subsystem foobar 1000; +type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE + ctype: mach_port_t; +simpleroutine foobar_reply ( + reply_port: reply_port_t; + err: kern_return_t, RetCode); +EOF +if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AS_MESSAGE_LOG_FD]); then + hurd_cv_mig_retcode=yes +else + hurd_cv_mig_retcode=no +fi +rm -f conftest*]) +if test $hurd_cv_mig_retcode = yes; then + AC_DEFINE(HAVE_MIG_RETCODE) +fi]) + +hurd_MIG_RETCODE diff --git a/libc/sysdeps/mach/configure.in b/libc/sysdeps/mach/configure.in deleted file mode 100644 index db85f47ea..000000000 --- a/libc/sysdeps/mach/configure.in +++ /dev/null @@ -1,126 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -AC_CHECK_TOOL(MIG, mig, MISSING) -if test "x$MIG" = xMISSING; then - AC_MSG_ERROR([cannot find required build tool mig]) -fi -LIBC_CONFIG_VAR([MIG], [$MIG]) - -### Sanity checks for Mach header installation -AC_CHECK_HEADER(mach/mach_types.h,, - [AC_MSG_ERROR([cannot find Mach headers])], -) -AC_CHECK_HEADER(mach/mach_types.defs,, [dnl -AC_MSG_ERROR([cannot find Mach .defs files])], -) - -dnl -dnl mach_TYPE_CHECK(foo_t, bar_t) -dnl -dnl Check if foo_t is defined by . -dnl If not, compile with -Dfoo_t=bar_t. -dnl -AC_DEFUN([mach_TYPE_CHECK], [dnl -AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1, -AC_TRY_COMPILE([#include ], [extern $1 foo;], -libc_cv_mach_$1=$1, libc_cv_mach_$1=$2)) -if test [$]libc_cv_mach_$1 != $1; then - DEFINES="$DEFINES -D$1=$2" -fi]) - -dnl -dnl OSF Mach has renamed these typedefs for some reason. -dnl -mach_TYPE_CHECK(task_t, task_port_t) -mach_TYPE_CHECK(thread_t, thread_port_t) - -dnl -dnl The creation_time field is a GNU Mach addition the other variants lack. -dnl -AC_CACHE_CHECK(for creation_time in task_basic_info, - libc_cv_mach_task_creation_time, [dnl -AC_TRY_COMPILE([#include ], [ -extern struct task_basic_info *i; -long s = i->creation_time.seconds; -], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)]) -if test $libc_cv_mach_task_creation_time = no; then - AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time]) -fi - -dnl -dnl The Darwin variant no longer has -dnl but instead has several constituent .defs files. -dnl In this scenario we will presume there is a -dnl that contains an #include for each constituent header file, -dnl but we don't do a check for that here because in a bare -dnl environment the compile against those headers will fail. -dnl -mach_interface_list= -for ifc in mach mach4 \ - clock clock_priv host_priv host_security ledger lock_set \ - processor processor_set task thread_act vm_map \ - memory_object memory_object_default default_pager \ - i386/mach_i386 \ - ; do - AC_CHECK_HEADER(mach/${ifc}.defs, [dnl - mach_interface_list="$mach_interface_list $ifc"],, -) -done -if test "x$mach_interface_list" = x; then - AC_MSG_ERROR([what manner of Mach is this?]) -fi - -AC_CACHE_CHECK(for host_page_size in mach_host.defs, - libc_cv_mach_host_page_size, [dnl -AC_EGREP_HEADER(host_page_size, mach/mach_host.defs, - libc_cv_mach_host_page_size=yes, - libc_cv_mach_host_page_size=no)]) -if test $libc_cv_mach_host_page_size = yes; then - AC_DEFINE([HAVE_HOST_PAGE_SIZE]) -fi - -AC_CHECK_HEADER(mach/machine/ndr_def.h, [dnl - DEFINES="$DEFINES -DNDR_DEF_HEADER=''"], [dnl -AC_CHECK_HEADER(machine/ndr_def.h, [dnl - DEFINES="$DEFINES -DNDR_DEF_HEADER=''"],, -)], -) - -AC_CACHE_CHECK(for i386_io_perm_modify in mach_i386.defs, - libc_cv_mach_i386_ioports, [dnl -AC_EGREP_HEADER(i386_io_perm_modify, mach/i386/mach_i386.defs, - libc_cv_mach_i386_ioports=yes, - libc_cv_mach_i386_ioports=no)]) -if test $libc_cv_mach_i386_ioports = yes; then - AC_DEFINE([HAVE_I386_IO_PERM_MODIFY]) -fi - -AC_CACHE_CHECK(for i386_set_gdt in mach_i386.defs, - libc_cv_mach_i386_gdt, [dnl -AC_EGREP_HEADER(i386_set_gdt, mach/i386/mach_i386.defs, - libc_cv_mach_i386_gdt=yes, - libc_cv_mach_i386_gdt=no)]) -if test $libc_cv_mach_i386_gdt = yes; then - AC_DEFINE([HAVE_I386_SET_GDT]) -fi - -dnl Swiped from hurd/aclocal.m4 -AC_DEFUN([hurd_MIG_RETCODE], [dnl -# See if mig groks `retcode'. -AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, -[cat > conftest.defs <<\EOF -#include -#include -subsystem foobar 1000; -type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; -simpleroutine foobar_reply ( - reply_port: reply_port_t; - err: kern_return_t, RetCode); -EOF -if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AS_MESSAGE_LOG_FD]); then - hurd_cv_mig_retcode=yes -else - hurd_cv_mig_retcode=no -fi -rm -f conftest*]) -if test $hurd_cv_mig_retcode = yes; then - AC_DEFINE(HAVE_MIG_RETCODE) -fi]) - -hurd_MIG_RETCODE diff --git a/libc/sysdeps/mach/hurd/configure b/libc/sysdeps/mach/hurd/configure index 84948a549..a0f97217e 100755 --- a/libc/sysdeps/mach/hurd/configure +++ b/libc/sysdeps/mach/hurd/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! $as_echo "#define NO_HIDDEN 1" >>confdefs.h diff --git a/libc/sysdeps/mach/hurd/configure.ac b/libc/sysdeps/mach/hurd/configure.ac new file mode 100644 index 000000000..ad915a568 --- /dev/null +++ b/libc/sysdeps/mach/hurd/configure.ac @@ -0,0 +1,31 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl We need this setting because of the need for PLT calls in ld.so. +AC_DEFINE([NO_HIDDEN]) + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +case "$machine" in + i386*) + # The default oldest ABI is 2.2.6. + # We only need a "yes" here if the oldest ABI supported will be < 2.2.6. + if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then + libc_cv_gcc_unwind_find_fde=yes + fi + ;; +esac + +AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl +AC_TRY_COMPILE(dnl +[#include ], [ +#define NEED_VERSION 20020609 +#if HURD_INTERFACE_VERSION < NEED_VERSION +# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION +#endif], + libc_cv_hurd_version=ok, + libc_cv_hurd_version=bad)]) +if test "x$libc_cv_hurd_version" != xok; then + AC_MSG_ERROR(Hurd headers not installed or too old) +fi diff --git a/libc/sysdeps/mach/hurd/configure.in b/libc/sysdeps/mach/hurd/configure.in deleted file mode 100644 index ad915a568..000000000 --- a/libc/sysdeps/mach/hurd/configure.in +++ /dev/null @@ -1,31 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl We need this setting because of the need for PLT calls in ld.so. -AC_DEFINE([NO_HIDDEN]) - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -case "$machine" in - i386*) - # The default oldest ABI is 2.2.6. - # We only need a "yes" here if the oldest ABI supported will be < 2.2.6. - if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then - libc_cv_gcc_unwind_find_fde=yes - fi - ;; -esac - -AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl -AC_TRY_COMPILE(dnl -[#include ], [ -#define NEED_VERSION 20020609 -#if HURD_INTERFACE_VERSION < NEED_VERSION -# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION -#endif], - libc_cv_hurd_version=ok, - libc_cv_hurd_version=bad)]) -if test "x$libc_cv_hurd_version" != xok; then - AC_MSG_ERROR(Hurd headers not installed or too old) -fi diff --git a/libc/sysdeps/posix/getaddrinfo.c b/libc/sysdeps/posix/getaddrinfo.c index 0f4b88514..8ff74b496 100644 --- a/libc/sysdeps/posix/getaddrinfo.c +++ b/libc/sysdeps/posix/getaddrinfo.c @@ -197,7 +197,22 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, &rc, &herrno, NULL, &localcanon)); \ if (rc != ERANGE || herrno != NETDB_INTERNAL) \ break; \ - tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); \ + if (!malloc_tmpbuf && __libc_use_alloca (alloca_used + 2 * tmpbuflen)) \ + tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen, 2 * tmpbuflen, \ + alloca_used); \ + else \ + { \ + char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL, \ + 2 * tmpbuflen); \ + if (newp == NULL) \ + { \ + result = -EAI_MEMORY; \ + goto free_and_return; \ + } \ + tmpbuf = newp; \ + malloc_tmpbuf = true; \ + tmpbuflen = 2 * tmpbuflen; \ + } \ } \ if (status == NSS_STATUS_SUCCESS && rc == 0) \ h = &th; \ @@ -209,7 +224,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, { \ __set_h_errno (herrno); \ _res.options |= old_res_options & RES_USE_INET6; \ - return -EAI_SYSTEM; \ + result = -EAI_SYSTEM; \ + goto free_and_return; \ } \ if (herrno == TRY_AGAIN) \ no_data = EAI_AGAIN; \ @@ -1666,13 +1682,13 @@ rfc3484_sort (const void *p1, const void *p2, void *arg) /* Fill in the results in all the records. */ for (int i = 0; i < src->nresults; ++i) - if (src->results[i].index == a1_index) + if (a1_index != -1 && src->results[i].index == a1_index) { assert (src->results[i].native == -1 || src->results[i].native == a1_native); src->results[i].native = a1_native; } - else if (src->results[i].index == a2_index) + else if (a2_index != -1 && src->results[i].index == a2_index) { assert (src->results[i].native == -1 || src->results[i].native == a2_native); @@ -2532,7 +2548,14 @@ getaddrinfo (const char *name, const char *service, tmp.addr[0] = 0; tmp.addr[1] = 0; tmp.addr[2] = htonl (0xffff); - tmp.addr[3] = sinp->sin_addr.s_addr; + /* Special case for lo interface, the source address + being possibly different than the interface + address. */ + if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000) + == 0x7f000000) + tmp.addr[3] = htonl(0x7f000001); + else + tmp.addr[3] = sinp->sin_addr.s_addr; } else { diff --git a/libc/sysdeps/powerpc/configure b/libc/sysdeps/powerpc/configure index 4afbc29ab..fccee659a 100755 --- a/libc/sysdeps/powerpc/configure +++ b/libc/sysdeps/powerpc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc. # Accept binutils which knows about ".machine". diff --git a/libc/sysdeps/powerpc/configure.ac b/libc/sysdeps/powerpc/configure.ac new file mode 100644 index 000000000..28cc85934 --- /dev/null +++ b/libc/sysdeps/powerpc/configure.ac @@ -0,0 +1,21 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc. + +# Accept binutils which knows about ".machine". +AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl +cat > conftest.s <<\EOF + .machine "altivec" + blr +EOF +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ppc_machine=yes +else + libc_cv_ppc_machine=no +fi +rm -f conftest*]) +if test $libc_cv_ppc_machine != yes; then + AC_MSG_ERROR([ +*** A binutils version which can handle +*** .machine "altivec" +*** is needed.]) +fi diff --git a/libc/sysdeps/powerpc/configure.in b/libc/sysdeps/powerpc/configure.in deleted file mode 100644 index 28cc85934..000000000 --- a/libc/sysdeps/powerpc/configure.in +++ /dev/null @@ -1,21 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc. - -# Accept binutils which knows about ".machine". -AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl -cat > conftest.s <<\EOF - .machine "altivec" - blr -EOF -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_ppc_machine=yes -else - libc_cv_ppc_machine=no -fi -rm -f conftest*]) -if test $libc_cv_ppc_machine != yes; then - AC_MSG_ERROR([ -*** A binutils version which can handle -*** .machine "altivec" -*** is needed.]) -fi diff --git a/libc/sysdeps/powerpc/powerpc32/configure b/libc/sysdeps/powerpc/powerpc32/configure index 31c571d9a..fe5a79234 100644 --- a/libc/sysdeps/powerpc/powerpc32/configure +++ b/libc/sysdeps/powerpc/powerpc32/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc/powerpc32. # See whether gas has R_PPC_REL16 relocs. diff --git a/libc/sysdeps/powerpc/powerpc32/configure.ac b/libc/sysdeps/powerpc/powerpc32/configure.ac new file mode 100644 index 000000000..21d3f5ee5 --- /dev/null +++ b/libc/sysdeps/powerpc/powerpc32/configure.ac @@ -0,0 +1,32 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc/powerpc32. + +# See whether gas has R_PPC_REL16 relocs. +AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl +cat > conftest.s <<\EOF + .text + addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha +EOF +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ppc_rel16=yes +else + libc_cv_ppc_rel16=no +fi +rm -f conftest*]) +if test $libc_cv_ppc_rel16 = no; then + AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.) +fi + +# See whether GCC uses -msecure-plt. +AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl +echo 'int foo (void) { extern int bar; return bar; }' > conftest.c +libc_cv_ppc_secure_plt=no +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&AS_MESSAGE_LOG_FD); then + if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then + libc_cv_ppc_secure_plt=yes + fi +fi +rm -rf conftest*]) +if test $libc_cv_ppc_secure_plt = yes; then + AC_DEFINE(HAVE_PPC_SECURE_PLT) +fi diff --git a/libc/sysdeps/powerpc/powerpc32/configure.in b/libc/sysdeps/powerpc/powerpc32/configure.in deleted file mode 100644 index 21d3f5ee5..000000000 --- a/libc/sysdeps/powerpc/powerpc32/configure.in +++ /dev/null @@ -1,32 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc/powerpc32. - -# See whether gas has R_PPC_REL16 relocs. -AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl -cat > conftest.s <<\EOF - .text - addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha -EOF -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_ppc_rel16=yes -else - libc_cv_ppc_rel16=no -fi -rm -f conftest*]) -if test $libc_cv_ppc_rel16 = no; then - AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.) -fi - -# See whether GCC uses -msecure-plt. -AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl -echo 'int foo (void) { extern int bar; return bar; }' > conftest.c -libc_cv_ppc_secure_plt=no -if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&AS_MESSAGE_LOG_FD); then - if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then - libc_cv_ppc_secure_plt=yes - fi -fi -rm -rf conftest*]) -if test $libc_cv_ppc_secure_plt = yes; then - AC_DEFINE(HAVE_PPC_SECURE_PLT) -fi diff --git a/libc/sysdeps/powerpc/powerpc64/configure b/libc/sysdeps/powerpc/powerpc64/configure index 5ddac5592..92ec607e0 100644 --- a/libc/sysdeps/powerpc/powerpc64/configure +++ b/libc/sysdeps/powerpc/powerpc64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc/powerpc64. # The Aix ld uses global .symbol_names instead of symbol_names diff --git a/libc/sysdeps/powerpc/powerpc64/configure.ac b/libc/sysdeps/powerpc/powerpc64/configure.ac new file mode 100644 index 000000000..67aac663d --- /dev/null +++ b/libc/sysdeps/powerpc/powerpc64/configure.ac @@ -0,0 +1,42 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc/powerpc64. + +# The Aix ld uses global .symbol_names instead of symbol_names +# and unfortunately early Linux PPC64 linkers use it as well. +AC_CACHE_CHECK(for support for omitting dot symbols, +libc_cv_omit_dot_syms, [dnl +libc_cv_omit_dot_syms=no +echo 'void foo (void) {}' > conftest.c +if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then + if grep -w '\.foo' conftest.s > /dev/null; then + : + else + libc_cv_omit_dot_syms=yes + fi +fi +rm -f conftest.c conftest.s +]) +if test x$libc_cv_omit_dot_syms != xyes; then + AC_DEFINE(HAVE_ASM_GLOBAL_DOT_NAME) +fi + +AC_CACHE_CHECK(for linker support for overlapping .opd entries, +libc_cv_overlapping_opd, [dnl +libc_cv_overlapping_opd=no +echo 'void foo (void) {}' > conftest.c +if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then +changequote(,)dnl + if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then + if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then + : + else + libc_cv_overlapping_opd=yes + fi + fi +changequote([,])dnl +fi +rm -f conftest.c conftest.s +]) +if test x$libc_cv_overlapping_opd = xyes; then + AC_DEFINE(USE_PPC64_OVERLAPPING_OPD) +fi diff --git a/libc/sysdeps/powerpc/powerpc64/configure.in b/libc/sysdeps/powerpc/powerpc64/configure.in deleted file mode 100644 index 67aac663d..000000000 --- a/libc/sysdeps/powerpc/powerpc64/configure.in +++ /dev/null @@ -1,42 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc/powerpc64. - -# The Aix ld uses global .symbol_names instead of symbol_names -# and unfortunately early Linux PPC64 linkers use it as well. -AC_CACHE_CHECK(for support for omitting dot symbols, -libc_cv_omit_dot_syms, [dnl -libc_cv_omit_dot_syms=no -echo 'void foo (void) {}' > conftest.c -if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then - if grep -w '\.foo' conftest.s > /dev/null; then - : - else - libc_cv_omit_dot_syms=yes - fi -fi -rm -f conftest.c conftest.s -]) -if test x$libc_cv_omit_dot_syms != xyes; then - AC_DEFINE(HAVE_ASM_GLOBAL_DOT_NAME) -fi - -AC_CACHE_CHECK(for linker support for overlapping .opd entries, -libc_cv_overlapping_opd, [dnl -libc_cv_overlapping_opd=no -echo 'void foo (void) {}' > conftest.c -if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then -changequote(,)dnl - if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then - if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then - : - else - libc_cv_overlapping_opd=yes - fi - fi -changequote([,])dnl -fi -rm -f conftest.c conftest.s -]) -if test x$libc_cv_overlapping_opd = xyes; then - AC_DEFINE(USE_PPC64_OVERLAPPING_OPD) -fi diff --git a/libc/sysdeps/powerpc/powerpc64/power7/stpcpy.S b/libc/sysdeps/powerpc/powerpc64/power7/stpcpy.S new file mode 100644 index 000000000..727dd06e7 --- /dev/null +++ b/libc/sysdeps/powerpc/powerpc64/power7/stpcpy.S @@ -0,0 +1,24 @@ +/* Optimized stpcpy implementation for PowerPC64/POWER7. + Copyright (C) 2013 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, see + . */ + +#define USE_AS_STPCPY +#include + +weak_alias (__stpcpy, stpcpy) +libc_hidden_def (__stpcpy) +libc_hidden_builtin_def (stpcpy) diff --git a/libc/sysdeps/powerpc/powerpc64/power7/strcpy.S b/libc/sysdeps/powerpc/powerpc64/power7/strcpy.S new file mode 100644 index 000000000..5c341a148 --- /dev/null +++ b/libc/sysdeps/powerpc/powerpc64/power7/strcpy.S @@ -0,0 +1,274 @@ +/* Optimized strcpy/stpcpy implementation for PowerPC64/POWER7. + Copyright (C) 2013 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, see + . */ + +#include + +/* Implements the function + + char * [r3] strcpy (char *dest [r3], const char *src [r4]) + + or + + char * [r3] strcpy (char *dest [r3], const char *src [r4]) + + if USE_AS_STPCPY is defined. It tries to use aligned memory accesses + when possible using the following algorithm: + + if (((((uintptr_t)dst & 0x7UL) == 0) && ((uintptr_t)src & 0x7UL) == 0)) + goto aligned_doubleword_copy; + if (((((uintptr_t)dst & 0x3UL) == 0) && ((uintptr_t)src & 0x3UL) == 0)) + goto aligned_word_copy; + if (((uintptr_t)dst & 0x7UL) == ((uintptr_t)src & 0x7UL)) + goto same_alignment; + goto unaligned; + + The aligned comparison are made using cmpb instructions. */ + +#ifdef USE_AS_STPCPY +# define FUNC_NAME __stpcpy +#else +# define FUNC_NAME strcpy +#endif + + .machine power7 +EALIGN (FUNC_NAME, 4, 0) + CALL_MCOUNT 2 + +#define rTMP r0 +#ifdef USE_AS_STPCPY +#define rRTN r3 /* pointer to previous word/doubleword in dest */ +#else +#define rRTN r12 /* pointer to previous word/doubleword in dest */ +#endif +#define rSRC r4 /* pointer to previous word/doubleword in src */ +#define rMASK r5 /* mask 0xffffffff | 0xffffffffffffffff */ +#define rWORD r6 /* current word from src */ +#define rALT r7 /* alternate word from src */ +#define rRTNAL r8 /* alignment of return pointer */ +#define rSRCAL r9 /* alignment of source pointer */ +#define rALCNT r10 /* bytes to read to reach 8 bytes alignment */ +#define rSUBAL r11 /* doubleword minus unaligned displacement */ + +#ifndef USE_AS_STPCPY +/* Save the dst pointer to use as return value. */ + mr rRTN, r3 +#endif + or rTMP, rSRC, rRTN + clrldi. rTMP, rTMP, 61 + bne L(check_word_alignment) + b L(aligned_doubleword_copy) + +L(same_alignment): +/* Src and dst with same alignment: align both to doubleword. */ + mr rALCNT, rRTN + lbz rWORD, 0(rSRC) + subfic rSUBAL, rRTNAL, 8 + addi rRTN, rRTN, 1 + addi rSRC, rSRC, 1 + cmpdi cr7, rWORD, 0 + stb rWORD, 0(rALCNT) + beq cr7, L(s2) + + add rALCNT, rALCNT, rSUBAL + subf rALCNT, rRTN, rALCNT + addi rALCNT, rALCNT, 1 + mtctr rALCNT + b L(s1) + + .align 4 +L(s0): + addi rSRC, rSRC, 1 + lbz rWORD, -1(rSRC) + cmpdi cr7, rWORD, 0 + stb rWORD, -1(rALCNT) + beqlr cr7 + mr rRTN, rALCNT +L(s1): + addi rALCNT, rRTN,1 + bdnz L(s0) + b L(aligned_doubleword_copy) + .align 4 +L(s2): + mr rRTN, rALCNT + blr + +/* For doubleword aligned memory, operate using doubleword load and stores. */ + .align 4 +L(aligned_doubleword_copy): + li rMASK, 0 + addi rRTN, rRTN, -8 + ld rWORD, 0(rSRC) + b L(g2) + + .align 4 +L(g0): ldu rALT, 8(rSRC) + stdu rWORD, 8(rRTN) + cmpb rTMP, rALT, rMASK + cmpdi rTMP, 0 + bne L(g1) + ldu rWORD, 8(rSRC) + stdu rALT, 8(rRTN) +L(g2): cmpb rTMP, rWORD, rMASK + cmpdi rTMP, 0 /* If rTMP is 0, no null's have been found. */ + beq L(g0) + + mr rALT, rWORD +/* We've hit the end of the string. Do the rest byte-by-byte. */ +L(g1): +#ifdef __LITTLE_ENDIAN__ + extrdi. rTMP, rALT, 8, 56 + stbu rALT, 8(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 48 + stbu rTMP, 1(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 40 + stbu rTMP, 1(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 32 + stbu rTMP, 1(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 24 + stbu rTMP, 1(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 16 + stbu rTMP, 1(rRTN) + beqlr- + extrdi. rTMP, rALT, 8, 8 + stbu rTMP, 1(rRTN) + beqlr- + extrdi rTMP, rALT, 8, 0 + stbu rTMP, 1(rRTN) +#else + extrdi. rTMP, rALT, 8, 0 + stbu rTMP, 8(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 8 + stbu rTMP, 1(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 16 + stbu rTMP, 1(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 24 + stbu rTMP, 1(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 32 + stbu rTMP, 1(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 40 + stbu rTMP, 1(rRTN) + beqlr + extrdi. rTMP, rALT, 8, 48 + stbu rTMP, 1(rRTN) + beqlr + stbu rALT, 1(rRTN) +#endif + blr + +L(check_word_alignment): + clrldi. rTMP, rTMP, 62 + beq L(aligned_word_copy) + rldicl rRTNAL, rRTN, 0, 61 + rldicl rSRCAL, rSRC, 0, 61 + cmpld cr7, rSRCAL, rRTNAL + beq cr7, L(same_alignment) + b L(unaligned) + +/* For word aligned memory, operate using word load and stores. */ + .align 4 +L(aligned_word_copy): + li rMASK, 0 + addi rRTN, rRTN, -4 + lwz rWORD, 0(rSRC) + b L(g5) + + .align 4 +L(g3): lwzu rALT, 4(rSRC) + stwu rWORD, 4(rRTN) + cmpb rTMP, rALT, rMASK + cmpwi rTMP, 0 + bne L(g4) + lwzu rWORD, 4(rSRC) + stwu rALT, 4(rRTN) +L(g5): cmpb rTMP, rWORD, rMASK + cmpwi rTMP, 0 /* If rTMP is 0, no null in word. */ + beq L(g3) + + mr rALT, rWORD +/* We've hit the end of the string. Do the rest byte-by-byte. */ +L(g4): +#ifdef __LITTLE_ENDIAN__ + rlwinm. rTMP, rALT, 0, 24, 31 + stbu rALT, 4(rRTN) + beqlr- + rlwinm. rTMP, rALT, 24, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + rlwinm. rTMP, rALT, 16, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + rlwinm rTMP, rALT, 8, 24, 31 + stbu rTMP, 1(rRTN) +#else + rlwinm. rTMP, rALT, 8, 24, 31 + stbu rTMP, 4(rRTN) + beqlr + rlwinm. rTMP, rALT, 16, 24, 31 + stbu rTMP, 1(rRTN) + beqlr + rlwinm. rTMP, rALT, 24, 24, 31 + stbu rTMP, 1(rRTN) + beqlr + stbu rALT, 1(rRTN) +#endif + blr + +/* Oh well. In this case, we just do a byte-by-byte copy. */ + .align 4 +L(unaligned): + lbz rWORD, 0(rSRC) + addi rRTN, rRTN, -1 + cmpdi rWORD, 0 + beq L(u2) + + .align 5 +L(u0): lbzu rALT, 1(rSRC) + stbu rWORD, 1(rRTN) + cmpdi rALT, 0 + beq L(u1) + lbzu rWORD, 1(rSRC) + stbu rALT, 1(rRTN) + cmpdi rWORD, 0 + beq L(u2) + lbzu rALT, 1(rSRC) + stbu rWORD, 1(rRTN) + cmpdi rALT, 0 + beq L(u1) + lbzu rWORD, 1(rSRC) + stbu rALT, 1(rRTN) + cmpdi rWORD, 0 + bne L(u0) +L(u2): stbu rWORD, 1(rRTN) + blr +L(u1): stbu rALT, 1(rRTN) + blr +END (FUNC_NAME) + +#ifndef USE_AS_STPCPY +libc_hidden_builtin_def (strcpy) +#endif diff --git a/libc/sysdeps/powerpc/powerpc64/stpcpy.S b/libc/sysdeps/powerpc/powerpc64/stpcpy.S index c0b39729e..09aa3be6b 100644 --- a/libc/sysdeps/powerpc/powerpc64/stpcpy.S +++ b/libc/sysdeps/powerpc/powerpc64/stpcpy.S @@ -16,103 +16,8 @@ License along with the GNU C Library; if not, see . */ -#include - -/* See strlen.s for comments on how the end-of-string testing works. */ - -/* char * [r3] stpcpy (char *dest [r3], const char *src [r4]) */ - -EALIGN (__stpcpy, 4, 0) - CALL_MCOUNT 2 - -#define rTMP r0 -#define rRTN r3 -#define rDEST r3 /* pointer to previous word in dest */ -#define rSRC r4 /* pointer to previous word in src */ -#define rWORD r6 /* current word from src */ -#define rFEFE r7 /* 0xfefefeff */ -#define r7F7F r8 /* 0x7f7f7f7f */ -#define rNEG r9 /* ~(word in src | 0x7f7f7f7f) */ -#define rALT r10 /* alternate word from src */ - - or rTMP, rSRC, rDEST - clrldi. rTMP, rTMP, 62 - addi rDEST, rDEST, -4 - bne L(unaligned) - - lis rFEFE, -0x101 - lis r7F7F, 0x7f7f - lwz rWORD, 0(rSRC) - addi rFEFE, rFEFE, -0x101 - addi r7F7F, r7F7F, 0x7f7f - b L(g2) - -L(g0): lwzu rALT, 4(rSRC) - stwu rWORD, 4(rDEST) - add rTMP, rFEFE, rALT - nor rNEG, r7F7F, rALT - and. rTMP, rTMP, rNEG - bne- L(g1) - lwzu rWORD, 4(rSRC) - stwu rALT, 4(rDEST) -L(g2): add rTMP, rFEFE, rWORD - nor rNEG, r7F7F, rWORD - and. rTMP, rTMP, rNEG - beq+ L(g0) - - mr rALT, rWORD -/* We've hit the end of the string. Do the rest byte-by-byte. */ -L(g1): -#ifdef __LITTLE_ENDIAN__ - rlwinm. rTMP, rALT, 0, 24, 31 - stbu rALT, 4(rDEST) - beqlr- - rlwinm. rTMP, rALT, 24, 24, 31 - stbu rTMP, 1(rDEST) - beqlr- - rlwinm. rTMP, rALT, 16, 24, 31 - stbu rTMP, 1(rDEST) - beqlr- - rlwinm rTMP, rALT, 8, 24, 31 - stbu rTMP, 1(rDEST) - blr -#else - rlwinm. rTMP, rALT, 8, 24, 31 - stbu rTMP, 4(rDEST) - beqlr- - rlwinm. rTMP, rALT, 16, 24, 31 - stbu rTMP, 1(rDEST) - beqlr- - rlwinm. rTMP, rALT, 24, 24, 31 - stbu rTMP, 1(rDEST) - beqlr- - stbu rALT, 1(rDEST) - blr -#endif - -/* Oh well. In this case, we just do a byte-by-byte copy. */ - .align 4 - nop -L(unaligned): - lbz rWORD, 0(rSRC) - addi rDEST, rDEST, 3 - cmpwi rWORD, 0 - beq- L(u2) - -L(u0): lbzu rALT, 1(rSRC) - stbu rWORD, 1(rDEST) - cmpwi rALT, 0 - beq- L(u1) - nop /* Let 601 load start of loop. */ - lbzu rWORD, 1(rSRC) - stbu rALT, 1(rDEST) - cmpwi rWORD, 0 - bne+ L(u0) -L(u2): stbu rWORD, 1(rDEST) - blr -L(u1): stbu rALT, 1(rDEST) - blr -END (__stpcpy) +#define USE_AS_STPCPY +#include weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) diff --git a/libc/sysdeps/powerpc/powerpc64/strcpy.S b/libc/sysdeps/powerpc/powerpc64/strcpy.S index a7fd85bad..793325d7b 100644 --- a/libc/sysdeps/powerpc/powerpc64/strcpy.S +++ b/libc/sysdeps/powerpc/powerpc64/strcpy.S @@ -22,25 +22,38 @@ /* char * [r3] strcpy (char *dest [r3], const char *src [r4]) */ -EALIGN (strcpy, 4, 0) +#ifdef USE_AS_STPCPY +# define FUNC_NAME __stpcpy +#else +# define FUNC_NAME strcpy +#endif + +EALIGN (FUNC_NAME, 4, 0) CALL_MCOUNT 2 #define rTMP r0 -#define rRTN r3 /* incoming DEST arg preserved as result */ -#define rSRC r4 /* pointer to previous word in src */ -#define rDEST r5 /* pointer to previous word in dest */ +#ifdef USE_AS_STPCPY +#define rRTN r3 /* pointer to previous word/doubleword in dest */ +#else +#define rRTN r12 /* pointer to previous word/doubleword in dest */ +#endif +#define rSRC r4 /* pointer to previous word/doubleword in src */ #define rWORD r6 /* current word from src */ -#define rFEFE r7 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ -#define r7F7F r8 /* constant 0x7f7f7f7f7f7f7f7f */ -#define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ +#define rFEFE r7 /* constant 0xfefefeff | 0xfefefefefefefeff */ +#define r7F7F r8 /* constant 0x7f7f7f7f | 0x7f7f7f7f7f7f7f7f */ +#define rNEG r9 /* ~(word in s1 | r7F7F) */ #define rALT r10 /* alternate word from src */ - dcbt 0,rSRC +#ifndef USE_AS_STPCPY +/* Save the dst pointer to use as return value. */ + mr rRTN, r3 +#endif or rTMP, rSRC, rRTN clrldi. rTMP, rTMP, 61 - addi rDEST, rRTN, -8 - dcbtst 0,rRTN - bne L(unaligned) + bne L(check_word_alignment) + +/* For doubleword aligned memory, operate using doubleword load and stores. */ + addi rRTN, rRTN, -8 lis rFEFE, -0x101 lis r7F7F, 0x7f7f @@ -53,13 +66,13 @@ EALIGN (strcpy, 4, 0) b L(g2) L(g0): ldu rALT, 8(rSRC) - stdu rWORD, 8(rDEST) + stdu rWORD, 8(rRTN) add rTMP, rFEFE, rALT nor rNEG, r7F7F, rALT and. rTMP, rTMP, rNEG bne- L(g1) ldu rWORD, 8(rSRC) - stdu rALT, 8(rDEST) + stdu rALT, 8(rRTN) L(g2): add rTMP, rFEFE, rWORD nor rNEG, r7F7F, rWORD and. rTMP, rTMP, rNEG @@ -70,77 +83,134 @@ L(g2): add rTMP, rFEFE, rWORD L(g1): #ifdef __LITTLE_ENDIAN__ extrdi. rTMP, rALT, 8, 56 - stb rALT, 8(rDEST) + stbu rALT, 8(rRTN) beqlr- extrdi. rTMP, rALT, 8, 48 - stb rTMP, 9(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 40 - stb rTMP, 10(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 32 - stb rTMP, 11(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 24 - stb rTMP, 12(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 16 - stb rTMP, 13(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 8 - stb rTMP, 14(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi rTMP, rALT, 8, 0 - stb rTMP, 15(rDEST) - blr + stbu rTMP, 1(rRTN) #else extrdi. rTMP, rALT, 8, 0 - stb rTMP, 8(rDEST) + stbu rTMP, 8(rRTN) beqlr- extrdi. rTMP, rALT, 8, 8 - stb rTMP, 9(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 16 - stb rTMP, 10(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 24 - stb rTMP, 11(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 32 - stb rTMP, 12(rDEST) - beqlr- + stbu rTMP, 1(rRTN) + beqlr extrdi. rTMP, rALT, 8, 40 - stb rTMP, 13(rDEST) + stbu rTMP, 1(rRTN) beqlr- extrdi. rTMP, rALT, 8, 48 - stb rTMP, 14(rDEST) + stbu rTMP, 1(rRTN) beqlr- - stb rALT, 15(rDEST) + stbu rALT, 1(rRTN) +#endif blr + +L(check_word_alignment): + clrldi. rTMP, rTMP, 62 + bne L(unaligned) + +/* For word aligned memory, operate using word load and stores. */ + addi rRTN, rRTN, -4 + + lis rFEFE, -0x101 + lis r7F7F, 0x7f7f + lwz rWORD, 0(rSRC) + addi rFEFE, rFEFE, -0x101 + addi r7F7F, r7F7F, 0x7f7f + b L(g5) + +L(g3): lwzu rALT, 4(rSRC) + stwu rWORD, 4(rRTN) + add rTMP, rFEFE, rALT + nor rNEG, r7F7F, rALT + and. rTMP, rTMP, rNEG + bne- L(g4) + lwzu rWORD, 4(rSRC) + stwu rALT, 4(rRTN) +L(g5): add rTMP, rFEFE, rWORD + nor rNEG, r7F7F, rWORD + and. rTMP, rTMP, rNEG + beq+ L(g3) + + mr rALT, rWORD +/* We've hit the end of the string. Do the rest byte-by-byte. */ +L(g4): +#ifdef __LITTLE_ENDIAN__ + rlwinm. rTMP, rALT, 0, 24, 31 + stbu rALT, 4(rRTN) + beqlr- + rlwinm. rTMP, rALT, 24, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + rlwinm. rTMP, rALT, 16, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + rlwinm rTMP, rALT, 8, 24, 31 + stbu rTMP, 1(rRTN) +#else + rlwinm. rTMP, rALT, 8, 24, 31 + stbu rTMP, 4(rRTN) + beqlr- + rlwinm. rTMP, rALT, 16, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + rlwinm. rTMP, rALT, 24, 24, 31 + stbu rTMP, 1(rRTN) + beqlr- + stbu rALT, 1(rRTN) #endif + blr /* Oh well. In this case, we just do a byte-by-byte copy. */ .align 4 nop L(unaligned): lbz rWORD, 0(rSRC) - addi rDEST, rRTN, -1 + addi rRTN, rRTN, -1 cmpwi rWORD, 0 beq- L(u2) L(u0): lbzu rALT, 1(rSRC) - stbu rWORD, 1(rDEST) + stbu rWORD, 1(rRTN) cmpwi rALT, 0 beq- L(u1) nop /* Let 601 load start of loop. */ lbzu rWORD, 1(rSRC) - stbu rALT, 1(rDEST) + stbu rALT, 1(rRTN) cmpwi rWORD, 0 bne+ L(u0) -L(u2): stb rWORD, 1(rDEST) +L(u2): stbu rWORD, 1(rRTN) blr -L(u1): stb rALT, 1(rDEST) +L(u1): stbu rALT, 1(rRTN) blr +END (FUNC_NAME) -END (strcpy) +#ifndef USE_AS_STPCPY libc_hidden_builtin_def (strcpy) +#endif diff --git a/libc/sysdeps/s390/s390-32/configure b/libc/sysdeps/s390/s390-32/configure index 669bb9be5..024565f85 100644 --- a/libc/sysdeps/s390/s390-32/configure +++ b/libc/sysdeps/s390/s390-32/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/s390. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/libc/sysdeps/s390/s390-32/configure.ac b/libc/sysdeps/s390/s390-32/configure.ac new file mode 100644 index 000000000..b5af4e12f --- /dev/null +++ b/libc/sysdeps/s390/s390-32/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/s390. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/s390/s390-32/configure.in b/libc/sysdeps/s390/s390-32/configure.in deleted file mode 100644 index b5af4e12f..000000000 --- a/libc/sysdeps/s390/s390-32/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/s390. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/s390/s390-64/configure b/libc/sysdeps/s390/s390-64/configure index 669bb9be5..024565f85 100644 --- a/libc/sysdeps/s390/s390-64/configure +++ b/libc/sysdeps/s390/s390-64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/s390. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/libc/sysdeps/s390/s390-64/configure.ac b/libc/sysdeps/s390/s390-64/configure.ac new file mode 100644 index 000000000..b5af4e12f --- /dev/null +++ b/libc/sysdeps/s390/s390-64/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/s390. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/s390/s390-64/configure.in b/libc/sysdeps/s390/s390-64/configure.in deleted file mode 100644 index b5af4e12f..000000000 --- a/libc/sysdeps/s390/s390-64/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/s390. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/sh/configure b/libc/sysdeps/sh/configure index b0f3b2fa2..110eb65b0 100644 --- a/libc/sysdeps/sh/configure +++ b/libc/sysdeps/sh/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/sh. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/libc/sysdeps/sh/configure.ac b/libc/sysdeps/sh/configure.ac new file mode 100644 index 000000000..21400c447 --- /dev/null +++ b/libc/sysdeps/sh/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/sh. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/sh/configure.in b/libc/sysdeps/sh/configure.in deleted file mode 100644 index 21400c447..000000000 --- a/libc/sysdeps/sh/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/sh. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/libc/sysdeps/sparc/configure b/libc/sysdeps/sparc/configure index 63e02de4a..90a86f6da 100644 --- a/libc/sysdeps/sparc/configure +++ b/libc/sysdeps/sparc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/sparc. # Check for support of VIS3 et al. instructions in the assembler. diff --git a/libc/sysdeps/sparc/configure.ac b/libc/sysdeps/sparc/configure.ac new file mode 100644 index 000000000..982077c9b --- /dev/null +++ b/libc/sysdeps/sparc/configure.ac @@ -0,0 +1,59 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/sparc. + +# Check for support of VIS3 et al. instructions in the assembler. +AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl +cat > conftest.S <<\EOF + .text +foo: fmadds %f1, %f2, %f3, %f5 + fmaddd %f2, %f4, %f8, %f10 + fhadds %f2, %f3, %f5 + fhaddd %f4, %f8, %f10 + pdistn %f2, %f4, %g1 + movdtox %f10, %o0 + movstouw %f9, %o1 + movstosw %f7, %o2 + movxtod %o3, %f18 + movwtos %o4, %f15 + flcmps %fcc0, %f3, %f5 + flcmpd %fcc1, %f4, %f6 +EOF +dnl +if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then + libc_cv_sparc_as_vis3=yes +else + libc_cv_sparc_as_vis3=no +fi +rm -f conftest*]) +if test $libc_cv_sparc_as_vis3 = yes; then + AC_DEFINE(HAVE_AS_VIS3_SUPPORT) +fi +LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) + +# Check for a GCC emitting GOTDATA relocations. +AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl +changequote(,)dnl +cat > conftest.c <<\EOF +int data; +int foo(void) +{ + return data; +} +EOF +changequote([,])dnl +dnl +libc_cv_sparc_gcc_gotdata=no +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then + if grep -q 'gdop_hix22' conftest.s \ + && grep -q 'gdop_lox10' conftest.s; then + libc_cv_sparc_gcc_gotdata=yes + fi +fi +rm -f conftest*]) +if test $libc_cv_sparc_gcc_gotdata = yes; then + AC_DEFINE(HAVE_GCC_GOTDATA) +fi + +if test $libc_cv_sparc_gcc_gotdata = yes; then + AC_DEFINE(PI_STATIC_AND_HIDDEN) +fi diff --git a/libc/sysdeps/sparc/configure.in b/libc/sysdeps/sparc/configure.in deleted file mode 100644 index 982077c9b..000000000 --- a/libc/sysdeps/sparc/configure.in +++ /dev/null @@ -1,59 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/sparc. - -# Check for support of VIS3 et al. instructions in the assembler. -AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl -cat > conftest.S <<\EOF - .text -foo: fmadds %f1, %f2, %f3, %f5 - fmaddd %f2, %f4, %f8, %f10 - fhadds %f2, %f3, %f5 - fhaddd %f4, %f8, %f10 - pdistn %f2, %f4, %g1 - movdtox %f10, %o0 - movstouw %f9, %o1 - movstosw %f7, %o2 - movxtod %o3, %f18 - movwtos %o4, %f15 - flcmps %fcc0, %f3, %f5 - flcmpd %fcc1, %f4, %f6 -EOF -dnl -if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then - libc_cv_sparc_as_vis3=yes -else - libc_cv_sparc_as_vis3=no -fi -rm -f conftest*]) -if test $libc_cv_sparc_as_vis3 = yes; then - AC_DEFINE(HAVE_AS_VIS3_SUPPORT) -fi -LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) - -# Check for a GCC emitting GOTDATA relocations. -AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl -changequote(,)dnl -cat > conftest.c <<\EOF -int data; -int foo(void) -{ - return data; -} -EOF -changequote([,])dnl -dnl -libc_cv_sparc_gcc_gotdata=no -if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then - if grep -q 'gdop_hix22' conftest.s \ - && grep -q 'gdop_lox10' conftest.s; then - libc_cv_sparc_gcc_gotdata=yes - fi -fi -rm -f conftest*]) -if test $libc_cv_sparc_gcc_gotdata = yes; then - AC_DEFINE(HAVE_GCC_GOTDATA) -fi - -if test $libc_cv_sparc_gcc_gotdata = yes; then - AC_DEFINE(PI_STATIC_AND_HIDDEN) -fi diff --git a/libc/sysdeps/sparc/sparc32/fpu/s_fdim.S b/libc/sysdeps/sparc/sparc32/fpu/s_fdim.S index 2f0c5ce58..22f69ce51 100644 --- a/libc/sysdeps/sparc/sparc32/fpu/s_fdim.S +++ b/libc/sysdeps/sparc/sparc32/fpu/s_fdim.S @@ -30,7 +30,8 @@ ENTRY(__fdim) fbug 1f st %g0, [%sp + 76] ldd [%sp + 72], %f0 - fnegd %f0, %f2 + fnegs %f0, %f2 + fmovs %f1, %f3 1: retl fsubd %f0, %f2, %f0 END(__fdim) diff --git a/libc/sysdeps/unix/sysv/linux/configure b/libc/sysdeps/unix/sysv/linux/configure index 88fab5662..84dfbb87d 100644 --- a/libc/sysdeps/unix/sysv/linux/configure +++ b/libc/sysdeps/unix/sysv/linux/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux. # Don't bother trying to generate any glue code to be compatible with the diff --git a/libc/sysdeps/unix/sysv/linux/configure.ac b/libc/sysdeps/unix/sysv/linux/configure.ac new file mode 100644 index 000000000..5e5902d8e --- /dev/null +++ b/libc/sysdeps/unix/sysv/linux/configure.ac @@ -0,0 +1,215 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux. + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +define([LIBC_LINUX_VERSION],[2.6.19])dnl +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi +define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl +AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl +AC_EGREP_CPP([eat flaming death], [#include +#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl +patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl +[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ +eat flaming death +#endif], + libc_cv_linuxVER='TOO OLD!', + libc_cv_linuxVER='LIBC_LINUX_VERSION or later')]) +if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then + AC_MSG_ERROR([GNU libc requires kernel header files from +Linux LIBC_LINUX_VERSION or later to be installed before configuring. +The kernel header files are found usually in /usr/include/asm and +/usr/include/linux; make sure these directories use files from +Linux LIBC_LINUX_VERSION or later. This check uses , so +make sure that file was built correctly when installing the kernel header +files. To use kernel headers not from /usr/include/linux, use the +configure option --with-headers.]) +fi + +# If the user gave a minimal version number test whether the available +# kernel headers are young enough. Additionally we have minimal +# kernel versions for some architectures. If a previous configure fragment +# set arch_minimum_kernel already, let that override our defaults here. +# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde +# if appropriate too. +test -n "$arch_minimum_kernel" || +case "$machine" in + i386*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + powerpc/powerpc32*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + s390/s390-32) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + s390/s390-64) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + sh*) + arch_minimum_kernel=2.6.16 + libc_cv_gcc_unwind_find_fde=yes + ;; + sparc/sparc64*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + sparc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + *) + arch_minimum_kernel=2.6.16 + ;; +esac +if test -n "$minimum_kernel"; then + changequote(,) + user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) + arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) + changequote([,]) + if test $user_version -lt $arch_version; then + AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel]) + minimum_kernel=$arch_minimum_kernel + fi +else + minimum_kernel=$arch_minimum_kernel +fi + +AC_MSG_CHECKING(for kernel header at least $minimum_kernel) +changequote(,)dnl +decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; +abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; +changequote([,])dnl +AC_EGREP_CPP([eat flaming death], [#include +#if LINUX_VERSION_CODE < $decnum +eat flaming death +#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok) +AC_MSG_RESULT($libc_minimum_kernel) +if test "$libc_minimum_kernel" = ok; then + AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum) + AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum) +else + AC_MSG_ERROR([*** The available kernel headers are older than the requested +*** compatible kernel version]) +fi + +# The result of the above test for the use of the FDE code is invalid if +# the user overrides the decision about the minimum ABI. +if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then + libc_cv_gcc_unwind_find_fde=no +fi + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi + +# Under Linux the NPTL add-on should be available. +case $add_ons in + # It is available. Good. + *nptl*) + nptl_missing= + ;; + *) + nptl_missing=yes + ;; +esac + +if test "$nptl_missing"; then + if test $enable_sanity = yes; then + echo "\ +*** On GNU/Linux systems it is normal to compile GNU libc with the +*** \`nptl' add-on. Without that, the library will be +*** incompatible with normal GNU/Linux systems. +*** If you really mean to not use this add-on, run configure again +*** using the extra parameter \`--disable-sanity-checks'." + exit 1 + else + echo "\ +*** WARNING: Are you sure you do not want to use the \`nptl' +*** add-on?" + fi +fi + +if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then + if test $enable_sanity = yes; then + echo "\ +*** On GNU/Linux systems the GNU C Library should not be installed into +*** /usr/local since this might make your system totally unusable. +*** We strongly advise to use a different prefix. For details read the FAQ. +*** If you really mean to do this, run configure again using the extra +*** parameter \`--disable-sanity-checks'." + exit 1 + else + echo "\ +*** WARNING: Do you really want to install the GNU C Library into /usr/local? +*** This might make your system totally unusable, for details read the FAQ." + fi +fi + + +# One Linux we use ldconfig. +use_ldconfig=yes + +# We need some extensions to the `ldd' script. +changequote(,) +case "$machine" in + i[3456]86*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed + ;; + s390*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed + ;; + sparc*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed + ;; + x86_64*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed + ;; + powerpc*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed + ;; + *) + ;; +esac +changequote([,]) + +if test $host = $build; then + # If $prefix/include/{net,scsi} are symlinks, make install will + # clobber what they're linked to (probably a kernel tree). + # test -L ought to work on all Linux boxes. + if test "x$prefix" != xNONE; then + ac_prefix=$prefix + else + ac_prefix=$ac_default_prefix + fi + AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include]) + ac_message= + if test -L ${ac_prefix}/include/net; then + ac_message="$ac_message + ${ac_prefix}/include/net is a symlink" + fi + if test -L ${ac_prefix}/include/scsi; then + ac_message="$ac_message + ${ac_prefix}/include/scsi is a symlink" + fi + if test -n "$ac_message"; then + AC_MSG_ERROR([$ac_message +\`make install' will destroy the target of the link(s). +Delete the links and re-run configure, or better still, move the entire +${ac_prefix}/include directory out of the way.]) + else + AC_MSG_RESULT(ok) + fi +fi + +# We have inlined syscalls. +AC_DEFINE(HAVE_INLINED_SYSCALLS) diff --git a/libc/sysdeps/unix/sysv/linux/configure.in b/libc/sysdeps/unix/sysv/linux/configure.in deleted file mode 100644 index 5e5902d8e..000000000 --- a/libc/sysdeps/unix/sysv/linux/configure.in +++ /dev/null @@ -1,215 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -define([LIBC_LINUX_VERSION],[2.6.19])dnl -if test -n "$sysheaders"; then - OLD_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $SYSINCLUDES" -fi -define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl -AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl -AC_EGREP_CPP([eat flaming death], [#include -#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl -patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl -[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ -eat flaming death -#endif], - libc_cv_linuxVER='TOO OLD!', - libc_cv_linuxVER='LIBC_LINUX_VERSION or later')]) -if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then - AC_MSG_ERROR([GNU libc requires kernel header files from -Linux LIBC_LINUX_VERSION or later to be installed before configuring. -The kernel header files are found usually in /usr/include/asm and -/usr/include/linux; make sure these directories use files from -Linux LIBC_LINUX_VERSION or later. This check uses , so -make sure that file was built correctly when installing the kernel header -files. To use kernel headers not from /usr/include/linux, use the -configure option --with-headers.]) -fi - -# If the user gave a minimal version number test whether the available -# kernel headers are young enough. Additionally we have minimal -# kernel versions for some architectures. If a previous configure fragment -# set arch_minimum_kernel already, let that override our defaults here. -# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde -# if appropriate too. -test -n "$arch_minimum_kernel" || -case "$machine" in - i386*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - powerpc/powerpc32*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - s390/s390-32) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - s390/s390-64) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - sh*) - arch_minimum_kernel=2.6.16 - libc_cv_gcc_unwind_find_fde=yes - ;; - sparc/sparc64*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - sparc*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - *) - arch_minimum_kernel=2.6.16 - ;; -esac -if test -n "$minimum_kernel"; then - changequote(,) - user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) - arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) - changequote([,]) - if test $user_version -lt $arch_version; then - AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel]) - minimum_kernel=$arch_minimum_kernel - fi -else - minimum_kernel=$arch_minimum_kernel -fi - -AC_MSG_CHECKING(for kernel header at least $minimum_kernel) -changequote(,)dnl -decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; -abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; -changequote([,])dnl -AC_EGREP_CPP([eat flaming death], [#include -#if LINUX_VERSION_CODE < $decnum -eat flaming death -#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok) -AC_MSG_RESULT($libc_minimum_kernel) -if test "$libc_minimum_kernel" = ok; then - AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum) - AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum) -else - AC_MSG_ERROR([*** The available kernel headers are older than the requested -*** compatible kernel version]) -fi - -# The result of the above test for the use of the FDE code is invalid if -# the user overrides the decision about the minimum ABI. -if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then - libc_cv_gcc_unwind_find_fde=no -fi - -if test -n "$sysheaders"; then - CPPFLAGS=$OLD_CPPFLAGS -fi - -# Under Linux the NPTL add-on should be available. -case $add_ons in - # It is available. Good. - *nptl*) - nptl_missing= - ;; - *) - nptl_missing=yes - ;; -esac - -if test "$nptl_missing"; then - if test $enable_sanity = yes; then - echo "\ -*** On GNU/Linux systems it is normal to compile GNU libc with the -*** \`nptl' add-on. Without that, the library will be -*** incompatible with normal GNU/Linux systems. -*** If you really mean to not use this add-on, run configure again -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** WARNING: Are you sure you do not want to use the \`nptl' -*** add-on?" - fi -fi - -if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then - if test $enable_sanity = yes; then - echo "\ -*** On GNU/Linux systems the GNU C Library should not be installed into -*** /usr/local since this might make your system totally unusable. -*** We strongly advise to use a different prefix. For details read the FAQ. -*** If you really mean to do this, run configure again using the extra -*** parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** WARNING: Do you really want to install the GNU C Library into /usr/local? -*** This might make your system totally unusable, for details read the FAQ." - fi -fi - - -# One Linux we use ldconfig. -use_ldconfig=yes - -# We need some extensions to the `ldd' script. -changequote(,) -case "$machine" in - i[3456]86*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed - ;; - s390*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed - ;; - sparc*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed - ;; - x86_64*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed - ;; - powerpc*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed - ;; - *) - ;; -esac -changequote([,]) - -if test $host = $build; then - # If $prefix/include/{net,scsi} are symlinks, make install will - # clobber what they're linked to (probably a kernel tree). - # test -L ought to work on all Linux boxes. - if test "x$prefix" != xNONE; then - ac_prefix=$prefix - else - ac_prefix=$ac_default_prefix - fi - AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include]) - ac_message= - if test -L ${ac_prefix}/include/net; then - ac_message="$ac_message - ${ac_prefix}/include/net is a symlink" - fi - if test -L ${ac_prefix}/include/scsi; then - ac_message="$ac_message - ${ac_prefix}/include/scsi is a symlink" - fi - if test -n "$ac_message"; then - AC_MSG_ERROR([$ac_message -\`make install' will destroy the target of the link(s). -Delete the links and re-run configure, or better still, move the entire -${ac_prefix}/include directory out of the way.]) - else - AC_MSG_RESULT(ok) - fi -fi - -# We have inlined syscalls. -AC_DEFINE(HAVE_INLINED_SYSCALLS) diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/configure b/libc/sysdeps/unix/sysv/linux/powerpc/configure index 7df7e481f..50e3639be 100644 --- a/libc/sysdeps/unix/sysv/linux/powerpc/configure +++ b/libc/sysdeps/unix/sysv/linux/powerpc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/configure.ac b/libc/sysdeps/unix/sysv/linux/powerpc/configure.ac new file mode 100644 index 000000000..1768ab1f9 --- /dev/null +++ b/libc/sysdeps/unix/sysv/linux/powerpc/configure.ac @@ -0,0 +1,37 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. + +AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format, + libc_cv_mlong_double_128ibm, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -mlong-double-128" +AC_TRY_COMPILE([#include ], [ +#if LDBL_MANT_DIG != 106 +# error "compiler doesn't implement IBM extended format of long double" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mlong_double_128ibm=yes, + libc_cv_mlong_double_128ibm=no) +CFLAGS="$save_CFLAGS"]) + +if test "$libc_cv_mlong_double_128ibm" = no; then + AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble, + libc_cv_mabi_ibmlongdouble, [dnl + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" + AC_TRY_COMPILE([#include ], [ +#if LDBL_MANT_DIG != 106 +# error "compiler doesn't implement IBM extended format of long double" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mabi_ibmlongdouble=yes, + libc_cv_mabi_ibmlongdouble=no) + CFLAGS="$save_CFLAGS"]) + + if test "$libc_cv_mabi_ibmlongdouble" = yes; then + CFLAGS="$CFLAGS -mabi=ibmlongdouble" + else + AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) + fi +fi diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/configure.in b/libc/sysdeps/unix/sysv/linux/powerpc/configure.in deleted file mode 100644 index 1768ab1f9..000000000 --- a/libc/sysdeps/unix/sysv/linux/powerpc/configure.in +++ /dev/null @@ -1,37 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. - -AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format, - libc_cv_mlong_double_128ibm, [dnl -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -mlong-double-128" -AC_TRY_COMPILE([#include ], [ -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mlong_double_128ibm=yes, - libc_cv_mlong_double_128ibm=no) -CFLAGS="$save_CFLAGS"]) - -if test "$libc_cv_mlong_double_128ibm" = no; then - AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble, - libc_cv_mabi_ibmlongdouble, [dnl - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" - AC_TRY_COMPILE([#include ], [ -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mabi_ibmlongdouble=yes, - libc_cv_mabi_ibmlongdouble=no) - CFLAGS="$save_CFLAGS"]) - - if test "$libc_cv_mabi_ibmlongdouble" = yes; then - CFLAGS="$CFLAGS -mabi=ibmlongdouble" - else - AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) - fi -fi diff --git a/libc/sysdeps/unix/sysv/linux/shm_open.c b/libc/sysdeps/unix/sysv/linux/shm_open.c index 41d93155a..482b49cfe 100644 --- a/libc/sysdeps/unix/sysv/linux/shm_open.c +++ b/libc/sysdeps/unix/sysv/linux/shm_open.c @@ -148,14 +148,15 @@ shm_open (const char *name, int oflag, mode_t mode) while (name[0] == '/') ++name; - if (name[0] == '\0') + namelen = strlen (name); + + /* Validate the filename. */ + if (name[0] == '\0' || namelen > NAME_MAX || strchr (name, '/') == NULL) { - /* The name "/" is not supported. */ __set_errno (EINVAL); return -1; } - namelen = strlen (name); fname = (char *) alloca (mountpoint.dirlen + namelen + 1); __mempcpy (__mempcpy (fname, mountpoint.dir, mountpoint.dirlen), name, namelen + 1); @@ -237,14 +238,15 @@ shm_unlink (const char *name) while (name[0] == '/') ++name; - if (name[0] == '\0') + namelen = strlen (name); + + /* Validate the filename. */ + if (name[0] == '\0' || namelen > NAME_MAX || strchr (name, '/') == NULL) { - /* The name "/" is not supported. */ __set_errno (ENOENT); return -1; } - namelen = strlen (name); fname = (char *) alloca (mountpoint.dirlen + namelen + 1); __mempcpy (__mempcpy (fname, mountpoint.dir, mountpoint.dirlen), name, namelen + 1); diff --git a/libc/sysdeps/x86_64/configure b/libc/sysdeps/x86_64/configure index 923241195..5a83a53aa 100644 --- a/libc/sysdeps/x86_64/configure +++ b/libc/sysdeps/x86_64/configure @@ -29,7 +29,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/x86_64. diff --git a/libc/sysdeps/x86_64/configure.ac b/libc/sysdeps/x86_64/configure.ac new file mode 100644 index 000000000..c682f93c3 --- /dev/null +++ b/libc/sysdeps/x86_64/configure.ac @@ -0,0 +1,57 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/x86_64. + +AC_CHECK_HEADER([cpuid.h], , + [AC_MSG_ERROR([gcc must provide the header])], + [/* No default includes. */]) + +dnl Check if -msse4 works. +AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl +LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) +]) +if test $libc_cv_cc_sse4 = yes; then + AC_DEFINE(HAVE_SSE4_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) + +dnl Check if -mavx works. +AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl +LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) +]) +if test $libc_cv_cc_avx = yes; then + AC_DEFINE(HAVE_AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) + +dnl Check if -msse2avx works. +AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl +LIBC_TRY_CC_OPTION([-msse2avx], + [libc_cv_cc_sse2avx=yes], + [libc_cv_cc_sse2avx=no]) +]) +if test $libc_cv_cc_sse2avx = yes; then + AC_DEFINE(HAVE_SSE2AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) + +dnl Check if -mfma4 works. +AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl +LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) +]) +if test $libc_cv_cc_fma4 = yes; then + AC_DEFINE(HAVE_FMA4_SUPPORT) +fi +LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) + +dnl Check if -mno-vzeroupper works. +AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl +LIBC_TRY_CC_OPTION([-mno-vzeroupper], + [libc_cv_cc_novzeroupper=yes], + [libc_cv_cc_novzeroupper=no]) +]) +LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) +# work around problem with autoconf and empty lines at the end of files diff --git a/libc/sysdeps/x86_64/configure.in b/libc/sysdeps/x86_64/configure.in deleted file mode 100644 index c682f93c3..000000000 --- a/libc/sysdeps/x86_64/configure.in +++ /dev/null @@ -1,57 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/x86_64. - -AC_CHECK_HEADER([cpuid.h], , - [AC_MSG_ERROR([gcc must provide the header])], - [/* No default includes. */]) - -dnl Check if -msse4 works. -AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl -LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) -]) -if test $libc_cv_cc_sse4 = yes; then - AC_DEFINE(HAVE_SSE4_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) - -dnl Check if -mavx works. -AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl -LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) -]) -if test $libc_cv_cc_avx = yes; then - AC_DEFINE(HAVE_AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) - -dnl Check if -msse2avx works. -AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl -LIBC_TRY_CC_OPTION([-msse2avx], - [libc_cv_cc_sse2avx=yes], - [libc_cv_cc_sse2avx=no]) -]) -if test $libc_cv_cc_sse2avx = yes; then - AC_DEFINE(HAVE_SSE2AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) - -dnl Check if -mfma4 works. -AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl -LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) -]) -if test $libc_cv_cc_fma4 = yes; then - AC_DEFINE(HAVE_FMA4_SUPPORT) -fi -LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) - -dnl Check if -mno-vzeroupper works. -AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl -LIBC_TRY_CC_OPTION([-mno-vzeroupper], - [libc_cv_cc_novzeroupper=yes], - [libc_cv_cc_novzeroupper=no]) -]) -LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) -# work around problem with autoconf and empty lines at the end of files diff --git a/libc/sysdeps/x86_64/preconfigure b/libc/sysdeps/x86_64/preconfigure index d5abba882..c8f1e0e13 100644 --- a/libc/sysdeps/x86_64/preconfigure +++ b/libc/sysdeps/x86_64/preconfigure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local preconfigure fragment for sysdeps/x86_64 test -n "$base_machine" || case "$machine" in diff --git a/libc/sysdeps/x86_64/preconfigure.ac b/libc/sysdeps/x86_64/preconfigure.ac new file mode 100644 index 000000000..600700ea1 --- /dev/null +++ b/libc/sysdeps/x86_64/preconfigure.ac @@ -0,0 +1,20 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local preconfigure fragment for sysdeps/x86_64 + +test -n "$base_machine" || case "$machine" in +x86_64) + base_machine=x86_64 + # Check if we are building for x32. + AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default, + libc_cv_x32, [dnl + AC_TRY_COMPILE(dnl +[#ifndef __ILP32__ +# error not x32 +#endif], [], libc_cv_x32=yes, libc_cv_x32=no)]) + if test $libc_cv_x32 = yes; then + machine=x86_64/x32 + else + machine=x86_64/64 + fi + ;; +esac diff --git a/libc/sysdeps/x86_64/preconfigure.in b/libc/sysdeps/x86_64/preconfigure.in deleted file mode 100644 index 600700ea1..000000000 --- a/libc/sysdeps/x86_64/preconfigure.in +++ /dev/null @@ -1,20 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local preconfigure fragment for sysdeps/x86_64 - -test -n "$base_machine" || case "$machine" in -x86_64) - base_machine=x86_64 - # Check if we are building for x32. - AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default, - libc_cv_x32, [dnl - AC_TRY_COMPILE(dnl -[#ifndef __ILP32__ -# error not x32 -#endif], [], libc_cv_x32=yes, libc_cv_x32=no)]) - if test $libc_cv_x32 = yes; then - machine=x86_64/x32 - else - machine=x86_64/64 - fi - ;; -esac diff --git a/libc/time/strptime_l.c b/libc/time/strptime_l.c index e61a0b342..9ea11ebfa 100644 --- a/libc/time/strptime_l.c +++ b/libc/time/strptime_l.c @@ -745,7 +745,11 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM) s.want_xday = 1; break; case 'Z': - /* XXX How to handle this? */ + /* Read timezone but perform no conversion. */ + while (ISSPACE (*rp)) + rp++; + while (!ISSPACE (*rp) && *rp != '\0') + rp++; break; case 'z': /* We recognize two formats: if two digits are given, these diff --git a/libc/time/tst-strptime.c b/libc/time/tst-strptime.c index 21fbb6364..193f7dbe0 100644 --- a/libc/time/tst-strptime.c +++ b/libc/time/tst-strptime.c @@ -41,6 +41,7 @@ static const struct { "C", "19990502123412", "%Y%m%d%H%M%S", 0, 121, 4, 2 }, { "C", "2001 20 Mon", "%Y %U %a", 1, 140, 4, 21 }, { "C", "2001 21 Mon", "%Y %W %a", 1, 140, 4, 21 }, + { "C", "2001 EST 21 Mon", "%Y %Z %W %a", 1, 140, 4, 21 }, { "C", "2012 00 Sun", "%Y %W %a", 0, 0, 0, 1 }, { "ja_JP.EUC-JP", "2000-01-01 08:12:21 AM", "%Y-%m-%d %I:%M:%S %p", 6, 0, 0, 1 }, diff --git a/libc/time/tzfile.c b/libc/time/tzfile.c index 9dd513075..3ea3051f4 100644 --- a/libc/time/tzfile.c +++ b/libc/time/tzfile.c @@ -114,6 +114,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap) int was_using_tzfile = __use_tzfile; int trans_width = 4; size_t tzspec_len; + char *new = NULL; if (sizeof (time_t) != 4 && sizeof (time_t) != 8) abort (); @@ -145,22 +146,12 @@ __tzfile_read (const char *file, size_t extra, char **extrap) if (*file != '/') { const char *tzdir; - unsigned int len, tzdir_len; - char *new, *tmp; tzdir = getenv ("TZDIR"); if (tzdir == NULL || *tzdir == '\0') - { - tzdir = default_tzdir; - tzdir_len = sizeof (default_tzdir) - 1; - } - else - tzdir_len = strlen (tzdir); - len = strlen (file) + 1; - new = (char *) __alloca (tzdir_len + 1 + len); - tmp = __mempcpy (new, tzdir, tzdir_len); - *tmp++ = '/'; - memcpy (tmp, file, len); + tzdir = default_tzdir; + if (__asprintf (&new, "%s/%s", tzdir, file) == -1) + goto ret_free_transitions; file = new; } @@ -170,11 +161,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap) && stat64 (file, &st) == 0 && tzfile_ino == st.st_ino && tzfile_dev == st.st_dev && tzfile_mtime == st.st_mtime) - { - /* Nothing to do. */ - __use_tzfile = 1; - return; - } + goto done; /* Nothing to do. */ /* Note the file is opened with cancellation in the I/O functions disabled and if available FD_CLOEXEC set. */ @@ -527,12 +514,15 @@ __tzfile_read (const char *file, size_t extra, char **extrap) __daylight = rule_stdoff != rule_dstoff; __timezone = -rule_stdoff; + done: __use_tzfile = 1; + free (new); return; lose: fclose (f); ret_free_transitions: + free (new); free ((void *) transitions); transitions = NULL; } -- cgit v1.2.3