Blame misc/Makefile

Packit 6c4009
# Copyright (C) 1991-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
#
Packit 6c4009
#	Sub-makefile for misc portion of the library.
Packit 6c4009
#
Packit 6c4009
Packit 6c4009
subdir	:= misc
Packit 6c4009
Packit 6c4009
include ../Makeconfig
Packit 6c4009
Packit 6c4009
headers	:= sys/uio.h bits/uio-ext.h bits/uio_lim.h \
Packit 6c4009
	   sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
Packit 6c4009
	   sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
Packit 6c4009
	   ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
Packit 6c4009
	   ttyent.h paths.h sys/reboot.h \
Packit 6c4009
	   sys/mman.h sys/param.h bits/param.h \
Packit 6c4009
	   fstab.h mntent.h search.h err.h error.h \
Packit 6c4009
	   sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
Packit 6c4009
	   sys/select.h sys/sysinfo.h \
Packit 6c4009
	   regexp.h bits/select.h bits/mman.h sys/xattr.h \
Packit 6c4009
	   syslog.h sys/syslog.h \
Packit 6c4009
	   bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
Packit 6c4009
	   bits/select2.h bits/hwcap.h sys/auxv.h \
Packit 6c4009
	   sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h
Packit 6c4009
Packit 6c4009
routines := brk sbrk sstk ioctl \
Packit 6c4009
	    readv writev preadv preadv64 pwritev pwritev64 \
Packit 6c4009
	    preadv2 preadv64v2 pwritev2 pwritev64v2 \
Packit 6c4009
	    setreuid setregid \
Packit 6c4009
	    seteuid setegid \
Packit 6c4009
	    getpagesize \
Packit 6c4009
	    getdtsz \
Packit 6c4009
	    gethostname sethostname getdomain setdomain \
Packit 6c4009
	    select pselect \
Packit 6c4009
	    acct chroot fsync sync fdatasync syncfs reboot \
Packit 6c4009
	    gethostid sethostid \
Packit 6c4009
	    revoke vhangup \
Packit 6c4009
	    swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
Packit 6c4009
	    mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
Packit 6c4009
	    ualarm usleep \
Packit 6c4009
	    gtty stty \
Packit 6c4009
	    ptrace \
Packit 6c4009
	    fstab mntent mntent_r \
Packit 6c4009
	    utimes lutimes futimes futimesat \
Packit 6c4009
	    truncate ftruncate truncate64 ftruncate64 \
Packit 6c4009
	    chflags fchflags \
Packit 6c4009
	    insremque getttyent getusershell getpass ttyslot \
Packit 6c4009
	    syslog syscall daemon \
Packit 6c4009
	    mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
Packit 6c4009
	    mlock munlock mlockall munlockall \
Packit 6c4009
	    efgcvt efgcvt_r qefgcvt qefgcvt_r \
Packit 6c4009
	    hsearch hsearch_r tsearch lsearch \
Packit 6c4009
	    err error ustat \
Packit 6c4009
	    getsysstats dirname regexp \
Packit 6c4009
	    getloadavg getclktck \
Packit 6c4009
	    fgetxattr flistxattr fremovexattr fsetxattr getxattr \
Packit 6c4009
	    listxattr lgetxattr llistxattr lremovexattr lsetxattr \
Packit 6c4009
	    removexattr setxattr getauxval ifunc-impl-list makedev \
Packit 6c4009
	    allocate_once
Packit 6c4009
Packit 6c4009
generated += tst-error1.mtrace tst-error1-mem.out \
Packit 6c4009
  tst-allocate_once.mtrace tst-allocate_once-mem.out
Packit 6c4009
Packit 6c4009
aux := init-misc
Packit 6c4009
install-lib := libg.a
Packit 6c4009
gpl2lgpl := error.c error.h
Packit 6c4009
Packit 6c4009
tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
Packit 6c4009
	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
Packit 6c4009
	 tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \
Packit 6c4009
	 tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
Packit Service 3e7c77
	 tst-preadvwritev2 tst-preadvwritev64v2 \
Packit Service 3e7c77
	 tst-mntent-autofs
Packit 004087
Packit Service 9b72f8
# Tests which need libdl.
Packit Service 9b72f8
ifeq (yes,$(build-shared))
Packit Service 9b72f8
tests += tst-gethostid
Packit Service 9b72f8
endif
Packit Service 9b72f8
Packit 6c4009
tests-internal := tst-atomic tst-atomic-long tst-allocate_once
Packit 6c4009
tests-static := tst-empty
Packit 6c4009
Packit 6c4009
ifeq ($(run-built-tests),yes)
Packit 6c4009
tests-special += $(objpfx)tst-error1-mem.out \
Packit 6c4009
  $(objpfx)tst-allocate_once-mem.out
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-tsearch.c += $(uses-callbacks)
Packit 6c4009
CFLAGS-lsearch.c += $(uses-callbacks)
Packit 6c4009
CFLAGS-pselect.c += -fexceptions
Packit 6c4009
CFLAGS-readv.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-writev.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-preadv.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-preadv64.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-pwritev.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-pwritev64.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-preadv2.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-preadv64v2.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-pwritev2.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-pwritev64v2.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-usleep.c += -fexceptions
Packit 6c4009
CFLAGS-syslog.c += -fexceptions
Packit 6c4009
CFLAGS-error.c += -fexceptions
Packit 6c4009
CFLAGS-getpass.c += -fexceptions
Packit 6c4009
CFLAGS-mkstemp.c += -fexceptions
Packit 6c4009
CFLAGS-mkstemp64.c += -fexceptions
Packit 6c4009
CFLAGS-getsysstats.c += -fexceptions
Packit 6c4009
CFLAGS-getusershell.c += -fexceptions
Packit 6c4009
CFLAGS-err.c += -fexceptions
Packit 6c4009
CFLAGS-tst-tsearch.c += $(stack-align-test-flags)
Packit 6c4009
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
Packit 6c4009
# Called during static library initialization, so turn stack-protection
Packit 6c4009
# off for non-shared builds.
Packit 6c4009
CFLAGS-sbrk.o = $(no-stack-protector)
Packit 6c4009
CFLAGS-sbrk.op = $(no-stack-protector)
Packit 6c4009
CFLAGS-brk.o = $(no-stack-protector)
Packit 6c4009
CFLAGS-brk.op = $(no-stack-protector)
Packit 6c4009
Packit 6c4009
include ../Rules
Packit 6c4009
Packit 6c4009
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
Packit 6c4009
Packit 6c4009
$(objpfx)tst-tsearch: $(libm)
Packit 6c4009
Packit 6c4009
tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
Packit 6c4009
tst-error1-ARGS = $(objpfx)tst-error1.out
Packit 6c4009
$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
Packit 6c4009
	$(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
Packit 6c4009
	$(evaluate-test)
Packit 6c4009
Packit 6c4009
tst-allocate_once-ENV = MALLOC_TRACE=$(objpfx)tst-allocate_once.mtrace
Packit 6c4009
$(objpfx)tst-allocate_once-mem.out: $(objpfx)tst-allocate_once.out
Packit 6c4009
	$(common-objpfx)malloc/mtrace $(objpfx)tst-allocate_once.mtrace > $@; \
Packit 6c4009
	$(evaluate-test)
Packit Service 9b72f8
Packit Service 9b72f8
$(objpfx)tst-gethostid: $(libdl)