Commit Graph

16215 Commits

Author SHA1 Message Date
Joseph Myers 7f98f1806a Split up rules for tests using mtrace and something else.
Most glibc tests that use mtrace to verify that there were no memory
leaks from the glibc facilities used in a given test depend on the
.out file of the previous test so that the mtrace test runs mtrace and
nothing else.

Two, however, have a single target combining mtrace with something
else.  In the case of libio/tst-fopenloc.check, the test both compares
the output with an expected baseline and runs mtrace.  In the case of
posix/tst-rxspencer-mem, the test is run (with different command line
from the main run) and then mtrace is run, from the same makefile
target.

This patch splits both of these tests up to use separate makefile
targets for each thing tested; in the tst-rxspencer case, a file
tst-rxspencer-no-utf8.c is created that just includes tst-rxspencer.c,
as is usual for tests where the same code gets tested in different
compile-time or runtime configurations.

Adding $(evaluate-test) to test commands, as in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html>, will no
longer need to insert && between multiple commands, as all tests will
either have just a single command or already use &&.

Tested x86_64.

	* libio/Makefile ($(objpfx)tst-fopenloc.check): Split into
	separate $(objpfx)tst-fopenloc-cmp.out and
	$(objpfx)tst-fopenloc-mem.out targets.
	(tests): Update dependencies.
	* posix/Makefile (tests variable): Add tst-rxspencer-no-utf8.
	(generated): Change tst-rxspencer-mem and tst-rxspencer.mtrace to
	tst-rxspencer-no-utf8-mem and tst-rxspencer-no-utf8.mtrace.
	(tst-rxspencer-no-utf8-ARGS): New variable.
	(tst-rxspencer-no-utf8-ENV): Likewise.
	(tests target): Depend on $(objpfx)tst-rxspencer-no-utf8-mem
	instead of $(objpfx)tst-rxspencer-mem.
	($(objpfx)tst-rxspencer-mem): Change target to
	$(objpfx)tst-rxspencer-no-utf8-mem.  Depend on
	$(objpfx)tst-rxspencer-no-utf8.out instead of running test program.
	* posix/tst-rxspencer-no-utf8.c: New file.
2014-02-14 13:45:14 +00:00
Joseph Myers 6e89caf118 Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file.  This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached.  It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.

In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed.  (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing.  In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)

It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)

