From owner-svn-src-projects@freebsd.org Wed Nov 7 18:52:32 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4FA2112C7EA for ; Wed, 7 Nov 2018 18:52:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44C9D74B2F; Wed, 7 Nov 2018 18:52:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2607C198B6; Wed, 7 Nov 2018 18:52:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA7IqVWd058652; Wed, 7 Nov 2018 18:52:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA7IqS7D058198; Wed, 7 Nov 2018 18:52:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201811071852.wA7IqS7D058198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 7 Nov 2018 18:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r340234 - in projects/clang700-import: . bin/dd bin/ed contrib/expat contrib/expat/doc contrib/expat/examples contrib/expat/lib contrib/expat/tests contrib/expat/tests/benchmark contrib... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang700-import: . bin/dd bin/ed contrib/expat contrib/expat/doc contrib/expat/examples contrib/expat/lib contrib/expat/tests contrib/expat/tests/benchmark contrib/expat/xmlwf contrib/jema... X-SVN-Commit-Revision: 340234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44C9D74B2F X-Spamd-Result: default: False [-106.84 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.999,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; IP_SCORE(-3.73)[ip: (-9.91), ipnet: 2610:1c1:1::/48(-4.91), asn: 11403(-3.76), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 18:52:32 -0000 Author: dim Date: Wed Nov 7 18:52:28 2018 New Revision: 340234 URL: https://svnweb.freebsd.org/changeset/base/340234 Log: Merge ^/head r340126 through r340212. Added: projects/clang700-import/contrib/expat/AUTHORS - copied unchanged from r340212, head/contrib/expat/AUTHORS projects/clang700-import/contrib/expat/Makefile.am - copied unchanged from r340212, head/contrib/expat/Makefile.am projects/clang700-import/contrib/expat/README.md - copied unchanged from r340212, head/contrib/expat/README.md projects/clang700-import/contrib/expat/doc/Makefile.am - copied unchanged from r340212, head/contrib/expat/doc/Makefile.am projects/clang700-import/contrib/expat/doc/Makefile.in - copied unchanged from r340212, head/contrib/expat/doc/Makefile.in projects/clang700-import/contrib/expat/examples/Makefile.am - copied unchanged from r340212, head/contrib/expat/examples/Makefile.am projects/clang700-import/contrib/expat/examples/Makefile.in - copied unchanged from r340212, head/contrib/expat/examples/Makefile.in projects/clang700-import/contrib/expat/lib/Makefile.am - copied unchanged from r340212, head/contrib/expat/lib/Makefile.am projects/clang700-import/contrib/expat/lib/Makefile.in - copied unchanged from r340212, head/contrib/expat/lib/Makefile.in projects/clang700-import/contrib/expat/lib/loadlibrary.c - copied unchanged from r340212, head/contrib/expat/lib/loadlibrary.c projects/clang700-import/contrib/expat/lib/siphash.h - copied unchanged from r340212, head/contrib/expat/lib/siphash.h projects/clang700-import/contrib/expat/run.sh.in - copied unchanged from r340212, head/contrib/expat/run.sh.in projects/clang700-import/contrib/expat/test-driver-wrapper.sh - copied unchanged from r340212, head/contrib/expat/test-driver-wrapper.sh projects/clang700-import/contrib/expat/tests/Makefile.am - copied unchanged from r340212, head/contrib/expat/tests/Makefile.am projects/clang700-import/contrib/expat/tests/Makefile.in - copied unchanged from r340212, head/contrib/expat/tests/Makefile.in projects/clang700-import/contrib/expat/tests/benchmark/Makefile.am - copied unchanged from r340212, head/contrib/expat/tests/benchmark/Makefile.am projects/clang700-import/contrib/expat/tests/benchmark/Makefile.in - copied unchanged from r340212, head/contrib/expat/tests/benchmark/Makefile.in projects/clang700-import/contrib/expat/tests/benchmark/benchmark.sln - copied unchanged from r340212, head/contrib/expat/tests/benchmark/benchmark.sln projects/clang700-import/contrib/expat/tests/memcheck.c - copied unchanged from r340212, head/contrib/expat/tests/memcheck.c projects/clang700-import/contrib/expat/tests/memcheck.h - copied unchanged from r340212, head/contrib/expat/tests/memcheck.h projects/clang700-import/contrib/expat/tests/runtests.sln - copied unchanged from r340212, head/contrib/expat/tests/runtests.sln projects/clang700-import/contrib/expat/tests/structdata.c - copied unchanged from r340212, head/contrib/expat/tests/structdata.c projects/clang700-import/contrib/expat/tests/structdata.h - copied unchanged from r340212, head/contrib/expat/tests/structdata.h projects/clang700-import/contrib/expat/tests/udiffer.py - copied unchanged from r340212, head/contrib/expat/tests/udiffer.py projects/clang700-import/contrib/expat/tests/xmltest.log.expected - copied unchanged from r340212, head/contrib/expat/tests/xmltest.log.expected projects/clang700-import/contrib/expat/xmlwf/Makefile.am - copied unchanged from r340212, head/contrib/expat/xmlwf/Makefile.am projects/clang700-import/contrib/expat/xmlwf/Makefile.in - copied unchanged from r340212, head/contrib/expat/xmlwf/Makefile.in projects/clang700-import/share/ctypedef/C.UTF-8.src - copied unchanged from r340212, head/share/ctypedef/C.UTF-8.src projects/clang700-import/sys/kern/kern_ubsan.c - copied unchanged from r340212, head/sys/kern/kern_ubsan.c projects/clang700-import/tools/build/options/WITHOUT_BIND_NOW - copied unchanged from r340212, head/tools/build/options/WITHOUT_BIND_NOW projects/clang700-import/tools/build/options/WITH_BIND_NOW - copied unchanged from r340212, head/tools/build/options/WITH_BIND_NOW Deleted: projects/clang700-import/bin/ed/cbc.c projects/clang700-import/contrib/expat/MANIFEST projects/clang700-import/contrib/expat/README projects/clang700-import/share/ctypedef/en_US.UTF-8.src projects/clang700-import/tools/build/options/WITHOUT_ED_CRYPTO projects/clang700-import/tools/tools/locale/etc/unicode.conf projects/clang700-import/tools/tools/locale/tools/UTF82encoding.pl projects/clang700-import/tools/tools/locale/tools/changeoffset.pl projects/clang700-import/tools/tools/locale/tools/unicode2src.pl projects/clang700-import/tools/tools/locale/tools/whatis.pl Modified: projects/clang700-import/Makefile projects/clang700-import/Makefile.inc1 projects/clang700-import/bin/dd/dd.c projects/clang700-import/bin/ed/Makefile projects/clang700-import/bin/ed/POSIX projects/clang700-import/bin/ed/README projects/clang700-import/bin/ed/ed.1 projects/clang700-import/bin/ed/ed.h projects/clang700-import/bin/ed/io.c projects/clang700-import/bin/ed/main.c projects/clang700-import/contrib/expat/COPYING (contents, props changed) projects/clang700-import/contrib/expat/Changes (contents, props changed) projects/clang700-import/contrib/expat/FREEBSD-Xlist (contents, props changed) projects/clang700-import/contrib/expat/Makefile.in (contents, props changed) projects/clang700-import/contrib/expat/configure.ac (contents, props changed) projects/clang700-import/contrib/expat/doc/reference.html (contents, props changed) projects/clang700-import/contrib/expat/doc/xmlwf.1 (contents, props changed) projects/clang700-import/contrib/expat/doc/xmlwf.xml (contents, props changed) projects/clang700-import/contrib/expat/examples/elements.c (contents, props changed) projects/clang700-import/contrib/expat/examples/outline.c (contents, props changed) projects/clang700-import/contrib/expat/expat_config.h.in (contents, props changed) projects/clang700-import/contrib/expat/lib/ascii.h (contents, props changed) projects/clang700-import/contrib/expat/lib/asciitab.h (contents, props changed) projects/clang700-import/contrib/expat/lib/expat.h (contents, props changed) projects/clang700-import/contrib/expat/lib/expat_external.h (contents, props changed) projects/clang700-import/contrib/expat/lib/iasciitab.h (contents, props changed) projects/clang700-import/contrib/expat/lib/internal.h (contents, props changed) projects/clang700-import/contrib/expat/lib/latin1tab.h (contents, props changed) projects/clang700-import/contrib/expat/lib/nametab.h (contents, props changed) projects/clang700-import/contrib/expat/lib/utf8tab.h (contents, props changed) projects/clang700-import/contrib/expat/lib/xmlparse.c (contents, props changed) projects/clang700-import/contrib/expat/lib/xmlrole.c (contents, props changed) projects/clang700-import/contrib/expat/lib/xmlrole.h (contents, props changed) projects/clang700-import/contrib/expat/lib/xmltok.c (contents, props changed) projects/clang700-import/contrib/expat/lib/xmltok.h (contents, props changed) projects/clang700-import/contrib/expat/lib/xmltok_impl.c (contents, props changed) projects/clang700-import/contrib/expat/lib/xmltok_impl.h (contents, props changed) projects/clang700-import/contrib/expat/lib/xmltok_ns.c (contents, props changed) projects/clang700-import/contrib/expat/tests/benchmark/benchmark.c (contents, props changed) projects/clang700-import/contrib/expat/tests/chardata.c (contents, props changed) projects/clang700-import/contrib/expat/tests/chardata.h (contents, props changed) projects/clang700-import/contrib/expat/tests/minicheck.c (contents, props changed) projects/clang700-import/contrib/expat/tests/minicheck.h (contents, props changed) projects/clang700-import/contrib/expat/tests/runtests.c (contents, props changed) projects/clang700-import/contrib/expat/tests/runtestspp.cpp (contents, props changed) projects/clang700-import/contrib/expat/tests/xmltest.sh (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/codepage.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/codepage.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/ct.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/filemap.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/readfilemap.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/unixfilemap.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/win32filemap.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlfile.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlfile.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlmime.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlmime.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmltchar.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlurl.h (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlwf.c (contents, props changed) projects/clang700-import/contrib/expat/xmlwf/xmlwin32url.cxx (contents, props changed) projects/clang700-import/contrib/jemalloc/src/pages.c projects/clang700-import/lib/Makefile projects/clang700-import/lib/libc/locale/collate.c projects/clang700-import/lib/libc/locale/ldpart.c projects/clang700-import/lib/libcapsicum/Makefile projects/clang700-import/lib/libcapsicum/capsicum_helpers.3 projects/clang700-import/lib/libcapsicum/capsicum_helpers.h projects/clang700-import/lib/libcasper/libcasper/libcasper.3 projects/clang700-import/lib/libcasper/services/cap_dns/Makefile projects/clang700-import/lib/libcasper/services/cap_dns/cap_dns.3 projects/clang700-import/lib/libcasper/services/cap_dns/cap_dns.c projects/clang700-import/lib/libcasper/services/cap_dns/tests/dns_test.c projects/clang700-import/lib/libcasper/services/cap_grp/cap_grp.c projects/clang700-import/lib/libexpat/expat_config.h projects/clang700-import/lib/libexpat/libbsdxml.3 projects/clang700-import/libexec/rtld-elf/rtld.c projects/clang700-import/sbin/dhclient/bpf.c projects/clang700-import/sbin/dhclient/dhclient.c projects/clang700-import/sbin/ipfw/ipv6.c projects/clang700-import/sbin/md5/md5.c projects/clang700-import/sbin/ping/ping.c projects/clang700-import/share/ctypedef/Makefile projects/clang700-import/share/man/man4/ng_pptpgre.4 projects/clang700-import/share/man/man5/src.conf.5 projects/clang700-import/share/mk/bsd.lib.mk projects/clang700-import/share/mk/bsd.opts.mk projects/clang700-import/share/mk/bsd.prog.mk projects/clang700-import/share/mk/src.opts.mk projects/clang700-import/stand/lua/menu.lua projects/clang700-import/sys/amd64/conf/GENERIC projects/clang700-import/sys/amd64/include/cpu.h projects/clang700-import/sys/amd64/linux32/linux32_sysvec.c projects/clang700-import/sys/arm/include/cpu.h projects/clang700-import/sys/arm/include/elf.h projects/clang700-import/sys/arm64/conf/GENERIC projects/clang700-import/sys/arm64/include/cpu.h projects/clang700-import/sys/cam/scsi/scsi_da.c projects/clang700-import/sys/compat/freebsd32/capabilities.conf projects/clang700-import/sys/compat/freebsd32/freebsd32_proto.h projects/clang700-import/sys/compat/freebsd32/freebsd32_sysent.c projects/clang700-import/sys/compat/freebsd32/freebsd32_systrace_args.c projects/clang700-import/sys/compat/freebsd32/syscalls.master projects/clang700-import/sys/compat/linux/linux_common.c projects/clang700-import/sys/compat/linux/linux_ioctl.c projects/clang700-import/sys/compat/linux/linux_ioctl.h projects/clang700-import/sys/compat/linux/linux_socket.c projects/clang700-import/sys/conf/files projects/clang700-import/sys/conf/kern.post.mk projects/clang700-import/sys/conf/kern.pre.mk projects/clang700-import/sys/conf/kmod.mk projects/clang700-import/sys/conf/options projects/clang700-import/sys/dev/cxgbe/adapter.h projects/clang700-import/sys/dev/cxgbe/t4_main.c projects/clang700-import/sys/dev/cxgbe/t4_sge.c projects/clang700-import/sys/dev/hwpmc/hwpmc_mod.c projects/clang700-import/sys/dev/mrsas/mrsas.h projects/clang700-import/sys/dev/usb/controller/dwc_otg.c projects/clang700-import/sys/fs/nfsclient/nfs_clvfsops.c projects/clang700-import/sys/fs/nfsclient/nfs_clvnops.c projects/clang700-import/sys/geom/geom_io.c projects/clang700-import/sys/i386/include/cpu.h projects/clang700-import/sys/kern/capabilities.conf projects/clang700-import/sys/kern/init_sysent.c projects/clang700-import/sys/kern/kern_mutex.c projects/clang700-import/sys/kern/sys_pipe.c projects/clang700-import/sys/kern/syscalls.master projects/clang700-import/sys/kern/systrace_args.c projects/clang700-import/sys/kern/tty.c projects/clang700-import/sys/kern/tty_info.c projects/clang700-import/sys/kern/uipc_mqueue.c projects/clang700-import/sys/kern/uipc_syscalls.c projects/clang700-import/sys/kern/vfs_bio.c projects/clang700-import/sys/mips/include/cpu.h projects/clang700-import/sys/netgraph/ng_pptpgre.c projects/clang700-import/sys/netgraph/ng_pptpgre.h projects/clang700-import/sys/netinet/sctp_output.c projects/clang700-import/sys/powerpc/include/atomic.h projects/clang700-import/sys/powerpc/include/cpu.h projects/clang700-import/sys/powerpc/powerpc/mp_machdep.c projects/clang700-import/sys/riscv/include/cpu.h projects/clang700-import/sys/riscv/riscv/pmap.c projects/clang700-import/sys/sparc64/include/cpu.h projects/clang700-import/sys/sys/capability.h projects/clang700-import/sys/sys/socketvar.h projects/clang700-import/sys/sys/syscallsubr.h projects/clang700-import/sys/sys/sysproto.h projects/clang700-import/sys/sys/tty.h projects/clang700-import/sys/vm/vm_kern.c projects/clang700-import/sys/vm/vm_pageout.c projects/clang700-import/sys/x86/x86/delay.c projects/clang700-import/tools/build/Makefile projects/clang700-import/tools/build/options/WITH_LLD_BOOTSTRAP projects/clang700-import/tools/tools/locale/Makefile projects/clang700-import/tools/tools/locale/README projects/clang700-import/tools/tools/locale/tools/cldr2def.pl projects/clang700-import/tools/tools/locale/tools/finalize projects/clang700-import/tools/tools/locale/tools/utf8-rollup.pl projects/clang700-import/tools/tools/nanobsd/embedded/common projects/clang700-import/usr.bin/cmp/cmp.c projects/clang700-import/usr.bin/diff/diffreg.c projects/clang700-import/usr.bin/diff3/diff3.c projects/clang700-import/usr.bin/elfdump/elfdump.1 projects/clang700-import/usr.bin/elfdump/elfdump.c projects/clang700-import/usr.bin/indent/indent.c projects/clang700-import/usr.bin/jot/jot.c projects/clang700-import/usr.bin/ktrdump/ktrdump.c projects/clang700-import/usr.bin/lam/lam.c projects/clang700-import/usr.bin/man/man.sh projects/clang700-import/usr.bin/rwho/rwho.c projects/clang700-import/usr.bin/tee/tee.c projects/clang700-import/usr.bin/uniq/uniq.c projects/clang700-import/usr.bin/units/units.c projects/clang700-import/usr.bin/write/write.c projects/clang700-import/usr.sbin/Makefile projects/clang700-import/usr.sbin/bhyve/pci_fbuf.c (contents, props changed) projects/clang700-import/usr.sbin/bhyve/pci_nvme.c projects/clang700-import/usr.sbin/rwhod/rwhod.c Directory Properties: projects/clang700-import/ (props changed) projects/clang700-import/contrib/expat/ (props changed) projects/clang700-import/contrib/expat/doc/style.css (props changed) projects/clang700-import/contrib/expat/tests/README.txt (props changed) projects/clang700-import/contrib/expat/tests/benchmark/README.txt (props changed) Modified: projects/clang700-import/Makefile ============================================================================== --- projects/clang700-import/Makefile Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/Makefile Wed Nov 7 18:52:28 2018 (r340234) @@ -610,10 +610,13 @@ _need_lld_${target}_${target_arch} != \ # XXX: Passing HOST_OBJTOP into the PATH would allow skipping legacy, # bootstrap-tools, and cross-tools. Need to ensure each tool actually # supports all TARGETS though. +# For now we only pass UNIVERSE_TOOLCHAIN_PATH which will be added at the end +# of STRICTTMPPATH to ensure that the target-specific binaries come first. MAKE_PARAMS_${target}+= \ XCC="${HOST_OBJTOP}/tmp/usr/bin/cc" \ XCXX="${HOST_OBJTOP}/tmp/usr/bin/c++" \ - XCPP="${HOST_OBJTOP}/tmp/usr/bin/cpp" + XCPP="${HOST_OBJTOP}/tmp/usr/bin/cpp" \ + UNIVERSE_TOOLCHAIN_PATH=${HOST_OBJTOP}/tmp/usr/bin .endif .if defined(_need_lld_${target}_${target_arch}) && \ ${_need_lld_${target}_${target_arch}} == "yes" Modified: projects/clang700-import/Makefile.inc1 ============================================================================== --- projects/clang700-import/Makefile.inc1 Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/Makefile.inc1 Wed Nov 7 18:52:28 2018 (r340234) @@ -580,8 +580,25 @@ BUILD_ARCH!= uname -p WORLDTMP?= ${OBJTOP}/tmp BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin -STRICTTMPPATH= ${BPATH}:${XPATH} + +# When building we want to find the cross tools before the host tools in ${BPATH}. +# We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared +# toolchain files (clang, lld, etc.) during make universe/tinderbox +STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_PATH} +# We should not be using tools from /usr/bin accidentally since this could cause +# the build to break on other systems that don't have that tool. For now we +# still allow using the old behaviour (inheriting $PATH) if +# BUILD_WITH_STRICT_TMPPATH is set to 0 but this will eventually be removed. + +# Currently strict $PATH can cause build failures and does not work yet with +# USING_SYSTEM_LINKER/USING_SYSTEM_COMPILER. Once these issues have been +# resolved it will be turned on by default. +BUILD_WITH_STRICT_TMPPATH?=0 +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +TMPPATH= ${STRICTTMPPATH} +.else TMPPATH= ${STRICTTMPPATH}:${PATH} +.endif # # Avoid running mktemp(1) unless actually needed. @@ -589,8 +606,16 @@ TMPPATH= ${STRICTTMPPATH}:${PATH} # when in the middle of installing over this system. # .if make(distributeworld) || make(installworld) || make(stageworld) -INSTALLTMP!= mktemp -d -u -t install +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +MKTEMP=${WORLDTMP}/legacy/usr/bin/mktemp +.if !exists(${MKTEMP}) +.error "mktemp binary doesn't exist in expected location: ${MKTEMP}" .endif +.else +MKTEMP=mktemp +.endif +INSTALLTMP!= ${MKTEMP} -d -u -t install +.endif .if make(stagekernel) || make(distributekernel) TAGS+= kernel @@ -647,6 +672,8 @@ CROSSENV+= BUILD_TOOLS_META=.NOMETA CROSSENV+= ${TARGET_CFLAGS} .endif +BOOTSTRAPPING_OSRELDATE?=${OSRELDATE} + # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ @@ -658,7 +685,7 @@ BSARGS= DESTDIR= \ OBJTOP='${WORLDTMP}/obj-tools' \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ - BOOTSTRAPPING=${OSRELDATE} \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ MK_HTML=no NO_LINT=yes MK_MAN=no \ @@ -680,7 +707,7 @@ TMAKE= \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ - BOOTSTRAPPING=${OSRELDATE} \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ -DNO_LINT \ @@ -705,7 +732,7 @@ KTMAKE= \ OBJTOP='${WORLDTMP}/obj-kernel-tools' \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ - BOOTSTRAPPING=${OSRELDATE} \ + BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \ SSP_CFLAGS= \ MK_HTML=no -DNO_LINT MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ @@ -874,6 +901,9 @@ WORLDTMP_MTREEFLAGS= -deUW DESTDIR_MTREEFLAGS+= -W .endif MTREE?= mtree +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +MTREE= ${WORLDTMP}/legacy/usr/sbin/mtree +.endif WORLDTMP_MTREE= ${MTREE} ${WORLDTMP_MTREEFLAGS} DESTDIR_MTREE= ${MTREE} ${DESTDIR_MTREEFLAGS} @@ -948,10 +978,15 @@ _worldtmp: .PHONY .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} .else +# Note: for delete-old we need to set $PATH to also include the host $PATH +# since otherwise a partial build with missing symlinks in ${WORLDTMP}/legacy/ +# will fail to run due to missing binaries. $WMAKE sets PATH to only ${TMPPATH} +# so we remove that assingnment from $WMAKE and prepend the new $PATH ${_+_}@if [ -e "${WORLDTMP}" ]; then \ echo ">>> Deleting stale files in build tree..."; \ - cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES _NO_INCLUDE_COMPILERMK=t \ - delete-old delete-old-libs >/dev/null; \ + cd ${.CURDIR}; env PATH=${TMPPATH}:${PATH} ${WMAKE:NPATH=*} \ + _NO_INCLUDE_COMPILERMK=t -DBATCH_DELETE_OLD_FILES delete-old \ + delete-old-libs >/dev/null; \ fi rm -rf ${WORLDTMP}/legacy/usr/include .if ${USING_SYSTEM_COMPILER} == "yes" @@ -972,6 +1007,11 @@ _worldtmp: .PHONY # available on the target system (this happens e.g. when building on non-FreeBSD) cd ${.CURDIR}/tools/build; \ ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy installdirs +# In order to build without inheriting $PATH we need to add symlinks to the host +# tools in $WORLDTMP for the tools that we don't build during bootstrap-tools + cd ${.CURDIR}/tools/build; \ + ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy host-symlinks + _legacy: @echo @echo "--------------------------------------------------------------" @@ -1931,15 +1971,6 @@ update: .PHONY # build-tools or cross-tools. # -# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. -# r296685 fix cross-endian objcopy -# r310724 fixed PR 215350, a crash in libdwarf with objects built by GCC 6.2. -# r334881 added libdwarf constants used by ctfconvert. -# r338478 fixed a crash in objcopy for mips64el objects -# r339083 libelf: correct mips64el test to use ELF header -.if ${BOOTSTRAPPING} < 1200085 -_elftoolchain_libs= lib/libelf lib/libdwarf -.endif # libnv and libl are both requirements for config(8), which is an unconditional # bootstrap-tool. @@ -1951,7 +1982,7 @@ legacy: .PHONY false .endif -.for _tool in tools/build ${_elftoolchain_libs} ${_config_deps} +.for _tool in tools/build ${_config_deps} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ @@ -1965,10 +1996,34 @@ legacy: .PHONY # bootstrap-tools: Build tools needed for compatibility. These are binaries that # are built to build other binaries in the system. However, the focus of these # binaries is usually quite narrow. Bootstrap tools use the host's compiler and -# libraries, augmented by -legacy. +# libraries, augmented by -legacy, in addition to the libraries built during +# bootstrap-tools. # _bt= _bootstrap-tools +# We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't +# accidentally run tools that are incompatible but happen to be in $PATH. +# This is especially important when building on Linux/MacOS where many of the +# programs used during the build accept different flags or generate different +# output. On those platforms we only symlink the tools known to be compatible +# (e.g. basic utilities such as mkdir) into ${WORLDTMP} and build all others +# from the FreeBSD sources during the bootstrap-tools stage. +# We want to build without the user's $PATH starting in the bootstrap-tools +# phase so the tools used in that phase (ln, cp, etc) must have already been +# linked to $WORLDTMP. The tools are listed in the _host_tools_to_symlink +# variable in tools/build/Makefile and are linked during the legacy phase. +# Since they could be Linux or MacOS binaries, too we must only use flags that +# are portable across operating systems. + +# If BOOTSTRAP_ALL_TOOLS is set we will build all the required tools from the +# current source tree. Otherwise we create a symlink to the version found in +# $PATH during the bootstrap-tools stage. +.if defined(BOOTSTRAP_ALL_TOOLS) +# BOOTSTRAPPING will be set on the command line so we can't override it here. +# Instead set BOOTSTRAPPING_OSRELDATE so that the value 0 is set ${BSARGS} +BOOTSTRAPPING_OSRELDATE:= 0 +.endif + .if ${MK_GAMES} != "no" _strfile= usr.bin/fortune/strfile .endif @@ -1981,12 +2036,34 @@ _gperf= gnu/usr.bin/gperf _vtfontcvt= usr.bin/vtfontcvt .endif +# If we are not building the bootstrap because BOOTSTRAPPING is sufficient +# we symlink the host version to $WORLDTMP instead. By doing this we can also +# detect when a bootstrap tool is being used without the required MK_FOO. +# If you add a new bootstrap tool where we could also use the host version, +# please ensure that you also add a .else case where you add the tool to the +# _bootstrap_tools_links variable. .if ${BOOTSTRAPPING} < 1000033 _m4= usr.bin/m4 _lex= usr.bin/lex +# Note: lex needs m4 to build but m4 also depends on lex. However, lex can be +# bootstrapped so we build lex first. +${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-${_lex} +_bt_m4_depend=${_bt}-${_m4} +_bt_lex_depend=${_bt}-${_lex} ${_bt_m4_depend} +.else +_bootstrap_tools_links+=m4 lex +.endif -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd -${_bt}-usr.bin/lex: ${_bt}-usr.bin/m4 +# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. +# r296685 fix cross-endian objcopy +# r310724 fixed PR 215350, a crash in libdwarf with objects built by GCC 6.2. +# r334881 added libdwarf constants used by ctfconvert. +# r338478 fixed a crash in objcopy for mips64el objects +# r339083 libelf: correct mips64el test to use ELF header +.if ${BOOTSTRAPPING} < 1200085 +_elftoolchain_libs= lib/libelf lib/libdwarf +${_bt}-lib/libelf: ${_bt_m4_depend} +${_bt}-lib/libdwarf: ${_bt_m4_depend} .endif # r245440 mtree -N support added @@ -1998,17 +2075,23 @@ _nmtree= lib/libmd \ ${_bt}-lib/libnetbsd: ${_bt}-lib/libmd ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd +.else +_bootstrap_tools_links+=mtree .endif # r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l .if ${BOOTSTRAPPING} < 1000027 _cat= bin/cat +.else +_bootstrap_tools_links+=cat .endif # r277259 crunchide: Correct 64-bit section header offset # r281674 crunchide: always include both 32- and 64-bit ELF support .if ${BOOTSTRAPPING} < 1100078 _crunchide= usr.sbin/crunch/crunchide +.else +_bootstrap_tools_links+=crunchide .endif # r285986 crunchen: use STRIPBIN rather than STRIP @@ -2018,12 +2101,16 @@ _crunchide= usr.sbin/crunch/crunchide (${MK_AUTO_OBJ} == "yes" && ${BOOTSTRAPPING} < 1100114) || \ (${MK_META_MODE} == "yes" && ${BOOTSTRAPPING} < 1200006) _crunchgen= usr.sbin/crunch/crunchgen +.else +_bootstrap_tools_links+=crunchgen .endif # r296926 -P keymap search path, MFC to stable/10 in r298297 .if ${BOOTSTRAPPING} < 1003501 || \ (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) _kbdcontrol= usr.sbin/kbdcontrol +.else +_bootstrap_tools_links+=kbdcontrol .endif _yacc= lib/liby \ @@ -2059,6 +2146,10 @@ _dtc= usr.bin/dtc _dtc= gnu/usr.bin/dtc .endif +.if ${MK_LOCALES} != "no" +_localedef= usr.bin/localedef +.endif + .if ${MK_KERBEROS} != "no" _kerberos5_bootstrap_tools= \ kerberos5/tools/make-roken \ @@ -2069,12 +2160,107 @@ _kerberos5_bootstrap_tools= \ usr.bin/compile_et .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} +.for _tool in ${_kerberos5_bootstrap_tools} +${_bt}-${_tool}: ${_bt}-usr.bin/yacc ${_bt_lex_depend} +.endfor .endif ${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd -bootstrap-tools: .PHONY +# The tools listed in _basic_bootstrap_tools will generally not be +# bootstrapped unless BOOTSTRAP_ALL_TOOL is set. However, when building on a +# Linux or MacOS host the host versions are incompatible so we need to build +# them from the source tree. Usually the link name will be the same as the subdir, +# but some directories such as grep or test install multiple binaries. In that +# case we use the _basic_bootstrap_tools_multilink variable which is a list of +# subdirectory and comma-separated list of files. +_basic_bootstrap_tools_multilink=usr.bin/grep grep,egrep,fgrep +_basic_bootstrap_tools_multilink+=bin/test test,[ +# bootstrap tools needed by buildworld: +_basic_bootstrap_tools=usr.bin/awk usr.bin/cut bin/expr usr.bin/gencat \ + usr.bin/join usr.bin/mktemp bin/rmdir usr.bin/sed usr.bin/sort \ + usr.bin/truncate usr.bin/tsort +# elf2aout is required for sparc64 build +_basic_bootstrap_tools+=usr.bin/elf2aout +# file2c is required for building usr.sbin/config: +_basic_bootstrap_tools+=usr.bin/file2c +# uuencode/uudecode required for share/tabset +_basic_bootstrap_tools+=usr.bin/uuencode usr.bin/uudecode +# xargs is required by mkioctls +_basic_bootstrap_tools+=usr.bin/xargs +# cap_mkdb is required for share/termcap: +_basic_bootstrap_tools+=usr.bin/cap_mkdb +# ldd is required for installcheck (TODO: just always use /usr/bin/ldd instead?) +_basic_bootstrap_tools+=usr.bin/ldd +# services_mkdb/pwd_mkdb are required for installworld: +_basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb +# sysctl/chflags are required for installkernel: +_basic_bootstrap_tools+=sbin/sysctl bin/chflags +.if ${MK_AMD} != "no" +# unifdef is only used by usr.sbin/amd/libamu/Makefile +_basic_bootstrap_tools+=usr.bin/unifdef +.endif + +.if ${MK_BOOT} != "no" +_basic_bootstrap_tools+=bin/dd +# xz/unxz is used by EFI +_basic_bootstrap_tools_multilink+=usr.bin/xz xz,unxz +# md5 is used by boot/beri (and possibly others) +_basic_bootstrap_tools+=sbin/md5 +.if defined(BOOTSTRAP_ALL_TOOLS) +${_bt}-sbin/md5: ${_bt}-lib/libmd +.endif +.endif + +.if ${MK_ZONEINFO} != "no" +_basic_bootstrap_tools+=usr.sbin/zic usr.sbin/tzsetup +.endif + +.if defined(BOOTSTRAP_ALL_TOOLS) +_other_bootstrap_tools+=${_basic_bootstrap_tools} +.for _subdir _links in ${_basic_bootstrap_tools_multilink} +_other_bootstrap_tools+=${_subdir} +.endfor +${_bt}-usr.bin/awk: ${_bt_lex_depend} ${_bt}-usr.bin/yacc +${_bt}-bin/expr: ${_bt_lex_depend} ${_bt}-usr.bin/yacc +# If we are bootstrapping file2c, we have to build it before config: +${_bt}-usr.sbin/config: ${_bt}-usr.bin/file2c ${_bt_lex_depend} +# Note: no symlink to make/bmake in the !BOOTSTRAP_ALL_TOOLS case here since +# the links to make/bmake make links will have already have been created in the +# `make legacy` step. Not adding a link to make is important on non-FreeBSD +# since "make" will usually point to GNU make there. +_other_bootstrap_tools+=usr.bin/bmake +.else +# All tools in _basic_bootstrap_tools have the same name as the subdirectory +# so we can use :T to get the name of the symlinks that we need to create. +_bootstrap_tools_links+=${_basic_bootstrap_tools:T} +.for _subdir _links in ${_basic_bootstrap_tools_multilink} +_bootstrap_tools_links+=${_links:S/,/ /g} +.endfor +.endif # defined(BOOTSTRAP_ALL_TOOLS) + +# Link the tools that we need for building but don't need to bootstrap because +# the host version is known to be compatible into ${WORLDTMP}/legacy +# We do this before building any of the bootstrap tools in case they depend on +# the presence of any of the links (e.g. as m4/lex/awk) +${_bt}-links: .PHONY + +.for _tool in ${_bootstrap_tools_links} +${_bt}-link-${_tool}: .PHONY .MAKE + @if [ ! -e "${WORLDTMP}/legacy/bin/${_tool}" ]; then \ + source_path=`which ${_tool}`; \ + if [ ! -e "$${source_path}" ] ; then \ + echo "Cannot find host tool '${_tool}'"; false; \ + fi; \ + ln -sfnv "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"; \ + fi +${_bt}-links: ${_bt}-link-${_tool} +.endfor + + +bootstrap-tools: ${_bt}-links .PHONY + # Please document (add comment) why something is in 'bootstrap-tools'. # Try to bound the building of the bootstrap-tool to just the # FreeBSD versions that need the tool built at this stage of the build. @@ -2086,6 +2272,7 @@ bootstrap-tools: .PHONY ${_dtc} \ ${_cat} \ ${_kbdcontrol} \ + ${_elftoolchain_libs} \ usr.bin/lorder \ lib/libopenbsd \ usr.bin/mandoc \ @@ -2093,6 +2280,7 @@ bootstrap-tools: .PHONY ${_yacc} \ ${_m4} \ ${_lex} \ + ${_other_bootstrap_tools} \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ @@ -2101,10 +2289,13 @@ bootstrap-tools: .PHONY ${_nmtree} \ ${_vtfontcvt} \ ${_localedef} -${_bt}-${_tool}: .PHONY .MAKE +${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ + if [ "${_tool}" = "usr.bin/lex" ]; then \ + ${MAKE} DIRPRFX=${_tool}/ bootstrap; \ + fi; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP}/legacy install @@ -2182,7 +2373,7 @@ kernel-tools: .PHONY # we get done with the earlier stages. It is the last set of tools needed # to begin building the target binaries. # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BUILD_WITH_STRICT_TMPPATH} != 0 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif @@ -2235,9 +2426,14 @@ _gcc= gnu/usr.bin/cc _usb_tools= stand/usb/tools .endif +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 || defined(BOOTSTRAP_ALL_TOOLS) +_ar=usr.bin/ar +.endif + cross-tools: .MAKE .PHONY .for _tool in \ ${LOCAL_XTOOL_DIRS} \ + ${_ar} \ ${_clang_libs} \ ${_clang} \ ${_lld} \ Modified: projects/clang700-import/bin/dd/dd.c ============================================================================== --- projects/clang700-import/bin/dd/dd.c Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/dd/dd.c Wed Nov 7 18:52:28 2018 (r340234) @@ -157,7 +157,7 @@ setup(void) getfdtype(&in); cap_rights_init(&rights, CAP_READ, CAP_SEEK); - if (cap_rights_limit(in.fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(in.fd, &rights) == -1) err(1, "unable to limit capability rights"); if (files_cnt > 1 && !(in.flags & ISTAPE)) @@ -188,10 +188,9 @@ setup(void) getfdtype(&out); - if (cap_rights_limit(out.fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(out.fd, &rights) == -1) err(1, "unable to limit capability rights"); - if (cap_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1 && - errno != ENOSYS) + if (caph_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1) err(1, "unable to limit capability rights"); if (in.fd != STDIN_FILENO && out.fd != STDIN_FILENO) { Modified: projects/clang700-import/bin/ed/Makefile ============================================================================== --- projects/clang700-import/bin/ed/Makefile Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/Makefile Wed Nov 7 18:52:28 2018 (r340234) @@ -4,13 +4,8 @@ PACKAGE=runtime PROG= ed -SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c +SRCS= buf.c glbl.c io.c main.c re.c sub.c undo.c LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS= ed.1 red.1 - -.if ${MK_OPENSSL} != "no" && ${MK_ED_CRYPTO} != "no" -CFLAGS+=-DDES -LIBADD= crypto -.endif .include Modified: projects/clang700-import/bin/ed/POSIX ============================================================================== --- projects/clang700-import/bin/ed/POSIX Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/POSIX Wed Nov 7 18:52:28 2018 (r340234) @@ -25,29 +25,20 @@ EXTENSIONS iv) `z' for scrolling through the buffer, and v) BSD line addressing syntax (i.e., `^' and `%') is recognized. -2) If crypt(3) is available, files can be read and written using DES - encryption. The `x' command prompts the user to enter a key used for - encrypting/ decrypting subsequent reads and writes. If only a newline - is entered as the key, then encryption is disabled. Otherwise, a key - is read in the same manner as a password entry. The key remains in - effect until encryption is disabled. For more information on the - encryption algorithm, see the bdes(1) man page. Encryption/decryption - should be fully compatible with SunOS des(1). - -3) The POSIX interactive global commands `G' and `V' are extended to +2) The POSIX interactive global commands `G' and `V' are extended to support multiple commands, including `a', `i' and `c'. The command format is the same as for the global commands `g' and `v', i.e., one command per line with each line, except for the last, ending in a backslash (\). -4) An extension to the POSIX file commands `E', `e', `r', `W' and `w' is +3) An extension to the POSIX file commands `E', `e', `r', `W' and `w' is that arguments are processed for backslash escapes, i.e., any character preceded by a backslash is interpreted literally. If the first unescaped character of a argument is a bang (!), then the rest of the line is interpreted as a shell command, and no escape processing is performed by ed. -5) For SunOS ed(1) compatibility, ed runs in restricted mode if invoked +4) For SunOS ed(1) compatibility, ed runs in restricted mode if invoked as red. This limits editing of files in the local directory only and prohibits shell commands. Modified: projects/clang700-import/bin/ed/README ============================================================================== --- projects/clang700-import/bin/ed/README Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/README Wed Nov 7 18:52:28 2018 (r340234) @@ -9,7 +9,6 @@ compile with little trouble. Otherwise, the macros SP should be redefined to disable interrupts. The following compiler directives are recognized: -DES - to add encryption support (requires crypt(3)) NO_REALLOC_NULL - if realloc(3) does not accept a NULL pointer BACKWARDS - for backwards compatibility NEED_INSQUE - if insque(3) is missing Modified: projects/clang700-import/bin/ed/ed.1 ============================================================================== --- projects/clang700-import/bin/ed/ed.1 Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/ed.1 Wed Nov 7 18:52:28 2018 (r340234) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd February 5, 2017 +.Dd November 3, 2018 .Dt ED 1 .Os .Sh NAME @@ -9,12 +9,12 @@ .Sh SYNOPSIS .Nm .Op Fl -.Op Fl sx +.Op Fl s .Op Fl p Ar string .Op Ar file .Nm red .Op Fl -.Op Fl sx +.Op Fl s .Op Fl p Ar string .Op Ar file .Sh DESCRIPTION @@ -141,11 +141,6 @@ Suppress diagnostics. This should be used if .Nm Ns 's standard input is from a script. -.It Fl x -Prompt for an encryption key to be used in subsequent reads and writes -(see the -.Em x -command). .It Fl p Ar string Specify a command prompt. This may be toggled on and off with the @@ -865,12 +860,6 @@ This is similar to the .Em w command, expect that the previous contents of file is not clobbered. The current address is unchanged. -.It x -Prompt for an encryption key which is used in subsequent reads and -writes. -If a newline alone is entered as the key, then encryption is -turned off. -Otherwise, echoing is disabled while a key is read. .It Pf (.+1)z n Scroll .Ar n Modified: projects/clang700-import/bin/ed/ed.h ============================================================================== --- projects/clang700-import/bin/ed/ed.h Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/ed.h Wed Nov 7 18:52:28 2018 (r340234) @@ -175,18 +175,7 @@ if ((i) > (n)) { \ /* NEWLINE_TO_NUL: overwrite newlines with ASCII NULs */ #define NEWLINE_TO_NUL(s, l) translit_text(s, l, '\n', '\0') -#ifdef ED_DES_INCLUDES -void des_error(const char *); -void expand_des_key(char *, char *); -void set_des_key(DES_cblock *); -#endif -/* Other DES support stuff */ -void init_des_cipher(void); -int flush_des_file(FILE *); -int get_des_char(FILE *); -int put_des_char(int, FILE *); - /* Local Function Declarations */ void add_line_node(line_t *); int append_lines(long); @@ -280,6 +269,5 @@ extern long u_current_addr; extern long rows; extern int cols; extern int newline_added; -extern int des; extern int scripted; extern int patlock; Modified: projects/clang700-import/bin/ed/io.c ============================================================================== --- projects/clang700-import/bin/ed/io.c Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/io.c Wed Nov 7 18:52:28 2018 (r340234) @@ -76,8 +76,6 @@ read_stream(FILE *fp, long n) int len; isbinary = newline_added = 0; - if (des) - init_des_cipher(); for (current_addr = n; (len = get_stream_line(fp)) > 0; size += len) { SPL1(); if (put_sbuf_line(sbuf) == NULL) { @@ -106,8 +104,6 @@ read_stream(FILE *fp, long n) newline_added = 1; newline_added = appended ? newline_added : o_newline_added; isbinary = isbinary | o_isbinary; - if (des) - size += 8 - size % 8; /* adjust DES size */ return size; } @@ -119,8 +115,8 @@ get_stream_line(FILE *fp) int c; int i = 0; - while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) && - !ferror(fp))) && c != '\n') { + while (((c = getc(fp)) != EOF || (!feof(fp) && !ferror(fp))) && + c != '\n') { REALLOC(sbuf, sbufsz, i + 1, ERR); if (!(sbuf[i++] = c)) isbinary = 1; @@ -180,8 +176,6 @@ write_stream(FILE *fp, long n, long m) char *s; int len; - if (des) - init_des_cipher(); for (; n && n <= m; n++, lp = lp->q_forw) { if ((s = get_sbuf_line(lp)) == NULL) return ERR; @@ -192,10 +186,6 @@ write_stream(FILE *fp, long n, long m) return ERR; size += len; } - if (des) { - flush_des_file(fp); /* flush buffer */ - size += 8 - size % 8; /* adjust DES size */ - } return size; } @@ -205,7 +195,7 @@ int put_stream_line(FILE *fp, const char *s, int len) { while (len--) - if ((des ? put_des_char(*s++, fp) : fputc(*s++, fp)) < 0) { + if (fputc(*s++, fp) < 0) { fprintf(stderr, "%s\n", strerror(errno)); errmsg = "cannot write file"; return ERR; Modified: projects/clang700-import/bin/ed/main.c ============================================================================== --- projects/clang700-import/bin/ed/main.c Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/bin/ed/main.c Wed Nov 7 18:52:28 2018 (r340234) @@ -47,10 +47,6 @@ __FBSDID("$FreeBSD$"); * The buffering algorithm is attributed to Rodney Ruddock of * the University of Guelph, Guelph, Ontario. * - * The cbc.c encryption code is adapted from - * the bdes program by Matt Bishop of Dartmouth College, - * Hanover, NH. - * */ #include @@ -81,7 +77,6 @@ int ibufsz; /* ed command-line buffer size */ char *ibufp; /* pointer to ed command-line buffer */ /* global flags */ -int des = 0; /* if set, use crypt(3) for i/o */ static int garrulous = 0; /* if set, print all error messages */ int isbinary; /* if set, buffer contains ASCII NULs */ int isglobal; /* if set, doing a global command */ @@ -121,11 +116,7 @@ top: scripted = 1; break; case 'x': /* use crypt */ -#ifdef DES - des = get_keyword(); -#else fprintf(stderr, "crypt unavailable\n?\n"); -#endif break; default: @@ -821,13 +812,8 @@ exec_command(void) return ERR; } GET_COMMAND_SUFFIX(); -#ifdef DES - des = get_keyword(); - break; -#else errmsg = "crypt unavailable"; return ERR; -#endif case 'z': #ifdef BACKWARDS if (check_addr_range(first_addr = 1, current_addr + 1) < 0) Copied: projects/clang700-import/contrib/expat/AUTHORS (from r340212, head/contrib/expat/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/contrib/expat/AUTHORS Wed Nov 7 18:52:28 2018 (r340234, copy of r340212, head/contrib/expat/AUTHORS) @@ -0,0 +1,10 @@ +Expat is brought to you by: + +Clark Cooper +Fred L. Drake, Jr. +Greg Stein +James Clark +Karl Waclawek +Rhodri James +Sebastian Pipping +Steven Solie Modified: projects/clang700-import/contrib/expat/COPYING ============================================================================== --- projects/clang700-import/contrib/expat/COPYING Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/contrib/expat/COPYING Wed Nov 7 18:52:28 2018 (r340234) @@ -1,5 +1,5 @@ Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper -Copyright (c) 2001-2016 Expat maintainers +Copyright (c) 2001-2017 Expat maintainers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Modified: projects/clang700-import/contrib/expat/Changes ============================================================================== --- projects/clang700-import/contrib/expat/Changes Wed Nov 7 18:33:09 2018 (r340233) +++ projects/clang700-import/contrib/expat/Changes Wed Nov 7 18:52:28 2018 (r340234) @@ -1,3 +1,333 @@ +NOTE: We are looking for help with a few things: + https://github.com/libexpat/libexpat/labels/help%20wanted + If you can help, please get in touch. Thanks! + +Release 2.2.6 Sun August 12 2018 + Bug fixes: + #170 #206 Avoid doing arithmetic with NULL pointers in XML_GetBuffer + #204 #205 Fix 2.2.5 regression with suspend-resume while parsing + a document like '' + + Other changes: + #165 #168 Autotools: Fix docbook-related configure syntax error + #166 Autotools: Avoid grep option `-q` for Solaris + #167 Autotools: Support + ./configure DOCBOOK_TO_MAN="xmlto man --skip-validation" + #159 #167 Autotools: Support DOCBOOK_TO_MAN command which produces + xmlwf.1 rather than XMLWF.1; also covers case insensitive + file systems + #181 Autotools: Drop -rpath option passed to libtool + #188 Autotools: Detect and deny SGML docbook2man as ours is XML + #188 Autotools/CMake: Support command db2x_docbook2man as well + #174 CMake: Introduce option WARNINGS_AS_ERRORS, defaults to OFF + #184 #185 CMake: Introduce option MSVC_USE_STATIC_CRT, defaults to OFF + #207 #208 CMake: Introduce option XML_UNICODE and XML_UNICODE_WCHAR_T, + both defaulting to OFF + #175 CMake: Prefer check_symbol_exists over check_function_exists + #176 CMake: Create the same pkg-config file as with GNU Autotools + #178 #179 CMake: Use GNUInstallDirs module to set proper defaults for + install directories + #208 CMake: Utilize expat_config.h.cmake for XML_DEV_URANDOM + #180 Windows: Fix compilation of test suite for Visual Studio 2008 + #131 #173 #202 Address compiler warnings + #187 #190 #200 Fix miscellaneous typos + Version info bumped from 7:7:6 to 7:8:6 + + Special thanks to: + Anton Maklakov + Benjamin Peterson + Brad King + Franek Korta + Frank Rast + Joe Orton + luzpaz + Pedro Vicente + Rainer Jung + Rhodri James + Rolf Ade + Rolf Eike Beer + Thomas Beutlich + Tomasz Kłoczko + +Release 2.2.5 Tue October 31 2017 + Bug fixes: + #8 If the parser runs out of memory, make sure its internal + state reflects the memory it actually has, not the memory + it wanted to have. + #11 The default handler wasn't being called when it should for + a SYSTEM or PUBLIC doctype if an entity declaration handler + was registered. + #137 #138 Fix a case of mistakenly reported parsing success where + XML_StopParser was called from an element handler + #162 Function XML_ErrorString was returning NULL rather than + a message for code XML_ERROR_INVALID_ARGUMENT + introduced with release 2.2.1 + + Other changes: + #106 xmlwf: Add argument -N adding notation declarations + #75 #106 Test suite: Resolve expected failure cases where xmlwf + output was incomplete + #127 Windows: Fix test suite compilation + #126 #127 Windows: Fix compilation for Visual Studio 2012 + Windows: Upgrade shipped project files to Visual Studio 2017 + #33 #132 tests: Mass-fix compilation for XML_UNICODE_WCHAR_T + #129 examples: Fix compilation for XML_UNICODE_WCHAR_T + #130 benchmark: Fix compilation for XML_UNICODE_WCHAR_T + #144 xmlwf: Fix compilation for XML_UNICODE_WCHAR_T; still needs + Windows or MinGW for 2-byte wchar_t + #9 Address two Clang Static Analyzer false positives + #59 Resolve troublesome macros hiding parser struct membership + and dereferencing that pointer + #6 Resolve superfluous internal malloc/realloc switch + #153 #155 Improve docbook2x-man detection + #160 Undefine NDEBUG in the test suite (rather than rejecting it) + #161 Address compiler warnings + Version info bumped from 7:6:6 to 7:7:6 + + Special thanks to: + Benbuck Nason + Hans Wennborg + José Gutiérrez de la Concha + Pedro Monreal Gonzalez + Rhodri James + Rolf Ade + Stephen Groat + and + Core Infrastructure Initiative + +Release 2.2.4 Sat August 19 2017 + Bug fixes: + #115 Fix copying of partial characters for UTF-8 input + + Other changes: + #109 Fix "make check" for non-x86 architectures that default + to unsigned type char (-128..127 rather than 0..255) + #109 coverage.sh: Cover -funsigned-char + Autotools: Introduce --without-xmlwf argument + #65 Autotools: Replace handwritten Makefile with GNU Automake + #43 CMake: Auto-detect high quality entropy extractors, add new + option USE_libbsd=ON to use arc4random_buf of libbsd + #74 CMake: Add -fno-strict-aliasing only where supported + #114 CMake: Always honor manually set BUILD_* options + #114 CMake: Compile man page if docbook2x-man is available, only + #117 Include file tests/xmltest.log.expected in source tarball + (required for "make run-xmltest") + #117 Include (existing) Visual Studio 2013 files in source tarball + Improve test suite error output + #111 Fix some typos in documentation + Version info bumped from 7:5:6 to 7:6:6 + + Special thanks to: + Jakub Wilk + Joe Orton + Lin Tian + Rolf Eike Beer + +Release 2.2.3 Wed August 2 2017 + Security fixes: + #82 CVE-2017-11742 -- Windows: Fix DLL hijacking vulnerability + using Steve Holme's LoadLibrary wrapper for/of cURL + + Bug fixes: + #85 Fix a dangling pointer issue related to realloc + + Other changes: + Increase code coverage + #91 Linux: Allow getrandom to fail if nonblocking pool has not + yet been initialized and read /dev/urandom then, instead. + This is in line with what recent Python does. + #81 Pre-10.7/Lion macOS: Support entropy from arc4random + #86 Check that a UTF-16 encoding in an XML declaration has the + right endianness + #4 #5 #7 Recover correctly when some reallocations fail + Repair "./configure && make" for systems without any + provider of high quality entropy + and try reading /dev/urandom on those + Ensure that user-defined character encodings have converter + functions when they are needed + Fix mis-leading description of argument -c in xmlwf.1 + Rely on macro HAVE_ARC4RANDOM_BUF (rather than __CloudABI__) + for CloudABI + #100 Fix use of SIPHASH_MAIN in siphash.h + #23 Test suite: Fix memory leaks + Version info bumped from 7:4:6 to 7:5:6 + + Special thanks to: + Chanho Park + Joe Orton + Pascal Cuoq + Rhodri James + Simon McVittie + Vadim Zeitlin + Viktor Szakats + and + Core Infrastructure Initiative + +Release 2.2.2 Wed July 12 2017 + Security fixes: + #43 Protect against compilation without any source of high + quality entropy enabled, e.g. with CMake build system; + commit ff0207e6076e9828e536b8d9cd45c9c92069b895 + #60 Windows with _UNICODE: + Unintended use of LoadLibraryW with a non-wide string + resulted in failure to load advapi32.dll and degradation + in quality of used entropy when compiled with _UNICODE for + Windows; you can launch existing binaries with + EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the + quality of entropy used during runtime; commits + * 95b95032f907ef1cd17ee7a9a1768010a825d61d + * 73a5a2e9c081f49f2d775cf7ced864158b68dc80 + [MOX-006] Fix non-NULL parser parameter validation in XML_Parse; + resulted in NULL dereference, previously; + commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe + + Bug fixes: + #69 Fix improper use of unsigned long long integer literals + + Other changes: + #73 Start requiring a C99 compiler + #49 Fix "==" Bashism in configure script + #50 Fix too eager getrandom detection for Debian GNU/kFreeBSD + #52 and macOS + #51 Address lack of stdint.h in Visual Studio 2003 to 2008 + #58 Address compile warnings + #68 Fix "./buildconf.sh && ./configure" for some versions + of Dash for /bin/sh + #72 CMake: Ease use of Expat in context of a parent project + with multiple CMakeLists.txt files + #72 CMake: Resolve mistaken executable permissions + #76 Address compile warning with -DNDEBUG (not recommended!) + #77 Address compile warning about macro redefinition + + Special thanks to: + Alexander Bluhm + Ben Boeckel + Cătălin Răceanu + Kerin Millar + László Böszörményi + S. P. Zeidler + Segev Finer + Václav Slavík + Victor Stinner + Viktor Szakats + and + Radically Open Security + +Release 2.2.1 Sat June 17 2017 + Security fixes: + CVE-2017-9233 -- External entity infinite loop DoS + Details: https://libexpat.github.io/doc/cve-2017-9233/ + Commit c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f + [MOX-002] CVE-2016-9063 -- Detect integer overflow; commit + d4f735b88d9932bd5039df2335eefdd0723dbe20 + (Fixed version of existing downstream patches!) + (SF.net) #539 Fix regression from fix to CVE-2016-0718 cutting off + longer tag names; commits + * 896b6c1fd3b842f377d1b62135dccf0a579cf65d + * af507cef2c93cb8d40062a0abe43a4f4e9158fb2 + #16 * 0dbbf43fdb20f593ddf4fa1ff67288000dd4a7fd + #25 More integer overflow detection (function poolGrow); commits + * 810b74e4703dcfdd8f404e3cb177d44684775143 + * 44178553f3539ce69d34abee77a05e879a7982ac + [MOX-002] Detect overflow from len=INT_MAX call to XML_Parse; commits + * 4be2cb5afcc018d996f34bbbce6374b7befad47f + * 7e5b71b748491b6e459e5c9a1d090820f94544d8 + [MOX-005] #30 Use high quality entropy for hash initialization: + * arc4random_buf on BSD, systems with libbsd + (when configured with --with-libbsd), CloudABI + * RtlGenRandom on Windows XP / Server 2003 and later + * getrandom on Linux 3.17+ + In a way, that's still part of CVE-2016-5300. + https://github.com/libexpat/libexpat/pull/30/commits + [MOX-005] For the low quality entropy extraction fallback code, + the parser instance address can no longer leak, commit + 04ad658bd3079dd15cb60fc67087900f0ff4b083 + [MOX-003] Prevent use of uninitialised variable; commit + [MOX-004] a4dc944f37b664a3ca7199c624a98ee37babdb4b + Add missing parameter validation to public API functions + and dedicated error code XML_ERROR_INVALID_ARGUMENT: + [MOX-006] * NULL checks; commits + * d37f74b2b7149a3a95a680c4c4cd2a451a51d60a (merge/many) + * 9ed727064b675b7180c98cb3d4f75efba6966681 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***