aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-01nptl: Turn libpthread.so into a symbolic link to the real DSOFlorian Weimer
The linker script is no longer needed.
2018-03-01an_ES locale: update some locale data [BZ #22896]Mike FABIAN
[BZ #22896] * localedata/locales/an_ES: update month and day names, improve d_fmt, improve postal_fmt, add country_post, add country_isbn
2018-03-01bg_BG locale: Fix a typo in a commentMike FABIAN
* localedata/locales/bg_BG (LC_COLLATE): The comment mentioned Ukrainian instead of Bulgarian.
2018-03-01nptl: Drop libpthread_nonshared.a from libpthread.soFlorian Weimer
Fixes commit bd60ce86520b781ca24b99b2555e2ad389bbfeaa (nptl: Move pthread_atfork to libc_nonshared.a).
2018-03-01nptl: Move pthread_atfork to libc_nonshared.aFlorian Weimer
libpthread_nonshared.a is unused after this, so remove it from the build. There is no ABI impact because pthread_atfork was implemented using __register_atfork in libc even before this change. pthread_atfork has to be a weak alias because pthread_* names are not reserved in libc. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2018-02-28Fix i386 fenv_private.h float128 for 32-bit --with-fpmath=sse (bug 22902).Joseph Myers
As discussed in bug 22902, the i386 fenv_private.h implementation has problems for float128 for the case of 32-bit glibc built with libgcc from GCC configured using --with-fpmath=sse. The optimized floating-point state handling in fenv_private.h needs to know which floating-point state - x87 or SSE - is used for each floating-point type, so that only one state needs updating / testing for libm code using that state internally. On 32-bit x86, the x87 rounding mode is always used for float128, but the x87 exception flags are only used when libgcc is built using x87 floating-point arithmetic; if libgcc is built for SSE arithmetic, the SSE exception flags are used. The choice of arithmetic with which libgcc is built is independent of that with which glibc is built. Thus, since glibc cannot tell the choice used in libgcc, the default implementations of libc_feholdexcept_setroundf128 and libc_feupdateenv_testf128 (which use the <fenv.h> functions, thus using both x87 and SSE state on processors that have both) need to be used; this patch updates the code accordingly. Tested for 32-bit x86; HJ reports testing in the --with-fpmath=sse case. [BZ #22902] * sysdeps/i386/fpu/fenv_private.h [!__x86_64__] (libc_feholdexcept_setroundf128): New macro. [!__x86_64__] (libc_feupdateenv_testf128): Likewise.
2018-02-28Use libc_hidden_* for strtoumax (bug 15105).Joseph Myers
On sparc, localplt test failures appear when building with -Os because of a call to strtoumax from sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c, and strtoumax is not inlined when building with -Os. This patch fixes those failures by using libc_hidden_proto and libc_hidden_def for strtoumax. Tested with build-many-glibcs.py for sparc64-linux-gnu-disable-multi-arch, sparc64-linux-gnu, sparcv9-linux-gnu-disable-multi-arch, sparcv9-linux-gnu that this fixes that test failure with -Os. [BZ #15105] * sysdeps/wordsize-32/strtoumax.c (strtoumax): Use libc_hidden_def. * sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise. * include/inttypes.h: New file.
2018-02-27Fix two more -Os strcoll / wcscoll build failures.Joseph Myers
Continuing fixes for -Os build issues shown with build-many-glibcs.py, this patch adds uses of DIAG_* to disable -Wmaybe-uninitialized in two more places where code inlined from strcoll / wcscoll is wrongly diagnosed as possibly using uninitialized structure fields. (All these warnings in different places for these functions are I think essentially the same bug.) Tested with build-many-glibcs.py for alpha-linux-gnu and mips-linux-gnu that this fixes the -Os build failures for those configurations with GCC 7. * locale/weightwc.h (findidx): Ignore -Wmaybe-uninitialized for -Os in two more places.
2018-02-27Remove the lines from cmn_TW.UTF-8.in which cannot work at the moment.Mike FABIAN
See this bug https://sourceware.org/bugzilla/show_bug.cgi?id=22898 These lines don’t yet work because of a glibc bug, not because of problems in the locale data. No matter what sorting rules one uses, these characters cannot be sorted at all at the moment. As soon as that bug is fixed, these lines should be added back to the test file. * localedata/cmn_TW.UTF-8.in: Remove the lines which cannot be sorted correctly at the moment because of a bug.
2018-02-27Adapt collation in several locales to the new iso14651_t1_common fileMike FABIAN
[BZ #22550] - es_ES locale (and other es_* locales): collation should treat ñ as a primary different character, sync the collation for Spanish with CLDR [BZ #21547] - Tibetan script collation broken (Dzongkha and Tibetan) * localedata/Makefile: Add new test files. * localedata/lv_LV.UTF-8.in: Adapt test file to new collation order. * localedata/sv_SE.ISO-8859-1.in: Adapt test file to new collation order. * localedata/uk_UA.UTF-8.in: Adapt test file to new collation order. * localedata/am_ET.UTF-8.in: New test file. * localedata/az_AZ.UTF-8.in: Likewise. * localedata/be_BY.UTF-8.in: Likewise. * localedata/ber_DZ.UTF-8.in: Likewise. * localedata/ber_MA.UTF-8.in: Likewise. * localedata/bg_BG.UTF-8.in: Likewise. * localedata/br_FR.UTF-8.in: Likewise. * localedata/cmn_TW.UTF-8.in: Likewise. * localedata/crh_UA.UTF-8.in: Likewise. * localedata/csb_PL.UTF-8.in: Likewise. * localedata/cv_RU.UTF-8.in: Likewise. * localedata/cy_GB.UTF-8.in: Likewise. * localedata/dz_BT.UTF-8.in: Likewise. * localedata/eo.UTF-8.in: Likewise. * localedata/es_ES.UTF-8.in: Likewise. * localedata/fa_IR.UTF-8.in: Likewise. * localedata/fi_FI.UTF-8.in: Likewise. * localedata/fil_PH.UTF-8.in: Likewise. * localedata/fur_IT.UTF-8.in: Likewise. * localedata/gez_ER.UTF-8@abegede.in: Likewise. * localedata/ha_NG.UTF-8.in: Likewise. * localedata/ig_NG.UTF-8.in: Likewise. * localedata/ik_CA.UTF-8.in: Likewise. * localedata/kk_KZ.UTF-8.in: Likewise. * localedata/ku_TR.UTF-8.in: Likewise. * localedata/ky_KG.UTF-8.in: Likewise. * localedata/ln_CD.UTF-8.in: Likewise. * localedata/mi_NZ.UTF-8.in: Likewise. * localedata/ml_IN.UTF-8.in: Likewise. * localedata/mn_MN.UTF-8.in: Likewise. * localedata/mr_IN.UTF-8.in: Likewise. * localedata/mt_MT.UTF-8.in: Likewise. * localedata/nb_NO.UTF-8.in: Likewise. * localedata/om_KE.UTF-8.in: Likewise. * localedata/os_RU.UTF-8.in: Likewise. * localedata/ps_AF.UTF-8.in: Likewise. * localedata/ro_RO.UTF-8.in: Likewise. * localedata/ru_RU.UTF-8.in: Likewise. * localedata/sc_IT.UTF-8.in: Likewise. * localedata/se_NO.UTF-8.in: Likewise. * localedata/sq_AL.UTF-8.in: Likewise. * localedata/sv_SE.UTF-8.in: Likewise. * localedata/szl_PL.UTF-8.in: Likewise. * localedata/tg_TJ.UTF-8.in: Likewise. * localedata/tk_TM.UTF-8.in: Likewise. * localedata/tt_RU.UTF-8.in: Likewise. * localedata/tt_RU.UTF-8@iqtelif.in: Likewise. * localedata/ug_CN.UTF-8.in: Likewise. * localedata/uz_UZ.UTF-8.in: Likewise. * localedata/vi_VN.UTF-8.in: Likewise. * localedata/yi_US.UTF-8.in: Likewise. * localedata/yo_NG.UTF-8.in: Likewise. * localedata/zh_CN.UTF-8.in: Likewise. * localedata/locales/am_ET: Adapt collation rules to new iso14651_t1_common file and fix bugs in the collation. * localedata/locales/az_AZ: Likewise. * localedata/locales/be_BY: Likewise. * localedata/locales/ber_DZ: Likewise. * localedata/locales/ber_MA: Likewise. * localedata/locales/bg_BG: Likewise. * localedata/locales/br_FR: Likewise. * localedata/locales/br_FR@euro: Likewise. * localedata/locales/ca_ES: Likewise. * localedata/locales/cns11643_stroke: Likewise. * localedata/locales/crh_UA: Likewise. * localedata/locales/cs_CZ: Likewise. * localedata/locales/csb_PL: Likewise. * localedata/locales/cv_RU: Likewise. * localedata/locales/cy_GB: Likewise. * localedata/locales/da_DK: Likewise. * localedata/locales/dz_BT: Likewise. * localedata/locales/en_CA: Likewise. * localedata/locales/eo: Likewise. * localedata/locales/es_CU: Likewise. * localedata/locales/es_EC: Likewise. * localedata/locales/es_ES: Likewise. * localedata/locales/es_US: Likewise. * localedata/locales/et_EE: Likewise. * localedata/locales/fa_IR: Likewise. * localedata/locales/fi_FI: Likewise. * localedata/locales/fil_PH: Likewise. * localedata/locales/fur_IT: Likewise. * localedata/locales/gez_ER@abegede: Likewise. * localedata/locales/ha_NG: Likewise. * localedata/locales/hr_HR: Likewise. * localedata/locales/hsb_DE: Likewise. * localedata/locales/hu_HU: Likewise. * localedata/locales/ig_NG: Likewise. * localedata/locales/ik_CA: Likewise. * localedata/locales/is_IS: Likewise. * localedata/locales/iso14651_t1_pinyin: Likewise. * localedata/locales/kk_KZ: Likewise. * localedata/locales/ku_TR: Likewise. * localedata/locales/ky_KG: Likewise. * localedata/locales/ln_CD: Likewise. * localedata/locales/lt_LT: Likewise. * localedata/locales/lv_LV: Likewise. * localedata/locales/mi_NZ: Likewise. * localedata/locales/ml_IN: Likewise. * localedata/locales/mn_MN: Likewise. * localedata/locales/mr_IN: Likewise. * localedata/locales/mt_MT: Likewise. * localedata/locales/nb_NO: Likewise. * localedata/locales/om_KE: Likewise. * localedata/locales/os_RU: Likewise. * localedata/locales/pl_PL: Likewise. * localedata/locales/ps_AF: Likewise. * localedata/locales/ro_RO: Likewise. * localedata/locales/ru_RU: Likewise. * localedata/locales/ru_UA: Likewise. * localedata/locales/sc_IT: Likewise. * localedata/locales/se_NO: Likewise. * localedata/locales/si_LK: Likewise. * localedata/locales/sq_AL: Likewise. * localedata/locales/sv_FI: Likewise. * localedata/locales/sv_FI@euro: Likewise. * localedata/locales/sv_SE: Likewise. * localedata/locales/szl_PL: Likewise. * localedata/locales/tg_TJ: Likewise. * localedata/locales/ti_ER: Likewise. * localedata/locales/tk_TM: Likewise. * localedata/locales/tl_PH: Likewise. * localedata/locales/tr_TR: Likewise. * localedata/locales/tt_RU: Likewise. * localedata/locales/tt_RU@iqtelif: Likewise. * localedata/locales/ug_CN: Likewise. * localedata/locales/uk_UA: Likewise. * localedata/locales/uz_UZ: Likewise. * localedata/locales/uz_UZ@cyrillic: Likewise. * localedata/locales/vi_VN: Likewise. * localedata/locales/yi_US: Likewise. * localedata/locales/yo_NG: Likewise.
2018-02-27Improve gen-locales.mk and gen-locale.sh to make test files with @ options workMike FABIAN
With out this, adding collation test files like localedata/gez_ER.UTF-8@abegede.in does not work for locales which contain @ modifiers. * gen-locales.mk: Make test files which contain @ modifiers in their name work. * localedata/gen-locale.sh: Likewise.
2018-02-27Fix test cases tst-fnmatch and tst-regexloc for the new iso14651_t1_common file.Mike FABIAN
See: http://pubs.opengroup.org/onlinepubs/7908799/xbd/re.html > A range expression represents the set of collating elements that fall > between two elements in the current collation sequence, > inclusively. It is expressed as the starting point and the ending > point separated by a hyphen (-). > > Range expressions must not be used in portable applications because > their behaviour is dependent on the collating sequence. Ranges will be > treated according to the current collating sequence, and include such > characters that fall within the range based on that collating > sequence, regardless of character values. This, however, means that > the interpretation will differ depending on collating sequence. If, > for instance, one collating sequence defines ä as a variant of a, > while another defines it as a letter following z, then the expression > [ä-z] is valid in the first language and invalid in the second. Therefore, using [a-z] does not make much sense except in the C/POSIX locale. The new iso14651_t1_common lists upper case and lower case Latin characters in a different order than the old one which causes surprising results for example in the de_DE locale: [a-z] now includes A because A comes after a in iso14651_t1_common but does not include Z because that comes after z in iso14651_t1_common. * posix/tst-fnmatch.input: Fix results for range expressions for non C locales. * posix/tst-regexloc.c: Do not use a range expression for de_DE.ISO-8859-1 locale.
2018-02-27Fix posix/bug-regex5.c test case, adapt to iso14651_t1_common upateMike FABIAN
This test case tests how many collating elements are defined in da_DK.ISO-8859-1 locale. The da_DK locale source defines 4: collating-element <A-A> from "<U0041><U0041>" collating-element <A-a> from "<U0041><U0061>" collating-element <a-A> from "<U0061><U0041>" collating-element <a-a> from "<U0061><U0061>" The new iso14651_t1_common file defines more collating elements, two of them are in the ISO-8859-1 range: collating-element <U004C_00B7> from "<U004C><U00B7>" % decomposition of LATIN CAPITAL LETTER L WITH MIDDLE DOT collating-element <U006C_00B7> from "<U006C><U00B7>" % decomposition of LATIN SMALL LETTER L WITH MIDDLE DOT So the total count is now 6 instead of 4. * posix/bug-regex5.c: Fix test case because with the new iso14651_t1_common file, the da_DK locale now has 6 collating elements in the ISO-8859-1 range instead of 4 with the old iso14651_t1_common file.
2018-02-27Collation order of @-. and space has changed in new iso14651_t1_common file, ↵Mike FABIAN
adapt test files * localedata/da_DK.ISO-8859-1.in: In the new iso14651_t1_common file downloaded from ISO, the collation order of @-. and space has changed. Therefore, this test file needed to be adapted. * localedata/fr_CA.UTF-8.in: Likewise. * localedata/fr_FR.UTF-8.in: Likewise. * localedata/uk_UA.UTF-8.in: Likewise.
2018-02-27Collation order of ȥ has changed in new iso14651_t1_common file, adapt test ↵Mike FABIAN
files * localedata/cs_CZ.UTF-8.in: adapt this test file to the collation order of ȥ in the new iso14651_t1_common file. * localedata/pl_PL.UTF-8.in: Likewise.
2018-02-27Add sections for various scripts to the iso14651_t1_common fileMike FABIAN
* localedata/locales/iso14651_t1_common: Add sections for various scripts to the iso14651_t1_common file.
2018-02-27iso14651_t1_common: make the fourth level the codepoint for characters which ↵Mike FABIAN
are ignorable on all 4 levels Entries for characters which have “IGNORE” on all 4 levels like: <U0001> IGNORE;IGNORE;IGNORE;IGNORE % START OF HEADING (in ISO 6429) are changed into: <U0001> IGNORE;IGNORE;IGNORE;<U0001> % START OF HEADING (in ISO 6429) i.e. putting the code point of the character into the fourth level instead of “IGNORE”. Without that change, all such characters would compare equal which would make a wcscoll test case fail. It is better to have a clearly defined sort order even for characters like this so it is good to use the code point as a tie-break. * localedata/locales/iso14651_t1_common: Use the code point of a character in the fourth collation level instead of IGNORE for all entries which have IGNORE on all 4 levels.
2018-02-27Add convenience symbols like <AFTER-A>, <BEFORE-A> to iso14651_t1_commonMike FABIAN
* localedata/locales/iso14651_t1_common: Add some convenient collation symbols like <AFTER-A>, <BEFORE-A> to make tailoring easier using rules similar to those in CLDR.
2018-02-27Fixing syntax errors after updating the iso14651_t1_common fileMike FABIAN
* localedata/locales/iso14651_t1_common: The new version of this file downloaded from ISO contained several syntax errors which are fixed by this patch.
2018-02-27iso14651_t1_common: <U\([0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]\)> → <U000\1>Mike FABIAN
* localedata/locales/iso14651_t1_common: replace all <U.....> with <U000.....> because glibc understands only 4 digit or 8 digit
2018-02-27Necessary changes after updating the iso14651_t1_common fileMike FABIAN
* localedata/locales/iso14651_t1_common: Necessary changes to make the file downloaded from ISO usable by glibc.
2018-02-27Update iso14651_t1_common file to ISO14651_2016_TABLE1_en.txt [BZ #14095]Mike FABIAN
[BZ #14095] - Review / update collation data from Unicode / ISO 14651 File downloaded from: http://standards.iso.org/iso-iec/14651/ed-4/ISO14651_2016_TABLE1_en.txt Updating this file alone is not enough, there are problems in the new file which need to be fixed and the collation rules for many locales need to be adapted. This is done by the following patches. This update also fixes the problem that many characters are treated as identical when sorting because they were not yet in the old iso14651_t1_common file, see: https://bugzilla.redhat.com/show_bug.cgi?id=1336308 - Infinite (∞) and empty set (∅) are treated as if they were the same character by sort and uniq [BZ #14095] * localedata/locales/iso14651_t1_common: Update file to latest version from ISO (ISO14651_2016_TABLE1_en.txt).
2018-02-27hurd: fix timer_routines.c buildSamuel Thibault
* sysdeps/pthread/timer_routines.c: Include <timer_routines.h> instead of <internaltypes.h>.
2018-02-27hurd: fix gai_misc buildSamuel Thibault
* sysdeps/mach/hurd/gai_misc.h: New file.
2018-02-27hurd: fix timer_routines.c buildSamuel Thibault
* sysdeps/pthread/timer_routines.c: [!defined DELAYTIMER_MAX] (DELAYTIMER_MAX): Define to INT_MAX.
2018-02-27Move NPTL-specific code to NPTL-specific headerSamuel Thibault
* sysdeps/pthread/timer_routines.c: Include <timer_routines.h> instead of <nptl/pthreadP.h> (thread_attr_compare): Move function to... * sysdeps/nptl/timer_routines.h: ... new header.
2018-02-26Fix another -Os strcoll build issue.Joseph Myers
While there are now clean -Os build and test results on x86_64 (given my patch <https://sourceware.org/ml/libc-alpha/2018-02/msg00602.html>, pending review), testing with -Os with build-many-glibcs.py shows the build is still failing with -Os everywhere except for x86_64, x86 and s390x. There are a variety of different build failures, but the most common seem to be in strcoll / wcscoll, similar to existing such cases where DIAG_* are used to disable -Wmaybe-uninitialized. There are various different failures even within those functions. This patch fixes one particular case that seems quite common, where the warning appears at the declarations of seq1 and seq2. Tested with build-many-glibcs.py that this fixes the -Os build for aarch64-linux-gnu with GCC 7. * string/strcoll_l.c: Include <libc-diag.h>. (STRCOLL): Ignore -Wmaybe-uninitialized for -Os around declarations of seq1 and seq2.
2018-02-26Use libc_hidden_* for atoi (bug 15105).Joseph Myers
Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for atoi by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os, and that the testsuite continues to pass without -Os). [BZ #15105] * stdlib/atoi.c (atoi): Use libc_hidden_def. * include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto.
2018-02-26linux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807]Dmitry V. Levin
Tested with strace. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (__ptrace_request): Add PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS, PTRACE_GETVRREGS, PTRACE_SETVRREGS, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS, PTRACE_GETREGS64, PTRACE_SETREGS64, PTRACE_GET_DEBUGREG, PTRACE_SET_DEBUGREG, PTRACE_GETVSRREGS, PTRACE_SETVSRREGS, and PTRACE_SINGLEBLOCK.
2018-02-26powerpc: Undefine Linux ptrace macros that conflict with __ptrace_requestTulio Magno Quites Machado Filho
Linux ptrace headers define macros whose tokens conflict with the constants of enum __ptrace_request causing build errors when asm/ptrace.h or linux/ptrace.h are included before sys/ptrace.h. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux macros used in __ptrace_request. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
2018-02-26Fix a typo in ChangeLog (bit_cpu_BIT -> bit_cpu_IBT)H.J. Lu
2018-02-23Update ChangeLog for BZ 22884 - riscv fmax/fminDJ Delorie
2018-02-23Define GEN_AS_CONST_HEADERS when generating header files [BZ #22792]H.J. Lu
Glibc build generates header files to define constants from special .sym files. If a .sym file includes the same header file which it generates, it leads to circular dependency which may lead to build hang on a many-core machine. Define GEN_AS_CONST_HEADERS when generating header files to avoid circular dependency. <tcb-offsets.h> is needed for i686 and it isn't needed for x86-64 at least since glibc 2.23. Tested on i686 and x86-64. [BZ #22792] * Makerules ($(common-objpfx)%.h): Pass -DGEN_AS_CONST_HEADERS to $(CC). * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Include <tcb-offsets.h> only if GEN_AS_CONST_HEADERS isn't defined. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't include <tcb-offsets.h>.
2018-02-23Use libc_hidden_* for tolower, toupper (bug 15105).Joseph Myers
Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for tolower and toupper by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os, and that the testsuite continues to pass without -Os). 2018-02-22 Joseph Myers <joseph@codesourcery.com> [BZ #15105] * ctype/ctype.c (tolower): Use libc_hidden_def. (toupper): Likewise. * include/ctype.h [!_ISOMAC] (tolower): Use libc_hidden_proto. [!_ISOMAC] (toupper): Likewise.
2018-02-23Remove --quiet argument when installing localesMike FABIAN
Using this argument hides problems. I would like to see when something fails. * localedata/Makefile: Remove --quiet argument when installing locales
2018-02-23Use / instead of - in d_fmt for pt_BR and pt_PT [BZ #17438]Mike FABIAN
[BZ #17438] * localedata/locales/pt_BR (LC_TIME): use / instead of - in d_fmt. * localedata/locales/pt_PT (LC_TIME): likewise
2018-02-23Use “copy "es_BO"” in LC_TIME of es_CU, es_CL, and es_ECMike FABIAN
LC_TIME in these 4 locales is identical, using “copy "es_BO"” makes that more obvious. [BZ #22646] * localedata/locales/es_CL (LC_TIME): copy "es_BO". * localedata/locales/es_CU (LC_TIME): copy "es_BO". * localedata/locales/es_EC (LC_TIME): copy "es_BO".
2018-02-22Update sparc ulpsAdhemerval Zanella
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2018-02-22Refactor atfork handlersAdhemerval Zanella
Current implementation (sysdeps/nptl/fork.c) replicates the atfork handlers list backward to invoke the child handlers after fork/clone syscall. The internal atfork handlers is implemented as a single-linked list so a lock-free algorithm can be used, trading fork mulithread call performance for some code complexity and dynamic stack allocation (since the backwards list should not fail). This patch refactor it to use a dynarary instead of a linked list. It simplifies the external variables need to be exported and also the internal atfork handler member definition. The downside is a serialization of fork call in multithread, since to operate on the dynarray the internal lock should be used. However as noted by Florian, it already acquires external locks for malloc and libio so it is already hitting some lock contention. Besides, posix_spawn should be faster and more scalable to run external programs in multithread environments. Checked on x86_64-linux-gnu. * nptl/Makefile (routines): Remove unregister-atfork. * nptl/register-atfork.c (fork_handler_pool): Remove variable. (fork_handler_alloc): Remove function. (fork_handlers, fork_handler_init): New variables. (__fork_lock): Rename to atfork_lock. (__register_atfork, __unregister_atfork, libc_freeres_fn): Rewrite to use a dynamic array to add/remove atfork handlers. * sysdeps/nptl/fork.c (__libc_fork): Likewise. * sysdeps/nptl/fork.h (__fork_lock, __fork_handlers, __linkin_atfork): Remove declaration. (fork_handler): Remove next, refcntr, and need_signal member. (__run_fork_handler_type): New enum. (__run_fork_handlers): New prototype. * sysdeps/nptl/libc-lockP.h (__libc_atfork): Remove declaration.
2018-02-22Rename nptl-signals.h to internal-signals.hAdhemerval Zanella
This patch renames the nptl-signals.h header to internal-signals.h. On Linux the definitions and functions are not only NPTL related, but used for other POSIX definitions as well (for instance SIGTIMER for posix times, SIGSETXID for id functions, and signal block/restore helpers) and since generic functions will be places and used in generic implementation it makes more sense to decouple it from NPTL. Checked on x86_64-linux-gnu. * sysdeps/nptl/nptl-signals.h: Move to ... * sysdeps/generic/internal-signals.h: ... here. Adjust internal comments. * sysdeps/unix/sysv/linux/internal-signals.h: Add include guards. (__nptl_is_internal_signal): Rename to __is_internal_signal. (__nptl_clear_internal_signals): Rename to __clear_internal_signals. * sysdeps/unix/sysv/linux/raise.c: Adjust nptl-signal.h to include-signals.h rename. * nptl/pthreadP.h: Likewise. * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call __is_internal_signal instead of __nptl_is_internal_signal.
2018-02-22RISC-V: fmax/fmin: Handle signalling NaNs correctly.Andrew Waterman
RISC-V's fmax(sNAN,4) returns 4 but glibc expects it to return qNAN. * sysdeps/riscv/rvd/s_fmax.c (__fmax): Handle sNaNs correctly. * sysdeps/riscv/rvd/s_fmin.c (__fmin): Likewise. * sysdeps/riscv/rvf/s_fmaxf.c (__fmaxf): Likewise. * sysdeps/riscv/rvf/s_fminf.c (__fminf): Likewise.
2018-02-22RISC-V: Do not initialize $gp in TLS macros.DJ Delorie
RISC-V TLS doesn't require GP to be initialized, and doing so breaks TLS in a shared object.
2018-02-22aarch64/strcmp: fix misaligned loop jump targetSiddhesh Poyarekar
I accidentally set the loop jump back label as misaligned8 instead of do_misaligned. The typo is harmless but it's always nice to not have to unnecessarily execute those two instructions. * sysdeps/aarch64/strcmp.S (do_misaligned): Jump back to do_misaligned, not misaligned8.
2018-02-22IFUNC for Cavium ThunderX2Steve Ellcey
* sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memcpy_thunderx2. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (MAX_IFUNC): Increment to 4. (__libc_ifunc_impl_list): Add __memcpy_thunderx2. * sysdeps/aarch64/multiarch/memcpy.c (libc_ifunc): Add IS_THUNDERX2 and IS_THUNDERX2PA checks. * sysdeps/aarch64/multiarch/memcpy_thunderx.S (USE_THUNDERX2): Use macro to set name appropriately. (memcpy): Use USE_THUNDERX2 macro to modify prefetches. * sysdeps/aarch64/multiarch/memcpy_thunderx2.S: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_THUNDERX2PA): New macro. (IS_THUNDERX2): New macro.
2018-02-22Add [BZ #16335] annotation to ChangeLog entry.Rical Jasan
Commit 6a3962c4a408e8cbc305d2433711196107374e89 unwittingly fixed a bug, so update the ChangeLog entry accordingly.
2018-02-22S390: Regenerate ULPs.Stefan Liebler
After regenerating ULPs from scratch in commit 8e7196c8759287a3e4c882e3c7cf32ddc322df8a, I've missed to test it with multiple gcc versions. Hence, here is a further update. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
2018-02-21hurd: Add sysdep-cancel.hSamuel Thibault
2018-02-21Remove miscellaneous debris from libio.Zack Weinberg
This patch eliminates a number of #if 0 and #ifdef TODO blocks, macros that are never used, macros that provide portability to substrates that lack basic things like EINVAL and off_t, and other such debris. I preserved IO_DEBUG and CHECK_FILE, even though as far as I can tell IO_DEBUG is never defined and therefore CHECK_FILE never does anything, because it seems like we might actually want to turn it _on_. Installed stripped libraries and executables are unchanged, except, again, that the line number of an assertion changes (this time it's somewhere in fileops.c). * libio/libio.h (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Define here, unconditionally. * libio/iolibio.h (_IO_pos_BAD): Don't define here. * libio/libioP.h: Remove #if 0 blocks. (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Don't define here. (_IO_va_start, COERCE_FILE, MAYBE_SET_EINVAL): Don't define. (CHECK_FILE): Don't use MAYBE_SET_EINVAL or COERCE_FILE. Fix style. * libio/clearerr.c, libio/fputc.c, libio/getchar.c: Assume weak_alias is always defined. * libio/fileops.c, libio/genops.c, libio/oldfileops.c * libio/oldpclose.c, libio/pclose.c, libio/wfileops.c: Remove #if 0 and #ifdef TODO blocks. Assume text_set_element is always defined. * libio/iofdopen.c, libio/iogetdelim.c, libio/oldiofdopen.c Use __set_errno (EINVAL) instead of MAYBE_SET_EINVAL. * libio/tst-mmap-eofsync.c: Make #if 1 block unconditional.
2018-02-21Remove _IO_file_flags define.Zack Weinberg
This entirely mechanical (except for some indentation fixups) patch replaces all uses of _IO_file_flags with _flags and removes the #define. Installed stripped libraries and executables are unchanged by this patch. * libio/libio.h (_IO_file_flags): Remove macro. All uses changed to _flags.
2018-02-21Remove legacy configuration knobs from libio.Zack Weinberg
This patch eliminates the "compatibility defines" _IO_UNIFIED_JUMPTABLES (always defined to 1, used in a number of #ifs which are therefore always false), _STDIO_USES_IOSTREAM (unused), __HAVE_COLUMN (unused), _IO_BE (replaced with __glibc_unlikely), and yet another redundant definition of EOF. Installed stripped libraries are unchanged by this patch. * libio/libio.h (_IO_UNIFIED_JUMPTABLES, _STDIO_USES_IOSTREAM) (__HAVE_COLUMN, _IO_BE): Don't define. (_IO_peekc_unlocked, _IO_getwc_unlocked, _IO_putwc_unlocked) (_IO_fwide_maybe_incompatible): Use __glibc_unlikely. * libio/libioP.h (EOF): Don't define. * libio/iofdopen.c, libio/iofopen.c, libio/iopopen.c * libio/iovdprintf.c, libio/oldiofdopen.c, libio/oldiofopen.c * libio/oldiopopen.c, debug/vdprintf_chk.c: Remove #if block testing _IO_UNIFIED_JUMPTABLES.