Tested x86_64.

	* elf/Makefile ($(objpfx)order.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)order-cmp.out.
	($(objpfx)order-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
	$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
	$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
	$(objpfx)tst-array5-static-cmp.out.
	($(objpfx)tst-array1.out): Remove rule.
	($(objpfx)tst-array1-cmp.out): New rule.
	($(objpfx)tst-array1-static.out): Remove rule.
	($(objpfx)tst-array1-static-cmp.out): New rule.
	($(objpfx)tst-array2.out): Remove rule.
	($(objpfx)tst-array2-cmp.out): New rule.
	($(objpfx)tst-array3.out): Remove rule.
	($(objpfx)tst-array3-cmp.out): New rule.
	($(objpfx)tst-array4.out): Remove rule.
	($(objpfx)tst-array4-cmp.out): New rule.
	($(objpfx)tst-array5.out): Remove rule.
	($(objpfx)tst-array5-cmp.out): New rule.
	($(objpfx)tst-array5-static.out): Remove rule.
	($(objpfx)tst-array5-static-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)order2-cmp.out.
	($(objpfx)order2.out): Remove rule.
	($(objpfx)order2-cmp.out): New rule.
	($(objpfx)tst-initorder.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-initorder-cmp.out.
	($(objpfx)tst-initorder-cmp.out): New rule.
	($(objpfx)tst-initorder2.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-initorder2-cmp.out.
	($(objpfx)tst-initorder2-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-unused-dep-cmp.out.
	($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
	($(objpfx)tst-unused-dep-cmp.out): New rule.
	* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
	on $(objpfx)tst-setvbuf1-cmp.out.
	($(objpfx)tst-setvbuf1.out): Do not run cmp.
	($(objpfx)tst-setvbuf1-cmp.out): New rule.
	* string/Makefile [$(run-built-tests) = yes] (tests): Depend
	$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
	($(objpfx)tst-svc.out): Remove rule.
	($(objpfx)tst-svc-cmp.out): New rule.

nptl:
	* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-cleanup0-cmp.out.
	($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
Joseph Myers ed9a38e21b Clean up trivially redundant __USE_MISC conditionals.
This patch cleans up cases of __USE_MISC that are trivially redundant
after the recent substitution of __USE_MISC for __USE_BSD and
__USE_SVID: either in constructs such as "defined __USE_MISC ||
defined __USE_MISC", or else (in the bits/mman.h case) a conditional
on __USE_MISC nested inside another __USE_MISC conditional.  (The
cleanups remaining after this patch are still quite large, but it
seems a reasonable piece to separate out.)

Tested x86_64.

	* bits/mman.h [__USE_MISC]: Remove redundant conditionals.
	* ctype/ctype.h [__USE_MISC]: Likewise.
	* dirent/dirent.h [__USE_MISC]: Likewise.
	* grp/grp.h [__USE_MISC]: Likewise.
	* io/fcntl.h [__USE_MISC]: Likewise.
	* io/sys/stat.h [__USE_MISC]: Likewise.
	* libio/stdio.h [__USE_MISC]: Likewise.
	* posix/unistd.h [__USE_MISC]: Likewise.
	* pwd/pwd.h [__USE_MISC]: Likewise.
	* stdlib.h [__USE_MISC]: Likewise.
	* string/bits/string2.h [__USE_MISC]: Likewise.
	* string/string.h [__USE_MISC]: Likewise.
	* time/time.h [__USE_MISC]: Likewise.
2014-02-13 22:07:53 +00:00
Andreas Schwab d668061994 Fix memory leak in _nss_dns_gethostbyname4_r with big DNS answer 2014-02-13 12:54:34 +01:00
Joseph Myers 743151aeae Update MIPS math-tests.h for GCC 4.9 using soft-fp.
GCC trunk now uses soft-fp for MIPS64 long double, so supporting
integration with hardware exceptions and rounding modes.  This patch
updates MIPS math-tests.h accordingly not to disable exception and
rounding mode tests in this case.

Tested mips64 and ulps updated to reflect the newly run tests.

	* sysdeps/mips/math-tests.h: Include <features.h>.
	[!__mips_soft_float && _MIPS_SIM != _ABIO32 && __GNUC_PREREQ (4, 9)]
	(ROUNDING_TESTS_long_double): Do not define.
	[!__mips_soft_float && _MIPS_SIM != _ABIO32 && __GNUC_PREREQ (4, 9)]
	(EXCEPTION_TESTS_long_double): Likewise.
	* sysdeps/mips/mips64/libm-test-ulps: Update.
2014-02-13 00:46:45 +00:00
Joseph Myers 498afc54df Combine __USE_BSD and __USE_SVID into __USE_MISC.
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.

The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros.  Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name.  This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch.  (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)

Tested x86_64.

	* include/features.h (__USE_BSD): Remove macro definitions.
	(__USE_SVID): Likewise.
	(_BSD_SOURCE): Likewise.
	(_SVID_SOURCE): Likewise.
	[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
	from definition of _DEFAULT_SOURCE.
	[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
	[_DEFAULT_SOURCE].
	* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
	* bits/mman.h [__USE_BSD]: Likewise.
	* bits/termios.h [__USE_BSD]: Likewise.
	* bits/waitstatus.h [__USE_BSD]: Likewise.
	* ctype/ctype.h [__USE_SVID]: Likewise.
	* dirent/dirent.h [__USE_BSD]: Likewise.
	* grp/grp.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* inet/netinet/igmp.h [__USE_BSD]: Likewise.
	* io/fcntl.h [__USE_BSD]: Likewise.
	* io/ftw.h [__USE_BSD]: Likewise.
	* io/sys/stat.h [__USE_BSD]: Likewise.
	* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
	* libio/bits/stdio2.h [__USE_BSD]: Likewise.
	* libio/stdio.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* math/math.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
	* misc/bits/syslog.h [__USE_BSD]: Likewise.
	* misc/search.h [__USE_SVID]: Likewise.
	* misc/sys/mman.h [__USE_BSD]: Likewise.
	* misc/sys/syslog.h [__USE_BSD]: Likewise.
	* misc/sys/uio.h [__USE_BSD]: Likewise.
	* posix/bits/unistd.h [__USE_BSD]: Likewise.
	* posix/glob.h [__USE_BSD]: Likewise.
	* posix/regex.h [__USE_BSD]: Likewise.
	* posix/sys/types.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/sys/utsname.h [__USE_SVID]: Likewise.
	* posix/sys/wait.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/unistd.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* pwd/pwd.h [__USE_SVID]: Likewise.
	* resolv/netdb.h [__USE_BSD]: Likewise.
	* setjmp/setjmp.h [__USE_BSD]: Likewise.
	* signal/signal.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* socket/sys/socket.h [__USE_BSD]: Likewise.
	* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
	* stdlib/stdlib.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string2.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string3.h [__USE_BSD]: Likewise.
	* string/endian.h [__USE_BSD]: Likewise.
	* string/string.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* string/strings.h [__USE_BSD]: Likewise.
	* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
	* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
	* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
	* termios/termios.h [__USE_BSD]: Likewise.
	* time/sys/time.h [__USE_BSD]: Likewise.
	* time/time.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.

	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
	condition to [__USE_MISC].
2014-02-12 23:41:01 +00:00
Joseph Myers dd7b064cca Remove reference to subdir_lint.out.
The toplevel Makefile's subdir_targets variable refers to
subdir_lint.out.  As far as I can tell, this is not defined or
referenced anywhere else in the tree.  Having .out makefile references
that don't refer to the output from testcases seems confusing; this
patch removes the reference to subdir_lint.out.

Tested x86_64.

	* Makefile (subdir_targets): Remove subdir_lint.out.
2014-02-12 23:37:13 +00:00
Joseph Myers a2c4c1991d Remove indirection in stdio-common tests dependencies.
stdio-common/Makefile has the tests target depend on two test output
files indirectly through rules do-tst-unbputc and do-tst-printf.  I
see no reason for such an indirection, and everywhere else the tests
just depend on the output files directly, so this patch removes the
indirection.

Tested x86_64.

	* stdio-common/Makefile (do-tst-unbputc): Remove target.
	(do-tst-printf): Likewise.
	(tests): Depend directly on $(objpfx)tst-unbputc.out and
	$(objpfx)tst-printf.out.
2014-02-12 22:19:20 +00:00
Joseph Myers 8756f74004 Stop io/ftwtest deleting its own output.
If you rerun "make check" in a tree where some tests have already been
run, it will rerun io/ftwtest-sh because that test uses ftwtest.out,
the same name to which output is redirected, as its internal temporary
file, and then removes it on exit.

Clearly tests should not be removing the files to which their output
is redirected like that.  This patch changes the script to use a
different file as its internal temporary file, so the actual output
referenced in the makefile isn't removed.

Tested x86_64.

	* io/ftwtest-sh (testout): Change to $tmp/ftwtest-tmp.out.
2014-02-12 20:52:19 +00:00
Joseph Myers 1b6dd3f129 Make ABI tests generate .out files.
If you rerun "make check" in a tree where some tests have already been
run, it will rerun ABI tests because those do not create an output
file.

This patch changes those tests to create .out files so they only get
rerun if the dependencies (on the ABI baselines and the generated
.symlist files) indicate they should be rerun.

Tested x86_64.

	* Makerules (check-abi-%): Change target to
	$(objpfx)check-abi-%.out.
	(check-abi target): Update dependencies.
	(check-abi-pattern variable): Redirect output of diff to $@.
	(check-abi variable): Likewise.
	* elf/Makefile (check-abi): Update dependencies.
2014-02-12 20:51:13 +00:00
Joseph Myers ace614b8a5 soft-fp: support after-rounding tininess detection.
IEEE 754-2008 defines two ways in which tiny results can be detected,
"before rounding" (based on the infinite-precision result) and "after
rounding" (based on the result when rounded to normal precision as if
the exponent range were unbounded).  All binary operations on an
architecture must use the same choice of how tininess is detected.

soft-fp has so far implemented only before-rounding tininess
detection.  This patch adds support for after-rounding tininess
detection.  A new macro _FP_TININESS_AFTER_ROUNDING is added that
sfp-machine.h must define (soft-fp is meant to be self-contained so
the existing tininess.h files aren't used here, though the information
going in sfp-machine.h has been taken from them).  The soft-fp macros
dealing with raising underflow exceptions then handle the cases where
the choice matters specially, rounding a copy of the input to the
appropriate precision to see if a value that's tiny before rounding
isn't tiny after rounding.

Tested for mips64 using GCC trunk (which now uses soft-fp on MIPS, so
supporting exceptions and rounding modes for long double where not
previously supported - this is the immediate motivation for doing this
patch now) together with (a) a patch to sysdeps/mips/math-tests.h to
enable exceptions / rounding modes tests for long double for GCC 4.9
and later, and (b) corresponding changes applied to libgcc's soft-fp
and sfp-machine.h files.  In the libgcc context this is also tested on
x86_64 (also an after-rounding architecture) with testcases for
__float128 that I intend to add to the GCC testsuite when updating
soft-fp there.

(To be clear: this patch does not fix any glibc bugs that were
user-visible in past releases, since after-rounding architectures
didn't use soft-fp in any affected case with support for
floating-point exceptions - so there is no corresponding Bugzilla bug.
Rather, it works together with the GCC changes to use soft-fp on MIPS
to allow previously absent long double functionality to work properly,
and allows soft-fp to be used in glibc on after-rounding architectures
in cases where it couldn't previously be used.)

	* soft-fp/op-common.h (_FP_DECL): Mark exponent as possibly
	unused.
	(_FP_PACK_SEMIRAW): Determine tininess based on rounding shifted
	value if _FP_TININESS_AFTER_ROUNDING and unrounded value is in
	subnormal range.
	(_FP_PACK_CANONICAL): Determine tininess based on rounding to
	normal precision if _FP_TININESS_AFTER_ROUNDING and unrounded
	value has largest subnormal exponent.
	* soft-fp/soft-fp.h [FP_NO_EXCEPTIONS]
	(_FP_TININESS_AFTER_ROUNDING): Undefine and redefine to 0.
	* sysdeps/aarch64/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): New macro.
	* sysdeps/alpha/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/arm/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* sysdeps/mips/mips64/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/mips/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/powerpc/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/sh/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
	* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h
	(_FP_TININESS_AFTER_ROUNDING): Likewise.
	* sysdeps/tile/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING):
	Likewise.
2014-02-12 18:27:12 +00:00
Dylan Alex Simon fbfdf9cb03 Update x86_64 libm-test-ulps on AMD family 21h model 1 (bug 16545). 2014-02-12 15:55:10 +00:00
Richard Henderson 68b7efaadb Relocate alpha from ports to libc
Also fixed the following whitespace nits to satisfy the push:

sysdeps/alpha/alphaev6/memset.S:142: space before tab in indent.
sysdeps/alpha/configure:1: new blank line at EOF.
sysdeps/alpha/fpu/e_sqrt.c:126: space before tab in indent.
sysdeps/alpha/preconfigure:1: new blank line at EOF.
sysdeps/unix/sysv/linux/alpha/syscalls.list:1: new blank line at EOF.
2014-02-12 07:00:06 -08:00
Joseph Myers c941736c92 Remove _BSD_SOURCE and _SVID_SOURCE.
This is a minimal patch to remove _BSD_SOURCE and _SVID_SOURCE from
the documented user API, making them into aliases for _DEFAULT_SOURCE
with a #warning given, but keeping most of the features.h logic using
those macros and all the exising __USE_* conditionals, on the basis
that all the consequent cleanups will go in followup patches.

Tested x86_64.

	* include/features.h: Update comment documenting feature test
	macros.
	[_BSD_SOURCE || _SVID_SOURCE]: Give #warning.  Define
	_DEFAULT_SOURCE.
	* manual/creature.texi (_BSD_SOURCE): Remove documentation.
	(_SVID_SOURCE): Likewise.
	(_DEFAULT_SOURCE): Update description of default features.
	(Feature Test Macros): Don't mention _SVID_SOURCE in conjunction
	with _GNU_SOURCE.
	* manual/filesys.texi (__ftw_func_t): Do not refer to _BSD_SOURCE.
	(S_ISVTX): Likewise.
	* manual/math.texi (Mathematical Constants): Likewise.
	* manual/signal.texi (Interrupted Primitives): Likewise.
	* manual/startup.texi (putenv): Do not refer to _SVID_SOURCE.
	* math/test-matherr.c (_SVID_SOURCE): Do not define.
	* sysvipc/sys/ipc.h [__USE_SVID && !__USE_XOPEN && __GNUC__ >= 2]:
	Don't refer to _SVID_SOURCE in warning text.
2014-02-11 23:40:07 +00:00
Joseph Myers e8d8d7ec98 Regenerate x86_64 ulps. 2014-02-11 23:15:36 +00:00
Joseph Myers cb4a292812 Merge MIPS dl-lookup.c into generic file.
MIPS has its own version of dl-lookup.c to deal with differences
between undefined symbol semantics in the PIC and non-PIC ABIs.  This
is often liable to get out of date with respect to the generic file
(for example, the recent __builtin_expect changes didn't cover ports,
and it's not obvious to anyone changing dl-lookup.c that there would
be architecture-specific versions).

This patch adds a macro that dl-machine.h can define that is used in
the appropriate place in dl-lookup.c, so that MIPS no longer needs its
own version of that file.

Tested for mips64 that the only changes to disassembly of installed
shared libraries appear to be ld.so changes attributable to different
line numbers and paths in assertions.

	* elf/dl-lookup.c (ELF_MACHINE_SYM_NO_MATCH): Define if not
	already defined.
	(do_lookup_x): Use ELF_MACHINE_SYM_NO_MATCH.
	* sysdeps/mips/dl-lookup.c: Remove.
	* sysdeps/mips/dl-machine.h (ELF_MACHINE_SYM_NO_MATCH): New macro.
2014-02-11 22:33:07 +00:00
Andreas Krebbel 7e6424e343 BZ #16447: Fix ldbl-128 expl implementation.
Extend the range of numbers handled via unsafe mode.
Add expl testcase and regenerate ULPs for s390.
2014-02-11 13:47:47 +01:00
Marcus Shawcroft 75eff3fe90 Relocate AArch64 from ports to libc.
This patch moves the AArch64 port to the main sysdeps hierarchy.  The
move is essentially:

  git mv ports/sysdeps/aarch64 sysdeps/aarch64
  git mv ports/sysdeps/unix/sysv/linux/aarch64 sysdeps/unix/sysv/linux/aarch64

The README is updated and I've updated ChangeLog.aarch64 along the
lines of the ARM move.  The AArch64 build has been tested to confirm
that there were no changes in objdump -dr output or the shared
objects.
2014-02-11 11:36:00 +00:00
Will Newton d35f1e8073 manual/probes.texi: Use "triggered" instead of "hit"
Use the term "triggered" instead of "hit" when talking about probe
points.

ChangeLog:

2014-02-11  Will Newton  <will.newton@linaro.org>

	* manual/probes.texi (Mathematical Function Probes): Use
	"triggered" instead of "hit".
2014-02-11 10:21:00 +00:00
Will Newton 7b3436d468 manual/probes.texi: Add documentation of setjmp/longjmp probes
Add some documentation of the setjmp, longjmp and longjmp_target
Systemtap probe points.

ChangeLog:

2014-02-11  Will Newton  <will.newton@linaro.org>

	* manual/probes.texi (Internal Probes): Add documentation
	of setjmp, longjmp and longjmp_target probes.
2014-02-11 10:19:24 +00:00
Will Newton b4f12ca391 include/stap-probe.h: Add comment about SystemTap argument format
Add a comment pointing to the SystemTap wiki page that documents the
format of the arguments. Also add a pointer to the SystemTap and
gdb sources which seem to be the best place to get the architecture
specific details.

ChangeLog:

2014-02-11  Will Newton  <will.newton@linaro.org>

	* include/stap-probe.h: Add comment about probe argument
	format.
2014-02-11 10:17:11 +00:00
Will Newton c13a72b7c4 malloc/mtrace.c: Cosmetic cleanup.
Remove an unused #define and use ANSI prototypes.

Generated code identical on x86_64-unknown-linux-gnu.

ChangeLog:

2014-02-11  Will Newton  <will.newton@linaro.org>

	* malloc/mtrace.c (attribute_hidden): Remove unused macro
	definition.  (tr_where, tr_freehook, tr_mallochook,
	tr_reallochook, tr_memalignhook): Use ANSI protoype.
2014-02-11 10:02:57 +00:00
David S. Miller 195b8165ac Fix tst-sscanf and tst-swscanf on 64-bit.
* stdio-common/tst-sscanf.c (main): Use 'long' for 'dummy' when
	processing int_tests.
2014-02-11 00:37:53 -08:00
Joseph Myers 2ad7600be7 Move mips from ports to libc.
I've moved the MIPS port from ports to the main sysdeps hierarchy.
Beyond the README update, the move of the files was simply

git mv ports/sysdeps/mips sysdeps/mips
git mv ports/sysdeps/unix/mips sysdeps/unix/mips
git mv ports/sysdeps/unix/sysv/linux/mips sysdeps/unix/sysv/linux/mips

and in addition to the ChangeLog entries here, I put a note at the top
of ports/ChangeLog.mips similar to those in other files.

Tested that disassembly of installed shared libraries for mips is the
same before and after this patch (except for ld.so where paths in
assertions are involved, as for arm).

	* sysdeps/mips: Move directory from ports/sysdeps/mips.
	* sysdeps/unix/mips: Move directory from ports/sysdeps/unix/mips.
	* sysdeps/unix/sysv/linux/mips: Move directory from
	ports/sysdeps/unix/sysv/linux/mips.
	* README: Update listing for mips-*-linux-gnu and
	mips64-*-linux-gnu.

	* sysdeps/mips: Move directory to ../sysdeps/mips.
	* sysdeps/unix/mips: Move directory to ../sysdeps/unix/mips.
	* sysdeps/unix/sysv/linux/mips: Move directory to
	../sysdeps/unix/sysv/linux/mips.
2014-02-10 23:30:21 +00:00
Andreas Schwab 73588a7223 Move m68k from ports to libc 2014-02-10 20:22:40 +01:00
Chris Metcalf 4372980f58 Move tilegx, tilepro, and linux-generic from ports to libc.
I've moved the TILE-Gx and TILEPro ports to the main sysdeps hierarchy,
along with the linux-generic ports infrastructure.  Beyond the README
update, the move was just

    git mv ports/sysdeps/tile sysdeps/tile
    git mv ports/sysdeps/unix/sysv/linux/tile \
      sysdeps/unix/sysv/linux/tile
    git mv ports/sysdeps/unix/sysv/linux/generic \
      sysdeps/unix/sysv/linux/generic

I updated the relevant ChangeLogs along the lines of the ARM move
in commit c6bfe5c4d7 and tested the 64-bit tilegx build to confirm that
there were no changes in "objdump -dr" output in the shared objects.
2014-02-10 11:04:39 -05:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Ondřej Bílka f3d338c9f3 Deduplicate setenv.
Setenv contained a code path that was redundant as it could be handled
in general case.
2014-02-10 12:54:10 +01:00
Ondřej Bílka bdfe308a16 Remove THREAD_STATS.
A THREAD_STATS macro duplicates gathering information that could be
obtained by systemtap probes instead.
2014-02-10 12:25:04 +01:00
Mike Frysinger d674667cba shm_open: sync with logic in sem_open
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 08:17:16 -05:00
Mike Frysinger 6349768c8b manual: setjmp: fix typos/grammar
Should hopefully be all obvious stuff.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 07:59:36 -05:00
Mike Frysinger 0b7c7473b9 tst-backtrace4: expand output even on failures
When debugging failures in this test, it's helpful to see as much output
as possible.  So rather than returning immediately, let the code run as
far as it can.  We still mark failures as soon as they happen.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 07:01:38 -05:00
Mike Frysinger ac8cc9e300 tst-longjmp_chk3: new test for checking sigaltstack edge cases
Make sure the longjmp checking logic catches stacks that are slightly
outside of a valid alternative signal stack.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:59:13 -05:00
Mike Frysinger c5bb8e2399 tests: unify fortification handler logic
We have multiple tests that copy & paste the same logic for disabling the
fortification output.  Let's unify this in the test-skeleton instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:58:43 -05:00
Mike Frysinger 10444e425e tst-longjmp_chk: add comments and convert to test-skeleton
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:58:23 -05:00
Mike Frysinger 1e805e8db5 linux: bits/in.h: sync with latest kernel headers
Forgot to include ChangeLog update.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:58:04 -05:00
Mike Frysinger 73f79bb7e7 tzselect: stop requiring ksh
This script works fine under bash (which we already require), so drop
the legacy ksh munging.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:47:58 -05:00
Mike Frysinger 8da79b60ae linux_fsinfo.h: sync with current linux/magic.h
Import the current list of defines available in the kernel headers.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-02-08 06:39:10 -05:00
Joseph Myers c6bfe5c4d7 Move arm from ports to libc.
I've moved the ARM port from ports to the main sysdeps hierarchy.
Beyond the README update, the move of the files was simply

git mv ports/sysdeps/arm sysdeps/arm
git mv ports/sysdeps/unix/arm sysdeps/unix/arm
git mv ports/sysdeps/unix/sysv/linux/arm sysdeps/unix/sysv/linux/arm

and in addition to the ChangeLog entries here, I put a note at the top
of ports/ChangeLog.arm similar to that at the top of
ChangeLog.powerpc.  There is deliberately no NEWS change, as I think
it makes the most sense to put in a general note above all ports
having moved if we can achieve that for 2.20.

Tested that disassembly of installed shared libraries for arm is the
same before and after this patch, except for data (not instructions)
in ld.so (there are assertions in sysdeps/arm/dl-machine.h, and the
path by which that file is found, and so by which it appears in the
assertion message, changes as a result of the move).

	* sysdeps/arm: Move directory from ports/sysdeps/arm.
	* sysdeps/unix/arm: Move directory from ports/sysdeps/unix/arm.
	* sysdeps/unix/sysv/linux/arm: Move directory from
	ports/sysdeps/unix/sysv/linux/arm.
	* README: Update listing for arm-*-linux-gnueabi.

ports/ChangeLog.arm:
	* sysdeps/arm: Move directory to ../sysdeps/arm.
	* sysdeps/unix/arm: Move directory to ../sysdeps.arm.
	* sysdeps/unix/sysv/linux/arm: Move directory to
	../sysdeps/unix/sysv/linux/arm.
2014-02-08 01:49:39 +00:00
Joseph Myers 464263cc00 Remove am33 port.
This patch removes the am33 port (no other port #includes any files
from it), as previously discussed (see
<https://sourceware.org/ml/libc-ports/2014-01/msg00046.html>).
2014-02-08 00:16:57 +00:00
Roland McGrath 32749f6cd2 Avoid comma operator warnings. 2014-02-07 15:26:28 -08:00
Allan McRae d5b396c1c8 Open development for 2.20 2014-02-08 08:10:29 +10:00
Joseph Myers ed27ed836d Bug 15968 was fixed by commit 0748546f66. 2014-02-07 02:47:37 +00:00
Joseph Myers fd2f9486a1 Bug 6981 was fixed by commit 1484e65736. 2014-02-07 02:36:28 +00:00
Carlos O'Donell 3bfff2edbe BZ #16529: Fix pedantic warning with netinet/in.h.
When compiling with pedantic the following warning is seen:

gcc -Wall -pedantic -O0 -o test test.c
In file included from test.c:3:0:
/path/inet/netinet/in.h:111:21: warning: comma at end of \
enumerator list [-Wpedantic]
     IPPROTO_MH = 135,      /* IPv6 mobility header.  */
                     ^

It is valid C99 to have a trailing comma after the last item in
an enumeration. However it is not valid C90. If possible glibc
attempts to keep all headers C90 + long long without requiring
C99 features. In this case it's easy to fix the headers and it
removes the warning seem with -pedantic.
2014-02-06 11:18:51 -05:00
Siddhesh Poyarekar ee7cc38537 Update contrib.texi
Update blurb for Roland, Alex, Ryan, Joseph and Carlos.
2014-02-06 11:01:35 +05:30
David S. Miller 2b5287329a Add missing ChangeLog from yesterday's sparc ULPs update. 2014-02-05 19:41:27 -08:00
Allan McRae bf06bcee84 Revert "Patch [1/4] async-signal safe TLS."
This reverts commit 69a17d9d24.
2014-02-06 08:46:20 +10:00
Allan McRae 8b6785f083 Revert "Patch 3/4 of the effort to make TLS access async-signal-safe."
This reverts commit 35e8f7ab94.
2014-02-06 08:46:20 +10:00
Allan McRae dd654bf9ba Revert "Patch 2/4 of the effort to make TLS access async-signal-safe."
This reverts commit 1f33d36a8a.

Conflicts:
	elf/dl-misc.c

Also reverts the follow commits that were bug fixes to new code introduced
in the above commit:
063b2acbce
b627fdd585
e81c64bba1
2014-02-06 08:46:20 +10:00