|
Packit |
6c4009 |
# Makefile for support library, used only at build and test time
|
|
Packit |
6c4009 |
# Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
subdir := support
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Makeconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extra-libs := libsupport
|
|
Packit |
6c4009 |
extra-libs-others = $(extra-libs)
|
|
Packit |
6c4009 |
extra-libs-noinstall := $(extra-libs)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
libsupport-routines = \
|
|
Packit Bot |
3f3af5 |
blob_repeat \
|
|
Packit |
6c4009 |
check \
|
|
Packit |
6c4009 |
check_addrinfo \
|
|
Packit |
6c4009 |
check_dns_packet \
|
|
Packit |
6c4009 |
check_hostent \
|
|
Packit |
6c4009 |
check_netent \
|
|
Packit |
6c4009 |
delayed_exit \
|
|
Packit |
6c4009 |
ignore_stderr \
|
|
Packit |
6c4009 |
next_to_fault \
|
|
Packit |
6c4009 |
oom_error \
|
|
Packit Bot |
2eb904 |
resolv_response_context_duplicate \
|
|
Packit Bot |
2eb904 |
resolv_response_context_free \
|
|
Packit |
6c4009 |
resolv_test \
|
|
Packit |
6c4009 |
set_fortify_handler \
|
|
Packit |
6c4009 |
support-xfstat \
|
|
Packit |
6c4009 |
support-xstat \
|
|
Packit |
6c4009 |
support_become_root \
|
|
Packit |
6c4009 |
support_can_chroot \
|
|
Packit |
6c4009 |
support_capture_subprocess \
|
|
Packit |
6c4009 |
support_capture_subprocess_check \
|
|
Packit |
6c4009 |
support_chroot \
|
|
Packit Bot |
3f3af5 |
support_copy_file_range \
|
|
Packit Bot |
3f3af5 |
support_descriptor_supports_holes \
|
|
Packit Bot |
8ec8cb |
support_descriptors \
|
|
Packit |
6c4009 |
support_enter_mount_namespace \
|
|
Packit |
6c4009 |
support_enter_network_namespace \
|
|
Packit |
6c4009 |
support_format_address_family \
|
|
Packit |
6c4009 |
support_format_addrinfo \
|
|
Packit |
6c4009 |
support_format_dns_packet \
|
|
Packit |
6c4009 |
support_format_herrno \
|
|
Packit |
6c4009 |
support_format_hostent \
|
|
Packit |
6c4009 |
support_format_netent \
|
|
Packit |
6c4009 |
support_isolate_in_subprocess \
|
|
Packit Bot |
6310c7 |
support_process_state \
|
|
Packit Bot |
56bdcd |
support_ptrace \
|
|
Packit |
6c4009 |
support_openpty \
|
|
Packit Bot |
3f3af5 |
support_paths \
|
|
Packit |
6c4009 |
support_quote_blob \
|
|
Packit Bot |
9d5ae7 |
support_quote_string \
|
|
Packit |
6c4009 |
support_record_failure \
|
|
Packit |
6c4009 |
support_run_diff \
|
|
Packit |
6c4009 |
support_shared_allocate \
|
|
Packit Bot |
40fc07 |
support_subprocess \
|
|
Packit |
6c4009 |
support_test_compare_blob \
|
|
Packit |
6c4009 |
support_test_compare_failure \
|
|
Packit Bot |
3f3af5 |
support_test_compare_string \
|
|
Packit |
6c4009 |
support_write_file_string \
|
|
Packit |
6c4009 |
support_test_main \
|
|
Packit |
6c4009 |
support_test_verify_impl \
|
|
Packit |
6c4009 |
temp_file \
|
|
Packit |
6c4009 |
write_message \
|
|
Packit |
6c4009 |
xaccept \
|
|
Packit |
6c4009 |
xaccept4 \
|
|
Packit |
6c4009 |
xasprintf \
|
|
Packit |
6c4009 |
xbind \
|
|
Packit |
6c4009 |
xcalloc \
|
|
Packit |
6c4009 |
xchroot \
|
|
Packit |
6c4009 |
xclose \
|
|
Packit |
6c4009 |
xconnect \
|
|
Packit Bot |
3f3af5 |
xcopy_file_range \
|
|
Packit |
6c4009 |
xdlfcn \
|
|
Packit Bot |
00cb17 |
xdlmopen \
|
|
Packit |
6c4009 |
xdup2 \
|
|
Packit |
6c4009 |
xfclose \
|
|
Packit |
6c4009 |
xfopen \
|
|
Packit |
6c4009 |
xfork \
|
|
Packit |
6c4009 |
xftruncate \
|
|
Packit Bot |
6310c7 |
xgetline \
|
|
Packit |
6c4009 |
xgetsockname \
|
|
Packit |
6c4009 |
xlisten \
|
|
Packit |
6c4009 |
xlseek \
|
|
Packit |
6c4009 |
xmalloc \
|
|
Packit |
6c4009 |
xmemstream \
|
|
Packit |
6c4009 |
xmkdir \
|
|
Packit Bot |
3f3af5 |
xmkdirp \
|
|
Packit |
6c4009 |
xmmap \
|
|
Packit |
6c4009 |
xmprotect \
|
|
Packit |
6c4009 |
xmunmap \
|
|
Packit |
6c4009 |
xopen \
|
|
Packit |
6c4009 |
xpipe \
|
|
Packit |
6c4009 |
xpoll \
|
|
Packit Bot |
ecc1b9 |
xposix_memalign \
|
|
Packit |
6c4009 |
xpthread_attr_destroy \
|
|
Packit |
6c4009 |
xpthread_attr_init \
|
|
Packit |
6c4009 |
xpthread_attr_setdetachstate \
|
|
Packit |
6c4009 |
xpthread_attr_setguardsize \
|
|
Packit Bot |
ecc1b9 |
xpthread_attr_setstack \
|
|
Packit |
6c4009 |
xpthread_attr_setstacksize \
|
|
Packit |
6c4009 |
xpthread_barrier_destroy \
|
|
Packit |
6c4009 |
xpthread_barrier_init \
|
|
Packit |
6c4009 |
xpthread_barrier_wait \
|
|
Packit |
6c4009 |
xpthread_barrierattr_destroy \
|
|
Packit |
6c4009 |
xpthread_barrierattr_init \
|
|
Packit |
6c4009 |
xpthread_barrierattr_setpshared \
|
|
Packit |
6c4009 |
xpthread_cancel \
|
|
Packit |
6c4009 |
xpthread_check_return \
|
|
Packit |
6c4009 |
xpthread_cond_wait \
|
|
Packit |
6c4009 |
xpthread_create \
|
|
Packit |
6c4009 |
xpthread_detach \
|
|
Packit |
6c4009 |
xpthread_join \
|
|
Packit |
6c4009 |
xpthread_mutex_consistent \
|
|
Packit |
6c4009 |
xpthread_mutex_destroy \
|
|
Packit |
6c4009 |
xpthread_mutex_init \
|
|
Packit |
6c4009 |
xpthread_mutex_lock \
|
|
Packit |
6c4009 |
xpthread_mutex_unlock \
|
|
Packit |
6c4009 |
xpthread_mutexattr_destroy \
|
|
Packit |
6c4009 |
xpthread_mutexattr_init \
|
|
Packit |
6c4009 |
xpthread_mutexattr_setprotocol \
|
|
Packit |
6c4009 |
xpthread_mutexattr_setpshared \
|
|
Packit |
6c4009 |
xpthread_mutexattr_setrobust \
|
|
Packit |
6c4009 |
xpthread_mutexattr_settype \
|
|
Packit |
6c4009 |
xpthread_once \
|
|
Packit |
6c4009 |
xpthread_rwlock_init \
|
|
Packit Bot |
bdf314 |
xpthread_rwlock_destroy \
|
|
Packit |
6c4009 |
xpthread_rwlock_rdlock \
|
|
Packit |
6c4009 |
xpthread_rwlock_unlock \
|
|
Packit |
6c4009 |
xpthread_rwlock_wrlock \
|
|
Packit |
6c4009 |
xpthread_rwlockattr_init \
|
|
Packit |
6c4009 |
xpthread_rwlockattr_setkind_np \
|
|
Packit |
6c4009 |
xpthread_sigmask \
|
|
Packit |
6c4009 |
xpthread_spin_lock \
|
|
Packit |
6c4009 |
xpthread_spin_unlock \
|
|
Packit |
6c4009 |
xraise \
|
|
Packit |
6c4009 |
xreadlink \
|
|
Packit |
6c4009 |
xrealloc \
|
|
Packit |
6c4009 |
xrecvfrom \
|
|
Packit |
6c4009 |
xsendto \
|
|
Packit Bot |
c55b1e |
xsetlocale \
|
|
Packit |
6c4009 |
xsetsockopt \
|
|
Packit |
6c4009 |
xsigaction \
|
|
Packit |
6c4009 |
xsignal \
|
|
Packit |
6c4009 |
xsocket \
|
|
Packit Bot |
40fc07 |
xposix_spawn \
|
|
Packit Bot |
40fc07 |
xposix_spawn_file_actions_addclose \
|
|
Packit Bot |
40fc07 |
xposix_spawn_file_actions_adddup2 \
|
|
Packit |
6c4009 |
xstrdup \
|
|
Packit |
6c4009 |
xstrndup \
|
|
Packit Bot |
3f3af5 |
xsymlink \
|
|
Packit |
6c4009 |
xsysconf \
|
|
Packit |
6c4009 |
xunlink \
|
|
Packit |
6c4009 |
xwaitpid \
|
|
Packit |
6c4009 |
xwrite \
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
libsupport-static-only-routines := $(libsupport-routines)
|
|
Packit |
6c4009 |
# Only build one variant of the library.
|
|
Packit |
6c4009 |
libsupport-inhibit-o := .os
|
|
Packit |
6c4009 |
ifeq ($(build-shared),yes)
|
|
Packit |
6c4009 |
libsupport-inhibit-o += .o
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit Bot |
3f3af5 |
CFLAGS-support_paths.c = \
|
|
Packit Bot |
3f3af5 |
-DSRCDIR_PATH=\"`cd .. ; pwd`\" \
|
|
Packit Bot |
3f3af5 |
-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
|
|
Packit Bot |
3f3af5 |
-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
|
|
Packit Bot |
3f3af5 |
-DINSTDIR_PATH=\"$(prefix)\" \
|
|
Packit Bot |
d1d011 |
-DLIBDIR_PATH=\"$(libdir)\" \
|
|
Packit Bot |
2bf7f3 |
-DBINDIR_PATH=\"$(bindir)\" \
|
|
Packit Bot |
4198b1 |
-DSBINDIR_PATH=\"$(sbindir)\" \
|
|
Packit Bot |
8b7da6 |
-DROOTSBINDIR_PATH=\"$(rootsbindir)\" \
|
|
Packit Bot |
8b7da6 |
-DCOMPLOCALEDIR_PATH=\"$(complocaledir)\"
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
3f3af5 |
ifeq (,$(CXX))
|
|
Packit Bot |
3f3af5 |
LINKS_DSO_PROGRAM = links-dso-program-c
|
|
Packit Bot |
3f3af5 |
else
|
|
Packit Bot |
3f3af5 |
LINKS_DSO_PROGRAM = links-dso-program
|
|
Packit Bot |
3f3af5 |
LDLIBS-links-dso-program = -lstdc++ -lgcc -lgcc_s $(libunwind)
|
|
Packit Bot |
3f3af5 |
endif
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
841947 |
ifeq (yes,$(have-selinux))
|
|
Packit Bot |
841947 |
LDLIBS-$(LINKS_DSO_PROGRAM) += -lselinux
|
|
Packit Bot |
841947 |
endif
|
|
Packit Bot |
841947 |
|
|
Packit Bot |
841947 |
|
|
Packit Bot |
3f3af5 |
LDLIBS-test-container = $(libsupport)
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
3f3af5 |
others += test-container
|
|
Packit Bot |
3f3af5 |
others-noinstall += test-container
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
3f3af5 |
others += shell-container echo-container true-container
|
|
Packit Bot |
3f3af5 |
others-noinstall += shell-container echo-container true-container
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
3f3af5 |
others += $(LINKS_DSO_PROGRAM)
|
|
Packit Bot |
3f3af5 |
others-noinstall += $(LINKS_DSO_PROGRAM)
|
|
Packit Bot |
3f3af5 |
|
|
Packit Bot |
3f3af5 |
$(objpfx)test-container : $(libsupport)
|
|
Packit Bot |
3f3af5 |
$(objpfx)shell-container : $(libsupport)
|
|
Packit Bot |
3f3af5 |
$(objpfx)echo-container : $(libsupport)
|
|
Packit Bot |
3f3af5 |
$(objpfx)true-container : $(libsupport)
|
|
Packit Bot |
3f3af5 |
|
|
Packit |
6c4009 |
tests = \
|
|
Packit |
6c4009 |
README-testing \
|
|
Packit |
6c4009 |
tst-support-namespace \
|
|
Packit Bot |
3f3af5 |
tst-support_blob_repeat \
|
|
Packit |
6c4009 |
tst-support_capture_subprocess \
|
|
Packit Bot |
8ec8cb |
tst-support_descriptors \
|
|
Packit |
6c4009 |
tst-support_format_dns_packet \
|
|
Packit Bot |
6310c7 |
tst-support-process_state \
|
|
Packit |
6c4009 |
tst-support_quote_blob \
|
|
Packit Bot |
9d5ae7 |
tst-support_quote_string \
|
|
Packit |
6c4009 |
tst-support_record_failure \
|
|
Packit |
6c4009 |
tst-test_compare \
|
|
Packit |
6c4009 |
tst-test_compare_blob \
|
|
Packit Bot |
3f3af5 |
tst-test_compare_string \
|
|
Packit |
6c4009 |
tst-xreadlink \
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special = \
|
|
Packit |
6c4009 |
$(objpfx)tst-support_record_failure-2.out
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-support_record_failure-2.out: tst-support_record_failure-2.sh \
|
|
Packit |
6c4009 |
$(objpfx)tst-support_record_failure
|
|
Packit |
6c4009 |
$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
|
|
Packit |
6c4009 |
'$(run-program-env)' '$(test-program-prefix-after-env)' \
|
|
Packit |
6c4009 |
> $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)tst-support_format_dns_packet: $(common-objpfx)resolv/libresolv.so
|
|
Packit |
6c4009 |
|
|
Packit Bot |
40fc07 |
tst-support_capture_subprocess-ARGS = -- $(host-test-program-cmd)
|
|
Packit Bot |
40fc07 |
|
|
Packit |
6c4009 |
include ../Rules
|