2023-01-06 21:08:04 +00:00
|
|
|
# Copyright (C) 1998-2023 Free Software Foundation, Inc.
|
2022-01-12 18:04:23 +00:00
|
|
|
# Copyright The GNU Toolchain Authors.
|
1998-06-08 19:06:31 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
# 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.
|
1998-06-08 19:06:31 +00:00
|
|
|
|
|
|
|
# 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
|
2001-07-06 04:58:11 +00:00
|
|
|
# Lesser General Public License for more details.
|
1998-06-08 19:06:31 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
# 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/>.
|
1998-06-08 19:06:31 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Sub-makefile for debug portion of the library.
|
|
|
|
#
|
|
|
|
subdir := debug
|
|
|
|
|
2014-02-26 23:12:03 +00:00
|
|
|
include ../Makeconfig
|
|
|
|
|
1998-06-08 19:06:31 +00:00
|
|
|
headers := execinfo.h
|
|
|
|
|
2013-05-06 22:58:44 +00:00
|
|
|
# Note that ptsname_r_chk and getlogin_r are not here, but in
|
|
|
|
# login/Makefile instead. If that subdir is omitted from the
|
|
|
|
# build, its _FORTIFY_SOURCE support will be too.
|
2023-04-17 13:41:08 +00:00
|
|
|
routines = \
|
2023-05-11 10:46:27 +00:00
|
|
|
$(static-only-routines) \
|
2023-04-17 13:41:08 +00:00
|
|
|
____longjmp_chk \
|
|
|
|
asprintf_chk \
|
|
|
|
backtrace \
|
|
|
|
backtracesyms \
|
|
|
|
backtracesymsfd \
|
|
|
|
chk_fail \
|
|
|
|
confstr_chk \
|
|
|
|
dprintf_chk \
|
|
|
|
explicit_bzero_chk \
|
|
|
|
fdelt_chk \
|
|
|
|
fgets_chk \
|
|
|
|
fgets_u_chk \
|
|
|
|
fgetws_chk \
|
|
|
|
fgetws_u_chk \
|
|
|
|
fortify_fail \
|
|
|
|
fprintf_chk \
|
|
|
|
fread_chk \
|
|
|
|
fread_u_chk \
|
|
|
|
fwprintf_chk \
|
|
|
|
getcwd_chk \
|
|
|
|
getdomainname_chk \
|
|
|
|
getgroups_chk \
|
|
|
|
gethostname_chk \
|
|
|
|
gets_chk \
|
|
|
|
getwd_chk \
|
|
|
|
longjmp_chk \
|
|
|
|
mbsnrtowcs_chk \
|
|
|
|
mbsrtowcs_chk \
|
|
|
|
mbstowcs_chk \
|
|
|
|
memcpy_chk \
|
|
|
|
memmove_chk \
|
|
|
|
mempcpy_chk \
|
|
|
|
memset_chk \
|
|
|
|
noophooks \
|
|
|
|
obprintf_chk \
|
|
|
|
poll_chk \
|
|
|
|
ppoll_chk \
|
|
|
|
pread64_chk \
|
|
|
|
pread_chk \
|
|
|
|
printf_chk \
|
|
|
|
read_chk \
|
|
|
|
readlink_chk \
|
|
|
|
readlinkat_chk \
|
|
|
|
readonly-area \
|
|
|
|
realpath_chk \
|
|
|
|
recv_chk \
|
|
|
|
recvfrom_chk \
|
|
|
|
snprintf_chk \
|
|
|
|
sprintf_chk \
|
|
|
|
stack_chk_fail \
|
|
|
|
stpcpy_chk \
|
|
|
|
stpncpy_chk \
|
|
|
|
strcat_chk \
|
|
|
|
strcpy_chk \
|
2023-06-14 16:10:08 +00:00
|
|
|
strlcat_chk \
|
|
|
|
strlcpy_chk \
|
2023-04-17 13:41:08 +00:00
|
|
|
strncat_chk \
|
|
|
|
strncpy_chk \
|
|
|
|
swprintf_chk \
|
|
|
|
ttyname_r_chk \
|
|
|
|
vasprintf_chk \
|
|
|
|
vdprintf_chk \
|
|
|
|
vfprintf_chk \
|
|
|
|
vfwprintf_chk \
|
|
|
|
vobprintf_chk \
|
|
|
|
vprintf_chk \
|
|
|
|
vsnprintf_chk \
|
|
|
|
vsprintf_chk \
|
|
|
|
vswprintf_chk \
|
|
|
|
vwprintf_chk \
|
|
|
|
wcpcpy_chk \
|
|
|
|
wcpncpy_chk \
|
|
|
|
wcrtomb_chk \
|
|
|
|
wcscat_chk \
|
|
|
|
wcscpy_chk \
|
2023-06-14 16:10:24 +00:00
|
|
|
wcslcat_chk \
|
|
|
|
wcslcpy_chk \
|
2023-04-17 13:41:08 +00:00
|
|
|
wcsncat_chk \
|
|
|
|
wcsncpy_chk \
|
|
|
|
wcsnrtombs_chk \
|
|
|
|
wcsrtombs_chk \
|
|
|
|
wcstombs_chk \
|
|
|
|
wctomb_chk \
|
|
|
|
wmemcpy_chk \
|
|
|
|
wmemmove_chk \
|
|
|
|
wmempcpy_chk \
|
|
|
|
wmemset_chk \
|
|
|
|
wprintf_chk \
|
|
|
|
# routines
|
2020-11-05 04:50:32 +00:00
|
|
|
static-only-routines := stack_chk_fail_local
|
1998-06-08 19:06:31 +00:00
|
|
|
|
2017-07-19 15:21:27 +00:00
|
|
|
# Don't add stack_chk_fail_local.o to libc.a since __stack_chk_fail_local
|
|
|
|
# is an alias of __stack_chk_fail in stack_chk_fail.o.
|
|
|
|
elide-routines.o := stack_chk_fail_local
|
|
|
|
|
2016-12-26 09:08:57 +00:00
|
|
|
# Building the stack-protector failure routines with stack protection
|
2018-07-05 17:28:11 +00:00
|
|
|
# is not required since we have already failed a stack check and are
|
|
|
|
# exiting the process. However, the local aliases which jump to the
|
|
|
|
# real routines should still be compiled with stack protection
|
|
|
|
# (stack_chk_fail_local.c), so that the statically linked parts of the
|
|
|
|
# library have the expected flags.
|
2016-12-26 09:08:57 +00:00
|
|
|
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-stack_chk_fail.c += $(no-stack-protector)
|
|
|
|
|
|
|
|
CFLAGS-backtrace.c += -fno-omit-frame-pointer -funwind-tables
|
|
|
|
CFLAGS-sprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-snprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-vsprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-vsnprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-asprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-vasprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-obprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-dprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-vdprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-printf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-vprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-vfprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-gets_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fgets_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fgets_u_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fread_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fread_u_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-swprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-vswprintf_chk.c += $(libio-mtsafe)
|
|
|
|
CFLAGS-wprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fwprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-vwprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-vfwprintf_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fgetws_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-fgetws_u_chk.c += $(libio-mtsafe) -fexceptions
|
|
|
|
CFLAGS-read_chk.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pread_chk.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-pread64_chk.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-recv_chk.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-recvfrom_chk.c += -fexceptions -fasynchronous-unwind-tables
|
2012-05-06 22:37:57 +00:00
|
|
|
|
|
|
|
# Need to make sure the settings here override what configure might have
|
|
|
|
# set up for us, so keep the CFLAGS/CPPFLAGS split logical as the order is:
|
|
|
|
# <user CFLAGS> <test CFLAGS> <user CPPFLAGS> <test CPPFLAGS>
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-longjmp_chk.c += -fexceptions -fasynchronous-unwind-tables
|
2023-03-17 09:17:28 +00:00
|
|
|
CPPFLAGS-tst-longjmp_chk.c += $(no-fortify-source),-D_FORTIFY_SOURCE=1
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-longjmp_chk2.c += -fexceptions -fasynchronous-unwind-tables
|
2023-03-17 09:17:28 +00:00
|
|
|
CPPFLAGS-tst-longjmp_chk2.c += $(no-fortify-source),-D_FORTIFY_SOURCE=1
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-longjmp_chk3.c += -fexceptions -fasynchronous-unwind-tables
|
2023-03-17 09:17:28 +00:00
|
|
|
CPPFLAGS-tst-longjmp_chk3.c += $(no-fortify-source),-D_FORTIFY_SOURCE=1
|
|
|
|
CPPFLAGS-tst-realpath-chk.c += $(no-fortify-source),-D_FORTIFY_SOURCE=2
|
|
|
|
CPPFLAGS-tst-chk-cancel.c += $(no-fortify-source),-D_FORTIFY_SOURCE=2
|
2023-10-03 18:09:36 +00:00
|
|
|
CFLAGS-tst-sprintf-fortify-rdonly.c += $(no-fortify-source),-D_FORTIFY_SOURCE=2
|
1998-06-08 19:06:31 +00:00
|
|
|
|
2022-01-12 18:04:23 +00:00
|
|
|
# _FORTIFY_SOURCE tests.
|
|
|
|
# Auto-generate tests for _FORTIFY_SOURCE for different levels, compilers and
|
|
|
|
# preprocessor conditions based on tst-fortify.c.
|
|
|
|
#
|
|
|
|
# To add a new test condition, define a cflags-$(cond) make variable to set
|
|
|
|
# CFLAGS for the file.
|
|
|
|
|
|
|
|
tests-all-chk = tst-fortify
|
2022-11-04 19:02:52 +00:00
|
|
|
tests-c-def-chk =
|
|
|
|
tests-cc-def-chk =
|
|
|
|
tests-c-time64-chk =
|
|
|
|
tests-cc-time64-chk =
|
2022-01-12 18:04:23 +00:00
|
|
|
|
|
|
|
CFLAGS-tst-fortify.c += -Wno-format -Wno-deprecated-declarations -Wno-error
|
|
|
|
|
|
|
|
# No additional flags for the default tests.
|
|
|
|
define cflags-default
|
|
|
|
endef
|
|
|
|
|
|
|
|
define cflags-lfs
|
2022-11-04 19:02:52 +00:00
|
|
|
CFLAGS-tst-fortify-$(1)-lfs-$(2)-$(3).$(1) += -D_FILE_OFFSET_BITS=64
|
2022-01-12 18:04:23 +00:00
|
|
|
endef
|
|
|
|
|
2022-01-12 18:04:48 +00:00
|
|
|
define cflags-nongnu
|
2022-11-04 19:02:52 +00:00
|
|
|
CFLAGS-tst-fortify-$(1)-nongnu-$(2)-$(3).$(1) += -D_LARGEFILE64_SOURCE=1
|
2022-01-12 18:04:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
src-chk-nongnu = \#undef _GNU_SOURCE
|
|
|
|
|
2007-08-26 01:19:56 +00:00
|
|
|
# We know these tests have problems with format strings, this is what
|
Clean up conditionals for declaration of gets.
gets has the dubious honor of being the only C89 library feature that
has been completely removed from the current C and C++ standards.
glibc follows suit by not declaring it in _GNU_SOURCE mode either,
but it remains present in older compatibility modes. Internally,
two test cases need to see stdio.h make the declaration, but all our
internal code is of course compiled under _GNU_SOURCE. This is currently
kludged by duplicating the gets declaration, fortify wrapper and all,
in include/stdio.h. Also, the conditional in the public headers for
deciding when to declare gets is complicated and repeated in two places.
This patch adds a new macro to features.h that encapsulates the
complicated rule for when to declare gets. stdio.h and bits/stdio2.h
then simply test __GLIBC_USE (DEPRECATED_GETS), and instead of having
a duplicate gets declaration in include/stdio.h, debug/tst-chk1.c and
stdio-common/tst-gets.c can force gets to be declared.
* include/features.h (__GLIBC_USE_DEPRECATED_GETS): New macro.
* libio/stdio.h, libio/bits/stdio2.h: Condition gets on
__GLIBC_USE (DEPRECATED_GETS). Update comments to indicate
gets was removed from C++ in C++14.
* include/stdio.h: Remove redundant declaration of gets.
* debug/tst-chk1.c, stdio-common/tst-gets.c: Force gets to
be declared, since we are testing it.
* stdio-common/Makefile (tst-gets.c): Compile with
-Wno-deprecated-declarations.
* debug/Makefile (tst-chk1.c, tst-chk2.c, tst-chk3.c, tst-chk4.cc)
(tst-chk5.cc, tst-chk6.cc, tst-lfschk1.c, tst-lfschk2.c)
(tst-lfschk3.c, tst-lfschk4.cc, tst-lfschk5.cc, tst-lfschk6.cc):
Compile with -Wno-deprecated-declarations.
2016-11-21 13:16:27 +00:00
|
|
|
# we are testing. Disable that warning. They are also testing
|
|
|
|
# deprecated functions (notably gets) so disable that warning as well.
|
|
|
|
# And they also generate warnings from warning attributes, which
|
|
|
|
# cannot be disabled via pragmas, so require -Wno-error to be used.
|
2022-01-12 18:04:23 +00:00
|
|
|
define gen-chk-test
|
2022-11-04 19:02:52 +00:00
|
|
|
tests-$(1)-$(4)-chk += tst-fortify-$(1)-$(2)-$(3)-$(4)
|
2023-03-17 09:17:28 +00:00
|
|
|
CFLAGS-tst-fortify-$(1)-$(2)-$(3)-$(4).$(1) += $(no-fortify-source),-D_FORTIFY_SOURCE=$(3) -Wno-format \
|
2022-01-12 18:04:23 +00:00
|
|
|
-Wno-deprecated-declarations \
|
|
|
|
-Wno-error
|
2022-11-04 19:02:52 +00:00
|
|
|
$(eval $(call cflags-$(2),$(1),$(3),$(4)))
|
|
|
|
$(objpfx)tst-fortify-$(1)-$(2)-$(3)-$(4).$(1): tst-fortify.c Makefile
|
2022-01-12 18:04:23 +00:00
|
|
|
( echo "/* Autogenerated from Makefile. */"; \
|
2022-01-12 18:04:48 +00:00
|
|
|
echo "$(src-chk-$(2))"; \
|
2022-01-12 18:04:23 +00:00
|
|
|
echo "#include \"tst-fortify.c\"" ) > $$@.tmp
|
|
|
|
mv $$@.tmp $$@
|
|
|
|
endef
|
|
|
|
|
|
|
|
chk-extensions = c cc
|
2022-01-12 18:04:48 +00:00
|
|
|
chk-types = default lfs nongnu
|
2022-11-04 19:02:52 +00:00
|
|
|
# 64 bit time_t implies LFS.
|
|
|
|
chk-types-time64 = default nongnu
|
2022-01-12 18:04:23 +00:00
|
|
|
chk-levels = 1 2 3
|
|
|
|
|
|
|
|
$(foreach e,$(chk-extensions), \
|
|
|
|
$(foreach t,$(chk-types), \
|
|
|
|
$(foreach l,$(chk-levels), \
|
2022-11-04 19:02:52 +00:00
|
|
|
$(eval $(call gen-chk-test,$(e),$(t),$(l),def)))))
|
2022-01-12 18:04:23 +00:00
|
|
|
|
2022-11-04 19:02:52 +00:00
|
|
|
tests-all-chk += $(tests-c-def-chk) $(tests-cc-def-chk)
|
|
|
|
|
|
|
|
$(foreach e,$(chk-extensions), \
|
|
|
|
$(foreach t,$(chk-types-time64), \
|
|
|
|
$(foreach l,$(chk-levels), \
|
|
|
|
$(eval $(call gen-chk-test,$(e),$(t),$(l),time64)))))
|
|
|
|
|
|
|
|
tests-all-time64-chk += $(tests-c-time64-chk) $(tests-cc-time64-chk)
|
2022-01-12 18:04:23 +00:00
|
|
|
|
|
|
|
define link-cc
|
|
|
|
LDLIBS-$(1) = -lstdc++
|
|
|
|
endef
|
2022-11-04 19:02:52 +00:00
|
|
|
$(foreach t,$(tests-cc-def-chk), $(eval $(call link-cc,$(t))))
|
|
|
|
$(foreach t,$(tests-cc-time64-chk), $(eval $(call link-cc,$(t))))
|
2005-07-15 10:49:02 +00:00
|
|
|
|
2013-01-18 15:49:43 +00:00
|
|
|
# backtrace_symbols only works if we link with -rdynamic. backtrace
|
|
|
|
# requires unwind tables on most architectures.
|
|
|
|
CFLAGS-tst-backtrace2.c += -funwind-tables
|
|
|
|
CFLAGS-tst-backtrace3.c += -funwind-tables
|
|
|
|
CFLAGS-tst-backtrace4.c += -funwind-tables
|
|
|
|
CFLAGS-tst-backtrace5.c += -funwind-tables
|
2013-08-20 20:01:59 +00:00
|
|
|
CFLAGS-tst-backtrace6.c += -funwind-tables
|
2013-01-18 15:49:43 +00:00
|
|
|
LDFLAGS-tst-backtrace2 = -rdynamic
|
|
|
|
LDFLAGS-tst-backtrace3 = -rdynamic
|
|
|
|
LDFLAGS-tst-backtrace4 = -rdynamic
|
|
|
|
LDFLAGS-tst-backtrace5 = -rdynamic
|
2013-08-20 20:01:59 +00:00
|
|
|
LDFLAGS-tst-backtrace6 = -rdynamic
|
2013-01-18 15:49:43 +00:00
|
|
|
|
2017-12-11 21:11:16 +00:00
|
|
|
CFLAGS-tst-ssp-1.c += -fstack-protector-all
|
2017-07-11 14:44:01 +00:00
|
|
|
|
2023-01-25 07:01:00 +00:00
|
|
|
# Disable compiler optimizations around vsprintf (the function under test).
|
|
|
|
CFLAGS-tst-sprintf-fortify-unchecked.c = \
|
|
|
|
-fno-builtin-vsprintf -fno-builtin-__vsprintf_chk
|
|
|
|
|
2023-05-11 10:46:27 +00:00
|
|
|
tests = \
|
|
|
|
$(tests-all-chk) \
|
|
|
|
backtrace-tst \
|
|
|
|
test-stpcpy_chk \
|
|
|
|
test-strcpy_chk \
|
|
|
|
tst-backtrace2 \
|
|
|
|
tst-backtrace3 \
|
|
|
|
tst-backtrace4 \
|
|
|
|
tst-backtrace5 \
|
|
|
|
tst-backtrace6 \
|
|
|
|
tst-longjmp_chk \
|
|
|
|
tst-longjmp_chk2 \
|
|
|
|
tst-realpath-chk \
|
2023-10-03 18:09:36 +00:00
|
|
|
tst-sprintf-fortify-rdonly \
|
2023-05-11 10:46:27 +00:00
|
|
|
tst-sprintf-fortify-unchecked \
|
|
|
|
# tests
|
1998-06-08 19:06:31 +00:00
|
|
|
|
2022-11-04 19:02:52 +00:00
|
|
|
tests-time64 += \
|
2023-05-11 10:46:27 +00:00
|
|
|
$(tests-all-time64-chk) \
|
|
|
|
# tests-time64
|
2022-11-04 19:02:52 +00:00
|
|
|
|
2017-07-11 14:44:01 +00:00
|
|
|
ifeq ($(have-ssp),yes)
|
|
|
|
tests += tst-ssp-1
|
|
|
|
endif
|
|
|
|
|
2022-06-22 11:16:30 +00:00
|
|
|
ifeq ($(have-thread-library), yes)
|
2022-06-27 20:37:45 +00:00
|
|
|
tests += tst-chk-cancel
|
2022-06-22 11:16:30 +00:00
|
|
|
endif
|
|
|
|
|
2015-03-10 22:13:14 +00:00
|
|
|
ifeq (,$(CXX))
|
2022-11-09 14:24:45 +00:00
|
|
|
tests-unsupported = $(tests-cc-def-chk) $(tests-cc-time64-chk)
|
2015-03-04 21:52:45 +00:00
|
|
|
endif
|
|
|
|
|
2021-12-20 11:41:55 +00:00
|
|
|
extra-libs = libpcprofile
|
1998-07-16 20:08:44 +00:00
|
|
|
extra-libs-others = $(extra-libs)
|
|
|
|
|
1999-08-08 22:20:38 +00:00
|
|
|
libpcprofile-routines = pcprofile
|
|
|
|
libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes))
|
|
|
|
|
1999-10-12 18:38:32 +00:00
|
|
|
others = pcprofiledump
|
2001-08-29 23:31:38 +00:00
|
|
|
install-bin = pcprofiledump
|
|
|
|
install-bin-script = xtrace
|
1999-10-07 07:25:16 +00:00
|
|
|
|
2021-12-20 11:41:55 +00:00
|
|
|
generated += xtrace
|
1998-07-16 23:08:48 +00:00
|
|
|
|
1998-06-08 19:06:31 +00:00
|
|
|
include ../Rules
|
1998-07-16 20:08:44 +00:00
|
|
|
|
2015-10-12 10:24:41 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
|
|
|
LOCALES := de_DE.UTF-8
|
|
|
|
include ../gen-locales.mk
|
|
|
|
|
2022-01-12 18:04:23 +00:00
|
|
|
define chk-gen-locales
|
|
|
|
$(objpfx)$(1).out: $(gen-locales)
|
|
|
|
endef
|
|
|
|
$(foreach t, $(tests-all-chk), $(eval $(call chk-gen-locales,$(t))))
|
2022-11-04 19:02:52 +00:00
|
|
|
$(foreach t, $(tests-all-time64-chk), $(eval $(call chk-gen-locales,$(t))))
|
2015-10-12 10:24:41 +00:00
|
|
|
endif
|
|
|
|
|
2006-05-19 16:48:27 +00:00
|
|
|
sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
|
|
|
|
|
1999-10-07 07:25:16 +00:00
|
|
|
$(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
|
|
|
|
|
|
|
|
$(objpfx)xtrace: xtrace.sh
|
|
|
|
rm -f $@.new
|
2021-05-12 02:15:33 +00:00
|
|
|
sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
|
|
|
|
-e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
|
2012-11-09 22:13:45 +00:00
|
|
|
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
|
1999-10-07 07:25:16 +00:00
|
|
|
&& rm -f $@ && mv $@.new $@ && chmod +x $@
|
2022-06-22 11:16:30 +00:00
|
|
|
|
2022-06-27 20:37:45 +00:00
|
|
|
$(objpfx)tst-chk-cancel: $(shared-thread-library)
|