about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* locale: Fix localedef exit code (Bug 22292)Carlos O'Donell2017-10-1326-489/+767
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error and warning handling in localedef, locale, and iconv is a bit of a mess. We use ugly constructs like this: WITH_CUR_LOCALE (error (1, errno, gettext ("\ cannot read character map directory `%s'"), directory)); to issue errors, and read error_message_count directly from the error API to detect errors. The problem with that is that the code also uses error to print warnings, and informative messages. All of this leads to problems where just having warnings will produce an exit status as-if errors had been seen. To fix this situation I have adopted the following high-level changes: * All errors are counted distinctly. * All warnings are counted distinctly. * All informative messages are not counted. * Increasing verbosity cannot generate *more* errors, and it previously did for errors conditional on verbose, this is now fixed. * Increasing verbosity *can* generate *more* warnings. * Making the output quiet cannot generate *fewer* errors, and it previously did for errors conditional on be_quiet, this is now fixed. * Each of error, warning, and informative message has it's own function to call defined in record-status.h, and they are: record_error, record_warning, and record_verbose. * The record_error function always records an error, but conditional on be_quiet may not print it. * The record_warning function always records a warning, but conditional on be_quiet may not print it. * The record_verbose function only prints the verbose message if verbose is true and be_quiet is false. This has allowed the following fix: * Previously any warnings were being treated as errors because they incremented error_message_count, but now we properly return an exit status of 1 if there are warnings but output was generated. All of this allows localedef to correctly decide if errors, or warnings were present, and produce the correct exit code. The locale and iconv programs now also use record-status.h and we have removed the WITH_CUR_LOCALE hack, and instead have internal push_locale/pop_locale functions centralized in the record routines. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* localedata: Reorganize Unicode LC_CTYPE inclusion.Carlos O'Donell2017-10-134-2309/+2369
| | | | | | | | | | | | | | | | The commit does the following things: * Move non-transliteration Unicode generated data to i18n_ctype. * Copy the i18n_ctype data into i18n and add transliteration. In the future, any locale which needs Unicode LC_CTYPE data can also just use `copy i18n_ctype` and get the base character classes and maps without transliteration. Tested by compiling all the locales and my prototype C.UTF-8 which uses it. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* Support strfromf128 alias.Joseph Myers2017-10-132-0/+17
| | | | | | | | | | | | | | This patch adds support for building strfromf128 as an alias of strfroml, in the case of __HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. Also tested together with changes to enable float128 aliases. * stdlib/strfroml.c: Include <bits/floatn.h>. [__HAVE_FLOAT128 && !__HAVE_DISTINCT_FLOAT128] (strfromf128): Define before include of <stdlib.h> and undefine afterwards, then define as weak alias.
* Use libm_alias_ldouble_other in ldbl-64-128/s_nextafterl.c.Joseph Myers2017-10-132-0/+9
| | | | | | | | | | | | | | | | This patch makes ldbl-64-128/s_nextafterl.c restore the default weak_alias definition and use libm_alias_ldouble_other (having undefined and redefined weak_alias for the include of ldbl-128/s_nextafterl.c, so the libm_alias_ldouble use in the latter file is ineffective). Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. Also tested together with changes to enable float128 aliases. * sysdeps/ieee754/ldbl-64-128/s_nextafterl.c (weak_alias): Undefine and restore default definition. Use libm_alias_ldouble_other.
* nptl: Preserve error in setxid thread broadcast in coredumps [BZ #22153]Peter Zelezny2017-10-132-2/+13
|
* Fix TLS relocations against local symbols on powerpc32, sparc32 and sparc64James Clarke2017-10-134-1/+15
| | | | | | | | | | | | | | | | | | | | | Normally, TLS relocations against local symbols are optimised by the linker to be absolute. However, gold does not do this, and so it is possible to end up with, for example, R_SPARC_TLS_DTPMOD64 referring to a local symbol. Since sym_map is left as null in elf_machine_rela for the special local symbol case, the relocation handling thinks it has nothing to do, and so the module gets left as 0. Havoc then ensues when the variable in question is accessed. Before this fix, the main_local_gold program would receive a SIGBUS on sparc64, and SIGSEGV on powerpc32. With this fix applied, that test now passes like the rest of them. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Assign sym_map to be map for local symbols, as TLS relocations use sym_map to determine whether the symbol is defined and to extract the TLS information. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
* powerpc: Avoid putting floating point values in memory [BZ #22189]Tulio Magno Quites Machado Filho2017-10-132-0/+11
| | | | | | [BZ #22189] * sysdeps/powerpc/fpu/math_private.h (math_opt_barrier): (math_force_eval): Add powerpc version.
* [BZ #22142] powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7Tulio Magno Quites Machado Filho2017-10-134-4/+27
| | | | | | | | | | | | | | | | | Fix the ifdef clause that was being used in the opposite way, setting a wrong value of the carry bit. This is also correcting 2 memory accesses that were mistakenly referring to r0 while they were supposed to mean the immediate value 0. [BZ #22142] * stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and -DBL_MAX. (do_test): Likewise. * stdio-common/tst-printf.sh: Likewise. * sysdeps/powerpc/powerpc64/power7/add_n.S: Invert the initial ifdef clause in order to set the carry bit right. Replace r0 by 0 without changing the behavior.
* Use libm_alias_ldouble for SPARC fabsl.Joseph Myers2017-10-133-2/+12
| | | | | | | | | | | | | | | | This patch makes SPARC fabsl implementation use libm_alias_ldouble, to prepare them for also defining _Float128 function aliases. Tested with build-many-glibcs.py that installed stripped shared libraries (sparc64-linux-gnu and sparcv9-linux-gnu) are unchanged by the patch. * sysdeps/sparc/sparc32/fpu/s_fabsl.c: Include <libm-alias-ldouble.h>. (fabsl): Define using libm_alias_ldouble. * sysdeps/sparc/sparc64/fpu/s_fabsl.c: Include <libm-alias-ldouble.h>. (fabsl): Define using libm_alias_ldouble.
* Fix ldbl-opt/w_lgamma_compatl.c libm_alias_ldouble_other usage.Joseph Myers2017-10-132-5/+3
| | | | | | | | | | | | | | | Testing with changes to enable _Float128 function aliases shows that the libm_alias_ldouble_other usage in ldbl-opt/w_lgamma_compatl.c does not in fact work. Furthermore, it is unnecessary; the relevant aliases get created through w_lgammal_compat2.c. This patch removes the problem code. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. Also tested in conjunction with patches to enable _Float128 function aliases. * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c [BUILD_LGAMMA]: Remove conditional code.
* Fix ldbl-opt/s_clog10l.c libm_alias_ldouble_other usage.Joseph Myers2017-10-132-3/+11
| | | | | | | | | | | | | | | | | | | | | Testing with changes to enable _Float128 function aliases shows that the libm_alias_ldouble_other usage in ldbl-opt/s_clog10l.c does not in fact work, because __clog10l is defined with long_double_symbol rather than as a normal C alias. This patch fixes this by renaming the __clog10l__internal alias (not strictly necessary, but avoids a hack with "__clog10l_interna" / "__clog10l__interna" as first argument to libm_alias_ldouble_other) and using the renamed alias when calling libm_alias_ldouble_other. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanges by the patch. Also tested in conjunction with patches to enable _Float128 function aliases. * sysdeps/ieee754/ldbl-opt/s_clog10l.c (__clog10l__internal): Rename to __clog10_internal_l. (__clog10_internal_l): Define aliases using libm_alias_ldouble_other instead of using libm_alias_ldouble_other with __clog10.
* Benchtests for sinf, cosf and sincosfRajalakshmi Srinivasaraghavan2017-10-135-1/+10633
| | | | Numbers used from cos and sin inputs.
* fix posix/tst-spawn testSzabolcs Nagy2017-10-122-8/+16
| | | | | | | The test spawns two children but only waited for one. The fix avoids printing to stderr. * posix/tst-spawn.c (do_test): Wait for both children.
* Update ChangeLog entry for commit d165ca6498H.J. Lu2017-10-121-0/+1
|
* Support profiling PIE [BZ #22284]H.J. Lu2017-10-124-10/+79
| | | | | | | | | | | | | | | | | | | | | | | | | Since PIE can be loaded at any address, we need to subtract load address from PCs. [BZ #22284] * gmon/Makefile [$(have-fpie)$(build-shared) == yesyes] (tests, tests-pie): Add tst-gmon-pie. (CFLAGS-tst-gmon-pie.c): New. (CRT-tst-gmon-pie): Likewise. (tst-gmon-pie-ENV): Likewise. [$(have-fpie)$(build-shared) == yesyes] (tests-special): Likewise. ($(objpfx)tst-gmon-pie.out): Likewise. (clean-tst-gmon-pie-data): Likewise. ($(objpfx)tst-gmon-pie-gprof.out): Likewise. * gmon/gmon.c [PIC]: Include <link.h>. [PIC] (callback): New function. (write_hist): Add an argument for load address. Subtract load address from PCs. (write_call_graph): Likewise. (write_gmon): Call __dl_iterate_phdr to get load address, pass it to write_hist and write_call_graph. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Run libm long double tests for long double = double.Joseph Myers2017-10-117-11/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All interfaces in the glibc API ought to be covered by the testsuite, even where they alias other interfaces. This patch arranges for libm tests to be run for long double when it aliases double; previously those tests were run only for the floating-point types with distinct formats. The long double tests are made to use the double ulps values in this case, as having a separate duplicate set of ulps for them seems unnecessary; to accommodate that, the test-<type>.h headers now specify the macro indexing into the ulps array explicitly instead of having it computed from PREFIX. Nothing special is done about vector function tests. None are supported for any long double = double platforms, and supporting vector functions for a type alias such as _Float32 would not simply fall out of adding the scalar aliases for that type - it would require vector function wrappers like those for *_finite (or, better, a new GCC feature to allow specifying the asm name for vector functions independently of that for scalar ones, as previously discussed), so it seems reasonable to require the sysdeps makefile setting of libmvec-tests to be updated if any such tests are to be run for type aliases. Tested for x86_64 and arm. * math/Makefile (test-types-basic): New variable. (test-types): Likewise. (libm-test-support): Use $(test-types) instead of $(types). (libm-tests-base-normal): Likewise. (libm-tests-base-finite): Likewise. (libm-tests-base-inline): Likewise. (generated): Likewise. ($(objpfx)libm-test-support-$(t).c): Likewise. (libm-tests-for-type iterator): Likewise. (libm-test-support iterator): Likewise. * math/libm-test-support.c (ulp_i_idx): Use ULP_I_IDX. (ulp_idx): Use ULP_IDX. * math/test-ldouble.h: Include <float.h>. (TYPE_STR): Define conditional on [LDBL_MANT_DIG == DBL_MANT_DIG]. (ULP_IDX): New macro. (ULP_I_IDX): Likewise. * math/test-double.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise. * math/test-float.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise. * math/test-float128.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise.
* Linux: Consolidate {RTLD_}SINGLE_THREAD_P definitionAdhemerval Zanella2017-10-1126-676/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current GLIBC has two ways to implement the single thread optimization on syscalls to avoid calling the cancellation path: either by using global variables (__{libc,pthread}_multiple_thread) or by accessing the TCB field (defined by TLS_MULTIPLE_THREADS_IN_TCB). Both the variables and the macros to acces its value are defined in the architecture sysdep-cancel.h header. This patch consolidates its definition on only one header, sysdeps/unix/sysv/linux/sysdep-cancel.h, and adds a new define (SINGLE_THREAD_BY_GLOBAL) which the architecture defines if it prefer to use the global variables instead of the TCB field. This is an optimization, so if the architecture does not define it, the TCB method will be used as default. Checked on x86_64-linux-gnu and on a build with major touched ABIs (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf, hppa-linux-gnu, i686-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu, mips-linux-gnu, mips64-linux-gnu, powerpc-linux-gnu, powerpc64le-linux-gnu, s390-linux-gnu, s390x-linux-gnu, sh4-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, tilegx-linux-gnu). * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Remove file. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Define. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SINGLE_THREAD_BY_GLOBAL): Likewise.
* nscd: remove reference to libnslAndreas Schwab2017-10-117-17/+64
| | | | | This removes the dependency on libnsl from nscd. It only used __nis_hash, build its own copy under the name __nscd_hash.
* nss_files: Avoid large buffers with many host addresses [BZ #22078]Florian Weimer2017-10-114-96/+472
| | | | | The previous implementation had at least a quadratic space requirement in the number of host addresses and aliases.
* nss_files: Use struct scratch_buffer for gethostbyname [BZ #18023]Florian Weimer2017-10-112-156/+144
|
* Use generic alias macros in ldbl-opt.Joseph Myers2017-10-115-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes ldbl-opt code to use generic libm alias macros in preparation for getting _FloatN / _FloatNx aliases where appropriate. Four functions are affected, that undefine and redefine alias macros before including the implementations they wrap in such a way that _FloatN / _FloatNx aliases would not appear. s_clog10l.c undefines and redefined declare_mgen_alias, so just needs a libm_alias_ldouble_other call added. w_exp10l_compat.c undefines and redefines weak_alias, but in fact does not need to do so, since math/w_exp10l_compat.c uses libm_alias_ldouble and does not use weak_alias other than through that, so the undefines and redefines of weak_alias are removed. w_lgamma_compatl.c and w_remainderl_compat.c are made to use libm_alias_ldouble_other in conjunction with restoring the original definition of weak_alias so this is effective. Tested with build-many-glibcs.py. Installed stripped shared libraries are unchanged by this patch. * sysdeps/ieee754/ldbl-opt/s_clog10l.c: Use libm_alias_ldouble_other. * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (weak_alias): Do not undefine and redefine. [LIBM_SVID_COMPAT && !LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)] (exp10l): Do not define here. * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c [BUILD_LGAMMA] (weak_alias): Undefine and redefine. [BUILD_LGAMMA]: Use libm_alias_ldouble_other. * sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c [LIBM_SVID_COMPAT] (weak_alias): Undefine and redefine here. [LIBM_SVID_COMPAT]: Use libm_alias_ldouble_other.
* Use libm_alias_* in soft-fp.Joseph Myers2017-10-114-8/+15
| | | | | | | | | | | | | | | This patch makes the soft-fp implementations of fma functions use the libm_alias_* macros. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * soft-fp/fmadf4.c: Include <libm-alias-double.h>. [!__fma] (fma): Define using libm_alias_double. * soft-fp/fmasf4.c: Include <libm-alias-float.h>. [!__fmaf] (fmaf): Define using libm_alias_float. * soft-fp/fmatf4.c: Include <libm-alias-ldouble.h>. (fmal): Define using libm_alias_ldouble.
* Add libm_alias_*_other_r macros.Joseph Myers2017-10-1020-7/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some libm functions are unable to use the generic alias macros such as libm_alias_double because they have special symbol versioning requirements for the main float, double or long double public names. To facilitate adding _FloatN / _FloatNx function aliases in future, it's still desirable to have generic macros those functions can use as far as possible. This patch adds macros such as libm_alias_double_other, which only define names for _FloatN / _FloatNx aliases, not for float / double / long double. As present, all these new macros do nothing, but they are called in the appropriate places in macros such as libm_alias_double. This patch also arranges for lgamma implementations, and the recently added optimized float function implementations, to use the new macros to make them ready for addition of _FloatN / _FloatNx aliases. Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/generic/libm-alias-double.h (libm_alias_double_other_r): New macro. (libm_alias_double_other): Likewise. (libm_alias_double_r): Use libm_alias_double_other_r. * sysdeps/generic/libm-alias-float.h (libm_alias_float_other_r): New macro. (libm_alias_float_other): Likewise. (libm_alias_float_r): Use libm_alias_float_other_r. * sysdeps/generic/libm-alias-float128.h (libm_alias_float128_other_r): New macro. (libm_alias_float128_other): Likewise. (libm_alias_float128_r): Use libm_alias_float128_other_r. * sysdeps/generic/libm-alias-ldouble.h (libm_alias_ldouble_other_r): New macro. (libm_alias_ldouble_other): Likewise. (libm_alias_ldouble_r): Use libm_alias_ldouble_other_r. * sysdeps/ieee754/ldbl-opt/libm-alias-double.h (libm_alias_double_other_r): New macro. (libm_alias_double_other): Likewise. (libm_alias_double_r): Use libm_alias_double_other_r. * sysdeps/ieee754/ldbl-opt/libm-alias-ldouble.h (libm_alias_ldouble_other_r): New macro. (libm_alias_ldouble_other): Likewise. (libm_alias_ldouble_r): Use libm_alias_ldouble_other_r. * math/w_lgamma_main.c: Include <libm-alias-double.h>. [!USE_AS_COMPAT]: Use libm_alias_double_other. * math/w_lgammaf_main.c: Include <libm-alias-float.h>. [!USE_AS_COMPAT]: Use libm_alias_float_other. * math/w_lgammal_main.c: Include <libm-alias-ldouble.h>. [!USE_AS_COMPAT]: Use libm_alias_ldouble_other. * math/w_exp2f.c: Use libm_alias_float_other. * math/w_expf.c: Likewise. * math/w_log2f.c: Likewise. * math/w_logf.c: Likewise. * math/w_powf.c: Likewise. * sysdeps/ieee754/flt-32/e_exp2f.c: Include <libm-alias-float.h>. [!__exp2f]: Use libm_alias_float_other. * sysdeps/ieee754/flt-32/e_expf.c: Include <libm-alias-float.h>. [!__expf]: Use libm_alias_float_other. * sysdeps/ieee754/flt-32/e_log2f.c: Include <libm-alias-float.h>. [!__log2f]: Use libm_alias_float_other. * sysdeps/ieee754/flt-32/e_logf.c: Include <libm-alias-float.h>. [!__logf]: Use libm_alias_float_other. * sysdeps/ieee754/flt-32/e_powf.c: Include <libm-alias-float.h>. [!__powf]: Use libm_alias_float_other.
* nss_files: Refactor gethostbyname3 multi case into separate functionFlorian Weimer2017-10-102-193/+208
| | | | This is in preparation of further cleanup work.
* Use generic macros for lgamma_r function aliases.Joseph Myers2017-10-0912-34/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the use of generic macros for defining libm function aliases, in preparation for adding more _FloatN / _FloatNx function names, this patch makes the lgamma_r functions use such macros. declare_mgen_alias_r becomes a standard macro in math-type-macros.h instead of being locally defined in w_lgamma_r_templace.c. This in turn must be defined by each math-type-macros-<type>.h. Rather than providing an unused default in math-type-macros.h, that header is made to give an error if math-type-macros-<type>.h failed to define declare_mgen_alias or declare_mgen_alias_r. The compat lgamma_r wrappers are updated similarly. The ldbl-opt versions are removed as no longer needed. Tested for x86_64, and with build-many-glibcs.py. Installed stripped shared libraries are unchanged except for powerpc64le (where the usual issue applies that an ldbl-opt long double function previously used long_double_symbol unconditionally and now the symbol versions on powerpc64le mean weak_alias is used instead, resulting in the same symbol versions in the final shared library but still enough difference in the input objects for that library not to be byte-identical). * sysdeps/generic/math-type-macros.h [!declare_mgen_alias]: Give error. Remove default definition of declare_mgen_alias. [!declare_mgen_alias_r]: Likewise. * sysdeps/generic/math-type-macros-double.h [!declare_mgen_alias_r] (declare_mgen_alias_r): New macro. * sysdeps/generic/math-type-macros-float.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * sysdeps/generic/math-type-macros-float128.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * sysdeps/generic/math-type-macros-ldouble.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * math/w_lgamma_r_template.c (declare_mgen_alias_r_x): Remove macro. (declare_mgen_alias_r_s): Likewise. (declare_mgen_alias_r): Likewise. * math/w_lgamma_r_compat.c: Include <libm-alias-double.h>. (lgamma_r): Define using libm_alias_double_r. * math/w_lgammaf_r_compat.c: Include <libm-alias-float.h>. (lgammaf_r): Define using libm_alias_float_r. * math/w_lgammal_r_compat.c: Include <libm-alias-ldouble.h>. (lgammal_r): Define using libm_alias_ldouble_r. * sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c: Remove file. * sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c: Likewise.
* posix: remove glob internal bogus extern declAdhemerval Zanella2017-10-092-3/+5
| | | | | | | Sync with gnulib f586d709f07. Checked on x86_64-linux-gnu. * lib/glob.c (__glob_pattern_type): Remove now-spurious extern declaration.
* Remove ldbl-opt w_scalbln.c.Joseph Myers2017-10-092-5/+4
| | | | | | | | | | | The ldbl-opt version of w_scalbln.c is not in fact needed; it handles compat symbol versions for libc, but this file isn't built for libc, only for libm. This patch removes this file. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/ieee754/ldbl-opt/w_scalbln.c: Remove file.
* Ensure C99 and C11 interfaces are available for C++ [BZ #21326]Jonathan Wakely2017-10-094-7/+182
| | | | | | | | | | | | | | This patch ensures that the C99 and C11 features required by C++ are defined according to the value of the __cplusplus macro, and not just because G++ always defines _GNU_SOURCE. This will allow G++ to stop defining _GNU_SOURCE some day, without causing the C99 and C11 interfaces to disappear for C++ programs. [BZ #21326] * include/features.h [__cplusplus >= 201103] (__USE_ISOC99): Define. [__cplusplus >= 201703] (__USE_ISOCXX17, __USE_ISOC11): Define. * math/Makefile (test-math-cxx11): New test. * math/test-math-cxx11.cc: New file.
* openpty: use TIOCGPTPEER to open slave side fdChristian Brauner2017-10-082-6/+27
| | | | | | | | | | | Newer kernels expose the ioctl TIOCGPTPEER [1] call to userspace which allows to safely allocate a file descriptor for a pty slave based solely on the master file descriptor. This allows us to avoid path-based operations and makes this function a lot safer in the face of devpts mounts in different mount namespaces. [1]: https://patchwork.kernel.org/patch/9760743/ Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
* openpty: close slave pty fd on errorChristian Brauner2017-10-082-14/+20
| | | | | | | When openpty() failed only the master fd was closed so far. Let's close the slave fd as well. Also, let's unify the error handling. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
* Add missing reference to bug 21654Florian Weimer2017-10-071-0/+1
|
* Use libm_alias_double in ldbl-128, ldbl-96 fma.Joseph Myers2017-10-063-2/+9
| | | | | | | | | | | | | This patch makes the ldbl-128 and ldbl-96 implementations of fma use libm_alias_double. Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/ieee754/ldbl-128/s_fma.c: Include <libm-alias-double.h>. [!__fma] (fma): Define using libm_alias_double. * sysdeps/ieee754/ldbl-96/s_fma.c: Include <libm-alias-double.h>. [!__fma] (fma): Define using libm_alias_double.
* Use libm_alias_ldouble for ldbl-128 functions.Joseph Myers2017-10-0670-176/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes ldbl-128 functions use libm_alias_ldouble to define function aliases. float128_private.h is updated accordingly. Most of the ldbl-64-128 wrappers are removed as no longer needed with this change (leaving those that involve versioning for functions in libc or that shouldn't be exported from libm for _Float128 / _Float64x types with the same format as long double). Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/ieee754/float128/float128_private.h: Include <libm-alias-ldouble.h> and <libm-alias-float128.h>. (libm_alias_ldouble_r): Undefine and redefine. * sysdeps/ieee754/ldbl-128/s_asinhl.c: Include <libm-alias-ldouble.h>. (asinhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_atanl.c: Include <libm-alias-ldouble.h>. (atanl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_cbrtl.c: Include <libm-alias-ldouble.h>. (cbrtl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_ceill.c: Include <libm-alias-ldouble.h>. (ceill): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_copysignl.c: Include <libm-alias-ldouble.h>. (copysignl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_cosl.c: Include <libm-alias-ldouble.h>. (cosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_erfl.c: Include <libm-alias-ldouble.h>. (erfl): Define using libm_alias_ldouble. (erfcl): Likewise. * sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <libm-alias-ldouble.h>. (expm1l): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_fabsl.c: Include <libm-alias-ldouble.h>. (fabsl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_floorl.c: Include <libm-alias-ldouble.h>. (floorl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_fmal.c: Include <libm-alias-ldouble.h>. (fmal): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_frexpl.c: Include <libm-alias-ldouble.h>. (frexpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_fromfpl.c (fromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_fromfpl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-128/s_fromfpxl.c (fromfpxl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_getpayloadl.c: Include <libm-alias-ldouble.h>. (getpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_llrintl.c: Include <libm-alias-ldouble.h>. (llrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_llroundl.c: Include <libm-alias-ldouble.h>. (llroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_logbl.c: Include <libm-alias-ldouble.h>. (logbl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_lrintl.c: Include <libm-alias-ldouble.h>. (lrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_lroundl.c: Include <libm-alias-ldouble.h>. (lroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_modfl.c: Include <libm-alias-ldouble.h>. (modfl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Include <libm-alias-ldouble.h>. (nearbyintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_nextafterl.c: Include <libm-alias-ldouble.h>. (nextafterl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_nextupl.c: Include <libm-alias-ldouble.h>. (nextupl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_remquol.c: Include <libm-alias-ldouble.h>. (remquol): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_rintl.c: Include <libm-alias-ldouble.h>. (rintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_roundevenl.c: Include <libm-alias-ldouble.h>. (roundevenl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_roundl.c: Include <libm-alias-ldouble.h>. (roundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_setpayloadl.c (setpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_setpayloadl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c (setpayloadsigl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_sincosl.c: Include <libm-alias-ldouble.h>. (sincosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_sinl.c: Include <libm-alias-ldouble.h>. (sinl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_tanhl.c: Include <libm-alias-ldouble.h>. (tanhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_tanl.c: Include <libm-alias-ldouble.h>. (tanl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_totalorderl.c: Include <libm-alias-ldouble.h>. (totalorderl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_totalordermagl.c: Include <libm-alias-ldouble.h>. (totalordermagl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_truncl.c: Include <libm-alias-ldouble.h>. (truncl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_ufromfpl.c (ufromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-128/s_ufromfpxl.c (ufromfpxl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-64-128/s_copysignl.c: Include <libm-alias-ldouble.h>. (weak_alias): Do not undefine and redefine. [IS_IN (libc)] (libm_alias_ldouble): Undefine and redefine. (copysignl): Define with long_double_symbol only if [IS_IN (libc)]. * sysdeps/ieee754/ldbl-64-128/s_frexpl.c: Include <libm-alias-ldouble.h>. (weak_alias): Do not undefine and redefine. [IS_IN (libc)] (libm_alias_ldouble): Undefine and redefine. (frexpl): Define with long_double_symbol only if [IS_IN (libc)]. * sysdeps/ieee754/ldbl-64-128/s_modfl.c: Include <libm-alias-ldouble.h>. (weak_alias): Do not undefine and redefine. [IS_IN (libc)] (libm_alias_ldouble): Undefine and redefine. (modfl): Define with long_double_symbol only if [IS_IN (libc)]. * sysdeps/ieee754/ldbl-64-128/s_asinhl.c: Remove file. * sysdeps/ieee754/ldbl-64-128/s_atanl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_cbrtl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_ceill.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_cosl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_erfl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_expm1l.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_fabsl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_floorl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_logbl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_remquol.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_rintl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_roundl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_sincosl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_sinl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_tanhl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_tanl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_truncl.c: Likewise.
* malloc: Fix tcache leak after thread destruction [BZ #22111]Carlos O'Donell2017-10-064-3/+129
| | | | | | | | | | | | | | | The malloc tcache added in 2.26 will leak all of the elements remaining in the cache and the cache structure itself when a thread exits. The defect is that we do not set tcache_shutting_down early enough, and the thread simply recreates the tcache and places the elements back onto a new tcache which is subsequently lost as the thread exits (unfreed memory). The fix is relatively simple, move the setting of tcache_shutting_down earlier in tcache_thread_freeres. We add a test case which uses mallinfo and some heuristics to look for unaccounted for memory usage between the start and end of a thread start/join loop. It is very reliable at detecting that there is a leak given the number of iterations. Without the fix the test will consume 122MiB of leaked memory.
* Missed changelog entryRajalakshmi Srinivasaraghavan2017-10-061-0/+9
|
* Remove redundant ldbl-64-128 files.Joseph Myers2017-10-066-38/+8
| | | | | | | | | | | | | | | | | | | | | Various source files in ldbl-64-128 are redundant, because they wrap files that no longer provide public symbols that need special versioning (those symbols having moved to separate errno-setting wrappers), or, in the case of w_scalblnl.c, because the type-generic template now does everything required (it deals with symbol versioning for use in libm, and this file is never built for libc anyway - the compat scalbln* symbols in libc, as opposed to scalbn*, are only for i386 and m68k and are aliases to the corresponding scalbn* symbols). This patch removes those redundant files. Tested with build-many-glibcs.py (for all ldbl-64-128 configurations) that installed stripped shared libraries are unchanged by this patch. * sysdeps/ieee754/ldbl-64-128/e_ilogbl.c: Remove file. * sysdeps/ieee754/ldbl-64-128/s_log1pl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_scalblnl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/w_scalblnl.c: Likewise.
* powerpc: Fix IFUNC for memrchrRajalakshmi Srinivasaraghavan2017-10-063-17/+31
| | | | | | | | | | | | | | | Recent commit 59ba2d2b5421 missed to add __memrchr_power8 in ifunc list. Also handled discarding unwanted bytes for unaligned inputs in power8 optimization. 2017-10-05 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> * sysdeps/powerpc/powerpc64/multiarch/memrchr-ppc64.c: Revert back to powerpc32 file. * sysdeps/powerpc/powerpc64/multiarch/memrchr.c (memrchr): Add __memrchr_power8 to ifunc list. * sysdeps/powerpc/powerpc64/power8/memrchr.S: Mask extra bytes for unaligned inputs.
* Update ARM libm-test-ulps.Joseph Myers2017-10-052-2/+10
| | | | * sysdeps/arm/libm-test-ulps: Update.
* Use libm_alias_ldouble for ldbl-96 functions.Joseph Myers2017-10-0532-30/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes ldbl-96 functions use libm_alias_ldouble to define function aliases. Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/ieee754/ldbl-96/s_asinhl.c: Include <libm-alias-ldouble.h>. (asinhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_cbrtl.c: Include <libm-alias-ldouble.h>. (cbrtl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_copysignl.c: Include <libm-alias-ldouble.h>. (copysignl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_cosl.c: Include <libm-alias-ldouble.h>. (cosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_erfl.c: Include <libm-alias-ldouble.h>. (erfl): Define using libm_alias_ldouble. (erfcl): Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c: Include <libm-alias-ldouble.h>. (fmal): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_frexpl.c: Include <libm-alias-ldouble.h>. (frexpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_fromfpl.c (fromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_fromfpl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-96/s_fromfpxl.c (fromfpxl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_getpayloadl.c: Include <libm-alias-ldouble.h>. (getpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_llrintl.c: Include <libm-alias-ldouble.h>. (llrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_llroundl.c: Include <libm-alias-ldouble.h>. (llroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_lrintl.c: Include <libm-alias-ldouble.h>. (lrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_lroundl.c: Include <libm-alias-ldouble.h>. (lroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_modfl.c: Include <libm-alias-ldouble.h>. (modfl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_nextupl.c: Include <libm-alias-ldouble.h>. (nextupl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_remquol.c: Include <libm-alias-ldouble.h>. (remquol): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_roundevenl.c: Include <libm-alias-ldouble.h>. (roundevenl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_roundl.c: Include <libm-alias-ldouble.h>. (roundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_setpayloadl.c (setpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c: Include <libm-alias-ldouble.h>. (setpayloadsigl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_sincosl.c: Include <libm-alias-ldouble.h>. (sincosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_sinl.c: Include <libm-alias-ldouble.h>. (sinl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_tanhl.c: Include <libm-alias-ldouble.h>. (tanhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_tanl.c: Include <libm-alias-ldouble.h>. (tanl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_totalorderl.c: Include <libm-alias-ldouble.h>. (totalorderl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_totalordermagl.c: Include <libm-alias-ldouble.h>. (totalordermagl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_ufromfpl.c (ufromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_ufromfpxl.c (ufromfpxl): Define using libm_alias_ldouble.
* aarch64: Optimized implementation of memmove for Qualcomm FalkorSiddhesh Poyarekar2017-10-055-2/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an optimized memmove implementation for the Qualcomm Falkor processor core. Due to the way the falkor memcpy needs to be written, code cannot be easily shared between memmove and memcpy like in case of other aarch64 memcpy implementations due to which this routine is separate. The underlying principle is the same as that of memcpy where it tries to use registers with the same lower 4 bits for fetching the same stream, thus optimizing hardware prefetcher performance. The memcpy copy loop copies 64 bytes at a time using the same register pair since that's the way to train the hardware prefetcher on the falkor core. memmove cannot quite do that since it needs to avoid overlaps, so it does the next best thing, i.e. has a 32 byte loop with a 32 byte end (prefetch a loop ahead to account for overlapping locations) with register pairs that alias so that they hit the same prefetcher. Due to this difference in loop size, they have to currently be separate implementations but efforts are on to try and get memmove to fall back into memcpy whenever it can without simply duplicating all of the code. Performance: The routine fares around 20-25% better than the generic memmove for most medium to large sizes (i.e. > 128 bytes) for the new walking memmove benchmark (memmove-walk) with an unexplained regression between 1K and 2K. The minor regression is something worth looking into for us, but the remaining gains are significant enough that we would like this included upstream as we looking into the cause for the regression. Here is a snippet of the numbers as generated from the microbenchmark by the compare_strings script. Comparisons are against __memmove_generic: Function: memmove Variant: walk __memmove_thunderx __memmove_falkor __memmove_generic ======================================================================================================================== <snip> length=16384: 12508800.00 ( 6.09%) 11486800.00 ( 13.76%) 13319600.00 length=16400: 13614200.00 ( -0.67%) 11585000.00 ( 14.33%) 13523600.00 length=16385: 13448400.00 ( 0.10%) 11732700.00 ( 12.84%) 13461200.00 length=16399: 13594100.00 ( -0.22%) 11859600.00 ( 12.57%) 13564400.00 length=16386: 13211600.00 ( 1.13%) 11503800.00 ( 13.91%) 13362400.00 length=16398: 13218600.00 ( 2.12%) 11573200.00 ( 14.30%) 13504700.00 length=16387: 13510900.00 ( -0.37%) 11744200.00 ( 12.76%) 13461300.00 length=16397: 13603700.00 ( -0.15%) 11878200.00 ( 12.55%) 13583200.00 length=16388: 13461700.00 ( -0.13%) 11558000.00 ( 14.03%) 13444100.00 length=16396: 13517500.00 ( -0.03%) 11561300.00 ( 14.45%) 13513900.00 length=16389: 13534100.00 ( 0.17%) 11756800.00 ( 13.28%) 13556900.00 length=16395: 13585600.00 ( 0.11%) 11791800.00 ( 13.30%) 13601200.00 length=16390: 13480100.00 ( -0.13%) 11685500.00 ( 13.20%) 13462100.00 length=16394: 13529900.00 ( -0.23%) 11549800.00 ( 14.43%) 13498200.00 length=16391: 13595400.00 ( -0.26%) 11768200.00 ( 13.22%) 13560600.00 length=16393: 13567000.00 ( 0.20%) 11779700.00 ( 13.35%) 13594700.00 length=32768: 71308800.00 ( -6.53%) 50220800.00 ( 24.98%) 66939200.00 length=32784: 72100800.00 (-11.55%) 50114100.00 ( 22.47%) 64636300.00 length=32769: 71767000.00 ( -7.10%) 51238400.00 ( 23.54%) 67010000.00 length=32783: 70113700.00 (-40.95%) 51129000.00 ( -2.78%) 49744400.00 length=32770: 71367600.00 ( -6.52%) 50244700.00 ( 25.01%) 67000900.00 length=32782: 64366700.00 ( 4.71%) 50101400.00 ( 25.83%) 67545600.00 length=32771: 71440100.00 ( -6.51%) 51263900.00 ( 23.57%) 67074900.00 length=32781: 66993000.00 ( 0.34%) 51108300.00 ( 23.97%) 67220300.00 length=32772: 71443900.00 (-60.50%) 50062100.00 (-12.47%) 44512600.00 length=32780: 71759100.00 ( -6.58%) 50263200.00 ( 25.35%) 67328600.00 length=32773: 71714900.00 (-33.21%) 51076600.00 ( 5.12%) 53835400.00 length=32779: 71756900.00 ( -6.56%) 51290800.00 ( 23.83%) 67337800.00 length=32774: 59689300.00 (-34.55%) 50068400.00 (-12.86%) 44363300.00 length=32778: 71847500.00 (-18.20%) 50084100.00 ( 17.61%) 60786500.00 length=32775: 71599300.00 ( -6.54%) 51278200.00 ( 23.70%) 67204800.00 length=32777: 71862900.00 (-60.85%) 51094000.00 (-14.36%) 44677900.00 length=65536: 282848000.00 ( -6.60%) 199187000.00 ( 24.93%) 265325000.00 length=65552: 243285000.00 (-41.61%) 198512000.00 (-15.54%) 171805000.00 length=65537: 255415000.00 (-23.47%) 202499000.00 ( 2.11%) 206858000.00 length=65551: 280122000.00 (-62.95%) 203349000.00 (-18.29%) 171911000.00 length=65538: 283676000.00 (-14.46%) 198368000.00 ( 19.96%) 247848000.00 length=65550: 275566000.00 (-51.76%) 198494000.00 ( -9.31%) 181581000.00 length=65539: 283699000.00 ( -6.58%) 203453000.00 ( 23.57%) 266195000.00 length=65549: 286572000.00 ( -6.65%) 202607000.00 ( 24.60%) 268712000.00 length=65540: 283710000.00 ( -6.59%) 199161000.00 ( 25.17%) 266160000.00 length=65548: 237573000.00 ( 11.48%) 198462000.00 ( 26.06%) 268395000.00 length=65541: 284150000.00 ( -6.58%) 203273000.00 ( 23.75%) 266600000.00 length=65547: 286250000.00 ( -6.70%) 202594000.00 ( 24.48%) 268263000.00 length=65542: 284167000.00 ( -6.60%) 199122000.00 ( 25.31%) 266584000.00 length=65546: 285656000.00 ( -6.59%) 198443000.00 ( 25.95%) 268002000.00 length=65543: 284600000.00 ( -6.58%) 203247000.00 ( 23.89%) 267030000.00 length=65545: 285665000.00 ( -6.40%) 202575000.00 ( 24.55%) 268472000.00 <snip> * sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memmove_falkor. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Likewise. * sysdeps/aarch64/multiarch/memmove.c: Likewise. * sysdeps/aarch64/multiarch/memmove_falkor.S: New file.
* benchtests: Memory walking benchmark for memmoveSiddhesh Poyarekar2017-10-053-1/+147
| | | | | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks both ways through a large memory area and copies different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the simple memmove benchmark (which is only really useful for smaller sizes) especially for larger sizes where the likelihood of the call being done only once is pretty high. This benchmark is different from memcpy in that it also tests overlapping copies. * benchtests/bench-memmove-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* benchtests: Memory walking benchmark for memsetSiddhesh Poyarekar2017-10-053-1/+142
| | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks backward through a large memory area and sets different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the simple memset benchmark (which is only really useful for smaller sizes) especially for larger sizes where the likelihood of the call being done only once is pretty high. * benchtests/bench-memset-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* benchtests: Memory walking benchmark for memcpySiddhesh Poyarekar2017-10-053-1/+134
| | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks both ways through a large memory area and copies different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the other memcpy benchmarks, especially for larger sizes where the likelihood of the call being done only once is pretty high. * benchtests/bench-memcpy-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* nscd: Eliminate compilation time dependency in the build outputFlorian Weimer2017-10-052-6/+32
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove add-ons mechanism.Joseph Myers2017-10-0520-649/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc has an add-ons mechanism to allow additional software to be integrated into the glibc build. Such add-ons may be within the glibc source tree, or outside it at a path passed to the --enable-add-ons configure option. localedata and crypt were once add-ons, distributed in separate release tarballs, but long since stopped using that mechanism. Linuxthreads was always an add-on. Ports spent some time as an add-on with separate release tarballs, then was first moved into the glibc source tree, then had its sysdeps files moved into the main sysdeps hierarchy so the add-ons mechanism was no longer used. NPTL spent some time as an add-on in the main glibc tree before stopping using the add-on mechanism. libidn used to have separate release tarballs but no longer does so, but still uses the add-ons mechanism within the glibc source tree. Various other software has supported building with the add-ons mechanism at times in the past, but I don't think any is still widely used. Add-ons involve significant, little-used complexity in the glibc build system, and make it hard to understand what the space of possible glibc configurations is. This patch removes the add-ons mechanism. libidn is now built via the Subdirs mechanism to cause any configuration using sysdeps/unix/inet to build libidn; HAVE_LIBIDN (which effectively means shared libraries are available) is now defined via sysdeps/unix/inet/configure. Various references to add-ons around the source tree are removed (in the case of maint.texi, the example list of sysdeps directories is still very out of date). Externally maintained ports should now put their files in the normal sysdeps directory structure rather than being arranged as add-ons; they probably need to change e.g. elf.h anyway, rather than actually being able to work just as a drop-in subtree. Hurd libpthread should be arranged similarly to NPTL, so some files might go in a hurd-pthreads (or similar) top-level directory in glibc, while sysdeps files should go in the normal sysdeps directory structure (possibly in hurd or hurd-pthreads subdirectories, just as there are nptl subdirectories in the sysdeps tree). Tested for x86_64, and with build-many-glibcs.py. * configure.ac (--enable-add-ons): Remove option. (machine): Do not mention add-ons in comment. (LIBC_PRECONFIGURE): Likewise. (add_ons): Remove variable and sanity checks and logic to locate add-ons. (add_ons_automatic): Remove variable. (configured_add_ons): Likewise. (add_ons_sfx): Likewise. (add_ons_pfx): Likewise. (add_on_subdirs): Likewise. (sysnames_add_ons): Likewise. Remove loop over add-ons and consideration of add-ons in Implies handling. (sysdeps_add_ons): Likewise. * configure: Regenerated. * libidn/configure.ac: Remove. * libidn/configure: Likewise. * sysdeps/unix/inet/configure.ac: New file. * sysdeps/unix/inet/configure: New generated file. * sysdeps/unix/inet/Subdirs: Add libidn. * Makeconfig (sysdeps-srcdirs): Remove variable. (+sysdep_dirs): Do not include $(sysdeps-srcdirs). ($(common-objpfx)config.status): Do not depend on add-on files. ($(common-objpfx)shlib-versions.v.i): Do not mention add-ons in comment. (all-subdirs): Do not include $(add-on-subdirs). * Makefile (dist-prepare): Do not use $(sysdeps-add-ons). * config.make.in (add-ons): Remove variable. (add-on-subdirs): Likewise. (sysdeps-add-ons): Likewise. * manual/Makefile (add-chapters): Remove. ($(objpfx)texis): Do not depend on $(add-chapters). (nonexamples): Do not handle $(add-chapters). (examples): Do not handle $(add-ons). (chapters.% top-menu.%): Do not pass '$(add-chapters)' to libc-texinfo.sh. * manual/install.texi (Installation): Do not mention add-ons. (--enable-add-ons): Do not document configure option. * INSTALL: Regenerated. * manual/libc-texinfo.sh: Do not handle $2 add-ons argument. * manual/maint.texi (Hierarchy Conventions): Do not mention add-ons. * scripts/build-many-glibcs.py (Glibc.build_glibc): Do not use --enable-add-ons. * scripts/gen-sorted.awk: Do not handle Subdirs files from add-ons. * scripts/test-installation.pl: Do not handle glibc-compat add-on. * sysdeps/nptl/Makeconfig: Do not mention add-ons in comment.
* Always do locking when iterating over list of streams (bug 15142)Andreas Schwab2017-10-052-42/+26
| | | | _IO_list_all should only be traversed while locking list_all_lock.
* abort: Do not flush stdio streams [BZ #15436]Florian Weimer2017-10-053-24/+17
|
* tst-gmon: Build with -fno-omit-frame-pointerFlorian Weimer2017-10-052-1/+5
| | | | | | | | If glibc is built with -fomit-frame-pointer to undo the effect of configuring GCC with --enable-frame-pointer, using -pg by itself results in a build failure: gcc: error: -pg and -fomit-frame-pointer are incompatible
* S390: Regenerate ULPsStefan Liebler2017-10-052-2/+12
| | | | | | | | Updated ulps file. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* support_format_hostent: Add more error information for NETDB_INTERNALFlorian Weimer2017-10-052-4/+15
|