Go to file
Joseph Myers 477a02f637 Make gen-as-const.py handle '--' consistently with awk script.
It was reported in
<https://sourceware.org/ml/libc-alpha/2018-12/msg00045.html> that
gen-as-const.py fails to generate test code in the case where a .sym
file has no symbols in it, so resulting in a test failing to link for
Hurd.

The relevant difference from the old awk script is that the old script
treated '--' lines as indicating that the text to do at the start of
the test (or file used to compute constants) should be output at that
point if not already output, as well as treating lines with actual
entries for constants like that.  This patch changes gen-as-const.py
accordingly, making it the sole responsibility of the code parsing
.sym files to determine when such text should be output and ensuring
it's always output at some point even if there are no symbols and no
'--' lines, since not outputting it means the test fails to link.
Handling '--' like that also avoids any problems that would arise if
the first entry for a symbol were inside #ifdef (since the text in
question must not be output inside #ifdef).

Tested for x86_64, and with build-many-glibcs.py for i686-gnu.  Note
that there are still compilation test failures for i686-gnu
(linknamespace tests, possibly arising from recent posix_spawn-related
changes).

	* scripts/gen-as-const.py (compute_c_consts): Take an argument
	'START' to indicate that start text should be output.
	(gen_test): Likewise.
	(main): Generate 'START' for first symbol or '--' line, or at end
	of input if not previously generated.
2018-12-03 22:08:50 +00:00
argp argp: do not call _IO_fwide() if _LIBC is not defined 2018-11-29 17:56:55 +00:00
assert
benchtests
bits
catgets
ChangeLog.old
conform Combine more conformtest tests into single execution of the compiler. 2018-11-22 21:21:36 +00:00
crypt
csu
ctype
debug
dirent
dlfcn malloc: tcache double free check 2018-11-20 13:24:09 -05:00
elf Fix _dl_profile_fixup data-dependency issue (Bug 23690) 2018-11-30 18:05:32 -02:00
gmon
gnulib
grp
gshadow
hesiod
htl
hurd hurd: Fix spawni's user_link reallocation 2018-11-11 20:09:17 +01:00
iconv Unconditionally call __gconv_get_path when reading iconv configuration 2018-11-05 15:45:07 +01:00
iconvdata
include Fix _dl_profile_fixup data-dependency issue (Bug 23690) 2018-11-30 18:05:32 -02:00
inet
intl
io
libio posix: Use posix_spawn on popen 2018-11-30 18:42:05 -02:00
locale Add --no-hard-links option to localedef (bug 23923) 2018-12-03 10:15:39 -05:00
localedata Add --no-hard-links option to localedef (bug 23923) 2018-12-03 10:15:39 -05:00
login
mach
malloc malloc: tcache: Validate tc_idx before checking for double-frees [BZ #23907] 2018-11-26 20:06:37 +01:00
manual Mutex: Add pthread mutex tunables 2018-12-01 08:19:20 -08:00
math Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
mathvec
misc Add support for GCC 9 attribute copy. 2018-11-09 17:24:12 -07:00
nis
nptl Mutex: Add pthread mutex tunables 2018-12-01 08:19:20 -08:00
nptl_db
nscd
nss
po
posix posix: Do not include testcases.h, ptestcases.h in source tree 2018-11-29 13:51:25 +01:00
pwd
resolv Add an additional test to resolv/tst-resolv-network.c 2018-11-08 13:47:34 +01:00
resource
rt
scripts Make gen-as-const.py handle '--' consistently with awk script. 2018-12-03 22:08:50 +00:00
setjmp
shadow
signal
socket
soft-fp soft-fp: Add implementation for 128 bit self-contained 2018-11-01 18:22:00 +00:00
stdio-common Disable -Wformat-overflow= warnings for some printf tests. 2018-11-01 17:13:55 +00:00
stdlib stdlib: assert on NULL function pointer in atexit etc. [BZ #20544] 2018-11-30 16:18:34 -08:00
streams
string
sunrpc
support support: Close original descriptors in support_capture_subprocess 2018-12-01 22:41:46 +01:00
sysdeps Enable VDSO for static linking on arm 2018-12-03 20:59:22 +00:00
sysvipc
termios
time mktime: DEBUG_MKTIME cleanup 2018-11-15 22:59:33 +01:00
timezone
wcsmbs
wctype
.gitattributes
.gitignore
abi-tags
aclocal.m4
ChangeLog Make gen-as-const.py handle '--' consistently with awk script. 2018-12-03 22:08:50 +00:00
config.h.in
config.make.in
configure
configure.ac
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL
libc-abis
libof-iterator.mk
LICENSES
MAINTAINERS
Makeconfig
Makefile
Makefile.in
Makerules Replace gen-as-const.awk by gen-as-const.py. 2018-11-30 15:20:41 +00:00
NEWS posix: Use posix_spawn on popen 2018-11-30 18:42:05 -02:00
o-iterator.mk
README
Rules
shlib-versions
test-skeleton.c
version.h

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arm-*-linux-gnueabi
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see http://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at http://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.