glibc/Makerules

1502 lines
52 KiB
Plaintext
Raw Normal View History

# Copyright (C) 1991-2022 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
Prefer https to http for gnu.org and fsf.org URLs Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
# <https://www.gnu.org/licenses/>.
#
# Common rules for making the GNU C library. This file is included
# by the top-level Makefile and by all subdirectory makefiles
# (through Rules).
#
ifneq (,)
This makefile requires GNU Make.
endif
REQUIRED_MAKE_VERSION = 3.74
REAL_MAKE_VERSION = $(firstword $(MAKE_VERSION))
ifneq ($(REQUIRED_MAKE_VERSION), \
$(firstword $(sort $(REAL_MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
Wrong GNU Make version. See above for the version needed.
endif
ifdef subdir
.. := ../
endif # subdir
# If `sources' was defined by the parent makefile, undefine it so
# we will later get it from wildcard search in this directory.
ifneq "$(findstring env,$(origin sources))" ""
sources :=
endif
oPATH := $(PATH)
PATH := this definition should take precedence over $(oPATH)
ifeq ($(PATH),$(oPATH))
You must not use the -e flag when building the GNU C library.
else
PATH := $(oPATH)
endif
ifndef +included-Makeconfig
include $(..)Makeconfig
endif
# This variable is used in ``include $(o-iterator)'' after defining
# $(o-iterator-doit) to produce some desired rule using $o for the object
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
# is produced for each object suffix in use.
o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
# Include any system-specific makefiles.
# This is here so things in sysdep Makefiles can easily depend on foo.h as
# appropriate and not worry about where foo.h comes from, which may be
# system dependent and not known by that Makefile.
vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
$(+sysdep_dirs) $(..)))
# The same is true for RPC source files.
vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
$(+sysdep_dirs) $(..)))
# Some sysdep makefiles use this to distinguish being included here from
# being included individually by a subdir makefile (hurd/Makefile needs this).
in-Makerules := yes
* Makefile (subdir-target-args): New variable. ($(all-subdirs-targets)): Use it in place of -C option. * Rules: Use $(..) instead of ../ if it's already defined. * Makeconfig (subdir-srcdirs): New variable. * csu/Makefile (all-Banner-files): Use it. * configure.in (--enable-add-ons): Set to "yes" by default. Handle absolute add-on directory names when looking for configure fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. Require add-on configure to set $libc_add_on_canonical, use that in $add_ons_sfx. Substitute add_on_subdirs with computed list of subdir names each add-on configure set in libc_add_on_subdirs. * configure: Regenerated. * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. * config.make.in (add-on-subdirs): New substituted variable. * Makeconfig (all-subdirs): Include $(add-on-subdirs). Remove $(add-ons), $(sysdep-subdirs). Don't filter out $(sysdep-inhibit-subdirs). ($(common-objpfx)sysd-dirs): Target removed. Don't include it. ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs files together to gen-sorted.awk, and $(subdirs) via -v. (subdirs): Remove magic reordering for mach and hurd. * scripts/gen-sorted.awk: Use subdirs from command line. Process Subdirs and Depend files directly. Let Subdirs files use "first dir" and "inhibit dir". Always move elf to the end of the list. * hurd/Depend: New file. * sysdeps/mach/Subdirs: Use "first mach". * Makefile (dist-separate): Remove linuxthreads. (dist-separate-linuxthreads): Variable removed. (glibc-%.tar rule): Use $(sysdeps-add-ons). * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), not $(all-subdirs). (sysdep-makefiles): Use $(sysdirs). (sysdirs): Remove export. ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in $(config-sysdirs). (+sysdir_pfx): Variable removed. (sysd-rules): Use $(common-objpfx) in place of it. (sysdirs): Variable moved to ... * Makeconfig (sysdirs): ... here. Handle absolute directory names in $(config-sysdirs). (full_config_sysdirs): Variable removed. * csu/Makefile: Use $(sysdirs) in vpath directive. * math/Makefile (ulps-file): Use $(sysdirs). * sysdeps/gnu/Makefile (errlist-c): Likewise. ($(objpfx)errlist-compat.c): Likewise. * Makeconfig (all-Subdirs-files): Likewise. ($(common-objpfx)config.status): Likewise. * configure.in (sysnames): Handle absolute add-on directory names. (sysdeps_add_ons): New variable, AC_SUBST it. Compute which add-ons contributed sysdeps directories. * configure: Regenerated. * config.make.in (sysdeps-add-ons): New substituted variable. * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... * Makeconfig: ... to here. (+sysdep_dirs): Append $(sysdeps-add-ons) here. (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). Remove $(includes). (sysdep-makeconfigs): Use $(+sysdep_dirs). ($(common-objpfx)shlib-versions.v.i): Likewise. * Makeconfig: Remove hair to set Makeconfig-add-on. * sysdeps/unix/Makefile (sysdirs): Remove export. (asm_CPP): Variable removed. ($(common-objpfx)sysd-syscalls): Pass them directly for the script. * sysdeps/posix/Makefile: New file. * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix values here with ?=. * stdlib/gen-mpn-copy: File removed. * stdlib/Makefile (distribute): Remove it. * configure.in: Don't grok --with-gmp. * configure: Regenerated. * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. * configure: Regenerated. * bare: Directory removed, saved in ports repository.
2006-02-28 07:11:04 +00:00
sysdep-makefiles := $(wildcard $(sysdirs:=/Makefile))
ifneq (,$(sysdep-makefiles))
include $(sysdep-makefiles)
endif
# Reorder before-compile so that mach things come first, and hurd things
# second, before all else. The mach and hurd subdirectories have many
# generated header files which the much of rest of the library depends on,
# so it is best to build them first (and mach before hurd, at that).
before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\
$(before-compile)) \
$(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\
$(before-compile))
# Even before that, we need abi-versions.h which is generated right here.
2013-09-04 15:25:42 +00:00
ifeq ($(build-shared),yes)
ifndef avoid-generated
before-compile := $(common-objpfx)abi-versions.h $(before-compile)
$(common-objpfx)abi-versions.h: $(..)scripts/abi-versions.awk \
$(common-objpfx)Versions.all
LC_ALL=C $(AWK) -f $^ > $@T
mv -f $@T $@
$(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
sed -n '/ VERSION_$*_/{s/^.*_\([A-Z0-9_]*\).*$$/\1/;h;};$${g;p;}' \
$(common-objpfx)abi-versions.h > $@T
mv -f $@T $@
Create and use first-versions.h with macros for function symbol versions. This patch arranges for the glibc build to generate a header first-versions.h that defines macros for the earliest symbol version in which each public symbol (GLIBC_[0-9]* symbol version, name only uses C identifier characters) is available. This is used in sysdeps/ieee754/ldbl-opt/math-type-macros-double.h to replace the manually defined LDOUBLE_*_libm_version macros for various functions defined using type-generic templates, the purpose of which is to use in LONG_DOUBLE_COMPAT tests "was this function originally added before glibc supported long double != double on this platform?". As discussed in <https://sourceware.org/ml/libc-alpha/2016-12/msg00246.html>, I expect this to be useful more generally in reducing the amount of special-case code needed in ldbl-opt and ldbl-64-128. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * scripts/versions.awk: Generate first-versions.h. * sysdeps/ieee754/ldbl-opt/math-type-macros-double.h: Include <first-versions.h>. (LDOUBLE_cabsl_libm_version): Remove macro. (LDOUBLE_cargl_libm_version): Likewise. (LDOUBLE_cimagl_libm_version): Likewise. (LDOUBLE_conjl_libm_version): Likewise. (LDOUBLE_creall_libm_version): Likewise. (LDOUBLE_cacosl_libm_version): Likewise. (LDOUBLE_cacoshl_libm_version): Likewise. (LDOUBLE_ccosl_libm_version): Likewise. (LDOUBLE_ccoshl_libm_version): Likewise. (LDOUBLE_casinl_libm_version): Likewise. (LDOUBLE_csinl_libm_version): Likewise. (LDOUBLE_casinhl_libm_version): Likewise. (LDOUBLE_csinhl_libm_version): Likewise. (LDOUBLE_catanl_libm_version): Likewise. (LDOUBLE_catanhl_libm_version): Likewise. (LDOUBLE_ctanl_libm_version): Likewise. (LDOUBLE_ctanhl_libm_version): Likewise. (LDOUBLE_cexpl_libm_version): Likewise. (LDOUBLE_clogl_libm_version): Likewise. (LDOUBLE_cprojl_libm_version): Likewise. (LDOUBLE_csqrtl_libm_version): Likewise. (LDOUBLE_cpowl_libm_version): Likewise. (LDOUBLE_clog10l_libm_version): Likewise. (LDOUBLE___clog10l_libm_version): Likewise. (LDOUBLE_fdiml_libm_version): Likewise. (LDOUBLE_fmaxl_libm_version): Likewise. (LDOUBLE_fminl_libm_version): Likewise. (LDOUBLE_ilogbl_libm_version): Likewise. (LDOUBLE_nanl_libm_version): Likewise. [!M_LIBM_NEED_COMPAT] (M_LIBM_NEED_COMPAT): Use FIRST_VERSION_libm_* macros. [!declare_mgen_libm_compat] (declare_mgen_libm_compat): Likewise. * Makerules [$(build-shared) = yes && !avoid-generated] (before-compile): Add $(common-objpfx)first-versions.h. [$(build-shared) = yes && !avoid-generated] ($(common-objpfx)first-versions.h): New target. ($(common-objpfx)sysd-versions): Depend on and change to rule for building $(common-objpfx)versions.stmp.
2017-05-19 11:26:00 +00:00
Also create and use ldbl-compat-choose.h. This patch makes the glibc build generate an additional header ldbl-compat-choose.h that defines LONG_DOUBLE_COMPAT_CHOOSE_* macros for each libc and libm symbol, which select one or the other of their arguments based on whether the symbol was added before a change to long double != double. The effect of this is that it is then possible to define a macro maybe_long_double_symbol that automatically acts as either long_double_symbol or weak_alias depending on when the symbol being defined was added. This can be used when building long double functions from type-generic templates. Thus, with this patch ldbl-opt no longer needs special long double implementations of each new libm function added using such a template, and the existing such implementations are removed. This is a step towards being able more generally to use common macros to create all the aliases needed for a libm function, so reducing the amount of special-case code needed in ldbl-opt and ldbl-64-128, and facilitating subsequently adding *f32 / *f64 / *f128 / *f32x / *f64x aliases to existing functions (where the set of aliases that a function should have may depend on the architecture in various ways). Tested with build-many-glibcs.py. Except for on powerpc64le-linux-gnu, installed stripped shared libraries are unchanged by the patch. powerpc64le-linux-gnu is the unique configuration which used ldbl-opt from the start rather than adding a new long double choice after originally only having had long double = double. The effect of the patch there is that various cases that previously used long_double_symbol unconditionally now use weak_alias instead, so .os files contain e.g. a symbol cabsl instead of cabsl@@GLIBC_2.17. The final dynamic symbols and versions in the resulting shared libraries are unchanged (ABI tests pass), as is the disassembly of the shared libraries, but the differences in the .os files still result in different .gnu_hash contents in libm.so; the differences are of no significance and logically using weak_alias is what's most appropriate in those cases. * scripts/versions.awk: Generate ldbl-compat-choose.h. * sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h: Include <ldbl-compat-choose.h>. (maybe_long_double_symbol): New macro. [!declare_mgen_alias] (declare_mgen_alias): Use maybe_long_double_symbol. * sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Remove. * sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_fminmagl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_nextdownl.c: Likewise. * sysdeps/ieee754/ldbl-opt/w_llogbl.c: Likewise. * Makerules [$(build-shared) = yes && !avoid-generated] (before-compile): Add $(common-objpfx)ldbl-compat-choose.h. [$(build-shared) = yes && !avoid-generated] ($(common-objpfx)ldbl-compat-choose.h): New target.
2017-05-19 11:30:26 +00:00
# first-versions.h and ldbl-compat-choose.h provide macros used in
# various symbol versioning macro calls.
before-compile := $(common-objpfx)first-versions.h \
$(common-objpfx)ldbl-compat-choose.h $(before-compile)
Create and use first-versions.h with macros for function symbol versions. This patch arranges for the glibc build to generate a header first-versions.h that defines macros for the earliest symbol version in which each public symbol (GLIBC_[0-9]* symbol version, name only uses C identifier characters) is available. This is used in sysdeps/ieee754/ldbl-opt/math-type-macros-double.h to replace the manually defined LDOUBLE_*_libm_version macros for various functions defined using type-generic templates, the purpose of which is to use in LONG_DOUBLE_COMPAT tests "was this function originally added before glibc supported long double != double on this platform?". As discussed in <https://sourceware.org/ml/libc-alpha/2016-12/msg00246.html>, I expect this to be useful more generally in reducing the amount of special-case code needed in ldbl-opt and ldbl-64-128. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * scripts/versions.awk: Generate first-versions.h. * sysdeps/ieee754/ldbl-opt/math-type-macros-double.h: Include <first-versions.h>. (LDOUBLE_cabsl_libm_version): Remove macro. (LDOUBLE_cargl_libm_version): Likewise. (LDOUBLE_cimagl_libm_version): Likewise. (LDOUBLE_conjl_libm_version): Likewise. (LDOUBLE_creall_libm_version): Likewise. (LDOUBLE_cacosl_libm_version): Likewise. (LDOUBLE_cacoshl_libm_version): Likewise. (LDOUBLE_ccosl_libm_version): Likewise. (LDOUBLE_ccoshl_libm_version): Likewise. (LDOUBLE_casinl_libm_version): Likewise. (LDOUBLE_csinl_libm_version): Likewise. (LDOUBLE_casinhl_libm_version): Likewise. (LDOUBLE_csinhl_libm_version): Likewise. (LDOUBLE_catanl_libm_version): Likewise. (LDOUBLE_catanhl_libm_version): Likewise. (LDOUBLE_ctanl_libm_version): Likewise. (LDOUBLE_ctanhl_libm_version): Likewise. (LDOUBLE_cexpl_libm_version): Likewise. (LDOUBLE_clogl_libm_version): Likewise. (LDOUBLE_cprojl_libm_version): Likewise. (LDOUBLE_csqrtl_libm_version): Likewise. (LDOUBLE_cpowl_libm_version): Likewise. (LDOUBLE_clog10l_libm_version): Likewise. (LDOUBLE___clog10l_libm_version): Likewise. (LDOUBLE_fdiml_libm_version): Likewise. (LDOUBLE_fmaxl_libm_version): Likewise. (LDOUBLE_fminl_libm_version): Likewise. (LDOUBLE_ilogbl_libm_version): Likewise. (LDOUBLE_nanl_libm_version): Likewise. [!M_LIBM_NEED_COMPAT] (M_LIBM_NEED_COMPAT): Use FIRST_VERSION_libm_* macros. [!declare_mgen_libm_compat] (declare_mgen_libm_compat): Likewise. * Makerules [$(build-shared) = yes && !avoid-generated] (before-compile): Add $(common-objpfx)first-versions.h. [$(build-shared) = yes && !avoid-generated] ($(common-objpfx)first-versions.h): New target. ($(common-objpfx)sysd-versions): Depend on and change to rule for building $(common-objpfx)versions.stmp.
2017-05-19 11:26:00 +00:00
$(common-objpfx)first-versions.h: $(common-objpfx)versions.stmp
Also create and use ldbl-compat-choose.h. This patch makes the glibc build generate an additional header ldbl-compat-choose.h that defines LONG_DOUBLE_COMPAT_CHOOSE_* macros for each libc and libm symbol, which select one or the other of their arguments based on whether the symbol was added before a change to long double != double. The effect of this is that it is then possible to define a macro maybe_long_double_symbol that automatically acts as either long_double_symbol or weak_alias depending on when the symbol being defined was added. This can be used when building long double functions from type-generic templates. Thus, with this patch ldbl-opt no longer needs special long double implementations of each new libm function added using such a template, and the existing such implementations are removed. This is a step towards being able more generally to use common macros to create all the aliases needed for a libm function, so reducing the amount of special-case code needed in ldbl-opt and ldbl-64-128, and facilitating subsequently adding *f32 / *f64 / *f128 / *f32x / *f64x aliases to existing functions (where the set of aliases that a function should have may depend on the architecture in various ways). Tested with build-many-glibcs.py. Except for on powerpc64le-linux-gnu, installed stripped shared libraries are unchanged by the patch. powerpc64le-linux-gnu is the unique configuration which used ldbl-opt from the start rather than adding a new long double choice after originally only having had long double = double. The effect of the patch there is that various cases that previously used long_double_symbol unconditionally now use weak_alias instead, so .os files contain e.g. a symbol cabsl instead of cabsl@@GLIBC_2.17. The final dynamic symbols and versions in the resulting shared libraries are unchanged (ABI tests pass), as is the disassembly of the shared libraries, but the differences in the .os files still result in different .gnu_hash contents in libm.so; the differences are of no significance and logically using weak_alias is what's most appropriate in those cases. * scripts/versions.awk: Generate ldbl-compat-choose.h. * sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h: Include <ldbl-compat-choose.h>. (maybe_long_double_symbol): New macro. [!declare_mgen_alias] (declare_mgen_alias): Use maybe_long_double_symbol. * sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Remove. * sysdeps/ieee754/ldbl-opt/s_fmaxmagl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_fminmagl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_nextdownl.c: Likewise. * sysdeps/ieee754/ldbl-opt/w_llogbl.c: Likewise. * Makerules [$(build-shared) = yes && !avoid-generated] (before-compile): Add $(common-objpfx)ldbl-compat-choose.h. [$(build-shared) = yes && !avoid-generated] ($(common-objpfx)ldbl-compat-choose.h): New target.
2017-05-19 11:30:26 +00:00
$(common-objpfx)ldbl-compat-choose.h: $(common-objpfx)versions.stmp
endif # avoid-generated
2013-09-04 15:25:42 +00:00
endif # $(build-shared) = yes
ifndef avoid-generated
ifneq (,$(CXX))
# If C++ headers <cstdlib> or <cmath> are used, GCC 6 will include
# /usr/include/stdlib.h or /usr/include/math.h from "#include_next"
# (instead of stdlib/stdlib.h or math/math.h in the glibc source
# directory), and this turns up as a make dependency. An implicit
# rule will kick in and make will try to install stdlib/stdlib.h or
# math/math.h as /usr/include/stdlib.h or /usr/include/math.h because
# the target is out of date. We make a copy of <cstdlib> and <cmath>
# in the glibc build directory so that stdlib/stdlib.h and math/math.h
# will be used instead of /usr/include/stdlib.h and /usr/include/math.h.
before-compile := $(common-objpfx)cstdlib $(common-objpfx)cmath \
$(before-compile)
$(common-objpfx)cstdlib: $(c++-cstdlib-header)
$(INSTALL_DATA) $< $@T
$(move-if-change) $@T $@
$(common-objpfx)cmath: $(c++-cmath-header)
$(INSTALL_DATA) $< $@T
$(move-if-change) $@T $@
ifneq (,$(c++-bits-std_abs-h))
# Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
# including /usr/include/stdlib.h.
before-compile := $(common-objpfx)bits/std_abs.h $(before-compile)
$(common-objpfx)bits/std_abs.h: $(c++-bits-std_abs-h)
$(INSTALL_DATA) $< $@T
$(move-if-change) $@T $@
endif
endif
before-compile := $(common-objpfx)libc-abis.h $(before-compile)
2010-04-09 22:31:45 +00:00
$(common-objpfx)libc-abis.h: $(common-objpfx)libc-abis.stamp; @:
$(common-objpfx)libc-abis.stamp: $(..)scripts/gen-libc-abis \
$(firstword $(wildcard $(sysdirs:=/libc-abis)) \
$(..)libc-abis) \
$(..)Makerules
$(SHELL) $< \
$(base-machine)-$(config-vendor)-$(config-os) \
2010-04-09 22:31:45 +00:00
< $(word 2,$^) > $(@:.stamp=.h)T
$(move-if-change) $(@:.stamp=.h)T $(@:.stamp=.h)
touch $@
common-generated += $(common-objpfx)libc-abis.h
endif # avoid-generated
ifeq (yes,$(build-shared))
$(common-objpfx)runtime-linker.h: $(common-objpfx)runtime-linker.stamp; @:
$(common-objpfx)runtime-linker.stamp: $(common-objpfx)config.make
$(make-target-directory)
echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \
> ${@:stamp=T}
$(move-if-change) ${@:stamp=T} ${@:stamp=h}
touch $@
endif
# Make sure the subdirectory for object files gets created.
ifdef objpfx
ifeq (,$(wildcard $(objpfx).))
before-compile += $(objpfx).
$(objpfx).:
$(make-target-directory)
endif
endif
# Remove existing files from `before-compile'. Things are added there when
# they must exist for dependency generation to work right, but once they
# exist there is no further need for every single file to depend on them,
# and those gratuitous dependencies result in many gratuitous
# recompilations.
before-compile := $(filter-out $(wildcard $(before-compile)),$(before-compile))
# Don't let any before-compile file be an intermediate and get removed.
ifdef before-compile
$(before-compile):
endif
# We don't want $(common-objpfx) files to depend on miscellaneous stuff
# in subdirs.
ifdef subdir
common-before-compile := $(filter-out $(objpfx)%,$(before-compile))
else
common-before-compile = $(before-compile)
endif
ifndef subdir
# If a makefile needs to do something conditional on something that
# can only be figured out from headers, write a FOO.make.c input
# file that uses cpp contructs and contains @@@ LINE @@@ for each LINE
# to emit in the generated makefile, and use -include $(common-objpfx)FOO.make.
#
# We only generate these in the top-level makefile, to avoid any weirdness
# from subdir-specific makefile tweaks creeping in on an update.
$(common-objpfx)%.make: $(..)%.make.c $(..)Makerules $(common-before-compile)
rm -f $@T $@.dT
(echo '# Generated from $*.make.c by Makerules.'; \
$(CC) $(CFLAGS) $(CPPFLAGS) -E -DASSEMBLER $< \
-MD -MP -MT '$$(common-objpfx)$*.make' -MF $@.dT \
| sed -n '/@@@/{s/@@@[ ]*\(.*\)@@@/\1/;s/[ ]*$$//p;}'; \
echo 'common-generated += $(@F)'; \
sed $(sed-remove-objpfx) $(sed-remove-dotdot) $@.dT; \
rm -f $@.dT) > $@T
mv -f $@T $@
endif
ifdef subdir
sed-remove-dotdot := -e 's@ *\.\.\/\([^ \]*\)@ $$(..)\1@g' \
-e 's@^\.\.\/\([^ \]*\)@$$(..)\1@g'
else
sed-remove-dotdot := -e 's@ *\([^ \/$$][^ \]*\)@ $$(..)\1@g' \
-e 's@^\([^ \/$$][^ \]*\)@$$(..)\1@g'
endif
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
ifdef gen-py-const-headers
# We'll use a static pattern rule to match .pysym files with their
# corresponding generated .py files.
# The generated .py files go in the submodule's dir in the glibc build dir.
py-const-files := $(patsubst %.pysym,%.py,$(gen-py-const-headers))
py-const-dir := $(objpfx)
py-const := $(addprefix $(py-const-dir),$(py-const-files))
Use gen-as-const.py to process .pysym files. This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
2018-12-10 22:56:59 +00:00
py-const-script := $(..)scripts/gen-as-const.py
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
Use gen-as-const.py to process .pysym files. This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
2018-12-10 22:56:59 +00:00
# This is a hack we use to generate .py files with constants for
# Python code.
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
#
Use gen-as-const.py to process .pysym files. This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
2018-12-10 22:56:59 +00:00
# $@.tmp is a temporary file we use to store the partial contents of
# the target file. We do this instead of just writing on $@ because,
# if the build process terminates prematurely, re-running Make
# wouldn't run this rule since Make would see that the target file
# already exists (despite it being incomplete).
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
#
Use gen-as-const.py to process .pysym files. This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
2018-12-10 22:56:59 +00:00
# The output is redirected to a .py file; we'll import it in the main
# Python code to read the constants generated by gen-as-const.py.
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
$(py-const): $(py-const-dir)%.py: %.pysym $(py-const-script) \
$(common-before-compile)
$(make-target-directory)
Use gen-as-const.py to process .pysym files. This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
2018-12-10 22:56:59 +00:00
$(PYTHON) $(py-const-script) --python \
--cc="$(CC) $(CFLAGS) $(CPPFLAGS)" $< \
> $@.tmp
mv -f $@.tmp $@
Add pretty printers for the NPTL lock types This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were tested on an AMD64 running Ubuntu 14.04 and an x86 VM running Fedora 24. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both native builds and a cross build using a Beaglebone Black running Debian, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. * INSTALL: Regenerated. * Makeconfig: Add comments and whitespace to make the control flow clearer. (+link-printers-tests, +link-pie-printers-tests, CFLAGS-printers-tests, installed-rtld-LDFLAGS, built-rtld-LDFLAGS, link-libc-rpath, link-libc-tests-after-rpath-link, link-libc-printers-tests): New. (rtld-LDFLAGS, rtld-tests-LDFLAGS, link-libc-tests-rpath-link, link-libc-tests): Use the new variables as required. * Makerules ($(py-const)): New rule. generated: Add $(py-const). * README.pretty-printers: New file. * Rules (tests-printers-programs, tests-printers-out, py-env): New. (others): Depend on $(py-const). (tests): Depend on $(tests-printers-programs) or $(tests-printers-out), as required. Pass $(tests-printers) to merge-test-results.sh. * manual/install.texi: Add requirements for testing the pretty printers. * nptl/Makefile (gen-py-const-headers, pretty-printers, tests-printers, CFLAGS-test-mutexattr-printers.c CFLAGS-test-mutex-printers.c, CFLAGS-test-condattr-printers.c, CFLAGS-test-cond-printers.c, CFLAGS-test-rwlockattr-printers.c CFLAGS-test-rwlock-printers.c, tests-printers-libs): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * nptl/test-cond-printers.c: Likewise. * nptl/test-cond-printers.py: Likewise. * nptl/test-condattr-printers.c: Likewise. * nptl/test-condattr-printers.py: Likewise. * nptl/test-mutex-printers.c: Likewise. * nptl/test-mutex-printers.py: Likewise. * nptl/test-mutexattr-printers.c: Likewise. * nptl/test-mutexattr-printers.py: Likewise. * nptl/test-rwlock-printers.c: Likewise. * nptl/test-rwlock-printers.py: Likewise. * nptl/test-rwlockattr-printers.c: Likewise. * nptl/test-rwlockattr-printers.py: Likewise. * scripts/gen-py-const.awk: Likewise. * scripts/test_printers_common.py: Likewise. * scripts/test_printers_exceptions.py: Likewise.
2016-12-08 13:29:02 +00:00
generated += $(py-const)
endif # gen-py-const-headers
* sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: (gen-as-const-headers): Add it. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. * stdlib/tst-ucontext-off.c: File removed. * stdlib/Makefile (tests): Remove it. * scripts/gen-as-const.awk: Support generating a test program. * Makerules [gen-as-const-headers] (tests): Add test-as-const. [gen-as-const-headers] ($(objpfx)test-as-const.c): New target.
2005-12-22 05:18:34 +00:00
ifdef gen-as-const-headers
# Generating headers for assembly constants.
# We need this defined early to get into before-compile before
# it's used in sysd-rules, below.
# Define GEN_AS_CONST_HEADERS to avoid circular dependency [BZ #22792].
# NB: <tcb-offsets.h> is generated from tcb-offsets.sym to define
# offsets and sizes of types in <tls.h> and maybe <pthread.h> which
# may include <tcb-offsets.h>. Target header files can check if
# GEN_AS_CONST_HEADERS is defined to avoid circular dependency which
# may lead to build hang on a many-core machine.
Replace gen-as-const.awk by gen-as-const.py. This patch replaces gen-as-const.awk, and some fragments of the Makefile code that used it, by a Python script. The point is not such much that awk is problematic for this particular script, as that I'd like to build up a general Python infrastructure for extracting information from C headers, for use in writing tests of such headers. Thus, although this patch does not set up such infrastructure, the compute_c_consts function in gen-as-const.py might be moved to a separate Python module in a subsequent patch as a starting point for such infrastructure. The general idea of the code is the same as in the awk version, but no attempt is made to make the output files textually identical. When generating a header, a dict of constant names and values is generated internally then defines are printed in sorted order (rather than the order in the .sym file, which would have been used before). When generating a test that the values computed match those from a normal header inclusion, the test code is made into a compilation test using _Static_assert, where previously the comparisons were done only when the test was executed. One fragment of test generation (converting the previously generated header to use asconst_* prefixes on its macro names) is still in awk code in the makefiles; only the .sym processing and subsequent execution of the compiler to extract constants have moved to the Python script. Tested for x86_64, and with build-many-glibcs.py. * scripts/gen-as-const.py: New file. * scripts/gen-as-const.awk: Remove. * Makerules ($(common-objpfx)%.h $(common-objpfx)%.h.d): Use gen-as-const.py. ($(objpfx)test-as-const-%.c): Likewise.
2018-11-30 15:20:41 +00:00
$(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.py \
%.sym $(common-before-compile)
Replace gen-as-const.awk by gen-as-const.py. This patch replaces gen-as-const.awk, and some fragments of the Makefile code that used it, by a Python script. The point is not such much that awk is problematic for this particular script, as that I'd like to build up a general Python infrastructure for extracting information from C headers, for use in writing tests of such headers. Thus, although this patch does not set up such infrastructure, the compute_c_consts function in gen-as-const.py might be moved to a separate Python module in a subsequent patch as a starting point for such infrastructure. The general idea of the code is the same as in the awk version, but no attempt is made to make the output files textually identical. When generating a header, a dict of constant names and values is generated internally then defines are printed in sorted order (rather than the order in the .sym file, which would have been used before). When generating a test that the values computed match those from a normal header inclusion, the test code is made into a compilation test using _Static_assert, where previously the comparisons were done only when the test was executed. One fragment of test generation (converting the previously generated header to use asconst_* prefixes on its macro names) is still in awk code in the makefiles; only the .sym processing and subsequent execution of the compiler to extract constants have moved to the Python script. Tested for x86_64, and with build-many-glibcs.py. * scripts/gen-as-const.py: New file. * scripts/gen-as-const.awk: Remove. * Makerules ($(common-objpfx)%.h $(common-objpfx)%.h.d): Use gen-as-const.py. ($(objpfx)test-as-const-%.c): Likewise.
2018-11-30 15:20:41 +00:00
$(PYTHON) $< --cc="$(CC) $(CFLAGS) $(CPPFLAGS) -DGEN_AS_CONST_HEADERS \
-MD -MP -MF $(@:.h=.h.d)T \
-MT '$(@:.h=.h.d) $(@:.h.d=.h)'" \
$(filter %.sym,$^) > $(@:.h.d=.h)T
sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
$(@:.h=.h.d)T > $(@:.h=.h.d)T2
rm -f $(@:.h=.h.d)T
mv -f $(@:.h=.h.d)T2 $(@:.h=.h.d)
mv -f $(@:.h.d=.h)T $(@:.h.d=.h)
vpath %.sym $(sysdirs)
before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
* sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: (gen-as-const-headers): Add it. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. * stdlib/tst-ucontext-off.c: File removed. * stdlib/Makefile (tests): Remove it. * scripts/gen-as-const.awk: Support generating a test program. * Makerules [gen-as-const-headers] (tests): Add test-as-const. [gen-as-const-headers] ($(objpfx)test-as-const.c): New target.
2005-12-22 05:18:34 +00:00
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
tests-internal += $(gen-as-const-headers:%.sym=test-as-const-%)
generated += $(gen-as-const-headers:%.sym=test-as-const-%.c)
Replace gen-as-const.awk by gen-as-const.py. This patch replaces gen-as-const.awk, and some fragments of the Makefile code that used it, by a Python script. The point is not such much that awk is problematic for this particular script, as that I'd like to build up a general Python infrastructure for extracting information from C headers, for use in writing tests of such headers. Thus, although this patch does not set up such infrastructure, the compute_c_consts function in gen-as-const.py might be moved to a separate Python module in a subsequent patch as a starting point for such infrastructure. The general idea of the code is the same as in the awk version, but no attempt is made to make the output files textually identical. When generating a header, a dict of constant names and values is generated internally then defines are printed in sorted order (rather than the order in the .sym file, which would have been used before). When generating a test that the values computed match those from a normal header inclusion, the test code is made into a compilation test using _Static_assert, where previously the comparisons were done only when the test was executed. One fragment of test generation (converting the previously generated header to use asconst_* prefixes on its macro names) is still in awk code in the makefiles; only the .sym processing and subsequent execution of the compiler to extract constants have moved to the Python script. Tested for x86_64, and with build-many-glibcs.py. * scripts/gen-as-const.py: New file. * scripts/gen-as-const.awk: Remove. * Makerules ($(common-objpfx)%.h $(common-objpfx)%.h.d): Use gen-as-const.py. ($(objpfx)test-as-const-%.c): Likewise.
2018-11-30 15:20:41 +00:00
$(objpfx)test-as-const-%.c: $(..)scripts/gen-as-const.py $(..)Makerules \
%.sym $(common-objpfx)%.h
* sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: (gen-as-const-headers): Add it. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. * stdlib/tst-ucontext-off.c: File removed. * stdlib/Makefile (tests): Remove it. * scripts/gen-as-const.awk: Support generating a test program. * Makerules [gen-as-const-headers] (tests): Add test-as-const. [gen-as-const-headers] ($(objpfx)test-as-const.c): New target.
2005-12-22 05:18:34 +00:00
($(AWK) '{ sub(/^/, "asconst_", $$2); print; }' $(filter %.h,$^); \
Replace gen-as-const.awk by gen-as-const.py. This patch replaces gen-as-const.awk, and some fragments of the Makefile code that used it, by a Python script. The point is not such much that awk is problematic for this particular script, as that I'd like to build up a general Python infrastructure for extracting information from C headers, for use in writing tests of such headers. Thus, although this patch does not set up such infrastructure, the compute_c_consts function in gen-as-const.py might be moved to a separate Python module in a subsequent patch as a starting point for such infrastructure. The general idea of the code is the same as in the awk version, but no attempt is made to make the output files textually identical. When generating a header, a dict of constant names and values is generated internally then defines are printed in sorted order (rather than the order in the .sym file, which would have been used before). When generating a test that the values computed match those from a normal header inclusion, the test code is made into a compilation test using _Static_assert, where previously the comparisons were done only when the test was executed. One fragment of test generation (converting the previously generated header to use asconst_* prefixes on its macro names) is still in awk code in the makefiles; only the .sym processing and subsequent execution of the compiler to extract constants have moved to the Python script. Tested for x86_64, and with build-many-glibcs.py. * scripts/gen-as-const.py: New file. * scripts/gen-as-const.awk: Remove. * Makerules ($(common-objpfx)%.h $(common-objpfx)%.h.d): Use gen-as-const.py. ($(objpfx)test-as-const-%.c): Likewise.
2018-11-30 15:20:41 +00:00
$(PYTHON) $< --test $(filter %.sym,$^)) > $@T
* sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed. * sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]: (gen-as-const-headers): Add it. * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Likewise. * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. * stdlib/tst-ucontext-off.c: File removed. * stdlib/Makefile (tests): Remove it. * scripts/gen-as-const.awk: Support generating a test program. * Makerules [gen-as-const-headers] (tests): Add test-as-const. [gen-as-const-headers] ($(objpfx)test-as-const.c): New target.
2005-12-22 05:18:34 +00:00
mv -f $@T $@
endif
ifeq (yes,$(build-shared))
# Generate the header containing the names of all shared libraries.
# We use a stamp file to avoid unnecessary recompilations.
before-compile += $(common-objpfx)gnu/lib-names.h
ifeq ($(soversions.mk-done),t)
ifndef abi-variants
lib-names-h-abi = gnu/lib-names.h
lib-names-stmp-abi = gnu/lib-names.stmp
else
lib-names-h-abi = gnu/lib-names-$(default-abi).h
lib-names-stmp-abi = gnu/lib-names-$(default-abi).stmp
before-compile += $(common-objpfx)$(lib-names-h-abi)
common-generated += gnu/lib-names.h
install-others-nosubdir: $(inst_includedir)/$(lib-names-h-abi)
$(common-objpfx)gnu/lib-names.h:
$(make-target-directory)
{ \
echo '/* This file is automatically generated.';\
echo ' It defines macros to allow user program to find the shared'; \
echo ' library files which come as part of GNU libc. */'; \
echo '#ifndef __GNU_LIB_NAMES_H'; \
echo '#define __GNU_LIB_NAMES_H 1'; \
echo ''; \
$(if $(abi-includes), \
$(foreach h,$(abi-includes), echo '#include <$(h)>';) \
echo '';) \
$(foreach v,$(abi-variants),\
$(if $(abi-$(v)-condition),\
echo '#if $(abi-$(v)-condition)'; \
echo '# include <gnu/lib-names-$(v).h>'); \
$(if $(abi-$(v)-condition),echo '#endif';)) \
echo ''; \
echo '#endif /* gnu/lib-names.h */'; \
} > $@
endif
$(common-objpfx)$(lib-names-h-abi): $(common-objpfx)$(lib-names-stmp-abi); @:
$(common-objpfx)$(lib-names-stmp-abi): $(..)scripts/lib-names.awk \
$(common-objpfx)soversions.i
$(make-target-directory)
{ \
$(if $(abi-variants), \
echo '/* This file is automatically generated. */';\
echo '#ifndef __GNU_LIB_NAMES_H'; \
echo '# error "Never use <$(lib-names-h-abi)> directly; include <gnu/lib-names.h> instead."'; \
echo '#endif';, \
echo '/* This file is automatically generated.';\
echo ' It defines macros to allow user program to find the shared'; \
echo ' library files which come as part of GNU libc. */'; \
echo '#ifndef __GNU_LIB_NAMES_H'; \
echo '#define __GNU_LIB_NAMES_H 1';) \
echo ''; \
($(foreach s,$(all-sonames), echo $(s);)) \
| LC_ALL=C $(AWK) -f $(firstword $^) | LC_ALL=C sort; \
$(if $(abi-variants),, \
echo ''; \
echo '#endif /* gnu/lib-names.h */';) \
} > ${@:stmp=T}
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
touch $@
endif
common-generated += $(lib-names-h-abi) $(lib-names-stmp-abi)
endif
###############################################################################
# NOTE! Everything adding to before-compile needs to come before this point! #
###############################################################################
# Generate an ordered list of implicit rules which find the source files in
# each sysdep directory. The old method was to use vpath to search all the
# sysdep directories. However, that had the problem that a .S file in a
# later directory would be chosen over a .c file in an earlier directory,
# which does not preserve the desired sysdeps ordering behavior.
# System-dependent makefiles can put in `inhibit-sysdep-asm' regexps
# matching sysdep directories whose assembly source files should be
# suppressed.
* Makefile (subdir-target-args): New variable. ($(all-subdirs-targets)): Use it in place of -C option. * Rules: Use $(..) instead of ../ if it's already defined. * Makeconfig (subdir-srcdirs): New variable. * csu/Makefile (all-Banner-files): Use it. * configure.in (--enable-add-ons): Set to "yes" by default. Handle absolute add-on directory names when looking for configure fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. Require add-on configure to set $libc_add_on_canonical, use that in $add_ons_sfx. Substitute add_on_subdirs with computed list of subdir names each add-on configure set in libc_add_on_subdirs. * configure: Regenerated. * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. * config.make.in (add-on-subdirs): New substituted variable. * Makeconfig (all-subdirs): Include $(add-on-subdirs). Remove $(add-ons), $(sysdep-subdirs). Don't filter out $(sysdep-inhibit-subdirs). ($(common-objpfx)sysd-dirs): Target removed. Don't include it. ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs files together to gen-sorted.awk, and $(subdirs) via -v. (subdirs): Remove magic reordering for mach and hurd. * scripts/gen-sorted.awk: Use subdirs from command line. Process Subdirs and Depend files directly. Let Subdirs files use "first dir" and "inhibit dir". Always move elf to the end of the list. * hurd/Depend: New file. * sysdeps/mach/Subdirs: Use "first mach". * Makefile (dist-separate): Remove linuxthreads. (dist-separate-linuxthreads): Variable removed. (glibc-%.tar rule): Use $(sysdeps-add-ons). * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), not $(all-subdirs). (sysdep-makefiles): Use $(sysdirs). (sysdirs): Remove export. ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in $(config-sysdirs). (+sysdir_pfx): Variable removed. (sysd-rules): Use $(common-objpfx) in place of it. (sysdirs): Variable moved to ... * Makeconfig (sysdirs): ... here. Handle absolute directory names in $(config-sysdirs). (full_config_sysdirs): Variable removed. * csu/Makefile: Use $(sysdirs) in vpath directive. * math/Makefile (ulps-file): Use $(sysdirs). * sysdeps/gnu/Makefile (errlist-c): Likewise. ($(objpfx)errlist-compat.c): Likewise. * Makeconfig (all-Subdirs-files): Likewise. ($(common-objpfx)config.status): Likewise. * configure.in (sysnames): Handle absolute add-on directory names. (sysdeps_add_ons): New variable, AC_SUBST it. Compute which add-ons contributed sysdeps directories. * configure: Regenerated. * config.make.in (sysdeps-add-ons): New substituted variable. * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... * Makeconfig: ... to here. (+sysdep_dirs): Append $(sysdeps-add-ons) here. (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). Remove $(includes). (sysdep-makeconfigs): Use $(+sysdep_dirs). ($(common-objpfx)shlib-versions.v.i): Likewise. * Makeconfig: Remove hair to set Makeconfig-add-on. * sysdeps/unix/Makefile (sysdirs): Remove export. (asm_CPP): Variable removed. ($(common-objpfx)sysd-syscalls): Pass them directly for the script. * sysdeps/posix/Makefile: New file. * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix values here with ?=. * stdlib/gen-mpn-copy: File removed. * stdlib/Makefile (distribute): Remove it. * configure.in: Don't grok --with-gmp. * configure: Regenerated. * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. * configure: Regenerated. * bare: Directory removed, saved in ports repository.
2006-02-28 07:11:04 +00:00
-include $(common-objpfx)sysd-rules
ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
# The value of $(+sysdep_dirs) the sysd-rules was computed for
# differs from the one we are using now. So force a rebuild of sysd-rules.
sysd-rules-force = FORCE
FORCE:
endif
$(common-objpfx)sysd-rules: $(..)scripts/sysd-rules.awk \
$(common-objpfx)config.make $(..)Makerules \
$(sysdep-makefiles) $(sysdep-makeconfigs) \
$(sysd-rules-force)
-@rm -f $@T
LC_ALL=C $(AWK) -f $< > $@T \
-v all_object_suffixes='$(all-object-suffixes)' \
-v inhibit_sysdep_asm='$(inhibit-sysdep-asm)' \
-v sysd_rules_patterns='$(sysd-rules-patterns)' \
-v config_sysdirs='$(config-sysdirs)'
mv -f $@T $@
ifndef sysd-rules-done
# Don't do deps until this exists, because it provides rules to make the deps.
no_deps=t
endif
define o-iterator-doit
$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
define o-iterator-doit
$(objpfx)%$o: %.c $(before-compile); $$(compile-command.c)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
define o-iterator-doit
$(objpfx)%$o: %.cc $(before-compile); $$(compile-command.cc)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
# Omit the objpfx rules when building in the source tree, because
# objpfx is empty and so these rules just override the ones above.
ifdef objpfx
# Define first rules to find the source files in $(objpfx).
# Generated source files will end up there.
define o-iterator-doit
$(objpfx)%$o: $(objpfx)%.S $(before-compile); $$(compile-command.S)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
define o-iterator-doit
$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
endif
# Generate .dT files as we compile.
compile-mkdep-flags = -MD -MP -MF $@.dt -MT $@
compile-command.S = $(compile.S) $(OUTPUT_OPTION) $(compile-mkdep-flags)
compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
# Like compile-mkdep-flags, but for use with $(BUILD_CC). We don't want to
# track system includes here, they may spuriously trigger an install rule,
# and would cause the check-local-headers test to fail.
native-compile-mkdep-flags = -MMD -MP -MF $@.dt -MT $@
# GCC can grok options after the file name, and it looks nicer that way.
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
compile.cc = $(CXX) $< -c $(CXXFLAGS) $(CPPFLAGS)
compile.S = $(CC) $< -c $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
# We need this for the output to go in the right place. It will default to
# empty if make was configured to work with a cc that can't grok -c and -o
# together. You can't compile the C library with such a compiler.
OUTPUT_OPTION = -o $@
# This is the end of the pipeline for compiling generated C code.
compile-stdin.c = $(COMPILE.c) -o $@ -x c - $(compile-mkdep-flags)
# We need the $(CFLAGS) to be in there to have the right predefines during
# the dependency run for C sources. But having it for assembly sources can
# get the wrong predefines.
S-CPPFLAGS = -DASSEMBLER $(asm-CPPFLAGS)
ifneq (,$(objpfx))
# Continuation lines here are dangerous because they introduce spaces!
define sed-remove-objpfx
-e 's@ $(subst .,\.,$(subst @,\@,$(common-objpfx)))@ $$(common-objpfx)@g' \
-e 's@^$(subst .,\.,$(subst @,\@,$(common-objpfx)))@$$(common-objpfx)@g'
endef
endif
# Modify the list of routines we build for different targets
2012-01-08 01:30:26 +00:00
ifeq (yes,$(build-shared))
ifndef libc.so-version
# Undefine this because it can't work when we libc.so is unversioned.
static-only-routines =
endif
endif
elide-routines.oS += $(filter-out $(static-only-routines),\
2013-01-31 22:57:06 +00:00
$(routines) $(aux) $(sysdep_routines))
elide-routines.os += $(static-only-routines)
# If we have versioned code we don't need the old versions in any of the
# static libraries.
2013-01-31 22:57:06 +00:00
elide-routines.o += $(shared-only-routines)
elide-routines.op += $(shared-only-routines)
# Shared library building.
ifeq (yes,$(build-shared))
2013-09-04 15:25:42 +00:00
# Reference map file only when shared libraries are built and a map file name
# is given.
2013-09-04 15:25:42 +00:00
ifeq ($(build-shared),yes)
map-file = $(firstword $($(@F:.so=-map)) \
$(addprefix $(common-objpfx), \
$(filter $(@F:.so=.map),$(version-maps))))
load-map-file = $(map-file:%=-Wl,--version-script=%)
endif
# Compiler arguments to use to link a shared object with libc and
# ld.so. This is intended to be as similar as possible to a default
# link with an installed libc.
link-libc-args = -Wl,--start-group \
$(libc-for-link) \
$(common-objpfx)libc_nonshared.a \
-Wl,--as-needed $(elf-objpfx)ld.so -Wl,--no-as-needed \
-Wl,--end-group
# The corresponding shared libc to use. This may be modified for a
# particular target.
libc-for-link = $(common-objpfx)libc.so
# The corresponding dependencies. As these are used in dependencies,
# not just commands, they cannot use target-specific variables so need
# to name both possible libc.so objects.
link-libc-deps = $(common-objpfx)libc.so $(common-objpfx)linkobj/libc.so \
$(common-objpfx)libc_nonshared.a $(elf-objpfx)ld.so
# Pattern rule to build a shared object from an archive of PIC objects.
# This must come after the installation rules so Make doesn't try to
# build shared libraries in place from the installed *_pic.a files.
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
# on other shared objects. The linking with libc and ld.so is intended
# to be as similar as possible to a default link with an installed libc.
lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(link-libc-deps)
$(build-shlib) $(link-libc-args)
$(call after-link,$@)
define build-shlib-helper
$(LINK.o) -shared -static-libgcc -Wl,-O1 $(sysdep-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(rtld-LDFLAGS) \
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
$(LDFLAGS.so) $(LDFLAGS-lib.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
ifeq (yes,$(use-default-link))
# If the linker is good enough, we can let it use its default linker script.
shlib-lds =
shlib-lds-flags =
else
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
$(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
$(LINK.o) -shared -Wl,-O1 \
-nostdlib -nostartfiles \
$(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
-Wl,--verbose 2>/dev/null | \
sed > $@T \
-e '/^=========/,/^=========/!d;/^=========/d' \
$(if $(filter yes,$(have-hash-style)), \
-e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
-e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
-e '/DATA_SEGMENT_ALIGN/{H;g}' \
, \
-e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
) \
-e 's/^.*\*(\.dynbss).*$$/& \
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-e 's@^.*\*(\.jcr).*$$@& \
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
PROVIDE(__start___libc_atexit = .);\
__libc_atexit : { *(__libc_atexit) }\
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_IO_vtables = .);\
__libc_IO_vtables : { *(__libc_IO_vtables) }\
PROVIDE(__stop___libc_IO_vtables = .);\
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
test -s $@T
mv -f $@T $@
common-generated += shlib.lds
shlib-lds = $(common-objpfx)shlib.lds
shlib-lds-flags = -T $(shlib-lds)
endif
define build-shlib
$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
endef
define build-module-helper
$(LINK.o) -shared -static-libgcc $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
-B$(csu-objpfx) $(load-map-file) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
# This macro is similar to build-shlib but it does not define a soname
# and it does not depend on the destination name to start with `lib'.
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
define build-module
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-module-objlist) $(link-libc-args)
$(call after-link,$@)
endef
define build-module-asneeded
$(build-module-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
$(link-libc-args)
$(call after-link,$@)
endef
# sofini.os must be placed last since it terminates .eh_frame section.
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \
$(elf-objpfx)sofini.os \
$(link-libc-deps),$^))
build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
build-shlib-objlist = $(build-module-helper-objlist) \
$(LDLIBS-$(@F:lib%.so=%).so) \
$(filter $(elf-objpfx)sofini.os,$^)
# Don't try to use -lc when making libc.so itself.
# Also omits crti.o and crtn.o, which we do not want
# since we define our own `.init' section specially.
LDFLAGS-c.so = -nostdlib -nostartfiles
# But we still want to link libc.so against $(libc.so-gnulib).
LDLIBS-c.so += $(libc.so-gnulib)
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
# Pre-link the objects of libc_pic.a so that we can locally resolve
# COMMON symbols before we link against ld.so. This is because ld.so
# contains some of libc_pic.a already, which will prevent the COMMONs
# from being allocated in libc.so, which introduces evil dependencies
# between libc.so and ld.so, which can make it impossible to upgrade.
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
2011-06-10 17:34:45 +00:00
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@
ifeq (,$(strip $(shlib-lds-flags)))
# Generate a list of -R options to excise .gnu.glibc-stub.* sections.
$(common-objpfx)libc_pic.opts: $(common-objpfx)libc_pic.os
$(OBJDUMP) -h $< | \
$(AWK) '$$2 ~ /\.gnu\.glibc-stub\./ { print "-R", $$2 }' \
> $@T
mv -f $@T $@
# Apply those -R options.
$(common-objpfx)libc_pic.os.clean: $(common-objpfx)libc_pic.opts \
$(common-objpfx)libc_pic.os
$(OBJCOPY) @$^ $@
generated += libc_pic.opts libc_pic.os.clean
libc_pic_clean := .clean
endif
# Build a possibly-modified version of libc_pic.a for use in building
# linkobj/libc.so.
ifeq (,$(filter sunrpc,$(subdirs)))
$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a
$(make-target-directory)
ln -f $< $@
else
$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \
$(common-objpfx)sunrpc/librpc_compat_pic.a
$(make-target-directory)
(cd $(common-objpfx)linkobj; \
$(AR) x ../libc_pic.a; \
rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \
$(AR) x ../sunrpc/librpc_compat_pic.a; \
$(AR) cr libc_pic.a *.os; \
rm *.os)
endif # $(subdirs) contains sunrpc
# Clear link-libc-deps for the libc.so libraries so build-shlibs does not
# filter ld.so out of the list of linked objects.
$(common-objpfx)libc.so: link-libc-deps = # empty
$(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
# Use our own special initializer and finalizer files for the libc.so
# libraries.
$(common-objpfx)libc.so: $(common-objpfx)libc_pic.os$(libc_pic_clean) \
$(elf-objpfx)sofini.os \
$(elf-objpfx)interp.os \
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
$(call after-link,$@)
$(common-objpfx)linkobj/libc.so: $(common-objpfx)linkobj/libc_pic.a \
$(elf-objpfx)sofini.os \
$(elf-objpfx)interp.os \
$(elf-objpfx)ld.so \
$(shlib-lds)
$(build-shlib)
$(call after-link,$@)
2013-09-04 15:25:42 +00:00
ifeq ($(build-shared),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
endif
common-generated += libc.so libc_pic.os
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
$(make-link)
common-generated += libc.so$(libc.so-version)
endif
endif
# Figure out the source filenames in this directory.
override sources := $(addsuffix .c,\
$(filter-out $(elided-routines),\
$(routines) $(aux) \
$(sysdep_routines)))
sysdep_routines := $(sysdep_routines)
headers := $(headers) $(sysdep_headers)
# This is the list of all object files, gotten by
# replacing every ".c" in `sources' with a ".o".
2013-01-31 22:57:06 +00:00
override objects := $(addprefix $(objpfx),$(sources:.c=.o))
# The makefile may define $(extra-libs) with `libfoo libbar'
# to build libfoo.a et al from the modules listed in $(libfoo-routines).
ifdef extra-libs
# extra-lib.mk is included once for each extra lib to define rules
# to build it, and to add its objects to the various variables.
# During its evaluation, $(lib) is set to the name of the library.
extra-libs-left := $(extra-libs)
include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
endif
# The makefile may define $(modules-names) to build additional modules.
# These are built with $(build-module), except any in $(modules-names-nobuild).
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
# MODULE_NAME=extramodules, except any in $(modules-names-tests).
ifdef modules-names
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
cpp-srcs-left := $(filter-out $(modules-names-tests),$(modules-names))
ifneq (,$(cpp-srcs-left))
lib := extramodules
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
ifdef modules-names-tests
cpp-srcs-left := $(filter $(modules-names-tests),$(modules-names))
ifneq (,$(cpp-srcs-left))
lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
endif
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
$(objpfx)%.os $(shlib-lds) $(link-libs-deps)
$(build-module)
endif
+depfiles := $(sources:.c=.d) \
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
$(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \
$(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
y2038: Add test coverage It is enabled through a new rule, tests-y2038, which is built only when the ABI supports the comapt 64-bit time_t (defined by the header time64-compat.h, which also enables the creation of the symbol Version for Linux). It means the tests are not built for ABI which already provide default 64-bit time_t. The new rule already adds the required LFS and 64-bit time_t compiler flags. The current coverage is: * libc: - adjtime tst-adjtime-time64 - adjtimex tst-adjtimex-time64 - clock_adjtime tst-clock_adjtime-time64 - clock_getres tst-clock-time64, tst-cpuclock1-time64 - clock_gettime tst-clock-time64, tst-clock2-time64, tst-cpuclock1-time64 - clock_nanosleep tst-clock_nanosleep-time64, tst-cpuclock1-time64 - clock_settime tst-clock2-time64 - cnd_timedwait tst-cnd-timedwait-time64 - ctime tst-ctime-time64 - ctime_r tst-ctime-time64 - difftime tst-difftime-time64 - fstat tst-stat-time64 - fstatat tst-stat-time64 - futimens tst-futimens-time64 - futimes tst-futimes-time64 - futimesat tst-futimesat-time64 - fts_* tst-fts-time64 - getitimer tst-itimer-timer64 - getrusage - gettimeofday tst-clock_nanosleep-time64 - glob / globfree tst-gnuglob64-time64 - gmtime tst-gmtime-time64 - gmtime_r tst-gmtime-time64 - lstat tst-stat-time64 - localtime tst-y2039-time64 - localtime_t tst-y2039-time64 - lutimes tst-lutimes-time64 - mktime tst-mktime4-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - msgctl test-sysvmsg-time64 - mtx_timedlock tst-mtx-timedlock-time64 - nanosleep tst-cpuclock{12}-time64, tst-mqueue8-time64, tst-clock-time64 - nftw / ftw ftwtest-time64 - ntp_adjtime tst-ntp_adjtime-time64 - ntp_gettime tst-ntp_gettime-time64 - ntp_gettimex tst-ntp_gettimex-time64 - ppoll tst-ppoll-time64 - pselect tst-pselect-time64 - pthread_clockjoin_np tst-join14-time64 - pthread_cond_clockwait tst-cond11-time64 - pthread_cond_timedwait tst-abstime-time64 - pthread_mutex_clocklock tst-abstime-time64 - pthread_mutex_timedlock tst-abstime-time64 - pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_timedjoin_np tst-join14-time64 - recvmmsg tst-cancel4_2-time64 - sched_rr_get_interval tst-sched_rr_get_interval-time64 - select tst-select-time64 - sem_clockwait tst-sem5-time64 - sem_timedwait tst-sem5-time64 - semctl test-sysvsem-time64 - semtimedop test-sysvsem-time64 - setitimer tst-mqueue2-time64, tst-itimer-timer64 - settimeofday tst-settimeofday-time64 - shmctl test-sysvshm-time64 - sigtimedwait tst-sigtimedwait-time64 - stat tst-stat-time64 - thrd_sleep tst-thrd-sleep-time64 - time tst-mqueue{1248}-time64 - timegm tst-timegm-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 - timerfd_gettime tst-timerfd-time64 - timerfd_settime tst-timerfd-time64 - timespec_get tst-timespec_get-time64 - timespec_getres tst-timespec_getres-time64 - utime tst-utime-time64 - utimensat tst-utimensat-time64 - utimes tst-utimes-time64 - wait3 tst-wait3-time64 - wait4 tst-wait4-time64 * librt: - aio_suspend tst-aio6-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 * libanl: - gai_suspend Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
$(addsuffix .d,$(tests) $(tests-internal) $(xtests) \
$(test-srcs) $(tests-time64) $(xtests-time64))
ifeq ($(build-programs),yes)
+depfiles += $(addsuffix .d,$(others) $(sysdep-others))
endif
+depfiles := $(addprefix $(objpfx),\
$(filter-out $(addsuffix .d,$(omit-deps)),\
$(+depfiles)))
all-dt-files := $(foreach o,$(object-suffixes-for-libc),$(+depfiles:.d=$o.dt))
+depfiles := $(patsubst %.dt,%.d,$(wildcard $(all-dt-files))) \
$(wildcard $(all-dt-files:.dt=.d))
# This is a funny rule in that it removes its input file.
%.d: %.dt
@sed $(sed-remove-objpfx) $< > $(@:.d=.T) && \
mv -f $(@:.d=.T) $@ && \
rm -f $<
# Avoid the .h.d files for any .sym files whose .h files don't exist yet.
# They will be generated when they're needed, and trying too early won't work.
+gen-as-const := $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
+depfiles += $(addsuffix .d,$(filter $(wildcard $(+gen-as-const)),\
$(+gen-as-const)))
ifdef +depfiles
ifneq ($(no_deps),t)
-include $(+depfiles)
endif
endif
# Maximize efficiency by minimizing the number of rules.
.SUFFIXES: # Clear the suffix list. We don't use suffix rules.
# Don't define any builtin rules.
MAKEFLAGS := $(MAKEFLAGS)r
# Generic rule for making directories.
%/:
# mkdir isn't smart enough to strip a trailing /.
2007-08-26 02:18:14 +00:00
# We always require a mkdir which supports the -p option to avoid error
# messages in case of races.
mkdir -p $(@:%/=%)
# Make sure that object files are not removed
# when they are intermediates between sources and library members.
.PRECIOUS: $(addprefix $(objpfx)%,$(all-object-suffixes))
# Make sure that the parent library archive is never removed.
.PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
# Use the verbose option of ar and tar when not running silently.
ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
verbose := v
else # -s
verbose :=
endif # not -s
ARFLAGS := r$(verbose)
CREATE_ARFLAGS := cru$(verbose)
# This makes all the object files in the parent library archive.
.PHONY: lib lib-noranlib
lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
lib-noranlib: libobjs
# For object-suffix $o, the list of objects with that suffix.
# Makefiles can define `elide-routines.so = foo' to leave foo.so out.
o-objects = $(patsubst %.o,%$o,$(filter-out $(patsubst %,$(objpfx)%.o,\
$(elide-routines$o)),\
$(objects))) \
$(addprefix $(objpfx),$(o-objects$o))
others: $(addprefix $(objpfx),$(install-lib))
ifndef objects
# Create the stamp$o files to keep the parent makefile happy.
subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
$(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o):
$(make-target-directory)
rm -f $@; > $@
else
# Define explicit rules to update each $(objpfx)stamp.SUFFIX
# timestamp file; these rules (one explicit rule is generated for each
# object suffix) write a list of objects to update in the stamp file.
# The parent will then actually add them all to the archive in the
# archive rule, below.
define o-iterator-doit
$(objpfx)stamp$o: $(o-objects); $$(do-stamp)
endef
define do-stamp
$(make-target-directory)
echo '$(patsubst $(objpfx)%,$(addsuffix /,$(subdir))%,$^)' > $@T
mv -f $@T $@
endef
object-suffixes-left := $(object-suffixes-for-libc)
include $(o-iterator)
endif
# Now define explicit rules to build the library archives; these depend
# on the stamp files built above.
define o-iterator-doit
$(common-objpfx)$(patsubst %,$(libtype$o),c): \
$(subdirs-stamp-o) $(common-objpfx)stamp$o; $$(do-makelib)
endef
define do-makelib
cd $(common-objdir) && \
$(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
endef
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
ifndef subdir
$(subdirs-stamps): subdir_lib;
endif
object-suffixes-left = $(object-suffixes-for-libc)
include $(o-iterator)
# This makes all the object files.
.PHONY: objects objs libobjs extra-objs
objects objs: libobjs extra-objs
libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
extra-objs: $(addprefix $(objpfx),$(extra-objs))
# Canned sequence for building an extra library archive.
define build-extra-lib
$(patsubst %/,cd % &&,$(objpfx)) \
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
$(patsubst $(objpfx)%,%,$^)
endef
# Installation.
.PHONY: force-install
force-install:
# $(install-lib) are installed from the object directory into $(libdir);
# files in $(install-lib) matching `lib%.a' are ranlib'd after installation
# unless they also appear in $(non-lib.a). $(install-data) are installed as
# they are into $(datadir). $(headers) are installed as they are in
# $(includedir). $(install-bin), $(install-bin-script) and $(install-sbin)
# are installed from the object directory into $(bindir), $(bindir) and
# $(sbindir), respectively. $(install-others) and $(install-others-programs)
# are absolute path names of files to install; rules to install them are
# defined elsewhere.
# The simple library name to install libc.a under.
# This could be defined by a sysdep Makefile.
ifndef libc-name
libc-name := c
endif
define do-install
$(make-target-directory)
$(INSTALL_DATA) $< $@
endef
# Make the target directory if it doesn't exist, using the `mkinstalldirs'
# script that does `mkdir -p' even if `mkdir' doesn't support that flag.
define make-target-directory
$(addprefix $(..)./scripts/mkinstalldirs ,\
$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
endef
# Any directory (parent or subdir) should install libc.a; this way
# "make install" in a subdir is guaranteed to install everything it changes.
installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
$(inst_libdir)/$(patsubst %,$(libtype$o),\
$(libprefix)$(libc-name)))
.PHONY: check-install-supported
check-install-supported:
# Check to see if the prefix or exec_prefix GNU standard variable
# has been overridden on the command line and, if so, fail with
# an error message since doing so is not supported (set DESTDIR
# instead).
ifeq ($(origin prefix),command line)
check-install-supported:
$(error Overriding prefix is not supported. Set DESTDIR instead.)
endif
ifeq ($(origin exec_prefix),command line)
check-install-supported:
$(error Overriding exec_prefix is not supported. Set DESTDIR instead.)
endif
install: check-install-supported
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
$(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
define do-install-program
$(make-target-directory)
$(INSTALL_PROGRAM) $< $@.new
mv -f $@.new $@
endef
define do-install-script
$(make-target-directory)
$(INSTALL_SCRIPT) $< $@.new
mv -f $@.new $@
endef
install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
install-lib := $(filter-out %.so %_pic.a,$(install-lib))
ifeq (yes,$(build-shared))
# Find which .so's have a version number in their soname.
versioned := $(strip $(foreach so,$(install-lib.so),\
$(patsubst %,$(so),$($(so)-version))))
install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
# For libraries whose soname have version numbers, we install two files:
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME
install-lib-nosubdir: $(install-lib.so-unversioned:%=$(inst_slibdir)/%) \
$(foreach L,$(install-lib.so-versioned),\
$(inst_libdir)/$L \
$(inst_slibdir)/$L$($L-version))
# Install all the unversioned shared libraries.
$(install-lib.so-unversioned:%=$(inst_slibdir)/%): $(inst_slibdir)/%.so: \
$(objpfx)%.so $(+force)
$(do-install-program)
ifneq ($(findstring -s,$(LN_S)),)
define make-link
rm -f $@.new
$(SHELL) $(..)scripts/rellns-sh $< $@.new
mv -f $@.new $@
endef
define make-link-multidir
$(patsubst %/,cd %,$(objpfx)); \
$(addprefix $(abspath $(..)scripts/mkinstalldirs) ,$(dir $(multidir))); \
$(LN_S) . $(multidir) 2> /dev/null; \
test -L $(multidir)
endef
else
# If we have no symbolic links don't bother with rellns-sh.
define make-link
rm -f $@.new
$(LN_S) $< $@.new
mv -f $@.new $@
endef
define make-link-multidir
$(make-target-directory)
ln -f $(objpfx)/$(@F) $@
endef
endif
ifdef libc.so-version
$(inst_slibdir)/libc.so$(libc.so-version): $(common-objpfx)libc.so $(+force)
$(do-install-program)
install: $(inst_slibdir)/libc.so$(libc.so-version)
# This fragment of linker script gives the OUTPUT_FORMAT statement
# for the configuration we are building. We put this statement into
# the linker scripts we install for -lc et al so that they will not be
# used by a link for a different format on a multi-architecture system.
$(common-objpfx)format.lds: $(common-objpfx)config.make \
$(common-objpfx)config.h $(..)Makerules
$(LINK.o) -shared -nostdlib -nostartfiles \
-x assembler /dev/null -o $@.so
$(OBJDUMP) -f $@.so | sed -n 's/.*file format \(.*\)/OUTPUT_FORMAT(\1)/;T;p' > $@
rm -f $@.so
common-generated += format.lds
ifndef subdir
# What we install as libc.so for programs to link against is in fact a
# link script. It contains references for the various libraries we need.
# The libc.so object is not complete since some functions are only defined
# in libc_nonshared.a.
# We need to use absolute paths since otherwise local copies (if they exist)
# of the files are taken by the linker.
install: $(inst_libdir)/libc.so
$(inst_libdir)/libc.so: $(common-objpfx)format.lds \
$(common-objpfx)libc.so$(libc.so-version) \
$(inst_libdir)/$(patsubst %,$(libtype.oS),\
$(libprefix)$(libc-name)) \
$(+force)
(echo '/* GNU ld script';\
echo ' Use the shared library, but some functions are only in';\
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
2013-03-20 14:23:09 +00:00
' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@
endif
else
install: $(inst_slibdir)/libc.so
$(inst_slibdir)/libc.so: $(common-objpfx)libc.so $(+force)
$(do-install-program)
endif
ifneq (,$(versioned))
# Produce three sets of rules as above for all the smaller versioned libraries.
define o-iterator-doit
$(inst_libdir)/$o: $(inst_slibdir)/$o$($o-version) $(+force); $$(make-link)
endef
object-suffixes-left := $(filter-out $(install-lib-ldscripts),$(versioned))
ifneq (,$(object-suffixes-left))
include $(o-iterator)
endif
# Make symlinks in the build directory, because the versioned names might
# be referenced by a DT_NEEDED in another library.
define o-iterator-doit
$(objpfx)$o$($o-version): $(objpfx)$o; $$(make-link)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
generated += $(foreach o,$(versioned),$o$($o-version))
define o-iterator-doit
$(inst_slibdir)/$o$($o-version): $(objpfx)$o $(+force);
$$(do-install-program)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
endif # ifneq (,$(versioned))
define do-install-so
$(do-install-program)
$(patsubst %,$(LN_S) -f $(@F) \
$(@D)/$(patsubst %$*.so,%,$(<F))$(libprefix)$*.so,\
$(filter-out %.so,$@))
endef
so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version)))
$(foreach v,$(so-versions),\
$(inst_slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so \
$(+force)
$(do-install-so)
$(foreach v,$(so-versions),\
$(inst_slibdir)/$(libprefix)%$v): $(common-objpfx)%.so $(+force)
$(do-install-so)
endif
ifdef install-bin
$(addprefix $(inst_bindir)/,$(install-bin)): \
$(inst_bindir)/%: $(objpfx)% $(+force)
$(do-install-program)
endif
ifdef install-bin-script
$(addprefix $(inst_bindir)/,$(install-bin-script)): \
$(inst_bindir)/%: $(objpfx)% $(+force)
$(do-install-script)
endif
ifdef install-rootsbin
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin)): \
$(inst_rootsbindir)/%: $(objpfx)% $(+force)
$(do-install-program)
endif
ifdef install-sbin
$(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(inst_sbindir)/%: $(objpfx)% $(+force)
$(do-install-program)
endif
ifdef install-lib
install-lib.a := $(filter lib%.a,$(install-lib))
install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
$(inst_libdir)/$(libprefix)%: $(objpfx)% $(+force)
$(do-install)
endif
ifdef install-lib.a
$(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
$(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a $(+force)
$(do-install)
endif
endif
ifdef install-data
$(addprefix $(inst_datadir)/,$(install-data)): $(inst_datadir)/%: % $(+force)
$(do-install)
endif
headers := $(strip $(headers))
ifdef headers
# This implicit rule installs headers from the source directory.
# It may be ignored in preference to rules from sysd-rules to find
# headers in the sysdeps tree.
$(inst_includedir)/%.h: $(objpfx)%.h $(+force)
$(do-install)
$(inst_includedir)/%.h: $(common-objpfx)%.h $(+force)
$(do-install)
$(inst_includedir)/%.h: %.h $(+force)
$(do-install)
$(inst_includedir)/%.h: $(..)include/%.h $(+force)
$(do-install)
headers-nonh := $(filter-out %.h,$(headers))
ifdef headers-nonh
$(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
% $(+force)
$(do-install)
endif # headers-nonh
endif # headers
.PHONY: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
install-data-nosubdir install-headers-nosubdir
install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
install-rootsbin-nosubdir: \
$(addprefix $(inst_rootsbindir)/,$(install-rootsbin))
install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin))
install-lib-nosubdir: $(addprefix $(inst_libdir)/,\
$(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
$(addprefix $(libprefix),$(install-lib-non.a)))
install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
install-others-nosubdir: $(install-others)
install-others-programs-nosubdir: $(install-others-programs)
# We need all the `-nosubdir' targets so that `install' in the parent
# doesn't depend on several things which each iterate over the subdirs.
# This rule makes `install-FOO' always use `install-FOO-nosubdir' as a
# subroutine. Then in the parent `install-FOO' also causes subdir makes.
install-%:: install-%-nosubdir ;
.PHONY: install install-no-libc.a-nosubdir
install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
install-lib-nosubdir install-others-nosubdir
ifeq ($(build-programs),yes)
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
install-others-programs-nosubdir
endif
install: install-no-libc.a-nosubdir
# Command to compile $< using the native libraries.
define native-compile
$(make-target-directory)
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
$< $(OUTPUT_OPTION) $(BUILD_LDFLAGS)
endef
# We always want to use configuration definitions.
ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -D_GNU_SOURCE \
-DIS_IN_build -include $(common-objpfx)config.h
# Support the GNU standard name for this target.
.PHONY: check
check: tests
# Special target to run tests which cannot be run unconditionally.
# Maintainers should use this target.
.PHONY: xcheck
xcheck: xtests
y2038: Add test coverage It is enabled through a new rule, tests-y2038, which is built only when the ABI supports the comapt 64-bit time_t (defined by the header time64-compat.h, which also enables the creation of the symbol Version for Linux). It means the tests are not built for ABI which already provide default 64-bit time_t. The new rule already adds the required LFS and 64-bit time_t compiler flags. The current coverage is: * libc: - adjtime tst-adjtime-time64 - adjtimex tst-adjtimex-time64 - clock_adjtime tst-clock_adjtime-time64 - clock_getres tst-clock-time64, tst-cpuclock1-time64 - clock_gettime tst-clock-time64, tst-clock2-time64, tst-cpuclock1-time64 - clock_nanosleep tst-clock_nanosleep-time64, tst-cpuclock1-time64 - clock_settime tst-clock2-time64 - cnd_timedwait tst-cnd-timedwait-time64 - ctime tst-ctime-time64 - ctime_r tst-ctime-time64 - difftime tst-difftime-time64 - fstat tst-stat-time64 - fstatat tst-stat-time64 - futimens tst-futimens-time64 - futimes tst-futimes-time64 - futimesat tst-futimesat-time64 - fts_* tst-fts-time64 - getitimer tst-itimer-timer64 - getrusage - gettimeofday tst-clock_nanosleep-time64 - glob / globfree tst-gnuglob64-time64 - gmtime tst-gmtime-time64 - gmtime_r tst-gmtime-time64 - lstat tst-stat-time64 - localtime tst-y2039-time64 - localtime_t tst-y2039-time64 - lutimes tst-lutimes-time64 - mktime tst-mktime4-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - msgctl test-sysvmsg-time64 - mtx_timedlock tst-mtx-timedlock-time64 - nanosleep tst-cpuclock{12}-time64, tst-mqueue8-time64, tst-clock-time64 - nftw / ftw ftwtest-time64 - ntp_adjtime tst-ntp_adjtime-time64 - ntp_gettime tst-ntp_gettime-time64 - ntp_gettimex tst-ntp_gettimex-time64 - ppoll tst-ppoll-time64 - pselect tst-pselect-time64 - pthread_clockjoin_np tst-join14-time64 - pthread_cond_clockwait tst-cond11-time64 - pthread_cond_timedwait tst-abstime-time64 - pthread_mutex_clocklock tst-abstime-time64 - pthread_mutex_timedlock tst-abstime-time64 - pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_timedjoin_np tst-join14-time64 - recvmmsg tst-cancel4_2-time64 - sched_rr_get_interval tst-sched_rr_get_interval-time64 - select tst-select-time64 - sem_clockwait tst-sem5-time64 - sem_timedwait tst-sem5-time64 - semctl test-sysvsem-time64 - semtimedop test-sysvsem-time64 - setitimer tst-mqueue2-time64, tst-itimer-timer64 - settimeofday tst-settimeofday-time64 - shmctl test-sysvshm-time64 - sigtimedwait tst-sigtimedwait-time64 - stat tst-stat-time64 - thrd_sleep tst-thrd-sleep-time64 - time tst-mqueue{1248}-time64 - timegm tst-timegm-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 - timerfd_gettime tst-timerfd-time64 - timerfd_settime tst-timerfd-time64 - timespec_get tst-timespec_get-time64 - timespec_getres tst-timespec_getres-time64 - utime tst-utime-time64 - utimensat tst-utimensat-time64 - utimes tst-utimes-time64 - wait3 tst-wait3-time64 - wait4 tst-wait4-time64 * librt: - aio_suspend tst-aio6-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 * libanl: - gai_suspend Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
# Handle tests-time64 and xtests-time64 that should built with LFS
# and 64-bit time support.
include $(o-iterator)
define o-iterator-doit
$(foreach f,$(tests-time64) $(xtests-time64),\
$(objpfx)$(f)$(o)): CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
ifeq ($(have-time64-compat),yes)
tests += $(foreach t,$(tests-time64),$(t))
xtests += $(foreach t,$(xtests-time64),$(t))
endif
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
# The only difference between MODULE_NAME=testsuite and MODULE_NAME=nonlib is
# that almost all internal declarations from config.h, libc-symbols.h, and
# include/*.h are not available to 'testsuite' code, but are to 'nonlib' code.
all-testsuite := $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) \
$(tests-container))
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
ifneq (,$(all-testsuite))
cpp-srcs-left = $(all-testsuite)
lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
Use LFS and 64 bit time for installed programs (BZ #15333) The installed programs are built with a combination of different values for MODULE_NAME, as below. To enable both Long File Support and 64 bt time, -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 is added for nonlibi, nscd, lddlibc4, libresolv, ldconfig, locale_programs, iconvprogs, libnss_files, libnss_compat, libnss_db, libnss_hesiod, libutil, libpcprofile, and libSegFault. nscd/nscd nscd/nscd.o MODULE_NAME=nscd nscd/connections.o MODULE_NAME=nscd nscd/pwdcache.o MODULE_NAME=nscd nscd/getpwnam_r.o MODULE_NAME=nscd nscd/getpwuid_r.o MODULE_NAME=nscd nscd/grpcache.o MODULE_NAME=nscd nscd/getgrnam_r.o MODULE_NAME=nscd nscd/getgrgid_r.o MODULE_NAME=nscd nscd/hstcache.o MODULE_NAME=nscd nscd/gethstbyad_r.o MODULE_NAME=nscd nscd/gethstbynm3_r.o MODULE_NAME=nscd nscd/getsrvbynm_r.o MODULE_NAME=nscd nscd/getsrvbypt_r.o MODULE_NAME=nscd nscd/servicescache.o MODULE_NAME=nscd nscd/dbg_log.o MODULE_NAME=nscd nscd/nscd_conf.o MODULE_NAME=nscd nscd/nscd_stat.o MODULE_NAME=nscd nscd/cache.o MODULE_NAME=nscd nscd/mem.o MODULE_NAME=nscd nscd/nscd_setup_thread.o MODULE_NAME=nscd nscd/xmalloc.o MODULE_NAME=nscd nscd/xstrdup.o MODULE_NAME=nscd nscd/aicache.o MODULE_NAME=nscd nscd/initgrcache.o MODULE_NAME=nscd nscd/gai.o MODULE_NAME=nscd nscd/res_hconf.o MODULE_NAME=nscd nscd/netgroupcache.o MODULE_NAME=nscd nscd/cachedumper.o MODULE_NAME=nscd elf/lddlibc4 elf/lddlibc4 MODULE_NAME=lddlibc4 elf/pldd elf/pldd.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/sln elf/sln.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/sprof MODULE_NAME=nonlib elf/ldconfig elf/ldconfig.o MODULE_NAME=ldconfig elf/cache.o MODULE_NAME=nonlib elf/readlib.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/xstrdup.o MODULE_NAME=nonlib elf/chroot_canon.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/stringtable.o MODULE_NAME=nonlib io/pwd io/pwd.o MODULE_NAME=nonlib locale/locale locale/locale.o MODULE_NAME=locale_programs locale/locale-spec.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs locale/localedef locale/localedef.o MODULE_NAME=locale_programs locale/ld-ctype.o MODULE_NAME=locale_programs locale/ld-messages.o MODULE_NAME=locale_programs locale/ld-monetary.o MODULE_NAME=locale_programs locale/ld-numeric.o MODULE_NAME=locale_programs locale/ld-time.o MODULE_NAME=locale_programs locale/ld-paper.o MODULE_NAME=locale_programs locale/ld-name.o MODULE_NAME=locale_programs locale/ld-address.o MODULE_NAME=locale_programs locale/ld-telephone.o MODULE_NAME=locale_programs locale/ld-measurement.o MODULE_NAME=locale_programs locale/ld-identification.o MODULE_NAME=locale_programs locale/ld-collate.o MODULE_NAME=locale_programs locale/charmap.o MODULE_NAME=locale_programs locale/linereader.o MODULE_NAME=locale_programs locale/locfile.o MODULE_NAME=locale_programs locale/repertoire.o MODULE_NAME=locale_programs locale/locarchive.o MODULE_NAME=locale_programs locale/md5.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs catgets/gencat catgets/gencat.o MODULE_NAME=nonlib catgets/xmalloc.o MODULE_NAME=nonlib nss/makedb nss/makedb.o MODULE_NAME=nonlib nss/xmalloc.o MODULE_NAME=nonlib nss/hash-string.o MODULE_NAME=nonlib nss/getent nss/getent.o MODULE_NAME=nonlib posix/getconf posix/getconf.o MODULE_NAME=nonlib login/utmpdump login/utmpdump.o MODULE_NAME=nonlib debug/pcprofiledump debug/pcprofiledump.o MODULE_NAME=nonlib timezone/zic timezone/zic.o MODULE_NAME=nonlib timezone/zdump timezone/zdump.o MODULE_NAME=nonlib iconv/iconv_prog iconv/iconv_prog.o MODULE_NAME=nonlib iconv/iconv_charmap.o MODULE_NAME=iconvprogs iconv/charmap.o MODULE_NAME=iconvprogs iconv/charmap-dir.o MODULE_NAME=iconvprogs iconv/linereader.o MODULE_NAME=iconvprogs iconv/dummy-repertoire.o MODULE_NAME=iconvprogs iconv/simple-hash.o MODULE_NAME=iconvprogs iconv/xstrdup.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/record-status.o MODULE_NAME=iconvprogs iconv/iconvconfig iconv/iconvconfig.o MODULE_NAME=nonlib iconv/strtab.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/hash-string.o MODULE_NAME=iconvprogs nss/libnss_files.so MODULE_NAME=libnss_files nss/libnss_compat.so.2 MODULE_NAME=libnss_compat nss/libnss_db.so MODULE_NAME=libnss_db hesiod/libnss_hesiod.so MODULE_NAME=libnss_hesiod login/libutil.so MODULE_NAME=libutil debug/libpcprofile.so MODULE_NAME=libpcprofile debug/libSegFault.so MODULE_NAME=libSegFault Also, to avoid adding both LFS and 64 bit time support on internal tests they are moved to a newer 'testsuite-internal' module. It should be similar to 'nonlib' regarding internal definition and linking namespace. This patch also enables LFS and 64 bit support of libsupport container programs (echo-container, test-container, shell-container, and true-container). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
2021-05-20 17:20:18 +00:00
all-nonlib := $(strip $(others) $(others-extras))
ifneq (,$(all-nonlib))
Add new macro IN_MODULE to identify module in which source is built The current scheme to identify which module a translation unit is built in depends on defining multiple macros IS_IN_* and also defining NOT_IN_libc if we're building a non-libc module. In addition, there is an IN_LIB macro that does effectively the same thing, but for different modules (notably the systemtap probes). This macro scheme unifies both ideas to use just one macro IN_MODULE and assign it a value depending on the module it is being built into. If the module is not defined, it defaults to MODULE_libc. Patches that follow will replace uses of IS_IN_* variables with the IS_IN() macro. libc-symbols.h has been converted already to give an example of how such a transition will look. Verified that there are no relevant binary changes. One source change that will crop up repeatedly is that of nscd_stat, since it uses the build timestamp as a constant in its logic. * Makeconfig (in-module): Get value of libof set for the translation unit. (CPPFLAGS): Use $(in-module). * Makerules: Don't suffix routine names for nonlib. * include/libc-modules.h: New file. * include/libc-symbols.h: Include libc-modules.h (IS_IN): New macro to replace IS_IN_* macros. * elf/Makefile: Set libof-* for each routine. * elf/rtld-Rules: Likewise. * extra-modules.mk: Likewise. * iconv/Makefile: Likewise. * iconvdata/Makefile: Likewise. * locale/Makefile: Likewise. * malloc/Makefile: Likewise. * nss/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysdeps/s390/s390-64/Makefile: Likewise. * nscd/Makefile: Set libof-* for each routine. Set CFLAGS and CPPFLAGS for nscd instead of nonlib.
2014-11-19 06:43:54 +00:00
cpp-srcs-left = $(all-nonlib)
lib := nonlib
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
Use LFS and 64 bit time for installed programs (BZ #15333) The installed programs are built with a combination of different values for MODULE_NAME, as below. To enable both Long File Support and 64 bt time, -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 is added for nonlibi, nscd, lddlibc4, libresolv, ldconfig, locale_programs, iconvprogs, libnss_files, libnss_compat, libnss_db, libnss_hesiod, libutil, libpcprofile, and libSegFault. nscd/nscd nscd/nscd.o MODULE_NAME=nscd nscd/connections.o MODULE_NAME=nscd nscd/pwdcache.o MODULE_NAME=nscd nscd/getpwnam_r.o MODULE_NAME=nscd nscd/getpwuid_r.o MODULE_NAME=nscd nscd/grpcache.o MODULE_NAME=nscd nscd/getgrnam_r.o MODULE_NAME=nscd nscd/getgrgid_r.o MODULE_NAME=nscd nscd/hstcache.o MODULE_NAME=nscd nscd/gethstbyad_r.o MODULE_NAME=nscd nscd/gethstbynm3_r.o MODULE_NAME=nscd nscd/getsrvbynm_r.o MODULE_NAME=nscd nscd/getsrvbypt_r.o MODULE_NAME=nscd nscd/servicescache.o MODULE_NAME=nscd nscd/dbg_log.o MODULE_NAME=nscd nscd/nscd_conf.o MODULE_NAME=nscd nscd/nscd_stat.o MODULE_NAME=nscd nscd/cache.o MODULE_NAME=nscd nscd/mem.o MODULE_NAME=nscd nscd/nscd_setup_thread.o MODULE_NAME=nscd nscd/xmalloc.o MODULE_NAME=nscd nscd/xstrdup.o MODULE_NAME=nscd nscd/aicache.o MODULE_NAME=nscd nscd/initgrcache.o MODULE_NAME=nscd nscd/gai.o MODULE_NAME=nscd nscd/res_hconf.o MODULE_NAME=nscd nscd/netgroupcache.o MODULE_NAME=nscd nscd/cachedumper.o MODULE_NAME=nscd elf/lddlibc4 elf/lddlibc4 MODULE_NAME=lddlibc4 elf/pldd elf/pldd.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/sln elf/sln.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/sprof MODULE_NAME=nonlib elf/ldconfig elf/ldconfig.o MODULE_NAME=ldconfig elf/cache.o MODULE_NAME=nonlib elf/readlib.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/xstrdup.o MODULE_NAME=nonlib elf/chroot_canon.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/stringtable.o MODULE_NAME=nonlib io/pwd io/pwd.o MODULE_NAME=nonlib locale/locale locale/locale.o MODULE_NAME=locale_programs locale/locale-spec.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs locale/localedef locale/localedef.o MODULE_NAME=locale_programs locale/ld-ctype.o MODULE_NAME=locale_programs locale/ld-messages.o MODULE_NAME=locale_programs locale/ld-monetary.o MODULE_NAME=locale_programs locale/ld-numeric.o MODULE_NAME=locale_programs locale/ld-time.o MODULE_NAME=locale_programs locale/ld-paper.o MODULE_NAME=locale_programs locale/ld-name.o MODULE_NAME=locale_programs locale/ld-address.o MODULE_NAME=locale_programs locale/ld-telephone.o MODULE_NAME=locale_programs locale/ld-measurement.o MODULE_NAME=locale_programs locale/ld-identification.o MODULE_NAME=locale_programs locale/ld-collate.o MODULE_NAME=locale_programs locale/charmap.o MODULE_NAME=locale_programs locale/linereader.o MODULE_NAME=locale_programs locale/locfile.o MODULE_NAME=locale_programs locale/repertoire.o MODULE_NAME=locale_programs locale/locarchive.o MODULE_NAME=locale_programs locale/md5.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs catgets/gencat catgets/gencat.o MODULE_NAME=nonlib catgets/xmalloc.o MODULE_NAME=nonlib nss/makedb nss/makedb.o MODULE_NAME=nonlib nss/xmalloc.o MODULE_NAME=nonlib nss/hash-string.o MODULE_NAME=nonlib nss/getent nss/getent.o MODULE_NAME=nonlib posix/getconf posix/getconf.o MODULE_NAME=nonlib login/utmpdump login/utmpdump.o MODULE_NAME=nonlib debug/pcprofiledump debug/pcprofiledump.o MODULE_NAME=nonlib timezone/zic timezone/zic.o MODULE_NAME=nonlib timezone/zdump timezone/zdump.o MODULE_NAME=nonlib iconv/iconv_prog iconv/iconv_prog.o MODULE_NAME=nonlib iconv/iconv_charmap.o MODULE_NAME=iconvprogs iconv/charmap.o MODULE_NAME=iconvprogs iconv/charmap-dir.o MODULE_NAME=iconvprogs iconv/linereader.o MODULE_NAME=iconvprogs iconv/dummy-repertoire.o MODULE_NAME=iconvprogs iconv/simple-hash.o MODULE_NAME=iconvprogs iconv/xstrdup.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/record-status.o MODULE_NAME=iconvprogs iconv/iconvconfig iconv/iconvconfig.o MODULE_NAME=nonlib iconv/strtab.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/hash-string.o MODULE_NAME=iconvprogs nss/libnss_files.so MODULE_NAME=libnss_files nss/libnss_compat.so.2 MODULE_NAME=libnss_compat nss/libnss_db.so MODULE_NAME=libnss_db hesiod/libnss_hesiod.so MODULE_NAME=libnss_hesiod login/libutil.so MODULE_NAME=libutil debug/libpcprofile.so MODULE_NAME=libpcprofile debug/libSegFault.so MODULE_NAME=libSegFault Also, to avoid adding both LFS and 64 bit time support on internal tests they are moved to a newer 'testsuite-internal' module. It should be similar to 'nonlib' regarding internal definition and linking namespace. This patch also enables LFS and 64 bit support of libsupport container programs (echo-container, test-container, shell-container, and true-container). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
2021-05-20 17:20:18 +00:00
# All internal tests use testsuite-internal module since for 64 bit time
# support is set as default for MODULE_NAME=nonlib (which include some
# installed programs).
all-testsuite-internal := $(strip $(tests-internal) $(test-internal-extras))
ifneq (,$(all-testsuite-internal))
cpp-srcs-left = $(all-testsuite-internal)
lib := testsuite-internal
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
2013-09-04 15:25:42 +00:00
ifeq ($(build-shared),yes)
# Generate normalized lists of symbols, versions, and data sizes.
# This is handy for checking against existing library binaries.
%.symlist: $(..)scripts/abilist.awk %.dynsym
LC_ALL=C $(AWK) -f $^ > $@T
mv -f $@T $@
%.dynsym: %.so
LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T
mv -f $@T $@
Move abilist files into sysdep dirs. * Makerules (%.abilist): Add vpath on sysdep_dirs. (check-abi-%): Remove AWK script prerequisite and explicit abilist directory. (check-abi): Rewrite to just diff the symlist with the abilist. (config-tls, config-abi-config): Delete, no longer used. (update-abi-%): Remove AWK script and explicit abilist directory. (update-abi): Rewrite to simply compare and conditionally copy the symlist and the sysdep abilist file. Remove update-abi-config checks. * abilist/ld.abilist: Remove. * abilist/libBrokenLocale.abilist: Remove. * abilist/libanl.abilist: Remove. * abilist/libcrypt.abilist: Remove. * abilist/libdl.abilist: Remove. * abilist/librt.abilist: Remove. * abilist/libthread_db.abilist: Remove. * abilist/libutil.abilist: Remove. * scripts/extract-abilist.awk: Remove. * scripts/merge-abilist.awk: Remove. * sysdeps/generic/libcidn.abilist: New file. * sysdeps/generic/libnss_compat.abilist: New file. * sysdeps/generic/libnss_db.abilist: New file. * sysdeps/generic/libnss_dns.abilist: New file. * sysdeps/generic/libnss_files.abilist: New file. * sysdeps/generic/libnss_hesiod.abilist: New file. * sysdeps/generic/libnss_nis.abilist: New file. * sysdeps/generic/libnss_nisplus.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libutil.abilist: New file.
2012-04-28 08:36:51 +00:00
vpath %.abilist $(+sysdep_dirs)
# The .PRECIOUS rule prevents the files built by an implicit rule whose
# target pattern is %.symlist from being considered "intermediate files"
# and automatically removed. We only want these files to be removed by
# 'make clean', which is handled by the 'generated' variable.
.PRECIOUS: %.symlist
generated += $(extra-libs:=.symlist)
$(objpfx)check-abi-%.out: $(common-objpfx)config.make %.abilist \
$(objpfx)%.symlist
Generate .test-result files for tests with special rules. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now proposed for inclusion in glibc, extends the generation of PASS and FAIL status in .test-result files for individual tests to cover tests with their own custom makefile rules. This is just adding $(evaluate-test) calls to all such rules, since tests with multiple commands were previously split into separate tests. Note that the tests the makefiles expect to fail (posix/annexc and conformtest) currently get FAIL listed in the .test-result file, rather than XFAIL; a subsequent patch will introduce a better XFAIL mechanism. Tested x86_64. * Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test). ($(objpfx)check-local-headers.out): Likewise. ($(objpfx)begin-end-check.out): Likewise. * Makerules (check-abi-%.out): Likewise. * catgets/Makefile ($(objpfx)test1.cat): Likewise. ($(objpfx)test2.cat): Likewise. ($(objpfx)de/libc.cat): Likewise. ($(objpfx)test-gencat.out): Likewise. * conform/Makefile ($(objpfx)run-conformtest.out): Likewise. * elf/Makefile ($(objpfx)order-cmp.out): Likewise. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-pathopt.out): Likewise. ($(objpfx)tst-rtld-load-self.out): Likewise. ($(objpfx)tst-array1-cmp.out): Likewise. ($(objpfx)tst-array1-static-cmp.out): Likewise. ($(objpfx)tst-array2-cmp.out): Likewise. ($(objpfx)tst-array3-cmp.out): Likewise. ($(objpfx)tst-array4-cmp.out): Likewise. ($(objpfx)tst-array5-cmp.out): Likewise. ($(objpfx)tst-array5-static-cmp.out): Likewise. ($(objpfx)check-textrel.out): Likewise. ($(objpfx)check-execstack.out): Likewise. ($(objpfx)check-localplt.out): Likewise. ($(objpfx)order2-cmp.out): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem): Likewise. ($(objpfx)tst-initorder-cmp.out): Likewise. ($(objpfx)tst-initorder2-cmp.out): Likewise. ($(objpfx)tst-unused-dep.out): Likewise. ($(objpfx)tst-unused-dep-cmp.out): Likewise. * grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise. * iconv/Makefile (test-iconvconfig): Likewise. * iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise. ($(objpfx)iconv-test.out): Likewise. ($(objpfx)tst-tables.out): Likewise. * intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise. ($(objpfx)tst-gettext.out): Likewise. ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * io/Makefile ($(objpfx)ftwtest.out): Likewise. * libio/Makefile ($(objpfx)test-freopen.out): Likewise. ($(objpfx)tst-fopenloc-cmp.out): Likewise. ($(objpfx)tst-fopenloc-mem.out): Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise. * misc/Makefile ($(objpfx)tst-error1-mem): Likewise. * posix/Makefile ($(objpfx)globtest.out): Likewise. ($(objpfx)wordexp-tst.out): Likewise. ($(objpfx)annexc.out): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)tst-getconf.out): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise. ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Likewise. ($(objpfx)tst-setvbuf1-cmp.out): Likewise. * stdlib/Makefile ($(objpfx)isomac.out): Likewise. ($(objpfx)tst-fmtmsg.out): Likewise. * string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise. * sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise. localedata: * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). ($(objpfx)tst-fmon.out): Likewise. ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-locale.out): Likewise. ($(objpfx)tst-rpmatch.out): Likewise. ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. nptl: * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). ($(objpfx)tst-tls6.out): Likewise. ($(objpfx)tst-cleanup0.out): Likewise. ($(objpfx)tst-cleanup0-cmp.out): Likewise. ($(objpfx)tst-cancel-wrappers.out): Likewise. ($(objpfx)tst-oddstacklimit.out): Likewise. nptl_db: * Makefile ($(objpfx)db-symbols.out): Use $(evaluate-test).
2014-02-21 21:48:08 +00:00
$(check-abi); \
$(evaluate-test)
$(objpfx)check-abi-%.out: $(common-objpfx)config.make %.abilist \
$(common-objpfx)%.symlist
Generate .test-result files for tests with special rules. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now proposed for inclusion in glibc, extends the generation of PASS and FAIL status in .test-result files for individual tests to cover tests with their own custom makefile rules. This is just adding $(evaluate-test) calls to all such rules, since tests with multiple commands were previously split into separate tests. Note that the tests the makefiles expect to fail (posix/annexc and conformtest) currently get FAIL listed in the .test-result file, rather than XFAIL; a subsequent patch will introduce a better XFAIL mechanism. Tested x86_64. * Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test). ($(objpfx)check-local-headers.out): Likewise. ($(objpfx)begin-end-check.out): Likewise. * Makerules (check-abi-%.out): Likewise. * catgets/Makefile ($(objpfx)test1.cat): Likewise. ($(objpfx)test2.cat): Likewise. ($(objpfx)de/libc.cat): Likewise. ($(objpfx)test-gencat.out): Likewise. * conform/Makefile ($(objpfx)run-conformtest.out): Likewise. * elf/Makefile ($(objpfx)order-cmp.out): Likewise. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-pathopt.out): Likewise. ($(objpfx)tst-rtld-load-self.out): Likewise. ($(objpfx)tst-array1-cmp.out): Likewise. ($(objpfx)tst-array1-static-cmp.out): Likewise. ($(objpfx)tst-array2-cmp.out): Likewise. ($(objpfx)tst-array3-cmp.out): Likewise. ($(objpfx)tst-array4-cmp.out): Likewise. ($(objpfx)tst-array5-cmp.out): Likewise. ($(objpfx)tst-array5-static-cmp.out): Likewise. ($(objpfx)check-textrel.out): Likewise. ($(objpfx)check-execstack.out): Likewise. ($(objpfx)check-localplt.out): Likewise. ($(objpfx)order2-cmp.out): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem): Likewise. ($(objpfx)tst-initorder-cmp.out): Likewise. ($(objpfx)tst-initorder2-cmp.out): Likewise. ($(objpfx)tst-unused-dep.out): Likewise. ($(objpfx)tst-unused-dep-cmp.out): Likewise. * grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise. * iconv/Makefile (test-iconvconfig): Likewise. * iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise. ($(objpfx)iconv-test.out): Likewise. ($(objpfx)tst-tables.out): Likewise. * intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise. ($(objpfx)tst-gettext.out): Likewise. ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * io/Makefile ($(objpfx)ftwtest.out): Likewise. * libio/Makefile ($(objpfx)test-freopen.out): Likewise. ($(objpfx)tst-fopenloc-cmp.out): Likewise. ($(objpfx)tst-fopenloc-mem.out): Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise. * misc/Makefile ($(objpfx)tst-error1-mem): Likewise. * posix/Makefile ($(objpfx)globtest.out): Likewise. ($(objpfx)wordexp-tst.out): Likewise. ($(objpfx)annexc.out): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)tst-getconf.out): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise. ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Likewise. ($(objpfx)tst-setvbuf1-cmp.out): Likewise. * stdlib/Makefile ($(objpfx)isomac.out): Likewise. ($(objpfx)tst-fmtmsg.out): Likewise. * string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise. * sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise. localedata: * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). ($(objpfx)tst-fmon.out): Likewise. ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-locale.out): Likewise. ($(objpfx)tst-rpmatch.out): Likewise. ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. nptl: * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). ($(objpfx)tst-tls6.out): Likewise. ($(objpfx)tst-cleanup0.out): Likewise. ($(objpfx)tst-cleanup0-cmp.out): Likewise. ($(objpfx)tst-cancel-wrappers.out): Likewise. ($(objpfx)tst-oddstacklimit.out): Likewise. nptl_db: * Makefile ($(objpfx)db-symbols.out): Use $(evaluate-test).
2014-02-21 21:48:08 +00:00
$(check-abi); \
$(evaluate-test)
define check-abi
diff -p -U 0 $(filter %.abilist,$^) $(filter %.symlist,$^) > $@
endef
Move abilist files into sysdep dirs. * Makerules (%.abilist): Add vpath on sysdep_dirs. (check-abi-%): Remove AWK script prerequisite and explicit abilist directory. (check-abi): Rewrite to just diff the symlist with the abilist. (config-tls, config-abi-config): Delete, no longer used. (update-abi-%): Remove AWK script and explicit abilist directory. (update-abi): Rewrite to simply compare and conditionally copy the symlist and the sysdep abilist file. Remove update-abi-config checks. * abilist/ld.abilist: Remove. * abilist/libBrokenLocale.abilist: Remove. * abilist/libanl.abilist: Remove. * abilist/libcrypt.abilist: Remove. * abilist/libdl.abilist: Remove. * abilist/librt.abilist: Remove. * abilist/libthread_db.abilist: Remove. * abilist/libutil.abilist: Remove. * scripts/extract-abilist.awk: Remove. * scripts/merge-abilist.awk: Remove. * sysdeps/generic/libcidn.abilist: New file. * sysdeps/generic/libnss_compat.abilist: New file. * sysdeps/generic/libnss_db.abilist: New file. * sysdeps/generic/libnss_dns.abilist: New file. * sysdeps/generic/libnss_files.abilist: New file. * sysdeps/generic/libnss_hesiod.abilist: New file. * sysdeps/generic/libnss_nis.abilist: New file. * sysdeps/generic/libnss_nisplus.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libutil.abilist: New file.
2012-04-28 08:36:51 +00:00
update-abi-%: $(objpfx)%.symlist %.abilist
$(update-abi)
Move abilist files into sysdep dirs. * Makerules (%.abilist): Add vpath on sysdep_dirs. (check-abi-%): Remove AWK script prerequisite and explicit abilist directory. (check-abi): Rewrite to just diff the symlist with the abilist. (config-tls, config-abi-config): Delete, no longer used. (update-abi-%): Remove AWK script and explicit abilist directory. (update-abi): Rewrite to simply compare and conditionally copy the symlist and the sysdep abilist file. Remove update-abi-config checks. * abilist/ld.abilist: Remove. * abilist/libBrokenLocale.abilist: Remove. * abilist/libanl.abilist: Remove. * abilist/libcrypt.abilist: Remove. * abilist/libdl.abilist: Remove. * abilist/librt.abilist: Remove. * abilist/libthread_db.abilist: Remove. * abilist/libutil.abilist: Remove. * scripts/extract-abilist.awk: Remove. * scripts/merge-abilist.awk: Remove. * sysdeps/generic/libcidn.abilist: New file. * sysdeps/generic/libnss_compat.abilist: New file. * sysdeps/generic/libnss_db.abilist: New file. * sysdeps/generic/libnss_dns.abilist: New file. * sysdeps/generic/libnss_files.abilist: New file. * sysdeps/generic/libnss_hesiod.abilist: New file. * sysdeps/generic/libnss_nis.abilist: New file. * sysdeps/generic/libnss_nisplus.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libutil.abilist: New file.
2012-04-28 08:36:51 +00:00
update-abi-%: $(common-objpfx)%.symlist %.abilist
$(update-abi)
define update-abi
Move abilist files into sysdep dirs. * Makerules (%.abilist): Add vpath on sysdep_dirs. (check-abi-%): Remove AWK script prerequisite and explicit abilist directory. (check-abi): Rewrite to just diff the symlist with the abilist. (config-tls, config-abi-config): Delete, no longer used. (update-abi-%): Remove AWK script and explicit abilist directory. (update-abi): Rewrite to simply compare and conditionally copy the symlist and the sysdep abilist file. Remove update-abi-config checks. * abilist/ld.abilist: Remove. * abilist/libBrokenLocale.abilist: Remove. * abilist/libanl.abilist: Remove. * abilist/libcrypt.abilist: Remove. * abilist/libdl.abilist: Remove. * abilist/librt.abilist: Remove. * abilist/libthread_db.abilist: Remove. * abilist/libutil.abilist: Remove. * scripts/extract-abilist.awk: Remove. * scripts/merge-abilist.awk: Remove. * sysdeps/generic/libcidn.abilist: New file. * sysdeps/generic/libnss_compat.abilist: New file. * sysdeps/generic/libnss_db.abilist: New file. * sysdeps/generic/libnss_dns.abilist: New file. * sysdeps/generic/libnss_files.abilist: New file. * sysdeps/generic/libnss_hesiod.abilist: New file. * sysdeps/generic/libnss_nis.abilist: New file. * sysdeps/generic/libnss_nisplus.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/i386/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/x86_64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powercp32/fpu/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sh/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libutil.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/ld.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libanl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libBrokenLocale.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libcrypt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libdl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libm.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libnsl.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libpthread.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libresolv.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/librt.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libthread_db.abilist: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libutil.abilist: New file.
2012-04-28 08:36:51 +00:00
@if cmp -s $^ 2> /dev/null; \
then \
echo '+++ $(filter %.abilist,$^) is unchanged'; \
else cp -f $^; \
echo '*** Now check $(filter %.abilist,$^) changes for correctness ***'; \
fi
endef
2018-11-28 16:23:59 +00:00
# Patch all .abilist files for one DSO. The find command locates abilist
# files for all architectures. The abilist files in /generic/ are
# filtered out because these are expected to remain empty.
define update-all-abi
$(SHELL) $(..)scripts/update-abilist.sh $^ \
2018-11-28 16:23:59 +00:00
$$(find $(..)sysdeps -name '$*.abilist' \! -path '*/generic/*')
endef
update-all-abi-%: %.abilist $(objpfx)%.symlist
$(update-all-abi)
update-all-abi-%: %.abilist $(common-objpfx)%.symlist
$(update-all-abi)
.PHONY: update-abi update-all-abi check-abi
update-abi: $(patsubst %.so,update-abi-%,$(install-lib.so-versioned))
update-all-abi: $(patsubst %.so,update-all-abi-%,$(install-lib.so-versioned))
Enumerate tests with special rules in tests-special variable. This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
check-abi-list = $(patsubst %.so,$(objpfx)check-abi-%.out, \
$(install-lib.so-versioned))
check-abi: $(check-abi-list)
ifdef subdir
subdir_check-abi: check-abi
subdir_update-abi: update-abi
subdir_update-all-abi: update-all-abi
else
check-abi: subdir_check-abi
if grep -q '^FAIL:' $(objpfx)*/check-abi*.test-result; then \
cat $(objpfx)*/check-abi*.out && exit 1; fi
update-abi: subdir_update-abi
update-all-abi: subdir_update-all-abi
endif
ifeq ($(subdir),elf)
check-abi: $(objpfx)check-abi-libc.out
Enumerate tests with special rules in tests-special variable. This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
tests-special += $(objpfx)check-abi-libc.out
update-abi: update-abi-libc
update-all-abi: update-all-abi-libc
common-generated += libc.symlist
endif
ifeq ($(build-shared),yes)
ifdef subdir
Enumerate tests with special rules in tests-special variable. This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
2014-03-06 22:35:33 +00:00
tests-special += $(check-abi-list)
endif
endif
endif
* Makefile (subdir-target-args): New variable. ($(all-subdirs-targets)): Use it in place of -C option. * Rules: Use $(..) instead of ../ if it's already defined. * Makeconfig (subdir-srcdirs): New variable. * csu/Makefile (all-Banner-files): Use it. * configure.in (--enable-add-ons): Set to "yes" by default. Handle absolute add-on directory names when looking for configure fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. Require add-on configure to set $libc_add_on_canonical, use that in $add_ons_sfx. Substitute add_on_subdirs with computed list of subdir names each add-on configure set in libc_add_on_subdirs. * configure: Regenerated. * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. * config.make.in (add-on-subdirs): New substituted variable. * Makeconfig (all-subdirs): Include $(add-on-subdirs). Remove $(add-ons), $(sysdep-subdirs). Don't filter out $(sysdep-inhibit-subdirs). ($(common-objpfx)sysd-dirs): Target removed. Don't include it. ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs files together to gen-sorted.awk, and $(subdirs) via -v. (subdirs): Remove magic reordering for mach and hurd. * scripts/gen-sorted.awk: Use subdirs from command line. Process Subdirs and Depend files directly. Let Subdirs files use "first dir" and "inhibit dir". Always move elf to the end of the list. * hurd/Depend: New file. * sysdeps/mach/Subdirs: Use "first mach". * Makefile (dist-separate): Remove linuxthreads. (dist-separate-linuxthreads): Variable removed. (glibc-%.tar rule): Use $(sysdeps-add-ons). * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), not $(all-subdirs). (sysdep-makefiles): Use $(sysdirs). (sysdirs): Remove export. ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in $(config-sysdirs). (+sysdir_pfx): Variable removed. (sysd-rules): Use $(common-objpfx) in place of it. (sysdirs): Variable moved to ... * Makeconfig (sysdirs): ... here. Handle absolute directory names in $(config-sysdirs). (full_config_sysdirs): Variable removed. * csu/Makefile: Use $(sysdirs) in vpath directive. * math/Makefile (ulps-file): Use $(sysdirs). * sysdeps/gnu/Makefile (errlist-c): Likewise. ($(objpfx)errlist-compat.c): Likewise. * Makeconfig (all-Subdirs-files): Likewise. ($(common-objpfx)config.status): Likewise. * configure.in (sysnames): Handle absolute add-on directory names. (sysdeps_add_ons): New variable, AC_SUBST it. Compute which add-ons contributed sysdeps directories. * configure: Regenerated. * config.make.in (sysdeps-add-ons): New substituted variable. * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... * Makeconfig: ... to here. (+sysdep_dirs): Append $(sysdeps-add-ons) here. (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). Remove $(includes). (sysdep-makeconfigs): Use $(+sysdep_dirs). ($(common-objpfx)shlib-versions.v.i): Likewise. * Makeconfig: Remove hair to set Makeconfig-add-on. * sysdeps/unix/Makefile (sysdirs): Remove export. (asm_CPP): Variable removed. ($(common-objpfx)sysd-syscalls): Pass them directly for the script. * sysdeps/posix/Makefile: New file. * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix values here with ?=. * stdlib/gen-mpn-copy: File removed. * stdlib/Makefile (distribute): Remove it. * configure.in: Don't grok --with-gmp. * configure: Regenerated. * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. * configure: Regenerated. * bare: Directory removed, saved in ports repository.
2006-02-28 07:11:04 +00:00
# These will have been set by sysdeps/posix/Makefile.
L_tmpnam ?= 1
TMP_MAX ?= 0
L_ctermid ?= 1
L_cuserid ?= 1
stdio_lim = $(common-objpfx)bits/stdio_lim.h
$(stdio_lim:lim.h=%.h) $(stdio_lim:lim.h=%.d): $(stdio_lim:lim.h=%.st); @:
$(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
$(common-objpfx)config.make
$(make-target-directory)
{ echo '#include "$(..)posix/bits/posix1_lim.h"'; \
Remove __need_IOV_MAX and __need_FOPEN_MAX. __need_FOPEN_MAX wasn't being used anywhere. __need_IOV_MAX was more complicated; the basic deal is that sys/uio.h wants to define a constant named UIO_MAXIOV and bits/xopen_lim.h wants to define a constant named IOV_MAX, with the same meaning. For no apparent reason this was being handled via bits/stdio_lim.h -- stdio.h is NOT supposed to define IOV_MAX -- and some mess in Makerules. Also, bits/uio.h on Linux was being used as a dumping ground for extension functions. So now we have bits/uio_lim.h, which defines __IOV_MAX. bits/xopen_lim.h and sys/uio.h use that to define their respective constants. We also now have bits/uio-ext.h, which is the official Proper Home for extensions to sys/uio.h. bits/uio.h is removed, and stdio_lim.h doesn't define IOV_MAX at all. * bits/uio_lim.h, sysdeps/unix/sysv/linux/bits/uio_lim.h * bits/uio-ext.h, sysdeps/unix/sysv/linux/bits/uio-ext.h: New file. * bits/uio.h, sysdeps/unix/sysv/linux/bits/uio.h: Delete file. * include/bits/xopen_lim.h: Use bits/uio_lim.h to get the value for IOV_MAX. * misc/Makefile: Install bits/uio-ext.h and bits/uio_lim.h. Don't install bits/uio.h. * misc/sys/uio.h: Don't include bits/uio.h. Do include bits/types/struct_iovec.h and bits/uio_lim.h. Set UIO_MAXIOV based on __IOV_MAX. Under __USE_GNU, also include bits/uio-ext.h. * stdio-common/stdio_lim.h.in: Remove logic for __need_FOPEN_MAX and __need_IOV_MAX. Don't define IOV_MAX at all. * Makerules (stdio_lim.h): Remove logic for setting IOV_MAX. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Include bits/types/struct_iovec.h, not bits/uio.h. Use __ssize_t, not ssize_t, in function prototypes. Don't use hard TAB for double space after period in comments.
2017-03-22 14:55:38 +00:00
} | \
$(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \
$(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT)
sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
$(@:st=dT) > $(@:st=dt)
mv -f $(@:st=dt) $(@:st=d)
fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \
filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \
fopen_max=$${fopen_max:-16}; \
filename_max=$${filename_max:-1024}; \
sed -e "s/@FOPEN_MAX@/$$fopen_max/" \
-e "s/@FILENAME_MAX@/$$filename_max/" \
-e "s/@L_tmpnam@/$(L_tmpnam)/" \
-e "s/@TMP_MAX@/$(TMP_MAX)/" \
-e "s/@L_ctermid@/$(L_ctermid)/" \
-e "s/@L_cuserid@/$(L_cuserid)/" \
$< > $(@:st=h.new)
$(move-if-change) $(@:st=h.new) $(@:st=h)
# Remove these last so that they can be examined if something went wrong.
rm -f $(@:st=hT) $(@:st=dT) $(@:st=dt)
touch $@
# Get dependencies.
ifndef no_deps
-include $(stdio_lim:h=d)
endif
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
FORCE:
.PHONY: echo-headers
echo-headers:
@echo $(headers)
%.bz2: %; bzip2 -9vk $<
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
%.xz: %; xz -9evk $<
# Common cleaning targets.
.PHONY: common-mostlyclean common-clean mostlyclean clean do-tests-clean
clean: common-clean
mostlyclean: common-mostlyclean
do-tests-clean:
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
-rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) \
$(tests-internal) \
$(xtests) \
Generate .test-result files for ordinary tests. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00193.html>, starts the process of generating explicit PASS or FAIL status for individual glibc tests. It's based on Tomas Dohnalek's patch <https://sourceware.org/ml/libc-alpha/2012-10/msg00278.html>, but is deliberately more minimal: it doesn't try to cover any tests outside of $(tests) / $(xtests) (that's for a later patch), nor does it put the result together in an overall summary file (again, a later patch): it just generates the .test-result files. Thus, this patch keeps the overall logic for when a testsuite run finishes completely unchanged: a test failing will terminate the run. I think we *should* move to a more conventional approach where plain "make check" does not terminate for an individual test failure, unless e.g. you say "make stop-on-test-failure=y check", but that sort of policy change is best done as a separate patch once the infrastructure is in place to generate summary files for completed test runs (which will entirely consist of PASS and XFAIL lines if the testsuite run reaches the point of generating them, until such a policy change is made). Tested x86_64. 2014-02-14 Tomas Dohnalek <tdohnale@redhat.com> Joseph Myers <joseph@codesourcery.com> * Makeconfig (test-name): New variable. (evaluate-test): Likewise. * Makerules (do-test-clean): Remove .test-result files. (common-mostlyclean): Likewise. * Rules ($(objpfx)%.out): Use $(evaluate-test) in both rules. * scripts/evaluate-test.sh: New file.
2014-02-15 01:04:57 +00:00
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
$(tests-internal) \
Generate .test-result files for ordinary tests. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00193.html>, starts the process of generating explicit PASS or FAIL status for individual glibc tests. It's based on Tomas Dohnalek's patch <https://sourceware.org/ml/libc-alpha/2012-10/msg00278.html>, but is deliberately more minimal: it doesn't try to cover any tests outside of $(tests) / $(xtests) (that's for a later patch), nor does it put the result together in an overall summary file (again, a later patch): it just generates the .test-result files. Thus, this patch keeps the overall logic for when a testsuite run finishes completely unchanged: a test failing will terminate the run. I think we *should* move to a more conventional approach where plain "make check" does not terminate for an individual test failure, unless e.g. you say "make stop-on-test-failure=y check", but that sort of policy change is best done as a separate patch once the infrastructure is in place to generate summary files for completed test runs (which will entirely consist of PASS and XFAIL lines if the testsuite run reaches the point of generating them, until such a policy change is made). Tested x86_64. 2014-02-14 Tomas Dohnalek <tdohnale@redhat.com> Joseph Myers <joseph@codesourcery.com> * Makeconfig (test-name): New variable. (evaluate-test): Likewise. * Makerules (do-test-clean): Remove .test-result files. (common-mostlyclean): Likewise. * Rules ($(objpfx)%.out): Use $(evaluate-test) in both rules. * scripts/evaluate-test.sh: New file.
2014-02-15 01:04:57 +00:00
$(xtests) \
$(test-srcs)))
# Remove the object files.
common-mostlyclean:
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
-rm -f $(addprefix $(objpfx),$(tests) $(tests-internal) $(xtests) \
$(test-srcs) \
$(others) $(sysdep-others) stubs \
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
$(addsuffix .o,$(tests) \
$(tests-internal) \
$(xtests) \
$(test-srcs) \
$(others) \
$(sysdep-others)) \
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
$(addsuffix .out,$(tests) \
$(tests-internal) \
$(xtests) \
Generate .test-result files for ordinary tests. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00193.html>, starts the process of generating explicit PASS or FAIL status for individual glibc tests. It's based on Tomas Dohnalek's patch <https://sourceware.org/ml/libc-alpha/2012-10/msg00278.html>, but is deliberately more minimal: it doesn't try to cover any tests outside of $(tests) / $(xtests) (that's for a later patch), nor does it put the result together in an overall summary file (again, a later patch): it just generates the .test-result files. Thus, this patch keeps the overall logic for when a testsuite run finishes completely unchanged: a test failing will terminate the run. I think we *should* move to a more conventional approach where plain "make check" does not terminate for an individual test failure, unless e.g. you say "make stop-on-test-failure=y check", but that sort of policy change is best done as a separate patch once the infrastructure is in place to generate summary files for completed test runs (which will entirely consist of PASS and XFAIL lines if the testsuite run reaches the point of generating them, until such a policy change is made). Tested x86_64. 2014-02-14 Tomas Dohnalek <tdohnale@redhat.com> Joseph Myers <joseph@codesourcery.com> * Makeconfig (test-name): New variable. (evaluate-test): Likewise. * Makerules (do-test-clean): Remove .test-result files. (common-mostlyclean): Likewise. * Rules ($(objpfx)%.out): Use $(evaluate-test) in both rules. * scripts/evaluate-test.sh: New file.
2014-02-15 01:04:57 +00:00
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
Suppress internal declarations for most of the testsuite. 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.
2016-11-21 01:46:30 +00:00
$(tests-internal) \
Generate .test-result files for ordinary tests. This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00193.html>, starts the process of generating explicit PASS or FAIL status for individual glibc tests. It's based on Tomas Dohnalek's patch <https://sourceware.org/ml/libc-alpha/2012-10/msg00278.html>, but is deliberately more minimal: it doesn't try to cover any tests outside of $(tests) / $(xtests) (that's for a later patch), nor does it put the result together in an overall summary file (again, a later patch): it just generates the .test-result files. Thus, this patch keeps the overall logic for when a testsuite run finishes completely unchanged: a test failing will terminate the run. I think we *should* move to a more conventional approach where plain "make check" does not terminate for an individual test failure, unless e.g. you say "make stop-on-test-failure=y check", but that sort of policy change is best done as a separate patch once the infrastructure is in place to generate summary files for completed test runs (which will entirely consist of PASS and XFAIL lines if the testsuite run reaches the point of generating them, until such a policy change is made). Tested x86_64. 2014-02-14 Tomas Dohnalek <tdohnale@redhat.com> Joseph Myers <joseph@codesourcery.com> * Makeconfig (test-name): New variable. (evaluate-test): Likewise. * Makerules (do-test-clean): Remove .test-result files. (common-mostlyclean): Likewise. * Rules ($(objpfx)%.out): Use $(evaluate-test) in both rules. * scripts/evaluate-test.sh: New file.
2014-02-15 01:04:57 +00:00
$(xtests) \
$(test-srcs)))
-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
$(install-lib) $(install-lib.so) \
$(install-lib.so:%.so=%_pic.a))
-rm -f core
-rm -f $(objpfx)rtld-*.os
$(rmobjs)
define rmobjs
$(foreach o,$(object-suffixes-for-libc),
-rm -f $(objpfx)stamp$o $(o-objects))
endef
# Also remove the dependencies and generated source files.
common-clean: common-mostlyclean
-rm -f $(addprefix $(objpfx),$(generated))
-rm -f $(objpfx)*.d $(objpfx)*.dt
-rm -fr $(addprefix $(objpfx),$(generated-dirs))
-rm -f $(addprefix $(common-objpfx),$(common-generated))
-rm -f $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
# Produce a file `stubs' which contains `#define __stub_FUNCTION'
# for each function which is a stub.
ifdef objpfx
.PHONY: stubs # The parent Makefile calls this target.
stubs: $(objpfx)stubs
endif
objs-for-stubs := $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
$(addprefix $(objpfx),$(extra-objs))
$(objpfx)stubs: $(objs-for-stubs)
ifneq (,$(strip $(objs-for-stubs)))
(cd $(objpfx).; $(OBJDUMP) -h $(patsubst $(objpfx)%,%,$^)) | \
$(AWK) '/\.gnu\.glibc-stub\./ { \
sub(/\.gnu\.glibc-stub\./, "", $$2); \
stubs[$$2] = 1; } \
END { for (s in stubs) print "#define __stub_" s }' > $@T
mv -f $@T $@
else
> $@
endif
ifneq (,$(strip $(gpl2lgpl)))
ifneq (,$(wildcard $(..)gpl2lgpl.sed))
# Snarf from the master source and frob the copying notice.
$(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
sed -f $^ > $@-tmp
# So I don't edit them by mistake.
chmod a-w $@-tmp
mv -f $@-tmp $@
endif
endif
# Local Variables:
# mode: makefile
# End: