Skip to content
Snippets Groups Projects
  1. Oct 11, 2019
    • Florian Weimer's avatar
      Move ChangeLog to ChangeLog.old/ChangeLog.19 · 2e4e7572
      Florian Weimer authored
      We no longer maintain a manually-written ChangeLog file:
      
        <https://sourceware.org/ml/libc-alpha/2019-09/msg00333.html>
        <https://sourceware.org/ml/libc-alpha/2019-10/msg00131.html
      
      >
      
      Instead the release manager is expected to generate a ChangeLog-like
      file using scripts/gitlog_to_changelog.py.  For further details,
      see commit f2144b78 ("Script to
      generate ChangeLog-like output from git log").
      
      Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
    • Florian Weimer's avatar
      manual: Remove warning in the documentation of the abort function · 7f0e1933
      Florian Weimer authored
      
      The warning is confusing to those who do not understand the context,
      and the warning is easy to misunderstand:
      
      A reader needs to know that it was written by someone who is generally
      skeptical of government influence and control, otherwise it reads as
      an affirmation of the U.S. government's role as the ultimate editor of
      the manual.  This is precisely the opposite of what the warning
      intends to convey.  (Reportedly, it criticizes that several
      U.S. administrations have tried to restrict the medical advice that
      U.S.-funded health care workers can provide abroad, considering that
      censorship.)
      
      The warning is also misleading on a technical level.  A reader who
      makes the connection to pregnancy termination will get the wrong
      impression that calling the abort function will terminate subprocesses
      of the current process, but this is not what generally happens.
      
      Finally, for both GNU and the FSF, it is inappropriate to use female
      reproductive health as mere joke material, since these organizations
      do not concern themselves with such issues otherwise, and the warning
      is purportedly about something else entirely.
      
      This reinstates commit 340d9652
      ("manual/startup.texi (Aborting a Program): Remove inappropriate
      joke."), effectively reverting the revert in commit
      ffa81c22 ("Revert:").
      
      Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
      Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
      7f0e1933
  2. Oct 10, 2019
    • Adhemerval Zanella's avatar
      sysvipc: Set ipc_perm mode as mode_t (BZ#18231) · 2f959dfe
      Adhemerval Zanella authored
      This patch sets the mode field in ipc_perm as mode_t for all architectures,
      as POSIX specification [1].  The changes required are as follow:
      
        1. It moves the ipc_perm definition out of ipc.h to its own header
           ipc_perm.h.  It also allows consolidate the IPC_* definition on
           only one header.
      
        2. The generic implementation follow the kernel ipc64_perm size so the
           syscall can be made directly without temporary buffer copy.  However,
           since glibc defines the MODE field as mode_t, it omits the __PAD1 field
           (since glibc does not export mode_t as 16-bit for any architecture).
      
           It is a two-fold improvement:
      
           2.1. New implementation which follow Linux UAPI will not need to
      	  provide an arch-specific ipc-perm.h header neither wrongly
                use the wrong 16-bit definition from previous default ipc.h
      	  (as csky did).
      
           2.1. It allows consolidate ipc_perm definition for architectures that
                already provide mode_t as 32-bit.
      
        3. All kernel ABIs for the supported architectures already provides the
           expected padding for mode type extension to 32-bit.  However, some
           architectures the padding has the wrong placement, so it requires
           the ipc control routines (msgctl, semctl, and shmctl) to adjust the
           mode field accordingly.  Currently they are armeb, microblaze, m68k,
           s390, and sheb.
      
           A new assume is added, __ASSUME_SYSVIPC_BROKEN_MODE_T, which the
           required ABIs define.
      
        4. For the ABIs that define __ASSUME_SYSVIPC_BROKEN_MODE_T, it also
           require compat symbols that do not adjust the mode field.
      
      Checked on arm-linux-gnueabihf, aarch64-linux-gnu, powerpc64le-linux-gnu,
      and x86_64-linux-gnu. I also checked the sysvipc tests on hppa-linux-gnu,
      sh4-linux-gnu, s390x-linux-gnu, and s390-linux-gnu.
      
      I also did a sanity test against armeb qemu usermode for the sysvipc
      tests.
      
      	[BZ #18231]
      	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
      	bits/ipc-perm.h.
      	* sysdeps/unix/sysv/linux/aarch64/bits/ipc.h: Remove file.
      	* sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/hppa/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/ia64/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/s390/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/sparc/bits/ipc.h: Likewise.
      	* sysdeps/unix/sysv/linux/arm/kernel-features.h
      	[__BYTE_ORDER == __BIG_ENDIAN] (__ASSUME_SYSVIPC_BROKEN_MODE_T):
      	Define.
      	* sysdeps/sysv/linux/microblaze/kernel-features.h: Likewise.
      	* sysdeps/unix/sysv/linux/s390/kernel-features.h
      	[!__s390x__] (__ASSUME_SYSVIPC_BROKEN_MODE_T): Define.
      	* sysdeps/unix/sysv/linux/sh/kernel-features.h
      	(__ASSUME_SYSVIPC_BROKEN_MODE_T): Define.
      	* sysdeps/unix/sysv/linux/m68k/kernel-features.h: Likewise.
      	* sysdeps/unix/sysv/linux/bits/ipc-perm.h: New file.
      	* sysdeps/unix/sysv/linux/powerpc/bits/ipc-perm.h: Likewise.
      	* sysdeps/unix/sysv/linux/sparc/bits/ipc-perm.h: Likewise.
      	* sysdeps/unix/sysv/linux/bits/ipc.h (ipc_perm): Move to
      	bits/ipc-perm.h.
      	* sysdeps/unix/sysv/linux/hppa/bits/ipc-perm.h: New file.
      	* sysdeps/unix/sysv/linux/kernel-features.h: Add comment about
      	__ASSUME_SYSVIPC_BROKEN_MODE_T semantic.
      	* sysdeps/unix/sysv/linux/msgctl.c (DEFAULT_VERSION): Define as
      	2.31 if __ASSUME_SYSVIPC_BROKEN_MODE_T is defined.
      	(msgctl_syscall, __msgctl_mode16): New symbol.
      	(__new_msgctl): Add bits for __ASSUME_SYSVIPC_BROKEN_MODE_T.
      	* sysdeps/unix/sysv/linux/semctl.c: Likewise.
      	* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
      	* sysdeps/unix/sysv/linux/arm/be/libc.abilist (GLIBC_2.31): Add
      	msgctl, semctl, and shmctl.
      	* sysdeps/sysv/linux/microblaze/be/libc.abilist: Likewise.
      	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
      	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
      	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
      	* sysdeps/unix/sysv/linux/sh/be/libc.abilist: Likewise.
      	* conform/data/sys/ipc.h-data: Only xfail {struct ipc_perm} mode_t
      	mode for Hurd.
      	* sysdeps/unix/sysv/linux/m68k/Versions (libc) [GLIBC_2.31]: Add
      	msgctl, semctl, and shmctl.
      	* sysdeps/unix/sysv/linux/arm/be/Versions: New file.
      	* sysdeps/unix/sysv/linux/microblaze/be/Versions: Likewise.
      	* sysdeps/unix/sysv/linux/sh/be/Versions: Likewise.
      
      [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html
      2f959dfe
    • Andreas Schwab's avatar
      Simplify note processing · 8a3ca0fd
      Andreas Schwab authored
      This removes dead code during note processing.
      8a3ca0fd
    • Dmitry V. Levin's avatar
      syscall-names.list: fix typos in comment · e027ddef
      Dmitry V. Levin authored
      * sysdeps/unix/sysv/linux/syscall-names.list: Fix typos in comment,
      reformat the affected paragraph.
      e027ddef
  3. Oct 09, 2019
    • Lukasz Majewski's avatar
      y2038: linux: Provide __clock_settime64 implementation · 7ce198e1
      Lukasz Majewski authored
      This patch provides new __clock_settime64 explicit 64 bit function for
      setting the time. Moreover, a 32 bit version - __clock_settime - has been
      refactored to internally use __clock_settime64.
      
      The __clock_settime is now supposed to be used on systems still supporting
      32 bit time (__TIMESIZE != 64) - hence the necessary conversion to 64 bit
      struct timespec.
      
      The new clock_settime64 syscall available from Linux 5.1+ has been used,
      when applicable.
      
      In this patch the internal padding (tv_pad) of struct __timespec64 is
      left untouched (on systems with __WORDSIZE == 32) as Linux kernel ignores
      upper 32 bits of tv_nsec.
      
      Build tests:
      - The code has been tested on x86_64/x86 (native compilation):
      make PARALLELMFLAGS="-j8" && make xcheck PARALLELMFLAGS="-j8"
      
      - The glibc has been build tested (make PARALLELMFLAGS="-j8") for
      x86 (i386), x86_64-x32, and armv7
      
      Run-time tests:
      - Run specific tests on ARM/x86 32bit systems (qemu):
        https://github.com/lmajewski/meta-y2038 and run tests:
        https://github.com/lmajewski/y2038-tests/commits/master
      
      - Use of cross-test-ssh.sh for ARM (armv7):
        make PARALLELMFLAGS="-j8" test-wrapper='./cross-test-ssh.sh root@192.168.7.2' xcheck
      
      Linux kernel, headers and minimal kernel version for glibc build test
      matrix:
      - Linux v5.1 (with clock_settime64) and glibc build with v5.1 as minimal
        kernel version (--enable-kernel="5.1.0")
        The __ASSUME_TIME64_SYSCALLS flag defined.
      
      - Linux v5.1 and default minimal kernel version
        The __ASSUME_TIME64_SYSCALLS not defined, but kernel supports
        __clock_settime64 syscalls.
      
      - Linux v4.19 (no clock_settime64 support) with default minimal kernel
        version for contemporary glibc
      
        This kernel doesn't support __clock_settime64 syscalls, so the fallback
        to clock_settime is tested.
      
      The above tests were performed with Y2038 redirection applied as well as
      without (so the __TIMESIZE != 64 execution path is checked as well).
      
      No regressions were observed.
      
      * include/time.h (__clock_settime64):
        Add __clock_settime alias according to __TIMESIZE define
      * sysdeps/unix/sysv/linux/clock_settime.c (__clock_settime):
        Refactor this function to be used only on 32 bit machines as a wrapper
        on __clock_settime64.
      * sysdeps/unix/sysv/linux/clock_settime.c (__clock_settime64): Add
      * sysdeps/unix/sysv/linux/clock_settime.c (__clock_settime64):
        Use clock_settime64 kernel syscall (available from 5.1+ Linux)
      7ce198e1
    • Adhemerval Zanella's avatar
      posix: Use posix_spawn for wordexp · db8cbc6a
      Adhemerval Zanella authored
      This patch replaces the fork+exec by posix_spawn on wordexp, which
      allows a better scability on Linux and simplifies the thread
      cancellation handling.
      
      The only change which can not be implemented with posix_spawn the
      /dev/null check to certify it is indeed the expected device.  I am
      not sure how effetive this check is since /dev/null tampering means
      something very wrong with the system and this is the least of the
      issues.  My view is the tests is really out of the place and the
      hardening provided is minimum.
      
      If the idea is still to provide such check, I think a possibilty
      would be to open /dev/null, check it, add a dup2 file action, and
      close the file descriptor.
      
      Checked on powerpc64le-linux-gnu and x86_64-linux-gnu.
      
      	* include/spawn.h (__posix_spawn_file_actions_addopen): New
      	prototype.
      	* posix/spawn_faction_addopen.c (posix_spawn_file_actions_addopen):
      	Add internal alias.
      	* posix/wordexp.c (create_environment, free_environment): New
      	functions.
      	(exec_comm_child, exec_comm): Use posix_spawn instead of fork+exec.
      	* posix/wordexp-test.c: Use libsupport.
      db8cbc6a
    • Adhemerval Zanella's avatar
      mips: Do not malloc on getdents64 fallback · edcda4c0
      Adhemerval Zanella authored
      
      This patch changes how the fallback getdents64 implementation calls
      non-LFS getdents by replacing the scratch_buffer with static buffer
      plus a loop on getdents calls.  This avoids the potential malloc
      call on scratch_buffer_set_array_size for large input buffer size
      at the cost of more getdents syscalls.
      
      It also adds a small optimization for older kernels, where the first
      ENOSYS failure for getdents64 disable subsequent calls.
      
      Check the dirent tests on a mips64-linux-gnu with getdents64 code
      disabled.
      
      	* sysdeps/unix/sysv/linux/mips/mips64/getdents64.c (__getdents64):
      	Add small optimization for older kernel to avoid issuing
      	__NR_getdents64 on each call and replace scratch_buffer usage with
      	a static allocated buffer.
      
      Reviewed-by: default avatarFlorian Weimer <fweimer@redhat.com>
      edcda4c0
    • Florian Weimer's avatar
      sparc: Assume GOTDATA support in the toolchain · 00fe3c66
      Florian Weimer authored
      
      HAVE_GCC_GOTDATA has apparently never been used.
      
      Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
      00fe3c66
    • Petr Vorel's avatar
      <dirent.h>: Remove wrong comment about getdents64 declaration · 112a630b
      Petr Vorel authored
      Originally the public interface for getdents64 was declared in
      <unistd.h> in 51ea67d5. Later, b8b3d5a1 moved it to <dirent.h>.
      
      Fixes: b8b3d5a1 ("Linux: Move getdents64 to <dirent.h>")
      112a630b
    • Florian Weimer's avatar
  4. Oct 08, 2019
  5. Oct 07, 2019
  6. Oct 04, 2019
  7. Oct 03, 2019
  8. Oct 02, 2019
    • Joseph Myers's avatar
      Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. · 2334a78a
      Joseph Myers authored
      To work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91691>
      for RV32, we recently disabled -Wmaybe-uninitialized for some inline
      functions in inet/net-internal.h, as included by sunrpc/clnt_udp.c.
      
      The same error has now appeared with current GCC trunk for MIPS, in a
      form that is located at the definition of the variable in question and
      so unaffected by the disabling in inet/net-internal.h.  Thus, this
      patch adds the same disabling around the definition of that variable,
      to cover the MIPS case.
      
      Tested with build-many-glibcs.py (compilers and glibcs stages) for
      mips64-linux-gnu with GCC mainline.
      
      	* sunrpc/clnt_udp.c: Include <libc-diag.h>.
      	(clntudp_call): Disable -Wmaybe-uninitialized around declaration
      	of total_deadline.
      2334a78a
    • Alistair Francis's avatar
      string/endian.h: Restore the __USE_MISC conditionals · 0095a3e8
      Alistair Francis authored
      Commit 69fd157a "time: Add padding for the timespec if required"
      caused a breakage in the glibc tests as the endian.h include file was
      kept in the networking headers while the __USE_MISC #ifdefs had been
      removed. This resulted in namespace violations in the networking
      headers.
      
      This patche restores the __USE_MISC conditionals in endian.h to fix the
      test failures.
      
      	* string/endian.h: Restore the __USE_MISC conditionals.
      0095a3e8
    • Joseph Myers's avatar
      Disable warnings in string/tester.c at top level. · eed00527
      Joseph Myers authored
      string/tester.c contains code that correctly triggers various GCC
      warnings about dubious uses of string functions (uses that are being
      deliberately tested there), and duly disables those warnings around
      the relevant code.
      
      A change in GCC mainline resulted in this code failing to compile with
      a -Warray-bounds error, despite the location with the error having
      -Warray-bounds already disabled.  This has been reported as
      <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91890>.  This patch
      avoids that problem and possible future issues with these diagnostics
      by moving all the warning disabling in this file to top level, as
      suggested by Florian in
      <https://sourceware.org/ml/libc-alpha/2019-10/msg00033.html>, rather
      than only doing it locally around specific function calls.
      
      Tested with build-many-glibcs.py for aarch64-linux-gnu with GCC
      mainline (with only the conform/ failures noted in
      <https://sourceware.org/ml/libc-alpha/2019-10/msg00043.html>).
      
      	* string/tester.c: Ignore -Warray-bounds and
      	-Wmemset-transposed-args at top level.
      	[__GNUC_PREREQ (7, 0)]: Ignore -Wrestrict and -Wstringop-overflow=
      	at top level.
      	[__GNUC_PREREQ (8, 0)]: Ignore -Wstringop-truncation at top level.
      	(test_stpncpy): Do not ignore warnings here.
      	(test_strncat): Likewise.
      	(test_strncpy): Likewise.
      	(test_memset): Likewise.
      eed00527
    • Lukasz Majewski's avatar
      Y2038: Include proper header to provide support for struct timeval on HURD · 4973abcb
      Lukasz Majewski authored
      The HURD requires explicit inclusion of <bits/types/struct_timeval.h> to use
      struct timeval in ./include/time.h.
      For this particular glibc port, the proper header hasn't been included before
      inclusion of time.h.
      
      Tested with build-many-glibcs.py with i686-gnu and x86_64-linux-gnu:
      
      build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all compilers i686-gnu
      build-many-glibcs.py /home/lukma/work/glibc/glibc-many-build --keep all glibcs i686-gnu
      
      Also run of xcheck on x86_64:
      ./src/configure --prefix=/usr
      make PARALLELMFLAGS="-j12" && make xcheck PARALLELMFLAGS="-j12"
      
      	* include/time.h: Add #include <bits/types/struct_timeval.h>
      4973abcb
    • Paul A. Clarke's avatar
      [powerpc] No need to enter "Ignore Exceptions Mode" · 7b8481b3
      Paul A. Clarke authored
      Since at least POWER8, there is no performance advantage to entering
      "Ignore Exceptions Mode", and doing so conditionally requires
       - the conditional logic, and
       - a system call.
      
      Make it a no-op for uses within glibc.
      7b8481b3
    • Arjun Shankar's avatar
      Enable passing arguments to the inferior in debugglibc.sh · 21417aaa
      Arjun Shankar authored
      This patch adds the ability to run debugglibc.sh's inferior program with
      arguments specified on the command line. This enables convenient debugging
      of non-testcase programs such as iconv/iconv_prog or other dynamically
      linked programs. Program arguments may be passed using `--' as a separator.
      
      For example:
      
        $ ./debugglibc.sh -b iconv -- iconv/iconv_prog -f ASCII -t UTF-8 input.txt
      21417aaa
  9. Oct 01, 2019
    • Alistair Francis's avatar
      time: Add padding for the timespec if required · 69fd157a
      Alistair Francis authored
      If we are running on a 32-bit system with a 64-bit time_t we need to
      ensure there is padding around the tv_nsec variable. This is requried as
      the timespec is #defined to the __timespec64 struct.
      
      	* time/bits/types/struct_timespec.h: Add padding for the timespec if
      	required.
      69fd157a
    • Alistair Francis's avatar
      Split up endian.h to minimize exposure of BYTE_ORDER. · aa706e13
      Alistair Francis authored
      With only two exceptions (sys/types.h and sys/param.h, both of which
      historically might have defined BYTE_ORDER) the public headers that
      include <endian.h> only want to be able to test __BYTE_ORDER against
      __*_ENDIAN.
      
      This patch creates a new bits/endian.h that can be included by any
      header that wants to be able to test __BYTE_ORDER and/or
      __FLOAT_WORD_ORDER against the __*_ENDIAN constants, or needs
      __LONG_LONG_PAIR.  It only defines macros in the implementation
      namespace.
      
      The existing bits/endian.h (which could not be included independently
      of endian.h, and only defines __BYTE_ORDER and maybe __FLOAT_WORD_ORDER)
      is renamed to bits/endianness.h.  I also took the opportunity to
      canonicalize the form of this header, which we are stuck with having
      one copy of per architecture.  Since they are so short, this means git
      doesn’t understand that they were renamed from existing headers, sigh.
      
      endian.h itself is a nonstandard header and its only remaining use
      from a standard header is guarded by __USE_MISC, so I dropped the
      __USE_MISC conditionals from around all of the public-namespace things
      it defines.  (This means, an application that requests strict library
      conformance but includes endian.h will still see the definition of
      BYTE_ORDER.)
      
      A few changes to specific bits/endian(ness).h variants deserve
      mention:
      
       - sysdeps/unix/sysv/linux/ia64/bits/endian.h is moved to
         sysdeps/ia64/bits/endianness.h.  If I remember correctly, ia64 did
         have selectable endianness, but we have assembly code in
         sysdeps/ia64 that assumes it’s little-endian, so there is no reason
         to treat the ia64 endianness.h as linux-specific.
      
       - The C-SKY port does not fully support big-endian mode, the compile
         will error out if __CSKYBE__ is defined.
      
       - The PowerPC port had extra logic in its bits/endian.h to detect a
         broken compiler, which strikes me as unnecessary, so I removed it.
      
       - The only files that defined __FLOAT_WORD_ORDER always defined it to
         the same value as __BYTE_ORDER, so I removed those definitions.
         The SH bits/endian(ness).h had comments inconsistent with the
         actual setting of __FLOAT_WORD_ORDER, which I also removed.
      
       - I *removed* copyright boilerplate from the few bits/endian(ness).h
         headers that had it; these files record a single fact in a fashion
         dictated by an external spec, so I do not think they are copyrightable.
      
      As long as I was changing every copy of ieee754.h in the tree, I
      noticed that only the MIPS variant includes float.h, because it uses
      LDBL_MANT_DIG to decide among three different versions of
      ieee854_long_double.  This patch makes it not include float.h when
      GCC’s intrinsic __LDBL_MANT_DIG__ is available.
      
      	* string/endian.h: Unconditionally define LITTLE_ENDIAN,
      	BIG_ENDIAN, PDP_ENDIAN, and BYTE_ORDER.	 Condition byteswapping
      	macros only on !__ASSEMBLER__.	Move the definitions of
      	__BIG_ENDIAN, __LITTLE_ENDIAN, __PDP_ENDIAN, __FLOAT_WORD_ORDER,
      	and __LONG_LONG_PAIR to...
      	* string/bits/endian.h: ...this new file, which includes
      	the renamed header bits/endianness.h for the definition of
      	__BYTE_ORDER and possibly __FLOAT_WORD_ORDER.
      
      	* string/Makefile: Install bits/endianness.h.
      	* include/bits/endian.h: New wrapper.
      
      	* bits/endian.h: Rename to bits/endianness.h.
      	Add multiple-include guard.  Rewrite the comment explaining what
      	the machine-specific variants of this file should do.
      
      	* sysdeps/unix/sysv/linux/ia64/bits/endian.h:
      	Move to sysdeps/ia64.
      
      	* sysdeps/aarch64/bits/endian.h
      	* sysdeps/alpha/bits/endian.h
      	* sysdeps/arm/bits/endian.h
      	* sysdeps/csky/bits/endian.h
      	* sysdeps/hppa/bits/endian.h
      	* sysdeps/ia64/bits/endian.h
      	* sysdeps/m68k/bits/endian.h
      	* sysdeps/microblaze/bits/endian.h
      	* sysdeps/mips/bits/endian.h
      	* sysdeps/nios2/bits/endian.h
      	* sysdeps/powerpc/bits/endian.h
      	* sysdeps/riscv/bits/endian.h
      	* sysdeps/s390/bits/endian.h
      	* sysdeps/sh/bits/endian.h
      	* sysdeps/sparc/bits/endian.h
      	* sysdeps/x86/bits/endian.h:
      	Rename to endianness.h; canonicalize form of file; remove
      	redundant definitions of __FLOAT_WORD_ORDER.
      
      	* sysdeps/powerpc/bits/endianness.h: Remove logic to check for
      	broken compilers.
      
      	* ctype/ctype.h
      	* sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/arm/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/csky/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/ia64/ieee754.h
      	* sysdeps/ieee754/ieee754.h
      	* sysdeps/ieee754/ldbl-128/ieee754.h
      	* sysdeps/ieee754/ldbl-128ibm/ieee754.h
      	* sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/mips/ieee754/ieee754.h
      	* sysdeps/mips/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/nios2/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/nptl/pthread.h
      	* sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/sh/nptl/bits/pthreadtypes-arch.h
      	* sysdeps/sparc/sparc32/ieee754.h
      	* sysdeps/unix/sysv/linux/generic/bits/stat.h
      	* sysdeps/unix/sysv/linux/generic/bits/statfs.h
      	* sysdeps/unix/sysv/linux/sys/acct.h
      	* wctype/bits/wctype-wchar.h:
      	Include bits/endian.h, not endian.h.
      
      	* sysdeps/unix/sysv/linux/hppa/pthread.h: Don’t include endian.h.
      
      	* sysdeps/mips/ieee754/ieee754.h: Use __LDBL_MANT_DIG__
      	in ifdefs, instead of LDBL_MANT_DIG.  Only include float.h
      	when __LDBL_MANT_DIG__ is not predefined, in which case
      	define __LDBL_MANT_DIG__ to equal LDBL_MANT_DIG.
      aa706e13
    • Mike FABIAN's avatar
      Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable · 8e42fc68
      Mike FABIAN authored
      Sync these values with CLDR and langtable as much as possible.  Add
      missing values.
      
      If possible, take the values from CLDR, if CLDR does not have it,
      take it from langtable. The values from langtable which are not from
      CLDR are from  Wikipedia or native speakers.
      8e42fc68
  10. Sep 30, 2019
    • Joseph Myers's avatar
      Use binutils 2.33 branch in build-many-glibcs.py. · b5b67ece
      Joseph Myers authored
      This patch makes build-many-glibcs.py default to binutils 2.33 branch.
      
      Tested with build-many-glibcs.py (compilers and glibcs builds).
      
      	* scripts/build-many-glibcs.py (Context.checkout): Default
      	binutils version to 2.33 branch.
      b5b67ece
    • Lukasz Majewski's avatar
      y2038: Provide conversion helpers for struct __timespec64 · 9c44c6a9
      Lukasz Majewski authored
      Those functions allow easy conversion between Y2038 safe struct
      __timespec64 and other time related data structures (like struct timeval
      or struct timespec).
      
      * include/time.h (valid_timeval_to_timespec64): Add.
      * include/time.h (valid_timespec_to_timespec64): Likewise.
      * include/time.h (valid_timespec64_to_timespec): Likewise.
      * include/time.h (valid_timespec64_to_timeval): Likewise.
      9c44c6a9
    • Joseph Myers's avatar
      Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. · 71bdf29a
      Joseph Myers authored
      The Linux 5.3 uapi headers have some rearrangement relating to MAP_*
      constants, which includes the effect of adding definitions of MAP_SYNC
      on powerpc and sparc.  This patch updates the corresponding glibc
      bits/mman.h headers accordingly, and updates the Linux kernel version
      number in tst-mman-consts.py to reflect that these constants are now
      current with that kernel version.
      
      Tested with build-many-glibcs.py.
      
      	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h [__USE_MISC]
      	(MAP_SYNC): New macro.
      	* sysdeps/unix/sysv/linux/sparc/bits/mman.h [__USE_MISC]
      	(MAP_SYNC): Likewise.
      	* sysdeps/unix/sysv/linux/tst-mman-consts.py (main): Update Linux
      	kernel version number to 5.3.
      71bdf29a
    • Gabriel F. T. Gomes's avatar
      Add helper script for glibc debugging · 79ced5a8
      Gabriel F. T. Gomes authored
      This patch adds a new make rule that generates a helper script for
      debugging glibc test cases.  The new script, debugglibc.sh, is similar
      to testrun.sh, in the sense that it allows the execution of the
      specified test case, however, it opens the test case in GDB, setting the
      library path the same way that testrun.sh does.  The commands are based
      on the instructions on the wiki for glibc debugging [1,2].
      
      By default, the script tells GDB to load the test case for symbol
      information, so that, when a breakpoint is hit, the call stack is
      displayed correctly (instead of printing lots of '??'s).  For instance,
      after running 'make' and 'make check', one could do the following:
      
        $ ./debugglibc.sh nptl/tst-exec1 -b pthread_join
      
        Reading symbols from /home/gabriel/build/powerpc64le/glibc//elf/ld.so...done.
        Breakpoint 1 at 0x1444
        add symbol table from file "nptl/tst-exec1"
        [Thread debugging using libthread_db enabled]
        Using host libthread_db library "/home/gabriel/build/powerpc64le/glibc//nptl_db/libthread_db.so.1".
      
        Breakpoint 1, 0x00007ffff7fb1444 in _dl_start_user () from /home/gabriel/build/powerpc64le/glibc/elf/ld.so
        Breakpoint 2 at 0x7ffff7f49d48: file pthread_join.c, line 23.
      
      Notice that the script will always start GDB with the program running
      and halted at _dl_start_user.  So, in order to reach the actual
      breakpoint of interest, one should hit 'c', not 'r':
      
        >>> c
        Continuing.
        [New Thread 0x7ffff7d1f180 (LWP 76443)]
        [Switching to Thread 0x7ffff7d1f180 (LWP 76443)]
      
        Thread 2 "ld.so" hit Breakpoint 2, __pthread_join (threadid=140737354087616, thread_return=0x0) at pthread_join.c:24
        24        return __pthread_timedjoin_ex (threadid, thread_return, NULL, true);
      
      Then inspect the call stack with 'bt', as usual, and see symbols from
      both the test case and from the libraries themselves:
      
        >>> bt
        #0  __pthread_join (threadid=140737354087616, thread_return=0x0) at pthread_join.c:24
        #1  0x0000000010001f4c in tf (arg=<optimized out>) at tst-exec1.c:37
        #2  0x00007ffff7f487e8 in start_thread (arg=0x7ffff7510000) at pthread_create.c:479
        #3  0x00007ffff7e523a8 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S:82
      
      Tested for powerpc64le and x86_64.
      
      [1] https://sourceware.org/glibc/wiki/Debugging/Loader_Debugging
      [2] https://sourceware.org/glibc/wiki/Testing/Builds#Required_gdb_setup
      
      
      
      Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
      Reviewed-by: default avatarDmitry V. Levin <ldv@altlinux.org>
      Reviewed-by: default avatarJoseph Myers <joseph@codesourcery.com>
      Reviewed-by: default avatarAndreas Schwab <schwab@suse.de>
      79ced5a8
  11. Sep 27, 2019
Loading