Index: projects/make-check-sandbox/bin/cat/Makefile =================================================================== --- projects/make-check-sandbox/bin/cat/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/cat/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= cat -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/date/Makefile =================================================================== --- projects/make-check-sandbox/bin/date/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/date/Makefile (revision 321913) @@ -1,14 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= date SRCS= date.c netdate.c vary.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/dd/Makefile =================================================================== --- projects/make-check-sandbox/bin/dd/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/dd/Makefile (revision 321913) @@ -1,45 +1,43 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= dd SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c # # Test the character conversion functions. We have to be explicit about # which LC_LANG we use because the definition of upper and lower case # depends on it. # CLEANFILES= gen test: ${PROG} gen .for conv in ascii ebcdic ibm oldascii oldebcdic oldibm \ pareven parnone parodd parset \ swab lcase ucase @${ECHO} testing conv=${conv} @./gen | \ LC_ALL=en_US.US-ASCII ./dd conv=${conv} 2>/dev/null | \ LC_ALL=en_US.US-ASCII hexdump -C | \ diff -I FreeBSD - ${.CURDIR}/ref.${conv} .endfor @${ECHO} "testing sparse file (obs zeroes)" @./gen 189284 | ./dd ibs=16 obs=8 conv=sparse of=obs_zeroes 2> /dev/null @hexdump -C obs_zeroes | diff -I FreeBSD - ${.CURDIR}/ref.obs_zeroes @${ECHO} "testing spase file (all zeroes)" @./dd if=/dev/zero of=1M_zeroes bs=1048576 count=1 2> /dev/null @./dd if=1M_zeroes of=1M_zeroes.1 bs=1048576 conv=sparse 2> /dev/null @./dd if=1M_zeroes of=1M_zeroes.2 bs=1048576 2> /dev/null @diff 1M_zeroes 1M_zeroes.1 @diff 1M_zeroes 1M_zeroes.2 @rm -f gen 1M_zeroes* obs_zeroes -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/echo/Makefile =================================================================== --- projects/make-check-sandbox/bin/echo/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/echo/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= echo -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/expr/Makefile =================================================================== --- projects/make-check-sandbox/bin/expr/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/expr/Makefile (revision 321913) @@ -1,19 +1,17 @@ # $FreeBSD$ .include PACKAGE=runtime PROG= expr SRCS= expr.y YFLAGS= # expr relies on signed integer wrapping CFLAGS+= -fwrapv NO_WMISSING_VARIABLE_DECLARATIONS= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/ln/Makefile =================================================================== --- projects/make-check-sandbox/bin/ln/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/ln/Makefile (revision 321913) @@ -1,17 +1,15 @@ # @(#)Makefile 8.2 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= ln MAN= ln.1 symlink.7 LINKS= ${BINDIR}/ln ${BINDIR}/link MLINKS= ln.1 link.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/ls/Makefile =================================================================== --- projects/make-check-sandbox/bin/ls/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/ls/Makefile (revision 321913) @@ -1,21 +1,19 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 # $FreeBSD$ .include PACKAGE=runtime PROG= ls SRCS= cmp.c ls.c print.c util.c LIBADD= xo util .if !defined(RELEASE_CRUNCH) && \ ${MK_LS_COLORS} != no CFLAGS+= -DCOLORLS LIBADD+= termcapw .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/mv/Makefile =================================================================== --- projects/make-check-sandbox/bin/mv/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/mv/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.2 (Berkeley) 4/2/94 # $FreeBSD$ .include PACKAGE=runtime PROG= mv -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/pax/Makefile =================================================================== --- projects/make-check-sandbox/bin/pax/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/pax/Makefile (revision 321913) @@ -1,40 +1,38 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include # To install on versions prior to BSD 4.4 the following may have to be # defined with CFLAGS += # # -DNET2_STAT Use NET2 or older stat structure. The version of the # stat structure is easily determined by looking at the # basic type of an off_t (often defined in the file: # /usr/include/sys/types.h). If off_t is a long (and is # NOT A quad) then you must define NET2_STAT. # This define is important, as if you do have a quad_t # off_t and define NET2_STAT, pax will compile but will # NOT RUN PROPERLY. # # -DNET2_FTS Use the older NET2 fts. To identify the version, # examine the file: /usr/include/fts.h. If FTS_COMFOLLOW # is not defined then you must define NET2_FTS. # Pax may not compile if this not (un)defined properly. # # -DNET2_REGEX Use the older regexp.h not regex.h. The regex version # is determined by looking at the value returned by # regexec() (man 3 regexec). If regexec return a 1 for # success (and NOT a 0 for success) you have the older # regex routines and must define NET2_REGEX. # Pax may not compile if this not (un)defined properly. PACKAGE=runtime PROG= pax SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \ gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/pkill/Makefile =================================================================== --- projects/make-check-sandbox/bin/pkill/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/pkill/Makefile (revision 321913) @@ -1,26 +1,24 @@ # $NetBSD: Makefile,v 1.1 2002/03/01 11:21:58 ad Exp $ # $FreeBSD$ .include PACKAGE=runtime PROG= pkill LIBADD= kvm jail LINKS= ${BINDIR}/pkill ${BINDIR}/pgrep MLINKS= pkill.1 pgrep.1 # # If considering retirement of these compatibility symlinks, # keep in mind that pkill is installed to /usr/bin in other # OS types, e.g., NetBSD, OpenBSD, Solaris, and Linux. # SYMLINKS= ../..${BINDIR}/pkill /usr/bin/pkill SYMLINKS+= ../..${BINDIR}/pgrep /usr/bin/pgrep -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/sh/Makefile =================================================================== --- projects/make-check-sandbox/bin/sh/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/sh/Makefile (revision 321913) @@ -1,70 +1,70 @@ # @(#)Makefile 8.4 (Berkeley) 5/5/95 # $FreeBSD$ .include PACKAGE=runtime PROG= sh INSTALLFLAGS= -S SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \ exec.c expand.c \ histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \ mystring.c options.c output.c parser.c printf.c redir.c show.c \ test.c trap.c var.c GENSRCS= builtins.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} # MLINKS for Shell built in commands for which there are no userland # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. LIBADD= edit CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ ${.CURDIR:H}/kill \ ${.CURDIR:H}/test \ ${SRCTOP}/usr.bin/printf CLEANFILES+= mknodes mknodes.o \ mksyntax mksyntax.o CLEANFILES+= ${GENSRCS} ${GENHDRS} build-tools: mknodes mksyntax .ORDER: builtins.c builtins.h builtins.h: .NOMETA builtins.c builtins.h: mkbuiltins builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} # XXX this is just to stop the default .c rule being used, so that the # intermediate object has a fixed name. # XXX we have a default .c rule, but no default .o rule. mknodes.o mksyntax.o: ${BUILD_TOOLS_META} ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} mknodes: mknodes.o ${BUILD_TOOLS_META} mksyntax: mksyntax.o ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h nodes.h: .NOMETA nodes.c nodes.h: mknodes nodetypes nodes.c.pat ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat .ORDER: syntax.c syntax.h syntax.h: .NOMETA syntax.c syntax.h: mksyntax ${BTOOLSPATH:U.}/mksyntax token.h: mktokens sh ${.CURDIR}/mktokens HAS_TESTS= -SUBDIR.${MK_TESTS}+= tests +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/sleep/Makefile =================================================================== --- projects/make-check-sandbox/bin/sleep/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/sleep/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= sleep -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/bin/test/Makefile =================================================================== --- projects/make-check-sandbox/bin/test/Makefile (revision 321912) +++ projects/make-check-sandbox/bin/test/Makefile (revision 321913) @@ -1,15 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ .include PACKAGE=runtime PROG= test LINKS= ${BINDIR}/test ${BINDIR}/[ MLINKS= test.1 [.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/cddl/Makefile =================================================================== --- projects/make-check-sandbox/cddl/Makefile (revision 321912) +++ projects/make-check-sandbox/cddl/Makefile (revision 321913) @@ -1,14 +1,12 @@ # $FreeBSD$ .include SUBDIR= lib .WAIT \ sbin usr.bin usr.sbin -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/cddl/lib/Makefile =================================================================== --- projects/make-check-sandbox/cddl/lib/Makefile (revision 321912) +++ projects/make-check-sandbox/cddl/lib/Makefile (revision 321913) @@ -1,41 +1,38 @@ # $FreeBSD$ .include SUBDIR= ${_drti} \ libavl \ libctf \ ${_libdtrace} \ libnvpair \ libumem \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ ${_libzpool} \ - ${_tests} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core _libzfs= libzfs .if ${MK_LIBTHR} != "no" _libzpool= libzpool .endif .endif .if ${MACHINE_CPUARCH} != "sparc64" _drti= drti _libdtrace= libdtrace .endif SUBDIR_DEPEND_libdtrace= libctf SUBDIR_DEPEND_libzfs_core= libnvpair SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core SUBDIR_DEPEND_libzpool= libavl libnvpair libumem SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/cddl/sbin/Makefile =================================================================== --- projects/make-check-sandbox/cddl/sbin/Makefile (revision 321912) +++ projects/make-check-sandbox/cddl/sbin/Makefile (revision 321913) @@ -1,18 +1,16 @@ # $FreeBSD$ .include -SUBDIR= ${_tests} ${_zfs} ${_zpool} +SUBDIR= ${_zfs} ${_zpool} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _zfs= zfs _zpool= zpool .endif SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/cddl/usr.bin/Makefile =================================================================== --- projects/make-check-sandbox/cddl/usr.bin/Makefile (revision 321912) +++ projects/make-check-sandbox/cddl/usr.bin/Makefile (revision 321913) @@ -1,30 +1,27 @@ # $FreeBSD$ .include SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ - ${_tests} \ ${_zinject} \ ${_zlook} \ ${_zstreamdump} \ ${_ztest} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _zinject= zinject #_zlook= zlook .if ${MK_LIBTHR} != "no" _ztest= ztest _zstreamdump = zstreamdump .endif .endif SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/cddl/usr.sbin/Makefile =================================================================== --- projects/make-check-sandbox/cddl/usr.sbin/Makefile (revision 321912) +++ projects/make-check-sandbox/cddl/usr.sbin/Makefile (revision 321913) @@ -1,50 +1,47 @@ # $FreeBSD$ .include SUBDIR= ${_dtrace} \ ${_lockstat} \ ${_plockstat} \ - ${_tests} \ ${_zdb} \ ${_zfsd} \ ${_zhack} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" .if ${MK_LIBTHR} != "no" _zdb= zdb _zhack= zhack .endif . if ${MK_CXX} != "no" _zfsd= zfsd . endif .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _dtrace= dtrace _lockstat= lockstat _plockstat= plockstat .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ ${MACHINE_CPUARCH} == "riscv" _dtrace= dtrace _lockstat= lockstat .endif .if ${MACHINE_CPUARCH} == "mips" _dtrace= dtrace .endif .if ${MACHINE_CPUARCH} == "powerpc" _dtrace= dtrace _lockstat= lockstat .endif SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/cddl =================================================================== --- projects/make-check-sandbox/cddl (revision 321912) +++ projects/make-check-sandbox/cddl (revision 321913) Property changes on: projects/make-check-sandbox/cddl ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head/cddl:r321852-321912 Index: projects/make-check-sandbox/contrib/ofed/usr.bin/Makefile =================================================================== --- projects/make-check-sandbox/contrib/ofed/usr.bin/Makefile (revision 321912) +++ projects/make-check-sandbox/contrib/ofed/usr.bin/Makefile (revision 321913) @@ -1,13 +1,11 @@ .include SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \ ibsysstat ibtracert opensm perfquery saquery \ sminfo smpdump smpquery vendstat -.if ${MK_TESTS} != "no" -SUBDIR+= osmtest -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/gnu/Makefile =================================================================== --- projects/make-check-sandbox/gnu/Makefile (revision 321912) +++ projects/make-check-sandbox/gnu/Makefile (revision 321913) @@ -1,15 +1,13 @@ # @(#)Makefile 5.33.1.1 (Berkeley) 5/6/91 # $FreeBSD$ .include SUBDIR= lib .WAIT \ - ${_tests} usr.bin + usr.bin -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/lib/atf/Makefile =================================================================== --- projects/make-check-sandbox/lib/atf/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/atf/Makefile (revision 321913) @@ -1,38 +1,35 @@ #- # Copyright (c) 2011 Google, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include SUBDIR= libatf-c \ libatf-c++ \ - ${_tests} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/atf/libatf-c/Makefile =================================================================== --- projects/make-check-sandbox/lib/atf/libatf-c/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/atf/libatf-c/Makefile (revision 321913) @@ -1,105 +1,103 @@ #- # Copyright (c) 2011 Google, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include .include # Store the toolchain executable in ATF_BUILD_{CC,CPP,CXX} to ensure other # values -- like -target, -B ..., etc -- don't get leaked into the tests. # # Be sure to omit ${CCACHE_BIN} (if specified) from the variable as it gets # automatically appended to the variables in bsd.compiler.mk when # ${MK_CCACHE_BUILD} != no. ATF_BUILD_CC:= ${CC:N${CCACHE_BIN}:[1]} ATF_BUILD_CPP:= ${CPP:N${CCACHE_BIN}:[1]} ATF_BUILD_CXX:= ${CXX:N${CCACHE_BIN}:[1]} # Only capture defines, includes, linker flags, optimization levels, warnings # and preprocessor flags when building ATF_BUILD_{C,CPP,CXX}FLAGS. ATF_BUILD_CFLAGS:= ${CFLAGS:M-[DILOWf]*} ATF_BUILD_CPPFLAGS:= ${CPPFLAGS:M-[DILOWf]*} ATF_BUILD_CXXFLAGS:= ${CXXFLAGS:M-[DILOWf]*} LIB= atf-c PRIVATELIB= true SHLIB_MAJOR= 1 ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail CFLAGS+= -DATF_BUILD_CC='"${ATF_BUILD_CC}"' CFLAGS+= -DATF_BUILD_CFLAGS='"${ATF_BUILD_CFLAGS}"' CFLAGS+= -DATF_BUILD_CPP='"${ATF_BUILD_CPP}"' CFLAGS+= -DATF_BUILD_CPPFLAGS='"${ATF_BUILD_CPPFLAGS}"' CFLAGS+= -DATF_BUILD_CXX='"${ATF_BUILD_CXX}"' CFLAGS+= -DATF_BUILD_CXXFLAGS='"${ATF_BUILD_CXXFLAGS}"' CFLAGS+= -I${ATF} CFLAGS+= -I${.CURDIR} CFLAGS+= -I. SRCS= build.c \ check.c \ dynstr.c \ env.c \ error.c \ fs.c \ list.c \ map.c \ process.c \ sanity.c \ text.c \ user.c \ utils.c \ tc.c \ tp.c \ tp_main.c INCS= build.h \ check.h \ defs.h \ error.h \ error_fwd.h \ macros.h \ tc.h \ tp.h \ utils.h INCSDIR= ${INCLUDEDIR}/atf-c INCS+= atf-c.h INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c.3 MLINKS+= atf-c.3 atf-c-api.3 # Backwards compatibility. -.if ${MK_TESTS} != "no" -SUBDIR= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../common.mk" .include Index: projects/make-check-sandbox/lib/atf/libatf-c++/Makefile =================================================================== --- projects/make-check-sandbox/lib/atf/libatf-c++/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/atf/libatf-c++/Makefile (revision 321913) @@ -1,80 +1,78 @@ #- # Copyright (c) 2011 Google, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include .include LIB_CXX= atf-c++ PRIVATELIB= true SHLIB_MAJOR= 2 # libatf-c++ depends on the C version of the ATF library to build. LIBADD+= atf_c LDFLAGS+= -L${.OBJDIR:H}/libatf-c ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail CFLAGS+= -I${ATF} CFLAGS+= -I${.CURDIR:H}/libatf-c CFLAGS+= -I. CFLAGS+= -DHAVE_CONFIG_H SRCS= application.cpp \ build.cpp \ check.cpp \ env.cpp \ exceptions.cpp \ fs.cpp \ process.cpp \ tests.cpp \ text.cpp \ utils.cpp INCS= build.hpp \ check.hpp \ macros.hpp \ tests.hpp \ utils.hpp INCSDIR= ${INCLUDEDIR}/atf-c++ INCS+= atf-c++.hpp INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++.3 MLINKS+= atf-c++.3 atf-c-api++.3 # Backwards compatibility. -.if ${MK_TESTS} != "no" -SUBDIR= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../common.mk" .include Index: projects/make-check-sandbox/lib/libarchive/Makefile =================================================================== --- projects/make-check-sandbox/lib/libarchive/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libarchive/Makefile (revision 321913) @@ -1,420 +1,418 @@ # $FreeBSD$ .include PACKAGE=lib${LIB} _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive LIB= archive LIBADD= z bz2 lzma bsdxml CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. SHLIB_MAJOR= 7 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" CFLAGS+= -I${.OBJDIR} .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_OPENSSL LIBADD+= crypto .else LIBADD+= md .endif .if ${MK_ICONV} != "no" # TODO: This can be changed back to CFLAGS once iconv works correctly # with statically linked binaries. SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST= .endif .if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \ ${MACHINE_ARCH:Msparc64*} != "" || ${MACHINE_ARCH:Mpowerpc*} != "" NO_WCAST_ALIGN= yes .if ${MACHINE_ARCH:M*64*} == "" CFLAGS+= -DPPMD_32BIT .endif .endif NO_WCAST_ALIGN.clang= .PATH: ${_LIBARCHIVEDIR}/libarchive # Headers to be installed in /usr/include INCS= archive.h archive_entry.h # Sources to be compiled. SRCS= archive_acl.c \ archive_check_magic.c \ archive_cmdline.c \ archive_cryptor.c \ archive_disk_acl_freebsd.c \ archive_digest.c \ archive_entry.c \ archive_entry_copy_stat.c \ archive_entry_link_resolver.c \ archive_entry_sparse.c \ archive_entry_stat.c \ archive_entry_strmode.c \ archive_entry_xattr.c \ archive_getdate.c \ archive_hmac.c \ archive_match.c \ archive_options.c \ archive_pack_dev.c \ archive_pathmatch.c \ archive_ppmd7.c \ archive_random.c \ archive_rb.c \ archive_read.c \ archive_read_add_passphrase.c \ archive_read_append_filter.c \ archive_read_data_into_fd.c \ archive_read_disk_entry_from_file.c \ archive_read_disk_posix.c \ archive_read_disk_set_standard_lookup.c \ archive_read_extract.c \ archive_read_extract2.c \ archive_read_open_fd.c \ archive_read_open_file.c \ archive_read_open_filename.c \ archive_read_open_memory.c \ archive_read_set_format.c \ archive_read_set_options.c \ archive_read_support_filter_all.c \ archive_read_support_filter_bzip2.c \ archive_read_support_filter_compress.c \ archive_read_support_filter_gzip.c \ archive_read_support_filter_grzip.c \ archive_read_support_filter_lrzip.c \ archive_read_support_filter_lz4.c \ archive_read_support_filter_lzop.c \ archive_read_support_filter_none.c \ archive_read_support_filter_program.c \ archive_read_support_filter_rpm.c \ archive_read_support_filter_uu.c \ archive_read_support_filter_xz.c \ archive_read_support_format_7zip.c \ archive_read_support_format_all.c \ archive_read_support_format_ar.c \ archive_read_support_format_by_code.c \ archive_read_support_format_cab.c \ archive_read_support_format_cpio.c \ archive_read_support_format_empty.c \ archive_read_support_format_iso9660.c \ archive_read_support_format_lha.c \ archive_read_support_format_mtree.c \ archive_read_support_format_rar.c \ archive_read_support_format_raw.c \ archive_read_support_format_tar.c \ archive_read_support_format_warc.c \ archive_read_support_format_xar.c \ archive_read_support_format_zip.c \ archive_string.c \ archive_string_sprintf.c \ archive_util.c \ archive_version_details.c \ archive_virtual.c \ archive_write.c \ archive_write_add_filter.c \ archive_write_disk_set_standard_lookup.c \ archive_write_disk_posix.c \ archive_write_open_fd.c \ archive_write_open_file.c \ archive_write_open_filename.c \ archive_write_open_memory.c \ archive_write_add_filter_b64encode.c \ archive_write_add_filter_by_name.c \ archive_write_add_filter_bzip2.c \ archive_write_add_filter_compress.c \ archive_write_add_filter_grzip.c \ archive_write_add_filter_gzip.c \ archive_write_add_filter_lrzip.c \ archive_write_add_filter_lz4.c \ archive_write_add_filter_lzop.c \ archive_write_add_filter_none.c \ archive_write_add_filter_program.c \ archive_write_add_filter_uuencode.c \ archive_write_add_filter_xz.c \ archive_write_set_format.c \ archive_write_set_format_7zip.c \ archive_write_set_format_ar.c \ archive_write_set_format_by_name.c \ archive_write_set_format_cpio.c \ archive_write_set_format_cpio_newc.c \ archive_write_set_format_filter_by_ext.c \ archive_write_set_format_gnutar.c \ archive_write_set_format_iso9660.c \ archive_write_set_format_mtree.c \ archive_write_set_format_pax.c \ archive_write_set_format_raw.c \ archive_write_set_format_shar.c \ archive_write_set_format_ustar.c \ archive_write_set_format_v7tar.c \ archive_write_set_format_warc.c \ archive_write_set_format_xar.c \ archive_write_set_format_zip.c \ archive_write_set_passphrase.c \ archive_write_set_options.c \ filter_fork_posix.c # Man pages to be installed. MAN= archive_entry.3 \ archive_entry_acl.3 \ archive_entry_linkify.3 \ archive_entry_paths.3 \ archive_entry_perms.3 \ archive_entry_stat.3 \ archive_entry_time.3 \ archive_read.3 \ archive_read_data.3 \ archive_read_disk.3 \ archive_read_extract.3 \ archive_read_filter.3 \ archive_read_format.3 \ archive_read_free.3 \ archive_read_header.3 \ archive_read_new.3 \ archive_read_open.3 \ archive_read_set_options.3 \ archive_util.3 \ archive_write.3 \ archive_write_blocksize.3 \ archive_write_data.3 \ archive_write_disk.3 \ archive_write_filter.3 \ archive_write_finish_entry.3 \ archive_write_format.3 \ archive_write_free.3 \ archive_write_header.3 \ archive_write_new.3 \ archive_write_open.3 \ archive_write_set_options.3 \ cpio.5 \ libarchive.3 \ libarchive_changes.3 \ libarchive_internals.3 \ libarchive-formats.5 \ tar.5 # Symlink the man pages under each function name. MLINKS+= archive_entry.3 archive_entry_clear.3 MLINKS+= archive_entry.3 archive_entry_clone.3 MLINKS+= archive_entry.3 archive_entry_free.3 MLINKS+= archive_entry.3 archive_entry_new.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_add_entry.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_add_entry_w.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_clear.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_count.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_next.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_next_w.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_reset.3 MLINKS+= archive_entry_acl.3 archive_entry_acl_text_w.3 MLINKS+= archive_entry_linkify.3 archive_entry_linkresolver.3 MLINKS+= archive_entry_linkify.3 archive_entry_linkresolver_new.3 MLINKS+= archive_entry_linkify.3 archive_entry_linkresolver_set_strategy.3 MLINKS+= archive_entry_linkify.3 archive_entry_linkresolver_free.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_hardlink.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_hardlink_w.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_link.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_link_w.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_pathname.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_pathname_w.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_sourcepath.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_symlink.3 MLINKS+= archive_entry_paths.3 archive_entry_copy_symlink_w.3 MLINKS+= archive_entry_paths.3 archive_entry_hardlink.3 MLINKS+= archive_entry_paths.3 archive_entry_hardlink_w.3 MLINKS+= archive_entry_paths.3 archive_entry_pathname.3 MLINKS+= archive_entry_paths.3 archive_entry_pathname_w.3 MLINKS+= archive_entry_paths.3 archive_entry_set_hardlink.3 MLINKS+= archive_entry_paths.3 archive_entry_set_link.3 MLINKS+= archive_entry_paths.3 archive_entry_set_pathname.3 MLINKS+= archive_entry_paths.3 archive_entry_set_symlink.3 MLINKS+= archive_entry_paths.3 archive_entry_symlink.3 MLINKS+= archive_entry_paths.3 archive_entry_symlink_w.3 MLINKS+= archive_entry_paths.3 archive_entry_update_symlink_utf8.3 MLINKS+= archive_entry_paths.3 archive_entry_update_hardlink_utf8.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_fflags_text.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_fflags_text_w.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_gname.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_gname_w.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_uname.3 MLINKS+= archive_entry_perms.3 archive_entry_copy_uname_w.3 MLINKS+= archive_entry_perms.3 archive_entry_fflags.3 MLINKS+= archive_entry_perms.3 archive_entry_fflags_text.3 MLINKS+= archive_entry_perms.3 archive_entry_gid.3 MLINKS+= archive_entry_perms.3 archive_entry_gname.3 MLINKS+= archive_entry_perms.3 archive_entry_gname_w.3 MLINKS+= archive_entry_perms.3 archive_entry_set_fflags.3 MLINKS+= archive_entry_perms.3 archive_entry_set_gid.3 MLINKS+= archive_entry_perms.3 archive_entry_set_gname.3 MLINKS+= archive_entry_perms.3 archive_entry_perm.3 MLINKS+= archive_entry_perms.3 archive_entry_set_perm.3 MLINKS+= archive_entry_perms.3 archive_entry_set_uid.3 MLINKS+= archive_entry_perms.3 archive_entry_set_uname.3 MLINKS+= archive_entry_perms.3 archive_entry_strmode.3 MLINKS+= archive_entry_perms.3 archive_entry_uid.3 MLINKS+= archive_entry_perms.3 archive_entry_uname.3 MLINKS+= archive_entry_perms.3 archive_entry_uname_w.3 MLINKS+= archive_entry_perms.3 archive_entry_update_gname_utf8.3 MLINKS+= archive_entry_perms.3 archive_entry_update_uname_utf8.3 MLINKS+= archive_entry_stat.3 archive_entry_copy_stat.3 MLINKS+= archive_entry_stat.3 archive_entry_dev.3 MLINKS+= archive_entry_stat.3 archive_entry_dev_is_set.3 MLINKS+= archive_entry_stat.3 archive_entry_devmajor.3 MLINKS+= archive_entry_stat.3 archive_entry_devminor.3 MLINKS+= archive_entry_stat.3 archive_entry_filetype.3 MLINKS+= archive_entry_stat.3 archive_entry_ino.3 MLINKS+= archive_entry_stat.3 archive_entry_ino64.3 MLINKS+= archive_entry_stat.3 archive_entry_ino_is_set.3 MLINKS+= archive_entry_stat.3 archive_entry_mode.3 MLINKS+= archive_entry_stat.3 archive_entry_nlink.3 MLINKS+= archive_entry_stat.3 archive_entry_rdev.3 MLINKS+= archive_entry_stat.3 archive_entry_rdevmajor.3 MLINKS+= archive_entry_stat.3 archive_entry_rdevminor.3 MLINKS+= archive_entry_stat.3 archive_entry_set_dev.3 MLINKS+= archive_entry_stat.3 archive_entry_set_devmajor.3 MLINKS+= archive_entry_stat.3 archive_entry_set_devminor.3 MLINKS+= archive_entry_stat.3 archive_entry_set_filetype.3 MLINKS+= archive_entry_stat.3 archive_entry_set_ino.3 MLINKS+= archive_entry_stat.3 archive_entry_set_ino64.3 MLINKS+= archive_entry_stat.3 archive_entry_set_mode.3 MLINKS+= archive_entry_stat.3 archive_entry_set_nlink.3 MLINKS+= archive_entry_stat.3 archive_entry_set_rdev.3 MLINKS+= archive_entry_stat.3 archive_entry_set_rdevmajor.3 MLINKS+= archive_entry_stat.3 archive_entry_set_rdevminor.3 MLINKS+= archive_entry_stat.3 archive_entry_set_size.3 MLINKS+= archive_entry_stat.3 archive_entry_size.3 MLINKS+= archive_entry_stat.3 archive_entry_size_is_set.3 MLINKS+= archive_entry_stat.3 archive_entry_unset_size.3 MLINKS+= archive_entry_time.3 archive_entry_atime.3 MLINKS+= archive_entry_time.3 archive_entry_atime_is_set.3 MLINKS+= archive_entry_time.3 archive_entry_atime_nsec.3 MLINKS+= archive_entry_time.3 archive_entry_birthtime.3 MLINKS+= archive_entry_time.3 archive_entry_birthtime_is_set.3 MLINKS+= archive_entry_time.3 archive_entry_birthtime_nsec.3 MLINKS+= archive_entry_time.3 archive_entry_ctime.3 MLINKS+= archive_entry_time.3 archive_entry_ctime_is_set.3 MLINKS+= archive_entry_time.3 archive_entry_ctime_nsec.3 MLINKS+= archive_entry_time.3 archive_entry_mtime.3 MLINKS+= archive_entry_time.3 archive_entry_mtime_is_set.3 MLINKS+= archive_entry_time.3 archive_entry_mtime_nsec.3 MLINKS+= archive_entry_time.3 archive_entry_set_atime.3 MLINKS+= archive_entry_time.3 archive_entry_set_birthtime.3 MLINKS+= archive_entry_time.3 archive_entry_set_ctime.3 MLINKS+= archive_entry_time.3 archive_entry_set_mtime.3 MLINKS+= archive_entry_time.3 archive_entry_unset_atime.3 MLINKS+= archive_entry_time.3 archive_entry_unset_birthtime.3 MLINKS+= archive_entry_time.3 archive_entry_unset_ctime.3 MLINKS+= archive_entry_time.3 archive_entry_unset_mtime.3 MLINKS+= archive_read_data.3 archive_read_data_block.3 MLINKS+= archive_read_data.3 archive_read_data_into_fd.3 MLINKS+= archive_read_data.3 archive_read_data_skip.3 MLINKS+= archive_read_header.3 archive_read_next_header.3 MLINKS+= archive_read_header.3 archive_read_next_header2.3 MLINKS+= archive_read_extract.3 archive_read_extract2.3 MLINKS+= archive_read_extract.3 archive_read_extract_set_progress_callback.3 MLINKS+= archive_read_extract.3 archive_read_extract_set_skip_file.3 MLINKS+= archive_read_open.3 archive_read_open2.3 MLINKS+= archive_read_open.3 archive_read_open_FILE.3 MLINKS+= archive_read_open.3 archive_read_open_fd.3 MLINKS+= archive_read_open.3 archive_read_open_file.3 MLINKS+= archive_read_open.3 archive_read_open_filename.3 MLINKS+= archive_read_open.3 archive_read_open_memory.3 MLINKS+= archive_read_free.3 archive_read_close.3 MLINKS+= archive_read_free.3 archive_read_finish.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_all.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_bzip2.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_compress.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_gzip.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_lzma.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_none.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_xz.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_program.3 MLINKS+= archive_read_filter.3 archive_read_support_filter_program_signature.3 MLINKS+= archive_read_format.3 archive_read_support_format_7zip.3 MLINKS+= archive_read_format.3 archive_read_support_format_all.3 MLINKS+= archive_read_format.3 archive_read_support_format_ar.3 MLINKS+= archive_read_format.3 archive_read_support_format_by_code.3 MLINKS+= archive_read_format.3 archive_read_support_format_cab.3 MLINKS+= archive_read_format.3 archive_read_support_format_cpio.3 MLINKS+= archive_read_format.3 archive_read_support_format_empty.3 MLINKS+= archive_read_format.3 archive_read_support_format_iso9660.3 MLINKS+= archive_read_format.3 archive_read_support_format_lha.3 MLINKS+= archive_read_format.3 archive_read_support_format_mtree.3 MLINKS+= archive_read_format.3 archive_read_support_format_rar.3 MLINKS+= archive_read_format.3 archive_read_support_format_raw.3 MLINKS+= archive_read_format.3 archive_read_support_format_tar.3 MLINKS+= archive_read_format.3 archive_read_support_format_xar.3 MLINKS+= archive_read_format.3 archive_read_support_format_zip.3 MLINKS+= archive_read_disk.3 archive_read_disk_entry_from_file.3 MLINKS+= archive_read_disk.3 archive_read_disk_gname.3 MLINKS+= archive_read_disk.3 archive_read_disk_new.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_gname_lookup.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_standard_lookup.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_hybrid.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_logical.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_symlink_physical.3 MLINKS+= archive_read_disk.3 archive_read_disk_set_uname_lookup.3 MLINKS+= archive_read_disk.3 archive_read_disk_uname.3 MLINKS+= archive_read_set_options.3 archive_read_set_filter_option.3 MLINKS+= archive_read_set_options.3 archive_read_set_format_option.3 MLINKS+= archive_read_set_options.3 archive_read_set_option.3 MLINKS+= archive_util.3 archive_clear_error.3 MLINKS+= archive_util.3 archive_compression.3 MLINKS+= archive_util.3 archive_compression_name.3 MLINKS+= archive_util.3 archive_copy_error.3 MLINKS+= archive_util.3 archive_errno.3 MLINKS+= archive_util.3 archive_error_string.3 MLINKS+= archive_util.3 archive_file_count.3 MLINKS+= archive_util.3 archive_filter_code.3 MLINKS+= archive_util.3 archive_filter_count.3 MLINKS+= archive_util.3 archive_filter_name.3 MLINKS+= archive_util.3 archive_format.3 MLINKS+= archive_util.3 archive_format_name.3 MLINKS+= archive_util.3 archive_position.3 MLINKS+= archive_util.3 archive_set_error.3 MLINKS+= archive_write_blocksize.3 archive_write_get_bytes_in_last_block.3 MLINKS+= archive_write_blocksize.3 archive_write_get_bytes_per_block.3 MLINKS+= archive_write_blocksize.3 archive_write_set_bytes_in_last_block.3 MLINKS+= archive_write_blocksize.3 archive_write_set_bytes_per_block.3 MLINKS+= archive_write_disk.3 archive_write_data_block.3 MLINKS+= archive_write_disk.3 archive_write_disk_new.3 MLINKS+= archive_write_disk.3 archive_write_disk_set_group_lookup.3 MLINKS+= archive_write_disk.3 archive_write_disk_set_options.3 MLINKS+= archive_write_disk.3 archive_write_disk_set_skip_file.3 MLINKS+= archive_write_disk.3 archive_write_disk_set_standard_lookup.3 MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_bzip2.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_compress.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_gzip.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_lzip.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_lzma.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_none.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_program.3 MLINKS+= archive_write_filter.3 archive_write_add_filter_xz.3 MLINKS+= archive_write_format.3 archive_write_set_format_cpio.3 MLINKS+= archive_write_format.3 archive_write_set_format_pax.3 MLINKS+= archive_write_format.3 archive_write_set_format_pax_restricted.3 MLINKS+= archive_write_format.3 archive_write_set_format_shar.3 MLINKS+= archive_write_format.3 archive_write_set_format_shar_dump.3 MLINKS+= archive_write_format.3 archive_write_set_format_ustar.3 MLINKS+= archive_write_free.3 archive_write_close.3 MLINKS+= archive_write_free.3 archive_write_fail.3 MLINKS+= archive_write_free.3 archive_write_finish.3 MLINKS+= archive_write_open.3 archive_write_open_FILE.3 MLINKS+= archive_write_open.3 archive_write_open_fd.3 MLINKS+= archive_write_open.3 archive_write_open_file.3 MLINKS+= archive_write_open.3 archive_write_open_filename.3 MLINKS+= archive_write_open.3 archive_write_open_memory.3 MLINKS+= archive_write_set_options.3 archive_write_set_filter_option.3 MLINKS+= archive_write_set_options.3 archive_write_set_format_option.3 MLINKS+= archive_write_set_options.3 archive_write_set_option.3 MLINKS+= libarchive.3 archive.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libc/Makefile =================================================================== --- projects/make-check-sandbox/lib/libc/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libc/Makefile (revision 321913) @@ -1,209 +1,207 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # $FreeBSD$ PACKAGE= clibs SHLIBDIR?= /lib .include # Force building of libc_pic.a MK_TOOLCHAIN= yes LIBC_SRCTOP?= ${.CURDIR} # Pick the current architecture directory for libc. In general, this is # named MACHINE_CPUARCH, but some ABIs are different enough to require # their own libc, so allow a directory named MACHINE_ARCH to override this. .if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) LIBC_ARCH=${MACHINE_ARCH} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS # below. Note: there are no IDs for syscall stubs whose sources are generated. # To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS # to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. LIB=c SHLIB_MAJOR= 7 .if ${MK_SSP} != "no" SHLIB_LDSCRIPT=libc.ldscript .else SHLIB_LDSCRIPT=libc_nossp.ldscript .endif SHLIB_LDSCRIPT_LINKS=libxnet.so WARNS?= 2 CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS .endif CLEANFILES+=tags INSTALL_PIC_ARCHIVE= PRECIOUSLIB= .ifndef NO_THREAD_STACK_UNWIND CANCELPOINTS_CFLAGS=-fexceptions CFLAGS+=${CANCELPOINTS_CFLAGS} .endif # # Link with static libcompiler_rt.a. # LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt .if ${MK_SSP} != "no" LIBADD+= ssp_nonshared .endif # Extras that live in either libc.a or libc_nonshared.a LIBC_NONSHARED_SRCS= # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= MISRCS= MDASM= MIASM= NOASM= .include "${LIBC_SRCTOP}/${LIBC_ARCH}/Makefile.inc" .include "${LIBC_SRCTOP}/db/Makefile.inc" .include "${LIBC_SRCTOP}/compat-43/Makefile.inc" .include "${LIBC_SRCTOP}/gdtoa/Makefile.inc" .include "${LIBC_SRCTOP}/gen/Makefile.inc" .include "${LIBC_SRCTOP}/gmon/Makefile.inc" .if ${MK_ICONV} != "no" .include "${LIBC_SRCTOP}/iconv/Makefile.inc" .endif .include "${LIBC_SRCTOP}/inet/Makefile.inc" .include "${LIBC_SRCTOP}/isc/Makefile.inc" .include "${LIBC_SRCTOP}/locale/Makefile.inc" .include "${LIBC_SRCTOP}/md/Makefile.inc" .include "${LIBC_SRCTOP}/nameser/Makefile.inc" .include "${LIBC_SRCTOP}/net/Makefile.inc" .include "${LIBC_SRCTOP}/nls/Makefile.inc" .include "${LIBC_SRCTOP}/posix1e/Makefile.inc" .if ${LIBC_ARCH} != "aarch64" && \ ${LIBC_ARCH} != "amd64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "riscv" && \ ${LIBC_ARCH} != "sparc64" && \ ${MACHINE_ARCH:Mmipsn32*} == "" && \ ${MACHINE_ARCH:Mmips64*} == "" .include "${LIBC_SRCTOP}/quad/Makefile.inc" .endif .include "${LIBC_SRCTOP}/regex/Makefile.inc" .include "${LIBC_SRCTOP}/resolv/Makefile.inc" .include "${LIBC_SRCTOP}/stdio/Makefile.inc" .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" .include "${LIBC_SRCTOP}/stdlib/jemalloc/Makefile.inc" .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" .include "${LIBC_SRCTOP}/string/Makefile.inc" .include "${LIBC_SRCTOP}/sys/Makefile.inc" .include "${LIBC_SRCTOP}/secure/Makefile.inc" .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" .if (${LIBC_ARCH} == "arm" && \ (${MACHINE_ARCH:Marmv6*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ (${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") || \ (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" .include "${LIBC_SRCTOP}/x86/sys/Makefile.inc" .endif .if ${MK_NIS} != "no" CFLAGS+= -DYP .include "${LIBC_SRCTOP}/yp/Makefile.inc" .endif .include "${LIBC_SRCTOP}/capability/Makefile.inc" .if ${MK_HESIOD} != "no" CFLAGS+= -DHESIOD .endif .if ${MK_FP_LIBC} == "no" CFLAGS+= -DNO_FLOATING_POINT .endif .if ${MK_NS_CACHING} != "no" CFLAGS+= -DNS_CACHING .endif .if defined(_FREEFALL_CONFIG) CFLAGS+=-D_FREEFALL_CONFIG .endif STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} VERSION_DEF=${LIBC_SRCTOP}/Versions.def SYMBOL_MAPS=${SYM_MAPS} CFLAGS+= -DSYMBOL_VERSIONING # If there are no machine dependent sources, append all the # machine-independent sources: .if empty(MDSRCS) SRCS+= ${MISRCS} .else # Append machine-dependent sources, then append machine-independent sources # for which there is no machine-dependent variant. SRCS+= ${MDSRCS} .for _src in ${MISRCS} .if ${MDSRCS:R:M${_src:R}} == "" SRCS+= ${_src} .endif .endfor .endif KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c mcount.c strcat.c strchr.c \ strcmp.c strcpy.c strlen.c strncpy.c strrchr.c libkern: libkern.gen libkern.${LIBC_ARCH} libkern.gen: ${KQSRCS} ${KSRCS} ${CP} ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern libkern.${LIBC_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include .if !defined(_SKIP_BUILD) # We need libutil.h, get it directly to avoid # recording a build dependency CFLAGS+= -I${SRCTOP}/lib/libutil # Same issue with libm MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${SRCTOP}/lib/msun -V ARCH_SUBDIR # unfortunately msun/src contains both private and public headers CFLAGS+= -I${SRCTOP}/lib/msun/${MSUN_ARCH_SUBDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -I${SRCTOP}/lib/msun/x86 .endif CFLAGS+= -I${SRCTOP}/lib/msun/src # and we do not want to record a dependency on msun .if ${.MAKE.LEVEL} > 0 GENDIRDEPS_FILTER+= N${RELDIR:H}/msun .endif .endif # Disable warnings in contributed sources. CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} # XXX For now, we don't allow libc to be compiled with # -fstack-protector-all because it breaks rtld. We may want to make a librtld # in the future to circumvent this. SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} # Disable stack protection for SSP symbols. SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} # Generate stack unwinding tables for cancellation points CANCELPOINTS_CFLAGS:= ${.IMPSRC:Mcancelpoints_*:C/^.+$/${CANCELPOINTS_CFLAGS}/:C/^$//} Index: projects/make-check-sandbox/lib/libcasper/services/cap_dns/Makefile =================================================================== --- projects/make-check-sandbox/lib/libcasper/services/cap_dns/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libcasper/services/cap_dns/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ SHLIBDIR?= /lib/casper .include PACKAGE=libcasper LIB= cap_dns SHLIB_MAJOR= 0 INCSDIR?= ${INCLUDEDIR}/casper SRCS= cap_dns.c INCS= cap_dns.h LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libcasper/services/cap_grp/Makefile =================================================================== --- projects/make-check-sandbox/lib/libcasper/services/cap_grp/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libcasper/services/cap_grp/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ SHLIBDIR?= /lib/casper .include PACKAGE=libcasper LIB= cap_grp SHLIB_MAJOR= 0 INCSDIR?= ${INCLUDEDIR}/casper SRCS= cap_grp.c INCS= cap_grp.h LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libcasper/services/cap_pwd/Makefile =================================================================== --- projects/make-check-sandbox/lib/libcasper/services/cap_pwd/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libcasper/services/cap_pwd/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ SHLIBDIR?= /lib/casper .include PACKAGE=libcasper LIB= cap_pwd SHLIB_MAJOR= 0 INCSDIR?= ${INCLUDEDIR}/casper SRCS= cap_pwd.c INCS= cap_pwd.h LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libcasper/services/cap_sysctl/Makefile =================================================================== --- projects/make-check-sandbox/lib/libcasper/services/cap_sysctl/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libcasper/services/cap_sysctl/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ SHLIBDIR?= /lib/casper .include PACKAGE=libcasper LIB= cap_sysctl SHLIB_MAJOR= 0 INCSDIR?= ${INCLUDEDIR}/casper SRCS= cap_sysctl.c INCS= cap_sysctl.h LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libcrypt/Makefile =================================================================== --- projects/make-check-sandbox/lib/libcrypt/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libcrypt/Makefile (revision 321913) @@ -1,51 +1,49 @@ # # $FreeBSD$ # PACKAGE=lib${LIB} SHLIBDIR?= /lib .include SHLIB_MAJOR= 5 LIB= crypt .PATH: ${SRCTOP}/lib/libmd ${SRCTOP}/sys/crypto/sha2 SRCS= crypt.c misc.c \ crypt-md5.c md5c.c \ crypt-nthash.c md4c.c \ crypt-sha256.c sha256c.c \ crypt-sha512.c sha512c.c MAN= crypt.3 MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \ crypt.3 crypt_set_format.3 CFLAGS+= -I${SRCTOP}/lib/libmd -I${SRCTOP}/lib/libutil \ -I${SRCTOP}/sys/crypto/sha2 # Pull in the strong crypto, if it is present. .if exists(${SRCTOP}/secure/lib/libcrypt) && ${MK_CRYPT} != "no" .PATH: ${SRCTOP}/secure/lib/libcrypt SRCS+= crypt-des.c crypt-blowfish.c blowfish.c CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH .endif .for sym in MD4Init MD4Final MD4Update MD4Pad \ MD5Init MD5Final MD5Update MD5Pad \ SHA256_Init SHA256_Final SHA256_Update \ SHA512_224_Init SHA512_224_Final SHA512_224_Update \ SHA512_256_Init SHA512_256_Final SHA512_256_Update \ SHA384_Init SHA384_Final SHA384_Update \ SHA512_Init SHA512_Final SHA512_Update CFLAGS+= -D${sym}=__${sym} .endfor WARNS?= 2 PRECIOUSLIB= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include .include Index: projects/make-check-sandbox/lib/libmp/Makefile =================================================================== --- projects/make-check-sandbox/lib/libmp/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libmp/Makefile (revision 321913) @@ -1,22 +1,20 @@ # $FreeBSD$ .include PACKAGE=lib${LIB} LIB= mp SHLIB_MAJOR= 7 LIBADD= crypto MAN= libmp.3 INCS= mp.h SRCS= mpasbn.c CFLAGS+= -I${SRCTOP}/crypto VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libnv/Makefile =================================================================== --- projects/make-check-sandbox/lib/libnv/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libnv/Makefile (revision 321913) @@ -1,24 +1,22 @@ # $FreeBSD$ PACKAGE=lib${LIB} SHLIBDIR?= /lib .include LIB= nv SHLIB_MAJOR= 0 .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys CFLAGS+=-I${SRCTOP}/sys -I${.CURDIR} SRCS= cnvlist.c SRCS+= dnvlist.c SRCS+= msgio.c SRCS+= nvlist.c SRCS+= nvpair.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libpathconv/Makefile =================================================================== --- projects/make-check-sandbox/lib/libpathconv/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libpathconv/Makefile (revision 321913) @@ -1,20 +1,18 @@ # $FreeBSD$ .include PACKAGE=lib${LIB} LIB= pathconv SHLIB_MAJOR= 1 MAN= rel2abs.3 abs2rel.3 INCS= pathconv.h SRCS= abs2rel.c rel2abs.c #VERSION_DEF= ${SRCTOP/lib/libc/Versions.def #SYMBOL_MAPS= ${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libproc/Makefile =================================================================== --- projects/make-check-sandbox/lib/libproc/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libproc/Makefile (revision 321913) @@ -1,48 +1,46 @@ # $FreeBSD$ .include PACKAGE=lib${LIB} LIB= proc SRCS= crc32.c \ proc_bkpt.c \ proc_create.c \ proc_regs.c \ proc_sym.c \ proc_rtld.c \ proc_util.c INCS= libproc.h CFLAGS+= -I${.CURDIR} .if ${MK_CXX} == "no" CFLAGS+= -DNO_CXA_DEMANGLE .elif ${MK_LIBCPLUSPLUS} != "no" LIBADD+= cxxrt .else LIBADD+= supcplusplus .endif LIBADD+= elf procstat rtld_db util .if ${MK_CDDL} != "no" LIBADD+= ctf IGNORE_PRAGMA= YES CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common \ -I${SRCTOP}/sys/cddl/compat/opensolaris .else CFLAGS+= -DNO_CTF .endif SHLIB_MAJOR= 4 MAN= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/librt/Makefile =================================================================== --- projects/make-check-sandbox/lib/librt/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/librt/Makefile (revision 321913) @@ -1,28 +1,26 @@ # $FreeBSD$ .include PACKAGE=lib${LIB} LIB=rt SHLIB_MAJOR= 1 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR} .ifndef NO_THREAD_STACK_UNWIND CFLAGS+=-fexceptions .endif CFLAGS+=-Winline -Wall LIBADD= pthread WARNS?= 2 SRCS+= aio.c mq.c sigev_thread.c timer.c PRECIOUSLIB= VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libthr/Makefile =================================================================== --- projects/make-check-sandbox/lib/libthr/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libthr/Makefile (revision 321913) @@ -1,76 +1,74 @@ # $FreeBSD$ # # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS # below. Note, there are no IDs for syscall stubs whose sources are generated. # To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS # (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the # system call stubs. PACKAGE= clibs SHLIBDIR?= /lib .include MK_SSP= no LIB=thr SHLIB_MAJOR= 3 NO_WTHREAD_SAFETY=1 NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ -I${SRCTOP}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${SRCTOP}/libexec/rtld-elf CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} CFLAGS+=-I${SRCTOP}/lib/libthread_db CFLAGS+=-Winline CFLAGS.thr_stack.c+= -Wno-cast-align .include .if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations .endif .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions CFLAGS+=-D_PTHREAD_FORCED_UNWIND .endif LDFLAGS+=-Wl,-znodelete VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map MAN= libthr.3 # enable extra internal consistency checks CFLAGS+=-D_PTHREADS_INVARIANTS PRECIOUSLIB= .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} .if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc) .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" .endif .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" .if ${MK_INSTALLLIB} != "no" SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a .endif .if !defined(NO_PIC) SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so .endif .if ${MK_PROFILE} != "no" SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libutil/Makefile =================================================================== --- projects/make-check-sandbox/lib/libutil/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libutil/Makefile (revision 321913) @@ -1,91 +1,89 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ PACKAGE=lib${LIB} SHLIBDIR?= /lib .include LIB= util SHLIB_MAJOR= 9 SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ hexdump.c humanize_number.c kinfo_getfile.c \ kinfo_getallproc.c kinfo_getproc.c kinfo_getvmmap.c \ kinfo_getvmobject.c kld.c \ login_auth.c login_cap.c \ login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \ pidfile.c property.c pty.c pw_util.c quotafile.c realhostname.c \ stub.c trimdomain.c uucplock.c INCS= libutil.h login_cap.h CFLAGS+= -DLIBC_SCCS .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif CFLAGS+= -I${.CURDIR} -I${SRCTOP}/lib/libc/gen/ MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \ humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \ kinfo_getproc.3 kinfo_getvmmap.3 kinfo_getvmobject.3 kld.3 \ login_auth.3 login_cap.3 \ login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \ property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ login_cap.3 login_getcaplist.3 login_cap.3 login_getcapnum.3 \ login_cap.3 login_getcapsize.3 login_cap.3 login_getcapstr.3 \ login_cap.3 login_getcaptime.3 login_cap.3 login_getclass.3 \ login_cap.3 login_getclassbyname.3 login_cap.3 login_getpath.3 \ login_cap.3 login_getpwclass.3 login_cap.3 login_getstyle.3 \ login_cap.3 login_getuserclass.3 login_cap.3 login_setcryptfmt.3 MLINKS+=login_class.3 setclasscontext.3 login_class.3 setclassenvironment.3 \ login_class.3 setclassresources.3 login_class.3 setusercontext.3 MLINKS+=login_ok.3 auth_hostok.3 login_ok.3 auth_timeok.3 \ login_ok.3 auth_ttyok.3 MLINKS+=login_times.3 in_lt.3 login_times.3 in_ltm.3 \ login_times.3 in_ltms.3 \ login_times.3 in_lts.3 \ login_times.3 parse_lt.3 MLINKS+=pidfile.3 pidfile_close.3 \ pidfile.3 pidfile_fileno.3 \ pidfile.3 pidfile_open.3 \ pidfile.3 pidfile_remove.3 \ pidfile.3 pidfile_write.3 MLINKS+=property.3 property_find.3 property.3 properties_free.3 MLINKS+=property.3 properties_read.3 MLINKS+=pty.3 forkpty.3 pty.3 openpty.3 MLINKS+=quotafile.3 quota_close.3 \ quotafile.3 quota_fsname.3 \ quotafile.3 quota_open.3 \ quotafile.3 quota_qfname.3 \ quotafile.3 quota_read.3 \ quotafile.3 quota_statfs.3 \ quotafile.3 quota_write_limits.3 \ quotafile.3 quota_write_usage.3 MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_lock_txfr.3 \ uucplock.3 uu_lockerr.3 uucplock.3 uu_unlock.3 MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_dup.3 \ pw_util.3 pw_edit.3 \ pw_util.3 pw_equal.3 \ pw_util.3 pw_fini.3 \ pw_util.3 pw_init.3 \ pw_util.3 pw_make.3 \ pw_util.3 pw_make_v7.3 \ pw_util.3 pw_mkdb.3 \ pw_util.3 pw_lock.3 \ pw_util.3 pw_scan.3 \ pw_util.3 pw_tempname.3 \ pw_util.3 pw_tmp.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/libxo/Makefile =================================================================== --- projects/make-check-sandbox/lib/libxo/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/libxo/Makefile (revision 321913) @@ -1,117 +1,115 @@ # $FreeBSD$ PACKAGE=lib${LIB} SHLIBDIR?= /lib .include LIBXOSRC= ${SRCTOP}/contrib/libxo .PATH: ${LIBXOSRC}/libxo LIB= xo SHLIB_MAJOR=0 SRCS= libxo.c xo_encoder.c xo_syslog.c CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR} CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\" INCS= xo.h xo_encoder.h INCSDIR=${INCLUDEDIR}/libxo LIBADD= util WARNS?= 5 MAN+= libxo.3 MAN+= xo_attr.3 \ xo_create.3 \ xo_emit.3 \ xo_emit_err.3 \ xo_err.3 \ xo_error.3 \ xo_finish.3 \ xo_flush.3 \ xo_message.3 \ xo_no_setlocale.3 \ xo_open_container.3 \ xo_open_list.3 \ xo_open_marker.3 \ xo_parse_args.3 \ xo_set_allocator.3 \ xo_set_flags.3 \ xo_set_info.3 \ xo_set_options.3 \ xo_set_style.3 \ xo_set_syslog_enterprise_id.3 \ xo_set_version.3 \ xo_set_writer.3 \ xo_syslog.3 MAN+= xo_format.5 MAN+= xo_options.7 MLINKS= xo_attr.3 xo_attr_h.3 \ xo_attr.3 xo_attr_hv.3 \ xo_create.3 xo_create_to_file.3 \ xo_create.3 xo_destroy.3 \ xo_emit.3 xo_emit_h.3 \ xo_emit.3 xo_emit_hv.3 \ xo_emit_err.3 xo_emit_errc.3 \ xo_emit_err.3 xo_emit_errx.3 \ xo_emit_err.3 xo_emit_warn.3 \ xo_emit_err.3 xo_emit_warnx.3 \ xo_emit_err.3 xo_emit_warn_c.3 \ xo_emit_err.3 xo_emit_warn_hc.3 \ xo_err.3 xo_errc.3 \ xo_err.3 xo_errx.3 \ xo_err.3 xo_warn.3 \ xo_err.3 xo_warnx.3 \ xo_err.3 xo_warn_c.3 \ xo_err.3 xo_warn_hc.3 \ xo_finish.3 xo_finish_h.3 \ xo_flush.3 xo_flush_h.3 \ xo_message.3 xo_message_c.3 \ xo_message.3 xo_message_hc.3 \ xo_message.3 xo_message_hcv.3 \ xo_open_container.3 xo_open_container_h.3 \ xo_open_container.3 xo_open_container_hd.3 \ xo_open_container.3 xo_open_container_d.3 \ xo_open_container.3 xo_close_container.3 \ xo_open_container.3 xo_close_container_h.3 \ xo_open_container.3 xo_close_container_hd.3 \ xo_open_container.3 xo_close_container_d.3 \ xo_open_list.3 xo_open_list_h.3 \ xo_open_list.3 xo_open_list_hd.3 \ xo_open_list.3 xo_open_list_d.3 \ xo_open_list.3 xo_open_instance.3 \ xo_open_list.3 xo_open_instance_h.3 \ xo_open_list.3 xo_open_instance_hd.3 \ xo_open_list.3 xo_open_instance_d.3 \ xo_open_list.3 xo_close_instance.3 \ xo_open_list.3 xo_close_instance_h.3 \ xo_open_list.3 xo_close_instance_hd.3 \ xo_open_list.3 xo_close_instance_d.3 \ xo_open_list.3 xo_close_list.3 \ xo_open_list.3 xo_close_list_h.3 \ xo_open_list.3 xo_close_list_hd.3 \ xo_open_list.3 xo_close_list_d.3 \ xo_open_marker.3 xo_open_marker_h.3 \ xo_open_marker.3 xo_close_marker.3 \ xo_open_marker.3 xo_close_marker_h.3 \ xo_parse_args.3 xo_set_program.3 \ xo_set_flags.3 xo_clear_flags.3 \ xo_set_style.3 xo_set_style_name.3 \ xo_set_version.3 xo_set_version_h.3 \ xo_syslog.3 xo_close_log.3 \ xo_syslog.3 xo_open_log.3 \ xo_syslog.3 xo_set_logmask.3 \ xo_syslog.3 xo_vsyslog.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/lib/msun/Makefile =================================================================== --- projects/make-check-sandbox/lib/msun/Makefile (revision 321912) +++ projects/make-check-sandbox/lib/msun/Makefile (revision 321913) @@ -1,235 +1,233 @@ # @(#)Makefile 5.1beta 93/09/24 # $FreeBSD$ # # ==================================================== # Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. # # Developed at SunPro, a Sun Microsystems, Inc. business. # Permission to use, copy, modify, and distribute this # software is freely granted, provided that this notice # is preserved. # ==================================================== # # PACKAGE= clibs ARCH_SUBDIR= ${MACHINE_CPUARCH:S/i386/i387/} .include "${ARCH_SUBDIR}/Makefile.inc" .PATH: ${.CURDIR}/${ARCH_SUBDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" .PATH: ${.CURDIR}/x86 CFLAGS+= -I${.CURDIR}/x86 .endif # long double format .if ${LDBL_PREC} == 64 .PATH: ${.CURDIR}/ld80 CFLAGS+= -I${.CURDIR}/ld80 .elif ${LDBL_PREC} == 113 .PATH: ${.CURDIR}/ld128 CFLAGS+= -I${.CURDIR}/ld128 .endif CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man LIB= m SHLIBDIR?= /lib SHLIB_MAJOR= 5 WARNS?= 1 IGNORE_PRAGMA= COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \ e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \ e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \ e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \ e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \ e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.c \ e_pow.c e_powf.c e_rem_pio2.c \ e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \ e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c fenv.c \ imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \ s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabsf.c s_fdim.c \ s_finite.c s_finitef.c \ s_floor.c s_floorf.c s_fma.c s_fmaf.c \ s_fmax.c s_fmaxf.c s_fmin.c \ s_fminf.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_ilogbl.c s_isfinite.c s_isnan.c s_isnormal.c \ s_llrint.c s_llrintf.c s_llround.c s_llroundf.c s_llroundl.c \ s_log1p.c s_log1pf.c s_logb.c s_logbf.c s_lrint.c s_lrintf.c \ s_lround.c s_lroundf.c s_lroundl.c s_modff.c \ s_nan.c s_nearbyint.c s_nextafter.c s_nextafterf.c \ s_nexttowardf.c s_remquo.c s_remquof.c \ s_rint.c s_rintf.c s_round.c s_roundf.c \ s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ s_signgam.c s_significand.c s_significandf.c s_sin.c \ s_sincos.c s_sincosf.c s_sinf.c \ s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ w_cabs.c w_cabsf.c w_drem.c w_dremf.c # Location of fpmath.h and _fpmath.h .if exists(${LIBCSRCDIR}/${MACHINE_ARCH}) LIBC_ARCH=${MACHINE_ARCH} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif CFLAGS+= -I${.CURDIR}/src -I${LIBCSRCDIR}/include \ -I${LIBCSRCDIR}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} # C99 long double functions COMMON_SRCS+= s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c .if ${LDBL_PREC} != 53 # If long double != double use these; otherwise, we alias the double versions. COMMON_SRCS+= catrigl.c \ e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \ e_coshl.c e_fmodl.c e_hypotl.c \ e_lgammal.c e_lgammal_r.c \ e_remainderl.c e_sinhl.c e_sqrtl.c \ invtrig.c k_cosl.c k_sinl.c k_tanl.c \ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ s_csqrtl.c s_erfl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_fmaxl.c s_fminl.c s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c \ s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c .endif # C99 complex functions COMMON_SRCS+= catrig.c catrigf.c \ s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \ s_cimag.c s_cimagf.c s_cimagl.c \ s_conj.c s_conjf.c s_conjl.c \ s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \ s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c # FreeBSD's C library supplies these functions: #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c # Exclude the generic versions of what we provide in the MD area. .if defined(ARCH_SRCS) .for i in ${ARCH_SRCS} COMMON_SRCS:= ${COMMON_SRCS:N${i:R}.c} .endfor .endif SRCS= ${COMMON_SRCS} ${ARCH_SRCS} INCS+= fenv.h math.h MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ ceil.3 cacos.3 ccos.3 ccosh.3 cexp.3 \ cimag.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 \ fma.3 fmax.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ lgamma.3 log.3 lrint.3 lround.3 math.3 nan.3 \ nextafter.3 remainder.3 rint.3 \ round.3 scalbn.3 signbit.3 sin.3 sincos.3 \ sinh.3 sqrt.3 tan.3 tanh.3 trunc.3 \ complex.3 MLINKS+=acos.3 acosf.3 acos.3 acosl.3 MLINKS+=acosh.3 acoshf.3 acosh.3 acoshl.3 MLINKS+=asin.3 asinf.3 asin.3 asinl.3 MLINKS+=asinh.3 asinhf.3 asinh.3 asinhl.3 MLINKS+=atan.3 atanf.3 atan.3 atanl.3 MLINKS+=atanh.3 atanhf.3 atanh.3 atanhl.3 MLINKS+=atan2.3 atan2f.3 atan2.3 atan2l.3 \ atan2.3 carg.3 atan2.3 cargf.3 atan2.3 cargl.3 MLINKS+=cacos.3 cacosf.3 cacos.3 cacosl.3 \ cacos.3 cacosh.3 cacos.3 cacoshf.3 cacos.3 cacoshl.3 \ cacos.3 casin.3 cacos.3 casinf.3 cacos.3 casinl.3 \ cacos.3 casinh.3 cacos.3 casinhf.3 cacos.3 casinhl.3 \ cacos.3 catan.3 cacos.3 catanf.3 cacos.3 catanl.3 \ cacos.3 catanh.3 cacos.3 catanhf.3 cacos.3 catanhl.3 MLINKS+=ccos.3 ccosf.3 ccos.3 csin.3 ccos.3 csinf.3 ccos.3 ctan.3 ccos.3 ctanf.3 MLINKS+=ccosh.3 ccoshf.3 ccosh.3 csinh.3 ccosh.3 csinhf.3 \ ccosh.3 ctanh.3 ccosh.3 ctanhf.3 MLINKS+=ceil.3 ceilf.3 ceil.3 ceill.3 MLINKS+=cexp.3 cexpf.3 MLINKS+=cimag.3 cimagf.3 cimag.3 cimagl.3 \ cimag.3 conj.3 cimag.3 conjf.3 cimag.3 conjl.3 \ cimag.3 cproj.3 cimag.3 cprojf.3 cimag.3 cprojl.3 \ cimag.3 creal.3 cimag.3 crealf.3 cimag.3 creall.3 MLINKS+=copysign.3 copysignf.3 copysign.3 copysignl.3 MLINKS+=cos.3 cosf.3 cos.3 cosl.3 MLINKS+=cosh.3 coshf.3 cosh.3 coshl.3 MLINKS+=csqrt.3 csqrtf.3 csqrt.3 csqrtl.3 MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 erf.3 erfl.3 erf.3 erfcl.3 MLINKS+=exp.3 expm1.3 exp.3 expm1f.3 exp.3 expm1l.3 exp.3 pow.3 exp.3 powf.3 \ exp.3 powl.3 exp.3 exp2.3 exp.3 exp2f.3 exp.3 exp2l.3 exp.3 expf.3 \ exp.3 expl.3 MLINKS+=fabs.3 fabsf.3 fabs.3 fabsl.3 MLINKS+=fdim.3 fdimf.3 fdim.3 fdiml.3 MLINKS+=feclearexcept.3 fegetexceptflag.3 feclearexcept.3 feraiseexcept.3 \ feclearexcept.3 fesetexceptflag.3 feclearexcept.3 fetestexcept.3 MLINKS+=feenableexcept.3 fedisableexcept.3 feenableexcept.3 fegetexcept.3 MLINKS+=fegetenv.3 feholdexcept.3 fegetenv.3 fesetenv.3 \ fegetenv.3 feupdateenv.3 MLINKS+=fegetround.3 fesetround.3 MLINKS+=floor.3 floorf.3 floor.3 floorl.3 MLINKS+=fma.3 fmaf.3 fma.3 fmal.3 MLINKS+=fmax.3 fmaxf.3 fmax.3 fmaxl.3 \ fmax.3 fmin.3 fmax.3 fminf.3 fmax.3 fminl.3 MLINKS+=fmod.3 fmodf.3 fmod.3 fmodl.3 MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 cabsl.3 \ hypot.3 hypotf.3 hypot.3 hypotl.3 MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3 MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3 MLINKS+=ilogb.3 ilogbf.3 ilogb.3 ilogbl.3 \ ilogb.3 logb.3 ilogb.3 logbf.3 ilogb.3 logbl.3 MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 \ lgamma.3 lgammaf.3 lgamma.3 lgammal.3 \ lgamma.3 tgamma.3 lgamma.3 tgammaf.3 MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log10l.3 \ log.3 log1p.3 log.3 log1pf.3 log.3 log1pl.3 \ log.3 logf.3 log.3 logl.3 \ log.3 log2.3 log.3 log2f.3 log.3 log2l.3 MLINKS+=lrint.3 llrint.3 lrint.3 llrintf.3 lrint.3 llrintl.3 \ lrint.3 lrintf.3 lrint.3 lrintl.3 MLINKS+=lround.3 llround.3 lround.3 llroundf.3 lround.3 llroundl.3 \ lround.3 lroundf.3 lround.3 lroundl.3 MLINKS+=nan.3 nanf.3 nan.3 nanl.3 MLINKS+=nextafter.3 nextafterf.3 nextafter.3 nextafterl.3 MLINKS+=nextafter.3 nexttoward.3 nextafter.3 nexttowardf.3 MLINKS+=nextafter.3 nexttowardl.3 MLINKS+=remainder.3 remainderf.3 remainder.3 remainderl.3 \ remainder.3 remquo.3 remainder.3 remquof.3 remainder.3 remquol.3 MLINKS+=rint.3 rintf.3 rint.3 rintl.3 \ rint.3 nearbyint.3 rint.3 nearbyintf.3 rint.3 nearbyintl.3 MLINKS+=round.3 roundf.3 round.3 roundl.3 MLINKS+=scalbn.3 scalbln.3 scalbn.3 scalblnf.3 scalbn.3 scalblnl.3 MLINKS+=scalbn.3 scalbnf.3 scalbn.3 scalbnl.3 MLINKS+=sin.3 sinf.3 sin.3 sinl.3 MLINKS+=sincos.3 sincosf.3 sin.3 sincosl.3 MLINKS+=sinh.3 sinhf.3 sinh.3 sinhl.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 cbrtl.3 sqrt.3 sqrtf.3 \ sqrt.3 sqrtl.3 MLINKS+=tan.3 tanf.3 tan.3 tanl.3 MLINKS+=tanh.3 tanhf.3 tanh.3 tanhl.3 MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 .include -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/libexec/atf/atf-check/Makefile =================================================================== --- projects/make-check-sandbox/libexec/atf/atf-check/Makefile (revision 321912) +++ projects/make-check-sandbox/libexec/atf/atf-check/Makefile (revision 321913) @@ -1,47 +1,45 @@ #- # Copyright (c) 2011 Google, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include .include ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-check SRCS= atf-check.cpp MAN= atf-check.1 CFLAGS+= -I${ATF} CFLAGS+= -DATF_SHELL='"/bin/sh"' LIBADD= atf_cxx -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/libexec/atf/atf-sh/Makefile =================================================================== --- projects/make-check-sandbox/libexec/atf/atf-sh/Makefile (revision 321912) +++ projects/make-check-sandbox/libexec/atf/atf-sh/Makefile (revision 321913) @@ -1,80 +1,78 @@ #- # Copyright (c) 2011 Google, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include .include ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-sh SRCS= atf-sh.cpp MAN= atf-sh.1 atf-sh.3 # Backwards compatibility. MLINKS+= atf-sh.3 atf-sh-api.3 MLINKS+= \ atf-sh.3 atf_add_test_case.3 \ atf-sh.3 atf_check.3 \ atf-sh.3 atf_check_equal.3 \ atf-sh.3 atf_config_get.3 \ atf-sh.3 atf_config_has.3 \ atf-sh.3 atf_expect_death.3 \ atf-sh.3 atf_expect_exit.3 \ atf-sh.3 atf_expect_fail.3 \ atf-sh.3 atf_expect_pass.3 \ atf-sh.3 atf_expect_signal.3 \ atf-sh.3 atf_expect_timeout.3 \ atf-sh.3 atf_fail.3 \ atf-sh.3 atf_get.3 \ atf-sh.3 atf_get_srcdir.3 \ atf-sh.3 atf_init_test_cases.3 \ atf-sh.3 atf_pass.3 \ atf-sh.3 atf_require_prog.3 \ atf-sh.3 atf_set.3 \ atf-sh.3 atf_skip.3 \ atf-sh.3 atf_test_case.3 CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -DATF_LIBEXECDIR='"${LIBEXECDIR}"' CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/atf"' CFLAGS+= -DATF_SHELL='"/bin/sh"' CFLAGS+= -I${ATF} LIBADD= atf_cxx FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../../../lib/atf/common.mk" .include Index: projects/make-check-sandbox/libexec/rtld-elf/Makefile =================================================================== --- projects/make-check-sandbox/libexec/rtld-elf/Makefile (revision 321912) +++ projects/make-check-sandbox/libexec/rtld-elf/Makefile (revision 321913) @@ -1,94 +1,92 @@ # $FreeBSD$ # Use the following command to build local debug version of dynamic # linker: # make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all .include PACKAGE= clibs MK_SSP= no PROG?= ld-elf.so.1 .if (${PROG:M*ld-elf32*} != "") TAGS+= lib32 .endif SRCS= rtld_start.S \ reloc.c rtld.c rtld_lock.c rtld_printf.c map_object.c \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} .else RTLD_ARCH= ${MACHINE_CPUARCH} .endif CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} .if ${MACHINE_ARCH} == "powerpc64" LDFLAGS+= -nostdlib -e _rtld_start .else LDFLAGS+= -nostdlib -e .rtld_start .endif WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec SYMLINKS= ../..${BINDIR}/${PROG} ${LIBEXECDIR}/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 .if ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -fPIC .else CFLAGS+= -fpic .endif CFLAGS+= -DPIC $(DEBUG) .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -fvisibility=hidden .endif LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs LIBADD= c_pic .if ${MK_TOOLCHAIN} == "no" LDFLAGS+= -L${LIBCDIR} .endif .if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in # libcompiler_rt on ARM. The library also needs to be placed first to be # correctly linked. As some of the functions are used before we have # shared libraries. LIBADD+= compiler_rt .endif .if ${MK_SYMVER} == "yes" VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_MAP= Version.map LDFLAGS+= -Wl,--version-script=${VERSION_MAP} .if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map) SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map .endif .endif .sinclude "${.CURDIR}/${RTLD_ARCH}/Makefile.inc" # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: .if exists(${DESTDIR}/usr/libexec/${PROG}) && ${MK_STAGING} == "no" -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG} .endif .PATH: ${.CURDIR}/${RTLD_ARCH} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include ${PROG_FULL}: ${VERSION_MAP} .include Index: projects/make-check-sandbox/sbin/devd/Makefile =================================================================== --- projects/make-check-sandbox/sbin/devd/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/devd/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ .include PACKAGE=runtime PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 WARNS?= 3 NO_SHARED?=YES LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} CLEANFILES= y.output -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sbin/dhclient/Makefile =================================================================== --- projects/make-check-sandbox/sbin/dhclient/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/dhclient/Makefile (revision 321913) @@ -1,53 +1,51 @@ # $OpenBSD: Makefile,v 1.9 2004/05/04 12:52:05 henning Exp $ # $FreeBSD$ # # Copyright (c) 1996, 1997 The Internet Software Consortium. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of The Internet Software Consortium nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND # CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL # THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # OF THE POSSIBILITY OF SUCH DAMAGE. # .include PACKAGE=runtime SRCS= dhclient.c clparse.c alloc.c dispatch.c hash.c bpf.c options.c \ tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \ parse.c privsep.c PROG= dhclient SCRIPTS=dhclient-script MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \ dhclient-script.8 LIBADD= util WARNS?= 2 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sbin/growfs/Makefile =================================================================== --- projects/make-check-sandbox/sbin/growfs/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/growfs/Makefile (revision 321913) @@ -1,29 +1,27 @@ # @(#)Makefile 8.8 (Berkeley) 6/21/2000 # # $TSHeader: src/sbin/growfs/Makefile,v 1.4 2000/12/05 19:45:24 tomsoft Exp $ # $FreeBSD$ # .include .PATH: ${.CURDIR:H}/mount PACKAGE=runtime PROG= growfs SRCS= growfs.c getmntopts.c MAN= growfs.8 CFLAGS+=-I${.CURDIR:H}/mount .if defined(GFSDBG) SRCS+= debug.c CFLAGS+= -DFS_DEBUG NO_WCAST_ALIGN= yes .endif LIBADD= util -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sbin/ifconfig/Makefile =================================================================== --- projects/make-check-sandbox/sbin/ifconfig/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/ifconfig/Makefile (revision 321913) @@ -1,74 +1,72 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ .include PACKAGE=runtime PROG= ifconfig SRCS= ifconfig.c # base support # # NB: The order here defines the order in which the constructors # are called. This in turn defines the default order in which # status is displayed. Probably should add a priority mechanism # to the registration process so we don't depend on this aspect # of the toolchain. # SRCS+= af_link.c # LLC support .if ${MK_INET_SUPPORT} != "no" SRCS+= af_inet.c # IPv4 support .endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= af_inet6.c # IPv6 support .endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= af_nd6.c # ND6 support .endif SRCS+= ifclone.c # clone device support SRCS+= ifmac.c # MAC support SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support SRCS+= iffib.c # non-default FIB support SRCS+= ifvlan.c # SIOC[GS]ETVLAN support SRCS+= ifvxlan.c # VXLAN support SRCS+= ifgre.c # GRE keys etc SRCS+= ifgif.c # GIF reversed header workaround SRCS+= ifipsec.c # IPsec VTI SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support LIBADD+= 80211 SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... .if ${MK_PF} != "no" SRCS+= ifpfsync.c # pfsync(4) support .endif SRCS+= ifbridge.c # bridge support SRCS+= iflagg.c # lagg support .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif .if ${MK_INET_SUPPORT} != "no" CFLAGS+= -DINET .endif .if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE) CFLAGS+= -DJAIL LIBADD+= jail .endif MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs WARNS?= 2 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sbin/mdconfig/Makefile =================================================================== --- projects/make-check-sandbox/sbin/mdconfig/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/mdconfig/Makefile (revision 321913) @@ -1,15 +1,13 @@ # $FreeBSD$ .include PACKAGE=runtime PROG= mdconfig MAN= mdconfig.8 LIBADD= util geom -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sbin/pfctl/Makefile =================================================================== --- projects/make-check-sandbox/sbin/pfctl/Makefile (revision 321912) +++ projects/make-check-sandbox/sbin/pfctl/Makefile (revision 321913) @@ -1,38 +1,36 @@ # $FreeBSD$ .include # pf_ruleset.c is shared between kernel and pfctl .PATH: ${SRCTOP}/sys/netpfil/pf PACKAGE=pf PROG= pfctl MAN= pfctl.8 SRCS = pfctl.c parse.y pfctl_parser.c pf_print_state.c pfctl_altq.c SRCS+= pfctl_osfp.c pfctl_radix.c pfctl_table.c pfctl_qstats.c SRCS+= pfctl_optimize.c SRCS+= pf_ruleset.c WARNS?= 2 CFLAGS+= -Wall -Wmissing-prototypes -Wno-uninitialized CFLAGS+= -Wstrict-prototypes CFLAGS+= -DENABLE_ALTQ -I${.CURDIR} # Need to use "WITH_" prefix to not conflict with the l/y INET/INET6 keywords .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DWITH_INET6 .endif .if ${MK_INET_SUPPORT} != "no" CFLAGS+= -DWITH_INET .endif YFLAGS= LIBADD= m md -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/secure/Makefile =================================================================== --- projects/make-check-sandbox/secure/Makefile (revision 321912) +++ projects/make-check-sandbox/secure/Makefile (revision 321913) @@ -1,41 +1,39 @@ # $FreeBSD$ .include SUBDIR= lib .WAIT \ - libexec ${_tests} usr.bin usr.sbin + libexec usr.bin usr.sbin SUBDIR_PARALLEL= -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \ usr.sbin/pkg_install usr.sbin/ppp usr.sbin/tcpdump/tcpdump .if ${MK_SENDMAIL} != "no" SPROGS+=usr.sbin/sendmail .endif # This target is used to rebuild these programs with crypto. secure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR:H}/${entry}; \ ${MAKE} cleandir; \ ${MAKE} obj; \ ${MAKE} all; \ ${MAKE} install .endfor # This target is used to rebuild these programs without crypto. insecure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR:H}/${entry}; \ ${MAKE} MK_CRYPT=no cleandir; \ ${MAKE} MK_CRYPT=no obj; \ ${MAKE} MK_CRYPT=no all; \ ${MAKE} MK_CRYPT=no install .endfor .include Index: projects/make-check-sandbox/secure/lib/Makefile =================================================================== --- projects/make-check-sandbox/secure/lib/Makefile (revision 321912) +++ projects/make-check-sandbox/secure/lib/Makefile (revision 321913) @@ -1,17 +1,15 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSL} != "no" SUBDIR+=libcrypto libssl .if ${MK_OPENSSH} != "no" SUBDIR+=libssh .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/secure/libexec/Makefile =================================================================== --- projects/make-check-sandbox/secure/libexec/Makefile (revision 321912) +++ projects/make-check-sandbox/secure/libexec/Makefile (revision 321913) @@ -1,16 +1,14 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSH} != "no" SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/secure/usr.bin/Makefile =================================================================== --- projects/make-check-sandbox/secure/usr.bin/Makefile (revision 321912) +++ projects/make-check-sandbox/secure/usr.bin/Makefile (revision 321913) @@ -1,19 +1,17 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSL} != "no" SUBDIR+=openssl .if ${MK_OPENSSH} != "no" SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/secure/usr.sbin/Makefile =================================================================== --- projects/make-check-sandbox/secure/usr.sbin/Makefile (revision 321912) +++ projects/make-check-sandbox/secure/usr.sbin/Makefile (revision 321913) @@ -1,16 +1,14 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSH} != "no" SUBDIR+=sshd .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/share/Makefile =================================================================== --- projects/make-check-sandbox/share/Makefile (revision 321912) +++ projects/make-check-sandbox/share/Makefile (revision 321913) @@ -1,99 +1,96 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ .include # Do not include `info' in the SUBDIR list, it is handled separately. SUBDIR= ${_colldef} \ ${_ctypedef} \ ${_dict} \ ${_doc} \ ${_dtrace} \ ${_examples} \ ${_i18n} \ keys \ ${_man} \ ${_me} \ misc \ ${_mk} \ ${_monetdef} \ ${_msgdef} \ ${_numericdef} \ ${_sendmail} \ skel \ ${_snmp} \ ${_syscons} \ tabset \ termcap \ - ${_tests} \ ${_timedef} \ ${_vt} \ ${_zoneinfo} # NB: keep these sorted by MK_* knobs .if ${MK_BSNMP} != "no" _snmp= snmp .endif .if ${MK_CDDL} != "no" _dtrace= dtrace .endif .if ${MK_DICT} != "no" _dict= dict .endif .if ${MK_EXAMPLES} != "no" _examples= examples .endif .if ${MK_ICONV} != "no" _i18n= i18n .endif .if ${MK_LOCALES} != "no" _colldef= colldef _ctypedef= ctypedef _monetdef= monetdef _msgdef= msgdef _numericdef= numericdef _timedef= timedef .endif .if ${MK_MAKE} != "no" _mk= mk .endif .if ${MK_MAN} != "no" _man= man .endif .if ${MK_SENDMAIL} != "no" _sendmail= sendmail .endif .if ${MK_SHAREDOCS} != "no" _doc= doc .endif .if ${MK_SYSCONS} != "no" _syscons= syscons .endif -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_VT} != "no" _vt= vt .endif .if ${MK_ZONEINFO} != "no" _zoneinfo= zoneinfo .endif SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/share/examples/Makefile =================================================================== --- projects/make-check-sandbox/share/examples/Makefile (revision 321912) +++ projects/make-check-sandbox/share/examples/Makefile (revision 321913) @@ -1,275 +1,273 @@ # $FreeBSD$ # # Doing a make install builds /usr/share/examples .include PACKAGE=examples FILESDIR= ${SHAREDIR}/examples .for _XFILE in ${XFILES} FILESGROUPS+= ${_XFILE} PACKAGE_${_XFILE}?=examples ${_XFILE}DIR= ${SHAREDIR}/examples/${_XFILE:H} .endfor LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ bootforth \ csh \ diskless \ drivers \ etc \ find_interface \ ibcs2 \ indent \ ipfw \ jails \ kld \ libvgl \ mdoc \ netgraph \ perfmon \ ppi \ ppp \ printing \ ses \ scsi_target \ sunrpc \ uefisign \ ypldap XFILES= BSD_daemon/FreeBSD.pfa \ BSD_daemon/README \ BSD_daemon/beastie.eps \ BSD_daemon/beastie.fig \ BSD_daemon/eps.patch \ BSD_daemon/poster.sh \ FreeBSD_version/FreeBSD_version.c \ FreeBSD_version/Makefile \ FreeBSD_version/README \ IPv6/USAGE \ bootforth/README \ bootforth/boot.4th \ bootforth/frames.4th \ bootforth/loader.rc \ bootforth/menu.4th \ bootforth/menuconf.4th \ bootforth/screen.4th \ csh/dot.cshrc \ diskless/ME \ diskless/README.BOOTP \ diskless/README.TEMPLATING \ diskless/clone_root \ drivers/README \ drivers/make_device_driver.sh \ drivers/make_pseudo_driver.sh \ etc/README.examples \ etc/bsd-style-copyright \ etc/make.conf \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ ipfw/change_rules.sh \ jails/README \ kld/Makefile \ kld/cdev/Makefile \ kld/cdev/README \ kld/cdev/module/Makefile \ kld/cdev/module/cdev.c \ kld/cdev/module/cdev.h \ kld/cdev/module/cdevmod.c \ kld/cdev/test/Makefile \ kld/cdev/test/testcdev.c \ kld/dyn_sysctl/Makefile \ kld/dyn_sysctl/README \ kld/dyn_sysctl/dyn_sysctl.c \ kld/firmware/Makefile \ kld/firmware/README \ kld/firmware/fwconsumer/Makefile \ kld/firmware/fwconsumer/fw_consumer.c \ kld/firmware/fwimage/Makefile \ kld/firmware/fwimage/firmware.img.uu \ kld/khelp/Makefile \ kld/khelp/README \ kld/khelp/h_example.c \ kld/syscall/Makefile \ kld/syscall/module/Makefile \ kld/syscall/module/syscall.c \ kld/syscall/test/Makefile \ kld/syscall/test/call.c \ libvgl/Makefile \ libvgl/demo.c \ mdoc/POSIX-copyright \ mdoc/deshallify.sh \ mdoc/example.1 \ mdoc/example.3 \ mdoc/example.4 \ mdoc/example.9 \ netgraph/ether.bridge \ netgraph/frame_relay \ netgraph/ngctl \ netgraph/raw \ netgraph/udp.tunnel \ netgraph/virtual.chain \ netgraph/virtual.lan \ perfmon/Makefile \ perfmon/README \ perfmon/perfmon.c \ ppi/Makefile \ ppi/ppilcd.c \ ppp/chap-auth \ ppp/login-auth \ ppp/ppp.conf.sample \ ppp/ppp.conf.span-isp \ ppp/ppp.conf.span-isp.working \ ppp/ppp.linkdown.sample \ ppp/ppp.linkdown.span-isp \ ppp/ppp.linkdown.span-isp.working \ ppp/ppp.linkup.sample \ ppp/ppp.linkup.span-isp \ ppp/ppp.linkup.span-isp.working \ ppp/ppp.secret.sample \ ppp/ppp.secret.span-isp \ ppp/ppp.secret.span-isp.working \ printing/README \ printing/diablo-if-net \ printing/hpdf \ printing/hpif \ printing/hpof \ printing/hprf \ printing/hpvf \ printing/if-simple \ printing/if-simpleX \ printing/ifhp \ printing/make-ps-header \ printing/netprint \ printing/psdf \ printing/psdfX \ printing/psif \ printing/pstf \ printing/pstfX \ ses/Makefile \ ses/Makefile.inc \ ses/getencstat/Makefile \ ses/getencstat/getencstat.0 \ ses/sesd/Makefile \ ses/sesd/sesd.0 \ ses/setencstat/Makefile \ ses/setencstat/setencstat.0 \ ses/setobjstat/Makefile \ ses/setobjstat/setobjstat.0 \ ses/srcs/chpmon.c \ ses/srcs/eltsub.c \ ses/srcs/eltsub.h \ ses/srcs/getencstat.c \ ses/srcs/getnobj.c \ ses/srcs/getobjmap.c \ ses/srcs/getobjstat.c \ ses/srcs/inienc.c \ ses/srcs/sesd.c \ ses/srcs/setencstat.c \ ses/srcs/setobjstat.c \ scsi_target/Makefile \ scsi_target/scsi_target.c \ scsi_target/scsi_target.h \ scsi_target/scsi_target.8 \ scsi_target/scsi_cmds.c \ sunrpc/Makefile \ sunrpc/dir/Makefile \ sunrpc/dir/dir.x \ sunrpc/dir/dir_proc.c \ sunrpc/dir/rls.c \ sunrpc/msg/Makefile \ sunrpc/msg/msg.x \ sunrpc/msg/msg_proc.c \ sunrpc/msg/printmsg.c \ sunrpc/msg/rprintmsg.c \ sunrpc/sort/Makefile \ sunrpc/sort/rsort.c \ sunrpc/sort/sort.x \ sunrpc/sort/sort_proc.c \ uefisign/uefikeys \ ypldap/ypldap.conf BINDIR= ${SHAREDIR}/examples .if ${MK_HAST} != "no" LDIRS+= hast XFILES+= hast/ucarp.sh \ hast/ucarp_down.sh \ hast/ucarp_up.sh \ hast/vip-down.sh \ hast/vip-up.sh .endif .if ${MK_USB} != "no" LDIRS+= libusb20 XFILES+= libusb20/Makefile \ libusb20/README \ libusb20/util.c \ libusb20/util.h \ libusb20/bulk.c \ libusb20/control.c .endif .if ${MACHINE_CPUARCH} == "amd64" .if ${MK_BHYVE} != "no" LDIRS+= bhyve XFILES+= bhyve/vmrun.sh PACKAGE_bhyve/vmrun.sh= bhyve .endif .endif # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) SHARED?= copies beforeinstall: ${SHARED} etc-examples META_TARGETS+= copies symlinks .ORDER: ${SHARED} etc-examples copies: .for i in ${LDIRS} if [ -L ${DESTDIR}${BINDIR}/$i ]; then \ rm -f ${DESTDIR}${BINDIR}/$i; \ fi .endfor .for file in ${XFILES} ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file} .endfor symlinks: .for i in ${LDIRS} rm -rf ${DESTDIR}${BINDIR}/$i ${INSTALL} ${TAG_ARGS} -l s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i .endfor etc-examples: .if ${SHARED} != "symlinks" ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples) .endif .if ${SHARED} != "symlinks" SUBDIR= smbfs .if ${MK_IPFILTER} != "no" SUBDIR+=ipfilter .endif .if ${MK_PF} != "no" SUBDIR+=pf .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= .include Index: projects/make-check-sandbox/share/zoneinfo/Makefile =================================================================== --- projects/make-check-sandbox/share/zoneinfo/Makefile (revision 321912) +++ projects/make-check-sandbox/share/zoneinfo/Makefile (revision 321913) @@ -1,138 +1,136 @@ # $FreeBSD$ # # HOW TO UPDATE THE ZONEINFO DATA # # With the use of subversion, this is a little bit simpler than the CVS method. # # Import the new sources to the vendor branch: # # $ cd ~/svn/vendor/tzdata/dist # $ tar zxvf /usr/ports/distfile/tzdata2008X.tar.gz # (check with "svn stat" and "svn diff" if it all makes sense) # $ svn commit # Commit message: "Vendor import of tzdata2008X (+details)" # # Tag it # # $ cd ~/svn/vendor/tzdata # $ svn cp svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist \ # svn+ssh://svn.freebsd.org/base/vendor/tzdata/tzdata2008X # $ svn commit # Commit message: "Tag of tzdata2008X" # # Merge-from-vendor # # $ cd ~/svn/head/contrib/tzdata # $ svn update # $ svn merge -c X --accept=postpone \ # svn+ssh://svn.freebsd.org/base/vendor/tzdata/dist . # $ svn commit # Commit message: "MFV of tzdata2008X" # .include CLEANFILES+= yearistype CLEANDIRS+= builddir CONTRIBDIR= ${SRCTOP}/contrib/tzdata/ .PATH: ${CONTRIBDIR} .if defined(LEAPSECONDS) .warning "Using backwards compatibility variable for LEAPSECONDS; please use WITH_ZONEINFO_LEAPSECONDS_SUPPORT instead" MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes .endif .if defined(OLDTIMEZONES) .warning "Using backwards compatibility variable for OLDTIMEZONES; please use WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT instead" MK_ZONEINFO_OLD_TIMEZONES_SUPPORT= yes .endif .if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no" LEAPFILE= -L ${CONTRIBDIR}leapseconds .else LEAPFILE= .endif TZFILES= africa antarctica asia australasia etcetera europe \ factory northamerica southamerica POSIXRULES= America/New_York .if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZFILES+= backward systemv .endif TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/} TZBUILDDIR= ${.OBJDIR}/builddir TZBUILDSUBDIRS= \ Africa \ America/Argentina \ America/Indiana \ America/Kentucky \ America/North_Dakota \ Antarctica \ Arctic \ Asia \ Atlantic \ Australia \ Etc \ Europe \ Indian \ Pacific \ SystemV .if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil .endif .if !defined(_SKIP_BUILD) all: zoneinfo .endif META_TARGETS+= zoneinfo install-zoneinfo zoneinfo: yearistype ${TDATA} mkdir -p ${TZBUILDDIR} cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS} umask 022; cd ${.CURDIR}; \ zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \ ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} .if make(*install*) TZS!= cd ${TZBUILDDIR} && find -s * -type f .endif beforeinstall: install-zoneinfo install-zoneinfo: mkdir -p ${DESTDIR}/usr/share/zoneinfo cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} .for f in ${TZS} ${INSTALL} ${TAG_ARGS} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${TZBUILDDIR}/${f} ${DESTDIR}/usr/share/zoneinfo/${f} .endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: # # If the file /var/db/zoneinfo exists, and it is owned by root:wheel, # and the contents of it exists in /usr/share/zoneinfo, then reinstall # it. # @if [ -f ${DESTDIR}/var/db/zoneinfo -a -O ${DESTDIR}/var/db/zoneinfo \ -a -G ${DESTDIR}/var/db/zoneinfo ]; then \ zf=$$(cat ${DESTDIR}/var/db/zoneinfo); \ if [ -f ${DESTDIR}/usr/share/zoneinfo/$${zf} ]; then \ if [ ! -z "${DESTDIR}" ]; then \ optC="-C ${DESTDIR}"; \ fi; \ echo "Updating /etc/localtime"; \ tzsetup $${optC} -r; \ fi; \ else \ echo "Run tzsetup(8) manually to update /etc/localtime."; \ fi -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/sys/amd64/amd64/elf_machdep.c =================================================================== --- projects/make-check-sandbox/sys/amd64/amd64/elf_machdep.c (revision 321912) +++ projects/make-check-sandbox/sys/amd64/amd64/elf_machdep.c (revision 321913) @@ -1,297 +1,316 @@ /*- * Copyright 1996-1998 John D. Polstra. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include struct sysentvec elf64_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, .sv_fixup = __elfN(freebsd_fixup), .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, .sv_psstrings = PS_STRINGS, .sv_stackprot = VM_PROT_ALL, .sv_copyout_strings = exec_copyout_strings, .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_TIMEKEEP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, .sv_shared_page_base = SHAREDPAGE, .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); +void +amd64_lower_shared_page(struct sysentvec *sv) +{ + if (hw_lower_amd64_sharedpage != 0) { + sv->sv_maxuser -= PAGE_SIZE; + sv->sv_shared_page_base -= PAGE_SIZE; + sv->sv_usrstack -= PAGE_SIZE; + sv->sv_psstrings -= PAGE_SIZE; + } +} + +/* + * Do this fixup before INIT_SYSENTVEC (SI_ORDER_ANY) because the latter + * uses the value of sv_shared_page_base. + */ +SYSINIT(elf64_sysvec_fixup, SI_SUB_EXEC, SI_ORDER_FIRST, + (sysinit_cfunc_t) amd64_lower_shared_page, + &elf64_freebsd_sysvec); + static Elf64_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/libexec/ld-elf.so.1", .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/usr/libexec/ld-elf.so.1", .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_oinfo); static Elf64_Brandinfo kfreebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/lib/ld-kfreebsd-x86-64.so.1", .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, .brand_note = &elf64_kfreebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &kfreebsd_brand_info); void elf64_dump_thread(struct thread *td, void *dst, size_t *off) { void *buf; size_t len; len = 0; if (use_xsave) { if (dst != NULL) { fpugetregs(td); len += elf64_populate_note(NT_X86_XSTATE, get_pcb_user_save_td(td), dst, cpu_max_ext_state_size, &buf); *(uint64_t *)((char *)buf + X86_XSTATE_XCR0_OFFSET) = xsave_mask; } else len += elf64_populate_note(NT_X86_XSTATE, NULL, NULL, cpu_max_ext_state_size, NULL); } *off = len; } /* Process one elf relocation with addend. */ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, int local, elf_lookup_fn lookup) { Elf64_Addr *where, val; Elf32_Addr *where32, val32; Elf_Addr addr; Elf_Addr addend; Elf_Size rtype, symidx; const Elf_Rel *rel; const Elf_Rela *rela; int error; switch (type) { case ELF_RELOC_REL: rel = (const Elf_Rel *)data; where = (Elf_Addr *) (relocbase + rel->r_offset); rtype = ELF_R_TYPE(rel->r_info); symidx = ELF_R_SYM(rel->r_info); /* Addend is 32 bit on 32 bit relocs */ switch (rtype) { case R_X86_64_PC32: case R_X86_64_32S: case R_X86_64_PLT32: addend = *(Elf32_Addr *)where; break; default: addend = *where; break; } break; case ELF_RELOC_RELA: rela = (const Elf_Rela *)data; where = (Elf_Addr *) (relocbase + rela->r_offset); addend = rela->r_addend; rtype = ELF_R_TYPE(rela->r_info); symidx = ELF_R_SYM(rela->r_info); break; default: panic("unknown reloc type %d\n", type); } switch (rtype) { case R_X86_64_NONE: /* none */ break; case R_X86_64_64: /* S + A */ error = lookup(lf, symidx, 1, &addr); val = addr + addend; if (error != 0) return -1; if (*where != val) *where = val; break; case R_X86_64_PC32: /* S + A - P */ case R_X86_64_PLT32: /* L + A - P, L is PLT location for the symbol, which we treat as S */ error = lookup(lf, symidx, 1, &addr); where32 = (Elf32_Addr *)where; val32 = (Elf32_Addr)(addr + addend - (Elf_Addr)where); if (error != 0) return -1; if (*where32 != val32) *where32 = val32; break; case R_X86_64_32S: /* S + A sign extend */ error = lookup(lf, symidx, 1, &addr); val32 = (Elf32_Addr)(addr + addend); where32 = (Elf32_Addr *)where; if (error != 0) return -1; if (*where32 != val32) *where32 = val32; break; case R_X86_64_COPY: /* none */ /* * There shouldn't be copy relocations in kernel * objects. */ printf("kldload: unexpected R_COPY relocation\n"); return -1; break; case R_X86_64_GLOB_DAT: /* S */ case R_X86_64_JMP_SLOT: /* XXX need addend + offset */ error = lookup(lf, symidx, 1, &addr); if (error != 0) return -1; if (*where != addr) *where = addr; break; case R_X86_64_RELATIVE: /* B + A */ addr = relocbase + addend; val = addr; if (*where != val) *where = val; break; default: printf("kldload: unexpected relocation type %ld\n", rtype); return -1; } return(0); } int elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, elf_lookup_fn lookup) { return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); } int elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, elf_lookup_fn lookup) { return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); } int elf_cpu_load_file(linker_file_t lf __unused) { return (0); } int elf_cpu_unload_file(linker_file_t lf __unused) { return (0); } Index: projects/make-check-sandbox/sys/amd64/amd64/initcpu.c =================================================================== --- projects/make-check-sandbox/sys/amd64/amd64/initcpu.c (revision 321912) +++ projects/make-check-sandbox/sys/amd64/amd64/initcpu.c (revision 321913) @@ -1,238 +1,265 @@ /*- * Copyright (c) KATO Takenori, 1997, 1998. * * All rights reserved. Unpublished rights reserved under the copyright * laws of Japan. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer as * the first lines of this file unmodified. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include "opt_cpu.h" #include #include #include #include #include #include #include #include #include #include static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); +static int lower_sharedpage_init; +int hw_lower_amd64_sharedpage; +SYSCTL_INT(_hw, OID_AUTO, lower_amd64_sharedpage, CTLFLAG_RDTUN, + &hw_lower_amd64_sharedpage, 0, + "Lower sharedpage to work around Ryzen issue with executing code near the top of user memory"); /* * -1: automatic (default) * 0: keep enable CLFLUSH * 1: force disable CLFLUSH */ static int hw_clflush_disable = -1; static void init_amd(void) { uint64_t msr; /* * Work around Erratum 721 for Family 10h and 12h processors. * These processors may incorrectly update the stack pointer * after a long series of push and/or near-call instructions, * or a long series of pop and/or near-return instructions. * * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf * * Hypervisors do not provide access to the errata MSR, * causing #GP exception on attempt to apply the errata. The * MSR write shall be done on host and persist globally * anyway, so do not try to do it when under virtualization. */ switch (CPUID_TO_FAMILY(cpu_id)) { case 0x10: case 0x12: if ((cpu_feature2 & CPUID2_HV) == 0) wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); break; } /* * BIOS may fail to set InitApicIdCpuIdLo to 1 as it should per BKDG. * So, do it here or otherwise some tools could be confused by * Initial Local APIC ID reported with CPUID Function 1 in EBX. */ if (CPUID_TO_FAMILY(cpu_id) == 0x10) { if ((cpu_feature2 & CPUID2_HV) == 0) { msr = rdmsr(MSR_NB_CFG1); msr |= (uint64_t)1 << 54; wrmsr(MSR_NB_CFG1, msr); } } /* * BIOS may configure Family 10h processors to convert WC+ cache type * to CD. That can hurt performance of guest VMs using nested paging. * The relevant MSR bit is not documented in the BKDG, * the fix is borrowed from Linux. */ if (CPUID_TO_FAMILY(cpu_id) == 0x10) { if ((cpu_feature2 & CPUID2_HV) == 0) { msr = rdmsr(0xc001102a); msr &= ~((uint64_t)1 << 24); wrmsr(0xc001102a, msr); } } /* * Work around Erratum 793: Specific Combination of Writes to Write * Combined Memory Types and Locked Instructions May Cause Core Hang. * See Revision Guide for AMD Family 16h Models 00h-0Fh Processors, * revision 3.04 or later, publication 51810. */ if (CPUID_TO_FAMILY(cpu_id) == 0x16 && CPUID_TO_MODEL(cpu_id) <= 0xf) { if ((cpu_feature2 & CPUID2_HV) == 0) { msr = rdmsr(0xc0011020); msr |= (uint64_t)1 << 15; wrmsr(0xc0011020, msr); + } + } + + /* + * Work around a problem on Ryzen that is triggered by executing + * code near the top of user memory, in our case the signal + * trampoline code in the shared page on amd64. + * + * This function is executed once for the BSP before tunables take + * effect so the value determined here can be overridden by the + * tunable. This function is then executed again for each AP and + * also on resume. Set a flag the first time so that value set by + * the tunable is not overwritten. + * + * The stepping and/or microcode versions should be checked after + * this issue is fixed by AMD so that we don't use this mode if not + * needed. + */ + if (lower_sharedpage_init == 0) { + lower_sharedpage_init = 1; + if (CPUID_TO_FAMILY(cpu_id) == 0x17) { + hw_lower_amd64_sharedpage = 1; } } } /* * Initialize special VIA features */ static void init_via(void) { u_int regs[4], val; /* * Check extended CPUID for PadLock features. * * http://www.via.com.tw/en/downloads/whitepapers/initiatives/padlock/programming_guide.pdf */ do_cpuid(0xc0000000, regs); if (regs[0] >= 0xc0000001) { do_cpuid(0xc0000001, regs); val = regs[3]; } else return; /* Enable RNG if present. */ if ((val & VIA_CPUID_HAS_RNG) != 0) { via_feature_rng = VIA_HAS_RNG; wrmsr(0x110B, rdmsr(0x110B) | VIA_CPUID_DO_RNG); } /* Enable PadLock if present. */ if ((val & VIA_CPUID_HAS_ACE) != 0) via_feature_xcrypt |= VIA_HAS_AES; if ((val & VIA_CPUID_HAS_ACE2) != 0) via_feature_xcrypt |= VIA_HAS_AESCTR; if ((val & VIA_CPUID_HAS_PHE) != 0) via_feature_xcrypt |= VIA_HAS_SHA; if ((val & VIA_CPUID_HAS_PMM) != 0) via_feature_xcrypt |= VIA_HAS_MM; if (via_feature_xcrypt != 0) wrmsr(0x1107, rdmsr(0x1107) | (1 << 28)); } /* * Initialize CPU control registers */ void initializecpu(void) { uint64_t msr; uint32_t cr4; cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { cr4 |= CR4_FXSR | CR4_XMM; cpu_fxsr = hw_instruction_sse = 1; } if (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) cr4 |= CR4_FSGSBASE; /* * Postpone enabling the SMEP on the boot CPU until the page * tables are switched from the boot loader identity mapping * to the kernel tables. The boot loader enables the U bit in * its tables. */ if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) cr4 |= CR4_SMEP; load_cr4(cr4); if ((amd_feature & AMDID_NX) != 0) { msr = rdmsr(MSR_EFER) | EFER_NXE; wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } switch (cpu_vendor_id) { case CPU_VENDOR_AMD: init_amd(); break; case CPU_VENDOR_CENTAUR: init_via(); break; } } void initializecpucache(void) { /* * CPUID with %eax = 1, %ebx returns * Bits 15-8: CLFLUSH line size * (Value * 8 = cache line size in bytes) */ if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* * XXXKIB: (temporary) hack to work around traps generated * when CLFLUSHing APIC register window under virtualization * environments. These environments tend to disable the * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) { cpu_feature &= ~CPUID_CLFSH; cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; } /* * The kernel's use of CLFLUSH{,OPT} can be disabled manually * by setting the hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) { cpu_feature &= ~CPUID_CLFSH; cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; } } Index: projects/make-check-sandbox/sys/amd64/include/md_var.h =================================================================== --- projects/make-check-sandbox/sys/amd64/include/md_var.h (revision 321912) +++ projects/make-check-sandbox/sys/amd64/include/md_var.h (revision 321913) @@ -1,64 +1,67 @@ /*- * Copyright (c) 1995 Bruce D. Evans. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ #include -extern uint64_t *vm_page_dump; +extern uint64_t *vm_page_dump; +extern int hw_lower_amd64_sharedpage; struct savefpu; +struct sysentvec; void amd64_db_resume_dbreg(void); +void amd64_lower_shared_page(struct sysentvec *); void amd64_syscall(struct thread *td, int traced); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); void ld_ds(void) __asm(__STRING(ld_ds)); void ld_es(void) __asm(__STRING(ld_es)); void ld_fs(void) __asm(__STRING(ld_fs)); void ld_gs(void) __asm(__STRING(ld_gs)); void ld_fsbase(void) __asm(__STRING(ld_fsbase)); void ld_gsbase(void) __asm(__STRING(ld_gsbase)); void ds_load_fault(void) __asm(__STRING(ds_load_fault)); void es_load_fault(void) __asm(__STRING(es_load_fault)); void fs_load_fault(void) __asm(__STRING(fs_load_fault)); void gs_load_fault(void) __asm(__STRING(gs_load_fault)); void fsbase_load_fault(void) __asm(__STRING(fsbase_load_fault)); void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void fpstate_drop(struct thread *td); void pagezero(void *addr); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); void sse2_pagezero(void *addr); struct savefpu *get_pcb_user_save_td(struct thread *td); struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb); #endif /* !_MACHINE_MD_VAR_H_ */ Index: projects/make-check-sandbox/sys/amd64/linux/linux_sysvec.c =================================================================== --- projects/make-check-sandbox/sys/amd64/linux/linux_sysvec.c (revision 321912) +++ projects/make-check-sandbox/sys/amd64/linux/linux_sysvec.c (revision 321913) @@ -1,1005 +1,1007 @@ /*- * Copyright (c) 2013 Dmitry Chagin * Copyright (c) 2004 Tim J. Robbins * Copyright (c) 2003 Peter Wemm * Copyright (c) 2002 Doug Rabson * Copyright (c) 1998-1999 Andrew Gallatin * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include "opt_compat.h" #define __ELF_WORD_SIZE 64 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include MODULE_VERSION(linux64, 1); #if BYTE_ORDER == LITTLE_ENDIAN #define SHELLMAGIC 0x2123 /* #! */ #else #define SHELLMAGIC 0x2321 #endif #if defined(DEBUG) SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, linux_sysctl_debug, "A", "Linux 64 debugging control"); #endif /* * Allow the this functions to use the ldebug() facility * even though they are not syscalls themselves. Map them * to syscall 0. This is slightly less bogus than using * ldebug(sigreturn). */ #define LINUX_SYS_linux_rt_sendsig 0 const char *linux_kplatform; static int linux_szsigcode; static vm_object_t linux_shared_page_obj; static char *linux_shared_page_mapping; extern char _binary_linux_locore_o_start; extern char _binary_linux_locore_o_end; extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); static register_t * linux_copyout_strings(struct image_params *imgp); static int elf_linux_fixup(register_t **stack_base, struct image_params *iparams); static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); static void linux_set_syscall_retval(struct thread *td, int error); static int linux_fetch_syscall_args(struct thread *td); static void linux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack); static int linux_vsyscall(struct thread *td); /* * Linux syscalls return negative errno's, we do positive and map them * Reference: * FreeBSD: src/sys/sys/errno.h * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h * linux-2.6.17.8/include/asm-generic/errno.h */ static int bsd_to_linux_errno[ELAST + 1] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -11,-115,-114, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, -6, -6, -43, -42, -75,-125, -84, -95, -16, -74, -72, -67, -71 }; #define LINUX_T_UNKNOWN 255 static int _bsd_to_linux_trapcode[] = { LINUX_T_UNKNOWN, /* 0 */ 6, /* 1 T_PRIVINFLT */ LINUX_T_UNKNOWN, /* 2 */ 3, /* 3 T_BPTFLT */ LINUX_T_UNKNOWN, /* 4 */ LINUX_T_UNKNOWN, /* 5 */ 16, /* 6 T_ARITHTRAP */ 254, /* 7 T_ASTFLT */ LINUX_T_UNKNOWN, /* 8 */ 13, /* 9 T_PROTFLT */ 1, /* 10 T_TRCTRAP */ LINUX_T_UNKNOWN, /* 11 */ 14, /* 12 T_PAGEFLT */ LINUX_T_UNKNOWN, /* 13 */ 17, /* 14 T_ALIGNFLT */ LINUX_T_UNKNOWN, /* 15 */ LINUX_T_UNKNOWN, /* 16 */ LINUX_T_UNKNOWN, /* 17 */ 0, /* 18 T_DIVIDE */ 2, /* 19 T_NMI */ 4, /* 20 T_OFLOW */ 5, /* 21 T_BOUND */ 7, /* 22 T_DNA */ 8, /* 23 T_DOUBLEFLT */ 9, /* 24 T_FPOPFLT */ 10, /* 25 T_TSSFLT */ 11, /* 26 T_SEGNPFLT */ 12, /* 27 T_STKFLT */ 18, /* 28 T_MCHK */ 19, /* 29 T_XMMFLT */ 15 /* 30 T_RESERVED */ }; #define bsd_to_linux_trapcode(code) \ ((code)td_proc; frame = td->td_frame; sa = &td->td_sa; sa->args[0] = frame->tf_rdi; sa->args[1] = frame->tf_rsi; sa->args[2] = frame->tf_rdx; sa->args[3] = frame->tf_rcx; sa->args[4] = frame->tf_r8; sa->args[5] = frame->tf_r9; sa->code = frame->tf_rax; if (sa->code >= p->p_sysent->sv_size) /* nosys */ sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; td->td_retval[0] = 0; return (0); } static void linux_set_syscall_retval(struct thread *td, int error) { struct trapframe *frame = td->td_frame; /* * On Linux only %rcx and %r11 values are not preserved across * the syscall. * So, do not clobber %rdx and %r10 */ td->td_retval[1] = frame->tf_rdx; frame->tf_r10 = frame->tf_rcx; cpu_set_syscall_retval(td, error); /* Restore all registers. */ set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } static int elf_linux_fixup(register_t **stack_base, struct image_params *imgp) { Elf_Auxargs *args; Elf_Addr *base; Elf_Addr *pos; struct ps_strings *arginfo; struct proc *p; int issetugid; p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; KASSERT(curthread->td_proc == imgp->proc, ("unsafe elf_linux_fixup(), should be curproc")); base = (Elf64_Addr *)*stack_base; args = (Elf64_Auxargs *)imgp->auxargs; pos = base + (imgp->args->argc + imgp->args->envc + 2); issetugid = p->p_flag & P_SUGID ? 1 : 0; AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); AUXARGS_ENTRY(pos, AT_PHENT, args->phent); AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); AUXARGS_ENTRY(pos, AT_BASE, args->base); AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, imgp->execpathp); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); imgp->auxargs = NULL; base--; suword(base, (uint64_t)imgp->args->argc); *stack_base = (register_t *)base; return (0); } /* * Copy strings out to the new process address space, constructing new arg * and env vector tables. Return a pointer to the base so that it can be used * as the initial stack pointer. */ static register_t * linux_copyout_strings(struct image_params *imgp) { int argc, envc; char **vectp; char *stringp, *destp; register_t *stack_base; struct ps_strings *arginfo; char canary[LINUX_AT_RANDOM_LEN]; size_t execpath_len; struct proc *p; /* * Calculate string base and vector table pointers. */ if (imgp->execpath != NULL && imgp->auxargs != NULL) execpath_len = strlen(imgp->execpath) + 1; else execpath_len = 0; p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; destp = (caddr_t)arginfo - SPARE_USRSPACE - roundup(sizeof(canary), sizeof(char *)) - roundup(execpath_len, sizeof(char *)) - roundup(ARG_MAX - imgp->args->stringspace, sizeof(char *)); if (execpath_len != 0) { imgp->execpathp = (uintptr_t)arginfo - execpath_len; copyout(imgp->execpath, (void *)imgp->execpathp, execpath_len); } /* * Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); imgp->canary = (uintptr_t)arginfo - roundup(execpath_len, sizeof(char *)) - roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); /* * If we have a valid auxargs ptr, prepare some room * on the stack. */ if (imgp->auxargs) { /* * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for * lower compatibility. */ imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : (LINUX_AT_COUNT * 2); /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets,and imgp->auxarg_size is room * for argument of Runtime loader. */ vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(char *)); } else { /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets */ vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(char *)); } /* * vectp also becomes our initial stack base */ stack_base = (register_t *)vectp; stringp = imgp->args->begin_argv; argc = imgp->args->argc; envc = imgp->args->envc; /* * Copy out strings - arguments and environment. */ copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); /* * Fill in "ps_strings" struct for ps, w, etc. */ suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nargvstr, argc); /* * Fill in argument portion of vector table. */ for (; argc > 0; --argc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) destp++; destp++; } /* a null vector table pointer separates the argp's from the envp's */ suword(vectp++, 0); suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nenvstr, envc); /* * Fill in environment portion of vector table. */ for (; envc > 0; --envc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) destp++; destp++; } /* end of vector table is a null pointer */ suword(vectp, 0); return (stack_base); } /* * Reset registers to default values on exec. */ static void linux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) { struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; mtx_lock(&dt_lock); if (td->td_proc->p_md.md_ldt != NULL) user_ldt_free(td); else mtx_unlock(&dt_lock); pcb->pcb_fsbase = 0; pcb->pcb_gsbase = 0; clear_pcb_flags(pcb, PCB_32BIT); pcb->pcb_initial_fpucw = __LINUX_NPXCW__; set_pcb_flags(pcb, PCB_FULL_IRET); bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = imgp->entry_addr; regs->tf_rsp = stack; regs->tf_rflags = PSL_USER | (regs->tf_rflags & PSL_T); regs->tf_ss = _udatasel; regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; regs->tf_fs = _ufssel; regs->tf_gs = _ugssel; regs->tf_flags = TF_HASSEGS; /* * Reset the hardware debug registers if they were in use. * They won't have any meaning for the newly exec'd process. */ if (pcb->pcb_flags & PCB_DBREGS) { pcb->pcb_dr0 = 0; pcb->pcb_dr1 = 0; pcb->pcb_dr2 = 0; pcb->pcb_dr3 = 0; pcb->pcb_dr6 = 0; pcb->pcb_dr7 = 0; if (pcb == curpcb) { /* * Clear the debug registers on the running * CPU, otherwise they will end up affecting * the next process we switch to. */ reset_dbregs(); } clear_pcb_flags(pcb, PCB_DBREGS); } /* * Drop the FP state if we hold it, so that the process gets a * clean FP state if it uses the FPU again. */ fpstate_drop(td); } /* * Copied from amd64/amd64/machdep.c * * XXX fpu state need? don't think so */ int linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) { struct proc *p; struct l_ucontext uc; struct l_sigcontext *context; struct trapframe *regs; unsigned long rflags; int error; ksiginfo_t ksi; regs = td->td_frame; error = copyin((void *)regs->tf_rbx, &uc, sizeof(uc)); if (error != 0) return (error); p = td->td_proc; context = &uc.uc_mcontext; rflags = context->sc_rflags; /* * Don't allow users to change privileged or reserved flags. */ /* * XXX do allow users to change the privileged flag PSL_RF. * The cpu sets PSL_RF in tf_rflags for faults. Debuggers * should sometimes set it there too. tf_rflags is kept in * the signal context during signal handling and there is no * other place to remember it, so the PSL_RF bit may be * corrupted by the signal handler without us knowing. * Corruption of the PSL_RF bit at worst causes one more or * one less debugger trap, so allowing it is fairly harmless. */ #define RFLAG_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) if (!RFLAG_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { printf("linux_rt_sigreturn: rflags = 0x%lx\n", rflags); return (EINVAL); } /* * Don't allow users to load a valid privileged %cs. Let the * hardware check for invalid selectors, excess privilege in * other selectors, invalid %eip's and invalid %esp's. */ #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) if (!CS_SECURE(context->sc_cs)) { printf("linux_rt_sigreturn: cs = 0x%x\n", context->sc_cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; ksi.ksi_trapno = T_PROTFLT; ksi.ksi_addr = (void *)regs->tf_rip; trapsignal(td, &ksi); return (EINVAL); } PROC_LOCK(p); linux_to_bsd_sigset(&uc.uc_sigmask, &td->td_sigmask); SIG_CANTMASK(td->td_sigmask); signotify(td); PROC_UNLOCK(p); regs->tf_rdi = context->sc_rdi; regs->tf_rsi = context->sc_rsi; regs->tf_rdx = context->sc_rdx; regs->tf_rbp = context->sc_rbp; regs->tf_rbx = context->sc_rbx; regs->tf_rcx = context->sc_rcx; regs->tf_rax = context->sc_rax; regs->tf_rip = context->sc_rip; regs->tf_rsp = context->sc_rsp; regs->tf_r8 = context->sc_r8; regs->tf_r9 = context->sc_r9; regs->tf_r10 = context->sc_r10; regs->tf_r11 = context->sc_r11; regs->tf_r12 = context->sc_r12; regs->tf_r13 = context->sc_r13; regs->tf_r14 = context->sc_r14; regs->tf_r15 = context->sc_r15; regs->tf_cs = context->sc_cs; regs->tf_err = context->sc_err; regs->tf_rflags = rflags; set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (EJUSTRETURN); } /* * copied from amd64/amd64/machdep.c * * Send an interrupt to process. */ static void linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct l_rt_sigframe sf, *sfp; struct proc *p; struct thread *td; struct sigacts *psp; caddr_t sp; struct trapframe *regs; int sig, code; int oonstack; td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); sig = ksi->ksi_signo; psp = p->p_sigacts; code = ksi->ksi_code; mtx_assert(&psp->ps_mtx, MA_OWNED); regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); LINUX_CTR4(rt_sendsig, "%p, %d, %p, %u", catcher, sig, mask, code); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { sp = (caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size - sizeof(struct l_rt_sigframe); } else sp = (caddr_t)regs->tf_rsp - sizeof(struct l_rt_sigframe) - 128; /* Align to 16 bytes. */ sfp = (struct l_rt_sigframe *)((unsigned long)sp & ~0xFul); mtx_unlock(&psp->ps_mtx); /* Translate the signal. */ sig = bsd_to_linux_signal(sig); /* Save user context. */ bzero(&sf, sizeof(sf)); bsd_to_linux_sigset(mask, &sf.sf_sc.uc_sigmask); bsd_to_linux_sigset(mask, &sf.sf_sc.uc_mcontext.sc_mask); sf.sf_sc.uc_stack.ss_sp = PTROUT(td->td_sigstk.ss_sp); sf.sf_sc.uc_stack.ss_size = td->td_sigstk.ss_size; sf.sf_sc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) ? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE; PROC_UNLOCK(p); sf.sf_sc.uc_mcontext.sc_rdi = regs->tf_rdi; sf.sf_sc.uc_mcontext.sc_rsi = regs->tf_rsi; sf.sf_sc.uc_mcontext.sc_rdx = regs->tf_rdx; sf.sf_sc.uc_mcontext.sc_rbp = regs->tf_rbp; sf.sf_sc.uc_mcontext.sc_rbx = regs->tf_rbx; sf.sf_sc.uc_mcontext.sc_rcx = regs->tf_rcx; sf.sf_sc.uc_mcontext.sc_rax = regs->tf_rax; sf.sf_sc.uc_mcontext.sc_rip = regs->tf_rip; sf.sf_sc.uc_mcontext.sc_rsp = regs->tf_rsp; sf.sf_sc.uc_mcontext.sc_r8 = regs->tf_r8; sf.sf_sc.uc_mcontext.sc_r9 = regs->tf_r9; sf.sf_sc.uc_mcontext.sc_r10 = regs->tf_r10; sf.sf_sc.uc_mcontext.sc_r11 = regs->tf_r11; sf.sf_sc.uc_mcontext.sc_r12 = regs->tf_r12; sf.sf_sc.uc_mcontext.sc_r13 = regs->tf_r13; sf.sf_sc.uc_mcontext.sc_r14 = regs->tf_r14; sf.sf_sc.uc_mcontext.sc_r15 = regs->tf_r15; sf.sf_sc.uc_mcontext.sc_cs = regs->tf_cs; sf.sf_sc.uc_mcontext.sc_rflags = regs->tf_rflags; sf.sf_sc.uc_mcontext.sc_err = regs->tf_err; sf.sf_sc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code); sf.sf_sc.uc_mcontext.sc_cr2 = (register_t)ksi->ksi_addr; /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rax = 0; regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ regs->tf_rdx = (register_t)&sfp->sf_sc; /* arg 3 in %rdx */ sf.sf_handler = catcher; /* Fill in POSIX parts */ ksiginfo_to_lsiginfo(ksi, &sf.sf_si, sig); /* * Copy the sigframe out to the user's stack. */ if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); #endif PROC_LOCK(p); sigexit(td, SIGILL); } regs->tf_rsp = (long)sfp; regs->tf_rip = linux_rt_sigcode; regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; set_pcb_flags(td->td_pcb, PCB_FULL_IRET); PROC_LOCK(p); mtx_lock(&psp->ps_mtx); } /* * If a linux binary is exec'ing something, try this image activator * first. We override standard shell script execution in order to * be able to modify the interpreter path. We only do this if a linux * binary is doing the exec, so we do not create an EXEC module for it. */ static int exec_linux_imgact_try(struct image_params *iparams); static int exec_linux_imgact_try(struct image_params *imgp) { const char *head = (const char *)imgp->image_header; char *rpath; int error = -1; /* * The interpreter for shell scripts run from a linux binary needs * to be located in /compat/linux if possible in order to recursively * maintain linux path emulation. */ if (((const short *)head)[0] == SHELLMAGIC) { /* * Run our normal shell image activator. If it succeeds * attempt to use the alternate path for the interpreter. * If an alternate path is found, use our stringspace * to store it. */ if ((error = exec_shell_imgact(imgp)) == 0) { linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); if (rpath != NULL) imgp->args->fname_buf = imgp->interpreter_name = rpath; } } return (error); } #define LINUX_VSYSCALL_START (-10UL << 20) #define LINUX_VSYSCALL_SZ 1024 const unsigned long linux_vsyscall_vector[] = { LINUX_SYS_gettimeofday, LINUX_SYS_linux_time, /* getcpu not implemented */ }; static int linux_vsyscall(struct thread *td) { struct trapframe *frame; uint64_t retqaddr; int code, traced; int error; frame = td->td_frame; /* Check %rip for vsyscall area */ if (__predict_true(frame->tf_rip < LINUX_VSYSCALL_START)) return (EINVAL); if ((frame->tf_rip & (LINUX_VSYSCALL_SZ - 1)) != 0) return (EINVAL); code = (frame->tf_rip - LINUX_VSYSCALL_START) / LINUX_VSYSCALL_SZ; if (code >= nitems(linux_vsyscall_vector)) return (EINVAL); /* * vsyscall called as callq *(%rax), so we must * use return address from %rsp and also fixup %rsp */ error = copyin((void *)frame->tf_rsp, &retqaddr, sizeof(retqaddr)); if (error) return (error); frame->tf_rip = retqaddr; frame->tf_rax = linux_vsyscall_vector[code]; frame->tf_rsp += 8; traced = (frame->tf_flags & PSL_T); amd64_syscall(td, traced); return (0); } struct sysentvec elf_linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, .sv_mask = 0, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps, .sv_fixup = elf_linux_fixup, .sv_sendsig = linux_rt_sendsig, .sv_sigcode = &_binary_linux_locore_o_start, .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_imgact_try = exec_linux_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, .sv_psstrings = PS_STRINGS, .sv_stackprot = VM_PROT_ALL, .sv_copyout_strings = linux_copyout_strings, .sv_setregs = linux_exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, .sv_flags = SV_ABI_LINUX | SV_LP64 | SV_SHP, .sv_set_syscall_retval = linux_set_syscall_retval, .sv_fetch_syscall_args = linux_fetch_syscall_args, .sv_syscallnames = NULL, .sv_shared_page_base = SHAREDPAGE, .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = linux_vsyscall, }; static void linux_vdso_install(void *param) { + amd64_lower_shared_page(&elf_linux_sysvec); + linux_szsigcode = (&_binary_linux_locore_o_end - &_binary_linux_locore_o_start); if (linux_szsigcode > elf_linux_sysvec.sv_shared_page_len) panic("Linux invalid vdso size\n"); __elfN(linux_vdso_fixup)(&elf_linux_sysvec); linux_shared_page_obj = __elfN(linux_shared_page_init) (&linux_shared_page_mapping); __elfN(linux_vdso_reloc)(&elf_linux_sysvec); bcopy(elf_linux_sysvec.sv_sigcode, linux_shared_page_mapping, linux_szsigcode); elf_linux_sysvec.sv_shared_page_obj = linux_shared_page_obj; linux_kplatform = linux_shared_page_mapping + (linux_platform - (caddr_t)elf_linux_sysvec.sv_shared_page_base); } SYSINIT(elf_linux_vdso_init, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)linux_vdso_install, NULL); static void linux_vdso_deinstall(void *param) { __elfN(linux_shared_page_fini)(linux_shared_page_obj); }; SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)linux_vdso_deinstall, NULL); static char GNULINUX_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; uintptr_t p; p = (uintptr_t)(note + 1); p += roundup2(note->n_namesz, sizeof(Elf32_Addr)); desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) return (FALSE); /* * For linux we encode osrel as follows (see linux_mib.c): * VVVMMMIII (version, major, minor), see linux_mib.c. */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; return (TRUE); } static Elf_Brandnote linux64_brandnote = { .hdr.n_namesz = sizeof(GNULINUX_ABI_VENDOR), .hdr.n_descsz = 16, .hdr.n_type = 1, .vendor = GNULINUX_ABI_VENDOR, .flags = BN_TRANSLATE_OSREL, .trans_osrel = linux_trans_osrel }; static Elf64_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", .emul_path = "/compat/linux", .interp_path = "/lib64/ld-linux-x86-64.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux64_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; static Elf64_Brandinfo linux_glibc2brandshort = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", .emul_path = "/compat/linux", .interp_path = "/lib64/ld-linux.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux64_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; static Elf64_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", .emul_path = "/compat/linux", .interp_path = "/lib/ld-musl-x86_64.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, .brand_note = &linux64_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; Elf64_Brandinfo *linux_brandlist[] = { &linux_glibc2brand, &linux_glibc2brandshort, &linux_muslbrand, NULL }; static int linux64_elf_modevent(module_t mod, int type, void *data) { Elf64_Brandinfo **brandinfo; int error; struct linux_ioctl_handler **lihp; error = 0; switch(type) { case MOD_LOAD: for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; ++brandinfo) if (elf64_insert_brand_entry(*brandinfo) < 0) error = EINVAL; if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); LIST_INIT(&futex_list); mtx_init(&futex_mtx, "ftllk64", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux x86-64 ELF exec handler installed\n"); } else printf("cannot insert Linux x86-64 ELF brand handler\n"); break; case MOD_UNLOAD: for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; ++brandinfo) if (elf64_brand_inuse(*brandinfo)) error = EBUSY; if (error == 0) { for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; ++brandinfo) if (elf64_remove_brand_entry(*brandinfo) < 0) error = EINVAL; } if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); mtx_destroy(&futex_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else printf("Could not deinstall ELF interpreter entry\n"); break; default: return (EOPNOTSUPP); } return (error); } static moduledata_t linux64_elf_mod = { "linux64elf", linux64_elf_modevent, 0 }; DECLARE_MODULE_TIED(linux64elf, linux64_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); MODULE_DEPEND(linux64elf, linux_common, 1, 1, 1); FEATURE(linux64, "Linux 64bit support"); Index: projects/make-check-sandbox/usr.bin/apply/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/apply/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/apply/Makefile (revision 321913) @@ -1,14 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= apply LIBADD= sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/basename/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/basename/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/basename/Makefile (revision 321913) @@ -1,13 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= basename MLINKS= basename.1 dirname.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/bsdcat/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/bsdcat/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/bsdcat/Makefile (revision 321913) @@ -1,31 +1,29 @@ # $FreeBSD$ .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat BSDCAT_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c .PATH: ${_LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c CFLAGS+= -DBSDCAT_VERSION_STRING=\"${BSDCAT_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" CFLAGS+= -I${_LIBARCHIVEDIR}/cat -I${_LIBARCHIVEDIR}/libarchive_fe LIBADD= archive .if ${MK_ICONV} != "no" CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/calendar/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/calendar/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/calendar/Makefile (revision 321913) @@ -1,40 +1,38 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c LIBADD= m INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 beforeinstall: ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/calendar.* ${DESTDIR}${SHAREDIR}/calendar .for lang in ${INTER} ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/${lang}/calendar.* \ ${DESTDIR}${SHAREDIR}/calendar/${lang} .endfor .for link in ${DE_LINKS} rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} ${INSTALL} ${TAG_ARGS} -l s de_DE.ISO8859-1 \ ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor .for link in ${FR_LINKS} rm -rf ${DESTDIR}${SHAREDIR}/calendar/${link} ${INSTALL} ${TAG_ARGS} -l s fr_FR.ISO8859-1 \ ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/cmp/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/cmp/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/cmp/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= cmp SRCS= cmp.c link.c misc.c regular.c special.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/col/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/col/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/col/Makefile (revision 321913) @@ -1,12 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= col -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/comm/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/comm/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/comm/Makefile (revision 321913) @@ -1,12 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= comm -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/compress/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/compress/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/compress/Makefile (revision 321913) @@ -1,18 +1,16 @@ # @(#)Makefile 8.2 (Berkeley) 4/17/94 # $FreeBSD$ .include PROG= compress SRCS= compress.c zopen.c LINKS= ${BINDIR}/compress ${BINDIR}/uncompress MLINKS= compress.1 uncompress.1 # XXX zopen is not part of libc # MAN=zopen.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/cpio/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/cpio/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/cpio/Makefile (revision 321913) @@ -1,39 +1,37 @@ # $FreeBSD$ .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio BSDCPIO_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c .PATH: ${_LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c line_reader.c passphrase.c CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe .ifdef RELEASE_CRUNCH # FreeBSD's installer uses cpio in crunched binaries that are # statically linked, cannot use -lcrypto, and are size sensitive. CFLAGS+= -DSMALLER .endif LIBADD= archive .if ${MK_ICONV} != "no" CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const .endif SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/csplit/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/csplit/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/csplit/Makefile (revision 321913) @@ -1,11 +1,9 @@ # $FreeBSD$ .include PROG= csplit -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/cut/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/cut/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/cut/Makefile (revision 321913) @@ -1,12 +1,10 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= cut -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/diff/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/diff/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/diff/Makefile (revision 321913) @@ -1,12 +1,10 @@ # $FreeBSD$ .include PROG= diff SRCS= diff.c diffdir.c diffreg.c xmalloc.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/diff3/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/diff3/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/diff3/Makefile (revision 321913) @@ -1,11 +1,9 @@ # $FreeBSD$ .include PROG= diff3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/dirname/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/dirname/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/dirname/Makefile (revision 321913) @@ -1,13 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= dirname MAN= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/file2c/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/file2c/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/file2c/Makefile (revision 321913) @@ -1,11 +1,9 @@ # $FreeBSD$ .include PROG= file2c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/getconf/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/getconf/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/getconf/Makefile (revision 321913) @@ -1,44 +1,42 @@ # $FreeBSD$ .include PROG= getconf SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c CFLAGS+= -I${.CURDIR} CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \ confstr.names limits.names pathconf.names sysconf.names \ conflicting.names unique.names .SUFFIXES: .gperf .names .PHONY: conflicts all: conflicts FAKE_GPERF= ${.CURDIR}/fake-gperf.awk .gperf.c: ${FAKE_GPERF} LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET} .gperf.names: LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \ sed -e 's/,$$//' >${.TARGET} conflicts: conflicting.names unique.names @if test `wc -l &2; \ exit 1; \ fi # pathconf.names is not included here because pathconf names are # syntactically distinct from the other kinds. conflicting.names: confstr.names limits.names sysconf.names cat ${.ALLSRC} >${.TARGET} unique.names: conflicting.names LC_ALL=C sort -u ${.ALLSRC} >${.TARGET} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/grep/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/grep/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/grep/Makefile (revision 321913) @@ -1,99 +1,97 @@ # $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $ # $FreeBSD$ # $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ .include .if ${MK_BSD_GREP} == "yes" PROG= grep .else PROG= bsdgrep CLEANFILES+= bsdgrep.1 bsdgrep.1: grep.1 ${CP} ${.ALLSRC} ${.TARGET} .endif SRCS= file.c grep.c queue.c util.c .if ${MK_BSD_GREP_FASTMATCH} == "yes" # Extra files ported backported for some regex improvements .PATH: ${.CURDIR}/regex SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c CFLAGS+=-I${.CURDIR}/regex .else CFLAGS+= -DWITHOUT_FASTMATCH .endif CFLAGS.gcc+= --param max-inline-insns-single=500 .if ${MK_BSD_GREP} == "yes" LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/rgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ grep.1 rgrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ grep.1 zfgrep.1 .endif LIBADD= z .if ${MK_LZMA_SUPPORT} != "no" LIBADD+= lzma .if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ ${BINDIR}/${PROG} ${BINDIR}/lzfgrep MLINKS+= grep.1 xzgrep.1 \ grep.1 xzegrep.1 \ grep.1 xzfgrep.1 \ grep.1 lzgrep.1 \ grep.1 lzegrep.1 \ grep.1 lzfgrep.1 .endif .else CFLAGS+= -DWITHOUT_LZMA .endif .if ${MK_BZIP2_SUPPORT} != "no" LIBADD+= bz2 .if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ ${BINDIR}/grep ${BINDIR}/bzegrep \ ${BINDIR}/grep ${BINDIR}/bzfgrep MLINKS+= grep.1 bzgrep.1 \ grep.1 bzegrep.1 \ grep.1 bzfgrep.1 .endif .else CFLAGS+= -DWITHOUT_BZIP2 .endif .if ${MK_GNU_GREP_COMPAT} != "no" CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU LIBADD+= gnuregex .endif .if ${MK_NLS} != "no" .include "${.CURDIR}/nls/Makefile.inc" .else CFLAGS+= -DWITHOUT_NLS .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/gzip/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/gzip/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/gzip/Makefile (revision 321913) @@ -1,34 +1,32 @@ # $NetBSD: Makefile,v 1.18 2013/11/13 11:12:24 pettai Exp $ # $FreeBSD$ .include PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1 LIBADD= z lzma .if ${MK_BZIP2_SUPPORT} != "no" LIBADD+= bz2 .else CFLAGS+= -DNO_BZIP2_SUPPORT .endif SCRIPTS= gzexe zdiff zforce zmore znew MLINKS+= gzip.1 gunzip.1 \ gzip.1 gzcat.1 \ gzip.1 zcat.1 \ zdiff.1 zcmp.1 \ zmore.1 zless.1 LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip \ ${BINDIR}/gzip ${BINDIR}/gzcat \ ${BINDIR}/gzip ${BINDIR}/zcat \ ${BINDIR}/zdiff ${BINDIR}/zcmp -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/hexdump/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/hexdump/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/hexdump/Makefile (revision 321913) @@ -1,17 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= hexdump SRCS= conv.c display.c hexdump.c hexsyntax.c odsyntax.c parse.c MAN= hexdump.1 od.1 MLINKS= hexdump.1 hd.1 LINKS= ${BINDIR}/hexdump ${BINDIR}/od LINKS+= ${BINDIR}/hexdump ${BINDIR}/hd -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/ident/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/ident/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/ident/Makefile (revision 321913) @@ -1,13 +1,11 @@ # $FreeBSD$ .include PROG= ident LIBADD= sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/indent/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/indent/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/indent/Makefile (revision 321913) @@ -1,15 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= indent SRCS= indent.c io.c lexi.c parse.c pr_comment.c args.c NO_WMISSING_VARIABLE_DECLARATIONS= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/join/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/join/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/join/Makefile (revision 321913) @@ -1,12 +1,10 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include PROG= join -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/jot/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/jot/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/jot/Makefile (revision 321913) @@ -1,12 +1,10 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= jot -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/lastcomm/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/lastcomm/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/lastcomm/Makefile (revision 321913) @@ -1,15 +1,13 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PACKAGE=acct PROG= lastcomm SRCS= lastcomm.c readrec.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/limits/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/limits/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/limits/Makefile (revision 321913) @@ -1,12 +1,10 @@ # $FreeBSD$ .include PROG= limits LIBADD= util -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/m4/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/m4/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/m4/Makefile (revision 321913) @@ -1,27 +1,25 @@ # $OpenBSD: Makefile,v 1.13 2014/05/12 19:11:19 espie Exp $ # $FreeBSD$ # -DEXTENDED # if you want the paste & spaste macros. .include PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd LIBADD= y l m openbsd NO_WMISSING_VARIABLE_DECLARATIONS= SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l WARNS= 3 tokenizer.o: parser.h CLEANFILES+= parser.c parser.h tokenizer.o -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/mkimg/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/mkimg/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/mkimg/Makefile (revision 321913) @@ -1,42 +1,40 @@ # $FreeBSD$ .include PROG= mkimg SRCS+= format.c image.c mkimg.c scheme.c uuid.c MAN= mkimg.1 MKIMG_VERSION=20161016 mkimg.o: Makefile CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE CFLAGS+=-I${SRCTOP}/sys/sys/disk # List of formats to support SRCS+= \ qcow.c \ raw.c \ vhd.c \ vmdk.c # List of schemes to support SRCS+= \ apm.c \ bsd.c \ ebr.c \ gpt.c \ mbr.c \ vtoc8.c BINDIR?=/usr/bin LIBADD= util WARNS?= 6 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/ncal/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/ncal/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/ncal/Makefile (revision 321913) @@ -1,16 +1,14 @@ # $FreeBSD$ .include PROG= ncal LIBADD= calendar ncursesw LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/pr/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/pr/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/pr/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= pr SRCS= pr.c egetopt.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/printf/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/printf/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/printf/Makefile (revision 321913) @@ -1,12 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= printf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/procstat/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/procstat/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/procstat/Makefile (revision 321913) @@ -1,29 +1,27 @@ # $FreeBSD$ .include PROG= procstat MAN= procstat.1 SRCS= procstat.c \ procstat_args.c \ procstat_auxv.c \ procstat_basic.c \ procstat_bin.c \ procstat_cred.c \ procstat_cs.c \ procstat_files.c \ procstat_kstack.c \ procstat_ptlwpinfo.c \ procstat_rlimit.c \ procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ procstat_vm.c LIBADD+= procstat xo util sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/sdiff/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/sdiff/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/sdiff/Makefile (revision 321913) @@ -1,15 +1,13 @@ # $FreeBSD$ .include PROG= sdiff SRCS= edit.c sdiff.c WARNS= 3 MAN1= sdiff.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/sed/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/sed/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/sed/Makefile (revision 321913) @@ -1,15 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= sed SRCS= compile.c main.c misc.c process.c WARNS?= 2 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/soelim/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/soelim/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/soelim/Makefile (revision 321913) @@ -1,11 +1,9 @@ # $FreeBSD$ .include PROG= soelim -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/tail/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/tail/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/tail/Makefile (revision 321913) @@ -1,13 +1,11 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 .include PROG= tail SRCS= forward.c misc.c read.c reverse.c tail.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/tar/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/tar/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/tar/Makefile (revision 321913) @@ -1,40 +1,38 @@ # $FreeBSD$ .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PROG= bsdtar BSDTAR_VERSION_STRING= 3.3.2 .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ cmdline.c \ creation_set.c \ read.c \ subst.c \ util.c \ write.c .PATH: ${_LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c \ line_reader.c \ passphrase.c LIBADD= archive .if ${MK_ICONV} != "no" CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" CFLAGS+= -I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/libarchive CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/timeout/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/timeout/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/timeout/Makefile (revision 321913) @@ -1,11 +1,9 @@ # $FreeBSD$ .include PROG= timeout -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/tr/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/tr/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/tr/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= tr SRCS= cmap.c cset.c str.c tr.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/truncate/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/truncate/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/truncate/Makefile (revision 321913) @@ -1,12 +1,10 @@ # $FreeBSD$ .include PROG= truncate LIBADD= util -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/uniq/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/uniq/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/uniq/Makefile (revision 321913) @@ -1,12 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= uniq -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/units/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/units/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/units/Makefile (revision 321913) @@ -1,15 +1,13 @@ # $FreeBSD$ .include PROG= units FILES= definitions.units FILESDIR= ${SHAREDIR}/misc LIBADD= edit -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/uudecode/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/uudecode/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/uudecode/Makefile (revision 321913) @@ -1,14 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= uudecode LINKS= ${BINDIR}/uudecode ${BINDIR}/b64decode MAN= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/uuencode/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/uuencode/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/uuencode/Makefile (revision 321913) @@ -1,18 +1,16 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= uuencode MAN= uuencode.1 uuencode.format.5 LINKS= ${BINDIR}/uuencode ${BINDIR}/b64encode MLINKS= uuencode.1 uudecode.1 \ uuencode.format.5 uuencode.5 \ uuencode.1 b64encode.1 \ b64encode.1 b64decode.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/xargs/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/xargs/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/xargs/Makefile (revision 321913) @@ -1,13 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= xargs SRCS= xargs.c strnsubst.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/xinstall/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/xinstall/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/xinstall/Makefile (revision 321913) @@ -1,21 +1,19 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= xinstall PROGNAME= install SRCS= xinstall.c getid.c MAN= install.1 .PATH: ${SRCTOP}/contrib/mtree CFLAGS+= -I${SRCTOP}/contrib/mtree CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= md -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/xo/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/xo/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/xo/Makefile (revision 321913) @@ -1,25 +1,23 @@ # $FreeBSD$ .include LIBXOSRC= ${SRCTOP}/contrib/libxo .PATH: .PATH: ${LIBXOSRC}/xo PROG= xo MAN= xo.1 # XXX For xoversion.h CFLAGS+=-I${LIBXOSRC}/libxo # XXX For xo_config.h CFLAGS+=-I${SRCTOP}/lib/libxo LIBADD= xo util -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.bin/yacc/Makefile =================================================================== --- projects/make-check-sandbox/usr.bin/yacc/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.bin/yacc/Makefile (revision 321913) @@ -1,28 +1,26 @@ # @(#)Makefile 5.3 (Berkeley) 5/12/90 # $FreeBSD$ .include BYACC_SRC= ${SRCTOP}/contrib/byacc .PATH: ${BYACC_SRC} PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c mstring.c output.c \ reader.c yaccpar.c symtab.c verbose.c warshall.c CFLAGS+= -DHAVE_FCNTL_H=1 \ -DHAVE_MKSTEMP=1 \ -DMAXTABLE=INT_MAX \ -DMIXEDCASE_FILENAMES=1 YYPATCH!= cat ${BYACC_SRC}/VERSION CFLAGS+= -DYYPATCH=${YYPATCH} LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS= yacc.1 byacc.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/chown/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/chown/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/chown/Makefile (revision 321913) @@ -1,14 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ .include PROG= chown LINKS= ${BINDIR}/chown /usr/bin/chgrp MAN= chgrp.1 chown.8 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/etcupdate/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/etcupdate/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/etcupdate/Makefile (revision 321913) @@ -1,12 +1,10 @@ # $FreeBSD$ .include SCRIPTS=etcupdate.sh MAN= etcupdate.8 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/extattr/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/extattr/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/extattr/Makefile (revision 321913) @@ -1,22 +1,20 @@ # $FreeBSD$ PROG= rmextattr MAN= rmextattr.8 LIBADD= sbuf LINKS+= ${BINDIR}/rmextattr ${BINDIR}/getextattr LINKS+= ${BINDIR}/rmextattr ${BINDIR}/setextattr LINKS+= ${BINDIR}/rmextattr ${BINDIR}/lsextattr MLINKS+= rmextattr.8 setextattr.8 MLINKS+= rmextattr.8 getextattr.8 MLINKS+= rmextattr.8 lsextattr.8 .include -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/fstyp/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/fstyp/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/fstyp/Makefile (revision 321913) @@ -1,45 +1,45 @@ # $FreeBSD$ .include PROG= fstyp SRCS= cd9660.c exfat.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c .if ${MK_ZFS} != "no" SRCS += zfs.c .endif MAN= fstyp.8 WARNS?= 2 .include -.if ${MK_TESTS} != "no" && ${TARGET_ENDIANNESS} == 1234 -SUBDIR+= tests +.if ${TARGET_ENDIANNESS} == 1234 +SUBDIR.${MK_TESTS}+= tests .endif .if ${MK_ZFS} != "no" IGNORE_PRAGMA= YES CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_ZFS CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head .endif CFLAGS+=-I${SRCTOP}/sys LIBADD= geom md .if ${MK_ZFS} != "no" LIBADD+=nvpair zfs .endif .include Index: projects/make-check-sandbox/usr.sbin/makefs/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/makefs/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/makefs/Makefile (revision 321913) @@ -1,42 +1,40 @@ # $FreeBSD$ SRCDIR:=${.PARSEDIR:tA} .include PROG= makefs CFLAGS+=-I${SRCDIR} SRCS= cd9660.c ffs.c \ makefs.c \ mtree.c \ walk.c MAN= makefs.8 WARNS?= 2 .include "${SRCDIR}/cd9660/Makefile.inc" .include "${SRCDIR}/ffs/Makefile.inc" CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1 .PATH: ${SRCTOP}/contrib/mtree CFLAGS+=-I${SRCTOP}/contrib/mtree SRCS+= getid.c misc.c spec.c .PATH: ${SRCTOP}/contrib/mknod CFLAGS+=-I${SRCTOP}/contrib/mknod SRCS+= pack_dev.c .PATH: ${SRCTOP}/sys/ufs/ffs SRCS+= ffs_tables.c CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd util sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/newsyslog/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/newsyslog/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/newsyslog/Makefile (revision 321913) @@ -1,13 +1,11 @@ # $FreeBSD$ .include PROG= newsyslog MAN= newsyslog.8 newsyslog.conf.5 SRCS= newsyslog.c ptimes.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/nmtree/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/nmtree/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/nmtree/Makefile (revision 321913) @@ -1,26 +1,24 @@ # $FreeBSD$ .include .PATH: ${SRCTOP}/contrib/mtree PROG= mtree MAN= mtree.5 mtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ only.c spec.c specspec.c verify.c CFLAGS+= -I${SRCTOP}/contrib/mknod .PATH: ${SRCTOP}/contrib/mknod SRCS+= pack_dev.c CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd md util LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree MLINKS= mtree.8 nmtree.8 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/pw/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/pw/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/pw/Makefile (revision 321913) @@ -1,19 +1,17 @@ # $FreeBSD$ PROG= pw MAN= pw.conf.5 pw.8 SRCS= pw.c pw_conf.c pw_user.c pw_group.c pw_log.c pw_nis.c pw_vpw.c \ grupd.c pwupd.c psdate.c bitmap.c cpdir.c rm_r.c strtounum.c \ pw_utils.c WARNS?= 3 LIBADD= crypt util sbuf .include -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox/usr.sbin/rpcbind/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/rpcbind/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/rpcbind/Makefile (revision 321913) @@ -1,32 +1,30 @@ # $NetBSD: Makefile,v 1.3 2000/06/20 13:56:43 fvdl Exp $ # $FreeBSD$ .include PROG= rpcbind MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif .if ${MK_RPCBIND_WARMSTART_SUPPORT} != "no" CFLAGS+= -DWARMSTART .endif .if ${MK_TCP_WRAPPERS} != "no" CFLAGS+= -DLIBWRAP LIBADD+= wrap .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests WARNS?= 1 .include Index: projects/make-check-sandbox/usr.sbin/sa/Makefile =================================================================== --- projects/make-check-sandbox/usr.sbin/sa/Makefile (revision 321912) +++ projects/make-check-sandbox/usr.sbin/sa/Makefile (revision 321913) @@ -1,17 +1,15 @@ # $FreeBSD$ .include .PATH: ${SRCTOP}/usr.bin/lastcomm PROG= sa MAN= sa.8 SRCS= main.c db.c pdb.c usrdb.c readrec.c PACKAGE=acct -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Index: projects/make-check-sandbox =================================================================== --- projects/make-check-sandbox (revision 321912) +++ projects/make-check-sandbox (revision 321913) Property changes on: projects/make-check-sandbox ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r321898-321912