summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Suppress internal declarations for most of the testsuite.zack/testsuite-isomacZack Weinberg2017-05-0942-256/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new build module called 'testsuite'. IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus (which means several ad-hoc tests for __cplusplus can go away). libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is defined; in particular, _ISOMAC mode does not get config.h automatically anymore. There are still quite a few tests that need to see internal gunk of one variety or another. For them, we now have 'tests-internal' and 'test-internal-extras'; files in this category will still be compiled with MODULE_NAME=nonlib, and everything proceeds as it always has. The bulk of this patch is moving tests from 'tests' to 'tests-internal'. There is also 'tests-static-internal', which has the same effect on files in 'tests-static', and 'modules-names-tests', which has the *inverse* effect on files in 'modules-names' (it's inverted because most of the things in modules-names are *not* tests). For both of these, the file must appear in *both* the new variable and the old one. There is also now a special case for when libc-symbols.h is included without MODULE_NAME being defined at all. (This happens during the creation of libc-modules.h, and also when preprocessing Versions files.) When this happens, IS_IN is set to be always false and _ISOMAC is *not* defined, which was the status quo, but now it's explicit. The remaining changes to C source files in this patch seemed likely to cause problems in the absence of the main change. They should be relatively self-explanatory. In a few cases I duplicated a definition from an internal header rather than move the test to tests-internal; this was a judgement call each time and I'm happy to change those however reviewers feel is more appropriate. * Makerules: New subdir configuration variables 'tests-internal' and 'test-internal-extras'. Test files in these categories will still be compiled with MODULE_NAME=nonlib. Test files in the existing categories (tests, xtests, test-srcs, test-extras) are now compiled with MODULE_NAME=testsuite. New subdir configuration variable 'modules-names-tests'. Files which are in both 'modules-names' and 'modules-names-tests' will be compiled with MODULE_NAME=testsuite instead of MODULE_NAME=extramodules. (gen-as-const-headers): Move to tests-internal. (do-tests-clean, common-mostlyclean): Support tests-internal. * Makeconfig (built-modules): Add testsuite. * Makefile: Change libof-check-installed-headers-c and libof-check-installed-headers-cxx to 'testsuite'. * Rules: Likewise. Support tests-internal. * benchtests/strcoll-inputs/filelist#en_US.UTF-8: Remove extra-modules.mk. * config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here. * include/libc-symbols.h: Move definitions of _GNU_SOURCE, PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the very top of the file and rationalize their order. If MODULE_NAME is not defined at all, define IS_IN to always be false, and don't define _ISOMAC. If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are true, define _ISOMAC and suppress everything else in this file, starting with the inclusion of config.h. Do check for inappropriate definitions of __OPTIMIZE__ and __FAST_MATH__ here, but only if _ISOMAC is not defined. Correct some out-of-date commentary. * include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE and _Mlong_double_ before including math.h. * include/string.h: If _ISOMAC is defined, don't expose _STRING_ARCH_unaligned. Move a comment to a more appropriate location. * include/errno.h, include/stdio.h, include/stdlib.h, include/string.h * include/time.h, include/unistd.h, include/wchar.h: No need to check __cplusplus nor use __BEGIN_DECLS/__END_DECLS. * misc/sys/cdefs.h (__NTHNL): New macro. * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__m81_defun): Use __NTHNL to avoid errors with GCC 6. * elf/tst-env-setuid-tunables.c: Include config.h with _LIBC defined, for HAVE_TUNABLES. * inet/tst-checks-posix.c: No need to define _ISOMAC. * intl/tst-gettext2.c: Provide own definition of N_. * math/test-signgam-finite-c99.c: No need to define _ISOMAC. * math/test-signgam-main.c: No need to define _ISOMAC. * stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to... * stdlib/tst-strtod1i.c: ...this new file. * stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice. Split tests of __strtod_internal to... * stdlib/tst-strtod5i.c: ...this new file. * string/test-string.h: Include stdint.h. Duplicate definition of inhibit_loop_to_libcall here (from libc-symbols.h). * string/test-strstr.c: Provide dummy definition of libc_hidden_builtin_def when including strstr.c. * sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC mode; no need to test __STRICT_ANSI__ nor __cplusplus as well. * sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h. Don't include init-arch.h. * sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h. Don't include init-arch.h. * elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static, tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest, unload, unload2, circleload1, neededtest, neededtest2, neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3, tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1, tst-stackguard1, tst-_dl_addr_inside_object, and all of the ifunc tests to tests-internal. Don't add $(modules-names) to test-extras. * inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal. Add tst-deadline to tests-static-internal. * malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to tests-internal. * misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal. * nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11, tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3, tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static, tst-sem12-static, and tst-stackguard1-static to tests-internal. Link tests-internal with libpthread also. Don't add $(modules-names) to test-extras. * nss/Makefile: Move tst-field to tests-internal. * posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33, tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal. * stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4, tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to tests-internal. * sunrpc/Makefile: Move tst-svc_register to tests-internal. * sysdeps/powerpc/Makefile: Move test-get_hwcap and test-get_hwcap-static to tests-internal. * sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to tests-internal. * sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to modules-names-tests.
* Remove _IO_MTSAFE_IO from public headers.Zack Weinberg2017-05-094-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _IO_MTSAFE_IO controls whether stdio is *built* with support for multithreading. In the distant past it might also have worked as a feature selection macro, allowing library *users* to select thread-safe or lock-free stdio at application build time, I haven't done the archaeology. Nowadays, defining _IO_MTSAFE_IO while using the installed headers, or in _ISOMAC mode, will cause libio.h to throw syntax errors. This patch removes _IO_MTSAFE_IO from the public headers (specifically, from libio/libio.h). The most important thing it controlled in there was whether libio.h defines _IO_lock_t itself or expects stdio-lock.h to have done it, and we do still need a inter-header communication macro for that, because stdio-lock.h can only define _IO_lock_t as a typedef. I've invented _IO_lock_t_defined, which is defined by both versions of stdio-lock.h. _IO_MTSAFE_IO also controlled the definitions of a handful of macros that _might_ count as part of the public libio.h interface. They are now unconditionally given their non-_IO_MTSAFE_IO definition in libio/libio.h, and include/libio.h redefines them with the _IO_MTSAFE_IO definition. This should minimize the odds of breaking old software that actually uses those macros. I suspect that this entire mechanism is vestigial, and that glibc won't build anymore if you *don't* define _IO_MTSAFE_IO, but that's another patchset. The bulk of libio.h is internal-use-only stuff that no longer makes sense to expose (libstdc++ gave up on making a FILE the same object as a C++ filebuf *decades* ago) but that, too, is another patchset. * libio/libio.h: Condition dummy definition of _IO_lock_t on _IO_lock_t_defined, not _IO_MTSAFE_IO. Unconditionally use the non-_IO_MTSAFE_IO definitions for _IO_peekc, _IO_flockfile, _IO_funlockfile, and _IO_ftrylockfile. Only define _IO_cleanup_region_start and _IO_cleanup_region_end if not already defined. * include/libio.h: If _IO_MTSAFE_IO is defined, redefine _IO_peekc, _IO_flockfile, _IO_funlockfile, and _IO_ftrylockfile appropriately. * sysdeps/generic/stdio-lock.h, sysdeps/nptl/stdio-lock.h: Define _IO_lock_t_defined after defining _IO_lock_t.
* sunrpc/tst-xdrmem2.c: Include stdint.h.Zack Weinberg2017-05-092-0/+5
|
* resolv: Use RES_DFLRETRY consistently [BZ #21474]Florian Weimer2017-05-092-2/+8
|
* Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk.Zack Weinberg2017-05-0917-35/+39
| | | | | | | | | | | | | | | | | | | | | | cppflags-iterator.mk no longer has anything to do with CPPFLAGS; all it does is set libof-$(foo) for a list of files. extra-modules.mk does the same thing, but with a different input variable, and doesn't let the caller control the module. Therefore, this patch gives cppflags-iterator.mk a better name, removes extra-modules.mk, and updates all uses of both. * extra-modules.mk: Delete file. * cppflags-iterator.mk: Rename to ... * libof-iterator.mk: ...this. Adjust comments. * Makerules, extra-lib.mk, benchtests/Makefile, elf/Makefile * elf/rtld-Rules, iconv/Makefile, locale/Makefile, malloc/Makefile * nscd/Makefile, sunrpc/Makefile, sysdeps/s390/Makefile: Use libof-iterator.mk instead of cppflags-iterator.mk or extra-modules.mk. * benchtests/strcoll-inputs/filelist#en_US.UTF-8: Remove extra-modules.mk and cppflags-iterator.mk, add libof-iterator.mk.
* S390: Regenerate ULPsStefan Liebler2017-05-092-6/+10
| | | | | | | | Updated ulps file - Needed if build with GCC 7. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* vfprintf.c: Refactor magic number 32 into EXTSIZ.Carlos O'Donell2017-05-082-25/+33
| | | | | | | The magic number 32 is used everywhere as extra size to use when doing certain operations. This commit refactors that into a macro so you can change this value if you're debugging something in a local build.
* Remove __ASSUME_PROC_PID_TASK_COMM.Joseph Myers2017-05-083-19/+6
| | | | | | | | | | | | | | This patch removes the __ASSUME_PROC_PID_TASK_COMM macro, and associated conditional code (in a testcase), now that 3.2 is the global minimum Linux kernel version supported. Tested for x86_64. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PROC_PID_TASK_COMM): Remove macro. * sysdeps/unix/sysv/linux/tst-setgetname.c: Do not include <kernel-features.h>. (do_test) [!__ASSUME_PROC_PID_TASK_COMM]: Remove conditional code.
* Remove __ASSUME_GETCPU_SYSCALL.Joseph Myers2017-05-082-5/+5
| | | | | | | | | | | | | | | | | | | This patch removes the definition of __ASSUME_GETCPU_SYSCALL. In fact this macro is unused, probably since: commit dd26c44403582fdf10d663170f947dfe4b3207a0 Author: Adhemerval Zanella <adhemerval.zanella@linaro.com> Date: Wed Apr 22 14:21:39 2015 -0300 Consolidate sched_getcpu so it could have been removed even without the move to 3.2 as minimum kernel version on x86_64. Tested for x86_64. * sysdeps/unix/sysv/linux/x86_64/kernel-features.h (__ASSUME_GETCPU_SYSCALL): Remove macro.
* support: Prevent multiple deletion of temporary filesFlorian Weimer2017-05-087-93/+81
| | | | | | Otherwise, another user might recreate these files after the first deletion. Particularly with temporary directories, this could result in the removal of unintended files through symbol link attacks.
* support: Delete temporary files in LIFO orderFlorian Weimer2017-05-082-11/+14
| | | | | | | | This is required to remove temporary directories which contain temporary files. Previously, FIFO order meant that directory removal was attempted when the directory still contained files, which meant that temporary directory cleanup was essentially unsupported.
* Remove <sys/ultrasound.h>Florian Weimer2017-05-084-2/+9
| | | | | This header was once used for constants related to the Gravis Ultrasound sound card.
* Require Linux kernel 3.2 or later on x86 / x86_64.Joseph Myers2017-05-087-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the recent discussion, this patch implements a requirement for Linux 3.2 or later for x86 and x86_64. This is only the initial change to increase the configured minimum; it's expected that followup patches would deal with associated removal of conditionals that are no longer needed. If we remove the start-up test on the kernel version, of course the NEWS and README text should then be revised (to reflect that this version is just one such that glibc does not intend to include compatibility code for any older kernel version, rather than older kernels necessarily failing to work or glibc necessarily having compatibility code for newer interfaces). The followups would be able to assume presence of getcpu (x86_64), recvmmsg (not always through its own syscall, sometimes only through socketcall), sendmmsg (likewise), /proc/$pid/task/$tid/comm, f_flags from statfs, prlimit64. Tested for x86_64 and x86. * sysdeps/unix/sysv/linux/i386/configure.ac (arch_minimum_kernel): Remove. * sysdeps/unix/sysv/linux/i386/configure: Regenerated. * sysdeps/unix/sysv/linux/x86_64/64/configure.ac (arch_minimum_kernel): Remove. * sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerated. * README: Update statement about Linux kernel requirements.
* manual: Add preadv and pwritev documentationAdhemerval Zanella2017-05-042-0/+106
| | | | * manual/llio.texi: Add preadv and pwritev documentation.
* Fix network headers stdint.h namespace (bug 21455).Joseph Myers2017-05-0410-60/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conform/ namespace tests of arpa/inet.h, netdb.h and netinet/in.h fail for UNIX98 and XPG42 because of inclusion of stdint.h, which defines macros not permitted in those headers for those standards. UNIX98 allows them to include inttypes.h, but (predating C99) has restricted inttypes.h contents (not yet tested in the conform/ tests) not including those macros; XPG4.2 has no such permission and no inttypes.h / stdint.h at all. This patch rearranges the headers to avoid this issue. intN_t definitions move to bits/stdint-intn.h, and uintN_t definitions to bits/stdint-uintn.h. (These are not bits/types/ headers because they each define four types. They are separate rather than just a single header because sys/types.h defines intN_t but u_intN_t rather than uintN_t - and while sys/types.h could define uintN_t because of the POSIX reservation of *_t, existing practice there is largely to condition types on appropriate feature test macros, and indeed there is at least one open bug report (14553) about a type that's not so-conditioned, so maybe types there should actually have conditions added where appropriate.) The affected network headers are then made to include bits/stdint-uintn.h instead of stdint.h. This allows six XFAILs to be removed. This doesn't do anything about inttypes.h defining more than it should for UNIX98, but we don't have conformtest expectations for that case at present (and my inclination is that a fix for that should be as local as possible - affecting only inttypes.h, not stdint.h, only for the case of __USE_UNIX98 && !__USE_ISOC99). Tested for x86_64. [BZ #21455] * bits/stdint-intn.h: New file. * bits/stdint-uintn.h: Likewise. * stdlib/Makefile (headers): Add bits/stdint-intn.h and bits/stdint-uintn.h. * inet/netinet/in.h: Include <bits/stdint-uintn.h> instead of <stdint.h>. * posix/sys/types.h: Include <bits/stdint-intn.h>. (__int8_t_defined): Do not define here. (int8_t): Likewise. (int16_t): Likewise. (int32_t): Likewise. (int64_t): Likewise. [__GNUC_PREREQ (2, 7)] (__intN_t): Likewise. * resolv/netdb.h: Include <bits/stdint-uintn.h> instead of <stdint.h>. * include/netdb.h [_ISOMAC]: Do not include <stdint.h>. * sysdeps/generic/stdint.h: Include <bits/stdint-intn.h> and <bits/stdint-uintn.h>. (int8_t): Do not define here. (int16_t): Likewise. (int32_t): Likewise. (int64_t): Likewise. (uint8_t): Likewise. (uint16_t): Likewise. (uint32_t): Likewise. (uint64_t): Likewise. * conform/Makefile (test-xfail-XPG42/arpa/inet.h/conform): Remove variable. (test-xfail-XPG42/netdb.h/conform): Likewise. (test-xfail-XPG42/netinet/in.h/conform): Likewise. (test-xfail-UNIX98/arpa/inet.h/conform): Likewise. (test-xfail-UNIX98/netdb.h/conform): Likewise. (test-xfail-UNIX98/netinet/in.h/conform): Likewise.
* ldbl-128: Use mathx_hidden_def inplace of hidden_defPaul E. Murphy2017-05-045-3/+15
| | | | | | | | | | | | | This provides a extra macro expansion before invoking the hidden_def macro. This is necessary to build the ldbl-128 files as float128 correctly. * sysdeps/generic/math_private.h: (mathx_hidden_def): New macro. * sysdeps/ieee754/ldbl-128/s_finitel.c: Replace hidden_def with the above. * sysdeps/ieee754/ldbl-128/s_isinfl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_isnanl.c: Likewise.
* Fix signal.h bsd_signal namespace (bug 21445).Joseph Myers2017-05-042-1/+4
| | | | | | | | | | | | | signal.h declares bsd_signal for __USE_XOPEN. But this function was obsoleted in the 2001 edition of POSIX and removed in the 2008 edition, so it should not be declared when the 2008 edition is in use. This patch fixes the conditionals accordingly. (This does not fix any conform/ test failures because of other namespace issues in signal.h.) Tested for x86_64. [BZ #21445] * signal/signal.h [__USE_XOPEN2K8] (bsd_signal): Do not declare.
* Use __glibc_reserved convention in mcontext, sigcontext (bug 21457).Joseph Myers2017-05-044-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the most straightforward part of fixing namespace issues for sys/ucontext.h and related headers: where fields in sys/ucontext.h or bits/sigcontext.h are named "reserved", "padding" or similar, they are renamed to use the __glibc_reserved* naming convention. It does not change fields with a leading underscore, or even those with a prefix such as uc_ or sc_. It only fixes a small part of bug 21457, so no XFAILs are removed. Tested for x86_64 and x86, and with build-many-glibcs.py. [BZ #21457] * sysdeps/unix/sysv/linux/mips/sys/ucontext.h [_MIPS_SIM != _ABIO32] (mcontext_t): Rename field reserved to __glibc_reserved1. * sysdeps/unix/sysv/linux/x86/bits/sigcontext.h (struct _fpx_sw_bytes): Rename field padding to __glibc_reserved1. (struct _fpxreg): Likewise. [!__x86_64__] (struct _fpstate): Rename field reserved to __glibc_reserved1. Rename field padding to __glibc_reserved2. [__x86_64__] (struct _fpstate): Rename field padding to __glibc_reserved1. (struct _xsave_hdr): Rename field reserved1 to __glibc_reserved1. Rename field reserved2 to __glibc_reserved2. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h [__x86_64__] (struct _libc_fpxreg): Rename field padding to __glibc_reserved1. [__x86_64__] (struct _libc_fpstate): Rename field padding to __glibc_reserved1.
* powerpc: Fix strncat ifunc selectionRajalakshmi Srinivasaraghavan2017-05-042-1/+6
| | | | | | Correct hwcap usage in strncat introduced by commit 249dcdb71b79e4c488a46c9027e0014c0bc27044. Tested on power7 and power8 systems
* x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391]H.J. Lu2017-05-0312-138/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dl_platform and dl_hwcap are set from AT_PLATFORM and AT_HWCAP very early during startup. They are used by dynamic linker to determine platform and build an array of hardware capability names, which are added to search path when loading shared object. dl_platform and dl_hwcap are unused on x86-64. On i386, i386, i486, i586 and i686 platforms were supported and only SSE2 capability was used. On x86, usage of AT_PLATFORM and AT_HWCAP to determine platform and processor capabilities is obsolete since all information is available in dl_x86_cpu_features. This patch sets dl_platform and dl_hwcap from dl_x86_cpu_features in dynamic linker. On i386, the available plaforms are changed to i586 and i686 since i386 has been deprecated. On x86-64, the available plaforms are haswell, which is for Haswell class processors with BMI1, BMI2, LZCNT, MOVBE, POPCNT, AVX2 and FMA, and xeon_phi, which is for Xeon Phi class processors with AVX512F, AVX512CD, AVX512ER and AVX512PF. A capability, avx512_1, is also added to x86-64 for AVX512 ISAs: AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL. [BZ #21391] * sysdeps/i386/dl-machine.h (dl_platform_init) [IS_IN (rtld)]: Only call init_cpu_features. [!IS_IN (rtld)]: Only set GLRO(dl_platform) to NULL if needed. * sysdeps/x86_64/dl-machine.h (dl_platform_init): Likewise. * sysdeps/i386/dl-procinfo.h: Removed. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Don't include <sysdeps/i386/dl-procinfo.h> nor <ldsodefs.h>. Include <sysdeps/x86/dl-procinfo.h>. (_dl_procinfo): Replace _DL_HWCAP_COUNT with 32. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h [!IS_IN (ldconfig)]: Include <sysdeps/x86/dl-procinfo.h> instead of <sysdeps/generic/dl-procinfo.h>. * sysdeps/x86/cpu-features.c: Include <dl-hwcap.h>. (init_cpu_features): Set dl_platform, dl_hwcap and dl_hwcap_mask. * sysdeps/x86/cpu-features.h (bit_cpu_LZCNT): New. (bit_cpu_MOVBE): Likewise. (bit_cpu_BMI1): Likewise. (bit_cpu_BMI2): Likewise. (index_cpu_BMI1): Likewise. (index_cpu_BMI2): Likewise. (index_cpu_LZCNT): Likewise. (index_cpu_MOVBE): Likewise. (index_cpu_POPCNT): Likewise. (reg_BMI1): Likewise. (reg_BMI2): Likewise. (reg_LZCNT): Likewise. (reg_MOVBE): Likewise. (reg_POPCNT): Likewise. * sysdeps/x86/dl-hwcap.h: New file. * sysdeps/x86/dl-procinfo.h: Likewise. * sysdeps/x86/dl-procinfo.c (_dl_x86_hwcap_flags): New. (_dl_x86_platforms): Likewise.
* Tweak realloc/MREMAP comment to be more accurate.DJ Delorie2017-05-032-3/+8
| | | | | | | | | MMap'd memory isn't shrunk without MREMAP, but IIRC this is intentional for performance reasons. Regardless, this patch tweaks the existing comment to be more accurate wrt the existing code. [BZ #21411] * malloc/malloc.c: Tweak realloc/MREMAP comment to be more accurate.
* Correct misplaced comments in struct ip_mreq_sourcePhil Blundell2017-05-032-2/+7
|
* Bug 20686: Add el_GR@euro support.Carlos O'Donell2017-05-032-0/+6
| | | | | | | | | Despite the fact that el_GR is ISO-8859-7:2003 which contains the euro symobl, it is not possible to know this apriori to selecting the el_GR locale. Therefore you don't know if el_GR can possibly have the 2003 ammendments which include the euro symbol. This is resolved by creating an el_GR@euro locale similar to all the other @euro locales for non-UTF8 charsets.
* Bug 20116: Clarify behaviour of PD->lock.Carlos O'Donell2017-05-032-3/+18
| | | | | Add comments to the concurrency notes to clarify the semaphore-like and mutex-like behaviours of PD->lock.
* Consolidate Linux epoll_wait syscallAdhemerval Zanella2017-05-035-5/+17
| | | | | | | | | | | | | | This patch consolidates the epoll_wait Linux syscall generation on sysdeps/unix/sysv/linux/epoll_wait.c. The implementation tries to use __NR_epoll_wait if defined, otherwise calls epoll_pwait. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/epoll_wait.c: New file. * sysdeps/unix/sysv/linux/generic/epoll_wait.c: Remove file. * sysdeps/unix/sysv/linux/syscalls.list: Remove epoll_wait from auto-generation list.
* Consolidate Linux select implementationAdhemerval Zanella2017-05-037-11/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the select Linux syscall implementation on sysdeps/unix/sysv/linux/select.c. The changes are: 1. Remove select from auto-generation syscalls.list on the architecture that uses __NR_select. 2. Remove generic implementation add a default one that handle all current cases (with the expection of alpha) The new default implementation will either use __NR_select if available of fallback to __NR_pselect6 otherwise. 3. Add a alpha outlier implementation which requires old compatibility symbols. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Add osf_select. * sysdeps/unix/sysv/linux/alpha/select.c: New file. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove select and osf_select from auto-generation list. * sysdeps/unix/sysv/linux/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/generic/select.c: Remove file. * sysdeps/unix/sysv/linux/select.c: New file.
* Consolidate Linux poll implementationAdhemerval Zanella2017-05-033-3/+13
| | | | | | | | | | | | | | | | This patch consolidates the poll Linux syscall implementation on sysdeps/unix/sysv/linux/poll.c. It basically removes poll from auto-generation list and add a default implementation that either call __NR_poll directly (if the kernel headers defines it) or ppoll adjusting the timeout argument (as the generic implementation). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/generic/poll.c: Remove file. * sysdeps/unix/sysv/linux/poll.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Remove poll from auto-generation list.
* Add HWCAP_ASIMDRDM from Linux 4.11 to AArch64 bits/hwcap.h.Joseph Myers2017-05-032-0/+6
| | | | | | | | | | This patch adds the HWCAP_ASIMDRDM macro from Linux 4.11 to the AArch64 bits/hwcap.h. Tested (compilation only) with build-many-glibcs.py. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_ASIMDRDM): New macro.
* sparc: handle R_SPARC_DISP64 and R_SPARC_REGISTER relocsVladimir Mezentsev2017-05-022-0/+12
| | | | | | | | | | | The Studio compiler generates relocation types which are not supported in glibc. Handle these relocs. Tested in sparc64-linux-gnu. No regressions. BZ #21179] * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and R_SPARC_REGISTER relocations.
* posix: Fix internal p{read,write} plt usageAdhemerval Zanella2017-05-026-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds internal alias for __pread, __pread64, and __pwrite following the already in place one for __pwrite64. This is not used in any implementation but on microblaze on preadv/pwritev fallback (since it does not define __ASSUME_PREADV). In fact it was signaled by commit c35db50ff5 which update the expected localptl.data for the architecture based on resulted value. This patch updates the plt for microblaze now that p{read,write}{64} are correctly routed to use internal alias. Checked on x86_64-linux-gnu and a build for all supported architectures (no all variants although). * include/unistd.h (__pread): Add libc_hidden_proto. (__pread64): Likewise. (__pwrite): Likewise. * sysdeps/unix/sysv/linux/microblaze/localplt.data [libc.so] (__pread64): Remove. * sysdeps/unix/sysv/linux/pread.c (__pread64): Add libc_hidden_weak. * sysdeps/unix/sysv/linux/pread64.c (__pread64): Likewise. * sysdeps/unix/sysv/linux/pwrite.c (__pwrite): Likewise.
* powerpc: Update powerpc-fpu libm-test-ulpsTulio Magno Quites Machado Filho2017-05-022-16/+20
| | | | * sysdeps/powerpc/fpu/libm-test-ulps: Update.
* nptl: Using libsupport for tst-cancel4*Adhemerval Zanella2017-05-016-946/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checked on x86_64-linux-gnu. * nptl/tst-cancel4-common.c: Use libsupport. * nptl/tst-cancel4-common.h: Likewise. * nptl/tst-cancel4.c (tf_read): Likewise. (tf_readv): Likewise. (tf_write): Likewise. (tf_writev): Likewise. (tf_sleep): Likewise. (tf_usleep): Likewise. (tf_nanosleep): Likewise. (tf_select): Likewise. (tf_pselect): Likewise. (tf_poll): Likewise. (tf_ppoll): Likewise. (tf_wait): Likewise. (tf_waitpid): Likewise. (tf_waitid): Likewise. (tf_sigpause): Likewise. (tf_sigsuspend): Likewise. (tf_sigwait): Likewise. (tf_sigwaitinfo): Likewise. (tf_sigtimedwait): Likewise. (tf_pause): Likewise. (tf_accept): Likewise. (tf_send): Likewise. (tf_recv): Likewise. (tf_recvfrom): Likewise. (tf_recvmsg): Likewise. (tf_open): Likewise. (tf_close): Likewise. (tf_pread): Likewise. (tf_pwrite): Likewise. (tf_preadv): Likewise. (tf_pwritev): Likewise. (tf_fsync): Likewise. (tf_fdatasync): Likewise. (tf_msync): Likewise. (tf_sendto): Likewise. (tf_sendmsg): Likewise. (tf_creat): Likewise. (tf_connect): Likewise. (tf_tcdrain): Likewise. (tf_msgrcv): Likewise. (tf_msgsnd): Likewise. * nptl/tst-cancel4_1.c (tf_sendmmsg): Likewise. * nptl/tst-cancel4_2.c (tf_recvmmsg): Likewise.
* posix: Using libsupport for p{write,read}v testsAdhemerval Zanella2017-05-012-25/+30
| | | | | | | | Checked on x86_64-linux-gnu. * misc/tst-preadvwritev-common.c (do_prepare): Use libsupport expected arguments. (do_test): Adapt to use libsupport.
* Add TCP_FASTOPEN_CONNECT from Linux 4.11 to netinet/tcp.h.Joseph Myers2017-05-012-0/+3
| | | | | | | | | This patch adds the TCP_FASTOPEN_CONNECT macro from Linux 4.11 to sysdeps/gnu/netinet/tcp.h. Tested for x86-64. * sysdeps/gnu/netinet/tcp.h (TCP_FASTOPEN_CONNECT): New macro.
* Add PF_SMC, AF_SMC from Linux 4.11 to bits/socket.h.Joseph Myers2017-05-012-1/+7
| | | | | | | | | | | This patch adds the PF_SMC / AF_SMC macros from Linux 4.11 to sysdeps/unix/sysv/linux/bits/socket.h. Tested for x86_64. * sysdeps/unix/sysv/linux/bits/socket.h (PF_SMC): New macro. (PF_MAX): Set to 44. (AF_SMC): New macro.
* Default Linux kernel version in build-many-glibcs.py to 4.11.Joseph Myers2017-05-012-1/+6
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux kernel version to 4.11.
* powerpc: Fix logbl on power7 [BZ# 21280]Tulio Magno Quites Machado Filho2017-04-282-6/+25
| | | | | | | | | | | | | | | | | 1. Fix the results for negative subnormals by ignoring the signal when normalizing the value. 2. Fix the output when the high part is a power of 2 and the low part is a nonzero number with opposite sign. This fix is based on commit 380bd0fd2418f8988217de950f8b8ff18af0cb2b. After applying this patch, logbl() tests pass cleanly on POWER >= 7. Tested on powerpc, powerpc64 and powerpc64le [BZ #21280] * sysdeps/powerpc/power7/fpu/s_logbl.c (__logbl): Ignore the signal of subnormals and adjust the exponent of power of 2 down when low part has opposite sign.
* powerpc64le: Create divergent sysdep directory for powerpc64le.Paul E. Murphy2017-04-2820-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | float128 on powerpc64le requires the addition of the ieee754/float128 sysdep, whereas powerpc64 doesn't. This requires creating a bunch of submachine and cpu directories and Implies files which just point towards their powerpc64 equivalent. Tested on P7, P8, and generic powerpc64le targets with and without multiarch. * sysdeps/powerpc/powerpc64le/Implies: New file. * sysdeps/powerpc/powerpc64le/fpu/Implies: New file. * sysdeps/powerpc/powerpc64le/fpu/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power7/Implies: New file. * sysdeps/powerpc/powerpc64le/power7/fpu/Implies: New file. * sysdeps/powerpc/powerpc64le/power7/fpu/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power7/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power8/Implies: New file. * sysdeps/powerpc/powerpc64le/power8/fpu/Implies: New file. * sysdeps/powerpc/powerpc64le/power8/fpu/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power8/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power9/Implies: New file. * sysdeps/powerpc/powerpc64le/power9/fpu/Implies: New file. * sysdeps/powerpc/powerpc64le/power9/fpu/multiarch/Implies: New file. * sysdeps/powerpc/powerpc64le/power9/multiarch/Implies: New file. * sysdeps/powerpc/preconfigure: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64le/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64le/fpu/Implies: New file.
* conformtest: Allow time.h inclusion from semaphore.h for XOPEN2K.Joseph Myers2017-04-283-2/+10
| | | | | | | | | | | | | | | | POSIX.1:2001 added sem_timedwait, but said nothing about defining struct timespec in semaphore.h. The 2008 edition added a corresponding permission to include <time.h> from <semaphore.h>. Since this is the normal POSIX approach in such cases, it seems appropriate to consider this a bug fix, and so this patch makes the conform/ tests allow that inclusion for POSIX.1:2001 as well. Tested for x86_64. * conform/data/semaphore.h-data [XOPEN2K] (time.h): Allow header inclusion. * conform/Makefile (test-xfail-XOPEN2K/semaphore.h/conform): Remove.
* conformtest: Fix XPG standard naming.Joseph Myers2017-04-2764-224/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4". That naming is misleading. _XOPEN_SOURCE_EXTENDED actually means XPG4.2, including UX-shaded interfaces. _XOPEN_SOURCE actually means XPG4, or XPG4.2 without UX-shaded interfaces. (Prior XPG versions also used _XOPEN_SOURCE, but without any versioning of the values of the macro, so XPG4.2 without UX-shaded interfaces is the only sensible set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without _XOPEN_SOURCE_EXTENDED defined.) This patch fixes the naming in the conform/ tests, so that what is now called XPG4 is changed to XPG42, and what is now called XPG3 is changed to XPG4. Tested for x86_64 (and verified the complete set of expectations is unchanged by the patch beyond the intended renaming). * conform/GlibcConform.pm (XPG4): Rename standard to XPG42. (XPG3): Rename standard to XPG4. * conform/Makefile: Likewise. * conform/list-header-symbols.pl: Likewise. * conform/data/aio.h-data: Likewise. * conform/data/arpa/inet.h-data: Likewise. * conform/data/complex.h-data: Likewise. * conform/data/ctype.h-data: Likewise. * conform/data/dlfcn.h-data: Likewise. * conform/data/fcntl.h-data: Likewise. * conform/data/fenv.h-data: Likewise. * conform/data/float.h-data: Likewise. * conform/data/fmtmsg.h-data: Likewise. * conform/data/ftw.h-data: Likewise. * conform/data/grp.h-data: Likewise. * conform/data/inttypes.h-data: Likewise. * conform/data/iso646.h-data: Likewise. * conform/data/langinfo.h-data: Likewise. * conform/data/libgen.h-data: Likewise. * conform/data/limits.h-data: Likewise. * conform/data/locale.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/mqueue.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/net/if.h-data: Likewise. * conform/data/netdb.h-data: Likewise. * conform/data/netinet/in.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/pwd.h-data: Likewise. * conform/data/sched.h-data: Likewise. * conform/data/search.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/spawn.h-data: Likewise. * conform/data/stdbool.h-data: Likewise. * conform/data/stdint.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/resource.h-data: Likewise. * conform/data/sys/select.h-data: Likewise. * conform/data/sys/socket.h-data: Likewise. * conform/data/sys/stat.h-data: Likewise. * conform/data/sys/statvfs.h-data: Likewise. * conform/data/sys/time.h-data: Likewise. * conform/data/sys/timeb.h-data: Likewise. * conform/data/sys/types.h-data: Likewise. * conform/data/sys/uio.h-data: Likewise. * conform/data/sys/un.h-data: Likewise. * conform/data/sys/wait.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/termios.h-data: Likewise. * conform/data/tgmath.h-data: Likewise. * conform/data/time.h-data: Likewise. * conform/data/ucontext.h-data: Likewise. * conform/data/unistd.h-data: Likewise. * conform/data/utmpx.h-data: Likewise. * conform/data/varargs.h-data: Likewise. * conform/data/wchar.h-data: Likewise. * conform/data/wctype.h-data: Likewise.
* Default build-many-glibcs.py to GCC 7 branch.Joseph Myers2017-04-262-1/+6
| | | | | | | | | | | | | Now there is a GCC 7 release branch, this patch makes build-many-glibcs.py default to using it instead of GCC 6. Relative to GCC 6, this fixes the MicroBlaze build but introduces ICEs building glibc testcases for SH (GCC PRs 78459, 78460; the latter is an out-of-memory issue so you may want to set memory limits when running build-many-glibcs.py). * scripts/build-many-glibcs.py (Context.checkout): Default gcc version to 7 branch.
* Add earlyclobber to sqrtt/sqrtf insns.Uros Bizjak2017-04-262-4/+10
| | | | | | | | | | | | When using software completions, we have to prevent assembler to match input and output operands of sqrtt/sqrtf insn. Add earlyclobber to output operand to avoid unwanted operand matching. 2017-04-14 Uros Bizjak <ubizjak@gmail.com> * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): Add earlyclobber to output operand of sqrt insn. (__ieee754_sqrtf): Ditto.
* Fix sys/socket.h namespace issues from sys/uio.h inclusion (bug 21426).Joseph Myers2017-04-2511-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys/socket.h includes sys/uio.h to get the definition of the iovec structure. POSIX allows sys/socket.h to make all sys/uio.h symbols visible. However, all of sys/uio.h is XSI-shaded, so for non-XSI POSIX this results in conformtest failures (for sys/socket.h and other headers that include it): Namespace violation: "UIO_MAXIOV" Namespace violation: "readv" Namespace violation: "writev" Now, there is some ambiguity in POSIX about what namespace reservations apply in this case - see http://austingroupbugs.net/view.php?id=1127 - but glibc convention would still avoid declaring readv and writev, for example, for feature test macros that don't include them (if only headers from the relevant standard are included), even if such declarations are permitted, so there is a bug here according to glibc conventions. This patch moves the struct iovec definition to a new bits/types/struct_iovec.h header and includes that from sys/socket.h instead of including the whole of sys/uio.h. This fixes the namespace issue; however, three files in glibc that were relying on the implicit inclusion needed to be updated to include sys/uio.h explicitly. So there is a question of whether sys/socket.h should continue to include sys/uio.h under some conditions, such as __USE_XOPEN or __USE_MISC or __USE_XOPEN || __USE_MISC, for greater compatibility with code that (wrongly) expects this optional inclusion to be present there. (I think the three affected files in glibc should still have explicit sys/uio.h inclusions added in any case, however.) Tested for x86_64. [BZ #21426] * misc/bits/types/struct_iovec.h: New file. * misc/Makefile (headers): Add bits/types/struct_iovec.h. * include/bits/types/struct_iovec.h: New file. * bits/uio.h (struct iovec): Replace by inclusion of <bits/types/struct_iovec.h>. * sysdeps/unix/sysv/linux/bits/uio.h (struct iovec): Likewise. * socket/sys/socket.h: Include <bits/types/struct_iovec.h> instead of <sys/uio.h>. * nptl/tst-cancel4.c: Include <sys/uio.h> * posix/test-errno.c: Likewise. * support/resolv_test.c: Likewise. * conform/Makefile (test-xfail-POSIX2008/arpa/inet.h/conform): Remove. (test-xfail-POSIX2008/netdb.h/conform): Likewise. (test-xfail-POSIX2008/netinet/in.h/conform): Likewise. (test-xfail-POSIX2008/sys/socket.h/conform): Likewise.
* conformtest: Allow *_t in sys/socket.h.Joseph Myers2017-04-252-0/+5
| | | | | | | | | | | | | | | The conformtest expectations in sys/socket.h are missing the standard POSIX allowance for all headers to define *_t names. For XSI standard versions that allowance comes in via the permission to include <sys/uio.h> (for which the expectations properly allow *_t), but for non-XSI POSIX nothing brings in that allowance and spurious namespace failures occur. This patch adds the required permission to the expectations to remove the spurious failures (by itself this does not allow any XFAILs to be removed). Tested for x86_64. * conform/data/sys/socket.h-data (*_t): Allow.
* posix: Remove ununsed posix_spawn internal assignmentAdhemerval Zanella2017-04-252-16/+19
| | | | | | | | | | The internal 'ret' variable in '__spawni_child' function is not used after assignment in most cases. Checked on x86_64-linux-gnu. * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Remove ununsed assignment.
* [BZ 21340] add support for POSIX_SPAWN_SETSIDAdhemerval Zanella2017-04-259-2/+131
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the POSIX_SPAWN_SETSID flag. It was recently accepted by the Austin Group: http://austingroupbugs.net/view.php?id=1044 Checked on x86_64 Daurnimator <quae@daurnimator.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> [BZ #21340] * posix/Makefile (tests): Add tst-posix_spawn-setsid to list of tests. * posix/spawn.h: define POSIX_SPAWN_SETSID flag. * posix/spawnattr_setflags.c (ALL_FLAGS): Add POSIX_SPAWN_SETSID to valid flags. * posix/tst-posix_spawn-setsid.c: Add test for POSIX_SPAWN_SETSID. * sysdeps/mach/hurd/spawni.c (__spawni): Implementation of POSIX_SPAWN_SETSID. * sysdeps/posix/spawni.c (__spawni): Likewise. * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Likewise. * NEWS: Add note about POSIX_SPAWN_SETSID support.
* Macroize function declarations in math_private.hGabriel F. T. Gomes2017-04-243-170/+154
| | | | | | | | | | | | | | | | | This patch moves the declaration of many floating-point functions from math_private.h to math_private_calls.h and macroize the declaration to be dependent on floating-point type. For each of float, double, and long double, the new header file is included once. This reduces the amount of repetitive boilerplate that will be required when adding float128 versions of these functions. Tested for powerpc64le and s390x. * sysdeps/generic/math_private.h: Move the declaration of many functions to sysdeps/generic/math_private_calls.h. * sysdeps/generic/math_private_calls.h: New file with the declarations of the functions removed from math_private.h macroized by floating-point type.
* S390: Move utf8-utf32-z9.c to multiarch folder and use s390_libc_ifunc_expr ↵Stefan Liebler2017-04-213-103/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macro. The utf8-utf32-z9.c iconv module is using ifunc and thus the ifunc part should be in multiarch folder. Otherwise ifunc is used even if you configure with --disable-multi-arch. This patch moves the ifunc resolvers to the new file sysdeps/s390/multiarch/utf8-utf32-z9.c. The resolvers are now implemented with s390_libc_ifunc_expr macro instead of using gcc attribute ifunc directly. The ifunc versions are implemented in sysdeps/s390/utf8-utf32-z9.c. Each version is only implemented if needed or supported. Therefore there is a block at beginning of the file which selects the versions which should be defined depending on support for multiarch, vector-support and used minimum architecture level. This block defines HAVE_[FROM|TO]_[C|CU|VX] to 1 or 0. The code below is rearranged and surrounded by #if HAVE_[FROM|TO]_[C|CU|VX] == 1. There is no functional change. The cu instructions are z9 zarch instructions. As the major distros are already using the newer z196 as architecture level set, those instructions can be used as fallback version instead of the c-code. This behaviour is decided at compile time via HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT. ChangeLog: * sysdeps/s390/multiarch/utf8-utf32-z9.c: New File. * sysdeps/s390/utf8-utf32-z9.c: Move ifunc resolvers to multiarch folder and define ifunc versions depending on HAVE_[FROM|TO]_[C|CU|VX]. (HAVE_FROM_C, HAVE_FROM_CU, HAVE_FROM_VX, HAVE_TO_C, HAVE_TO_VX, FROM_LOOP_DEFAULT, FROM_LOOP_C, FROM_LOOP_CU, FROM_LOOP_VX, TO_LOOP_DEFAULT, TO_LOOP_C, TO_LOOP_VX): New Define.
* S390: Move utf16-utf32-z9.c to multiarch folder and use s390_libc_ifunc_expr ↵Stefan Liebler2017-04-213-72/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | macro. The utf16-utf32-z9.c iconv module is using ifunc and thus the ifunc part should be in multiarch folder. Otherwise ifunc is used even if you configure with --disable-multi-arch. This patch moves the ifunc resolvers to the new file sysdeps/s390/multiarch/utf16-utf32-z9.c. The resolvers are now implemented with s390_libc_ifunc_expr macro instead of using gcc attribute ifunc directly. The ifunc versions are implemented in sysdeps/s390/utf16-utf32-z9.c. Each version is only implemented if needed or supported. Therefore there is a block at beginning of the file which selects the versions which should be defined depending on support for multiarch, vector-support and used minimum architecture level. This block defines HAVE_[FROM|TO]_[C|VX] to 1 or 0. The code below is rearranged and surrounded by #if HAVE_[FROM|TO]_[C|VX] == 1. There is no functional change. ChangeLog: * sysdeps/s390/multiarch/utf16-utf32-z9.c: New File. * sysdeps/s390/utf16-utf32-z9.c: Move ifunc resolvers to multiarch folder and define ifunc versions depending on HAVE_[FROM|TO]_[C|VX]. (HAVE_FROM_C, HAVE_FROM_VX, HAVE_TO_C, HAVE_TO_VX, FROM_LOOP_DEFAULT, FROM_LOOP_C, FROM_LOOP_VX, TO_LOOP_DEFAULT, TO_LOOP_C, TO_LOOP_VX): New Define.
* S390: Move utf8-utf16-z9.c to multiarch folder and use s390_libc_ifunc_expr ↵Stefan Liebler2017-04-213-95/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macro. The utf8-utf16-z9.c iconv module is using ifunc and thus the ifunc part should be in multiarch folder. Otherwise ifunc is used even if you configure with --disable-multi-arch. This patch moves the ifunc resolvers to the new file sysdeps/s390/multiarch/utf8-utf16-z9.c. The resolvers are now implemented with s390_libc_ifunc_expr macro instead of using gcc attribute ifunc directly. The ifunc versions are implemented in sysdeps/s390/utf8-utf16-z9.c. Each version is only implemented if needed or supported. Therefore there is a block at beginning of the file which selects the versions which should be defined depending on support for multiarch, vector-support and used minimum architecture level. This block defines HAVE_[FROM|TO]_[C|CU|VX] to 1 or 0. The code below is rearranged and surrounded by #if HAVE_[FROM|TO]_[C|CU|VX] == 1. There is no functional change. The cu instructions are z9 zarch instructions. As the major distros are already using the newer z196 as architecture level set, those instructions can be used as fallback version instead of the c-code. This behaviour is decided at compile time via HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT. ChangeLog: * sysdeps/s390/multiarch/utf8-utf16-z9.c: New File. * sysdeps/s390/utf8-utf16-z9.c: Move ifunc resolvers to multiarch folder and define ifunc versions depending on HAVE_[FROM|TO]_[C|CU|VX]. (HAVE_FROM_C, HAVE_FROM_CU, HAVE_FROM_VX, HAVE_TO_C, HAVE_TO_VX, FROM_LOOP_DEFAULT, FROM_LOOP_C, FROM_LOOP_CU, FROM_LOOP_VX, TO_LOOP_DEFAULT, TO_LOOP_C, TO_LOOP_VX): New Define.