Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/freebsd/freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Ybalrid committed Dec 5, 2018
2 parents baf6c49 + b9525e2 commit 0c4cc13
Show file tree
Hide file tree
Showing 13,894 changed files with 1,856,453 additions and 1,113,004 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,5 @@
_.tinderbox.* _.tinderbox.*
_.universe-toolchain
_.amd64.* _.amd64.*
_.arm.* _.arm.*
_.arm64.* _.arm64.*
Expand Down
6 changes: 1 addition & 5 deletions LOCKS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ subsystem login expires notes
-------------------------------------- --------------------------------------


Special cases: Special cases:
releng/4.* Requires Security Officer approval. releng/* Requires Security Officer approval.
releng/5.* Requires Security Officer approval.
releng/6.* Requires Security Officer approval.
releng/7.* Requires Security Officer approval.
releng/8.* Requires Security Officer approval.
head/sys/dev/random Requires Security Officer approval. head/sys/dev/random Requires Security Officer approval.
head/sys/libkern/arc4random.c Requires Security Officer approval. head/sys/libkern/arc4random.c Requires Security Officer approval.
stable/*/sys/dev/random Requires Security Officer approval. stable/*/sys/dev/random Requires Security Officer approval.
Expand Down
3 changes: 2 additions & 1 deletion MAINTAINERS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ kqueue jmg Pre-commit review requested. Documentation Required.
libdpv dteske Pre-commit review requested. Keep in sync with dpv(1). libdpv dteske Pre-commit review requested. Keep in sync with dpv(1).
libfetch des Pre-commit review requested, email only. libfetch des Pre-commit review requested, email only.
libfigpar dteske Pre-commit review requested. libfigpar dteske Pre-commit review requested.
libm freebsd-numerics Send email with patches to freebsd-numerics@
libpam des Pre-commit review requested, email only. libpam des Pre-commit review requested, email only.
linprocfs des Pre-commit review requested, email only. linprocfs des Pre-commit review requested, email only.
lpr gad Pre-commit review requested, particularly for lpr gad Pre-commit review requested, particularly for
Expand Down Expand Up @@ -104,7 +105,7 @@ usr.sbin/bsdconfig dteske Pre-commit phabricator review requested.
usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv. usr.sbin/dpv dteske Pre-commit review requested. Keep in sync with libdpv.
usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team. usr.sbin/pkg pkg@ Please coordinate behavior or flag changes with pkg team.
usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr. usr.sbin/sysrc dteske Pre-commit phabricator review requested. Keep in sync with bsdconfig(8) sysrc.subr.
vmm(4) grehan Pre-commit review requested. vmm(4) tychon, jhb Pre-commit review requested.
autofs(5) trasz Pre-commit review recommended. autofs(5) trasz Pre-commit review recommended.
iscsi(4) trasz Pre-commit review recommended. iscsi(4) trasz Pre-commit review recommended.
rctl(8) trasz Pre-commit review recommended. rctl(8) trasz Pre-commit review recommended.
Expand Down
123 changes: 107 additions & 16 deletions Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# targets - Print a list of supported TARGET/TARGET_ARCH pairs # targets - Print a list of supported TARGET/TARGET_ARCH pairs
# for world and kernel targets. # for world and kernel targets.
# toolchains - Build a toolchain for all world and kernel targets. # toolchains - Build a toolchain for all world and kernel targets.
# sysent - (Re)build syscall entries from syscalls.master.
# xdev - xdev-build + xdev-install for the architecture # xdev - xdev-build + xdev-install for the architecture
# specified with TARGET and TARGET_ARCH. # specified with TARGET and TARGET_ARCH.
# xdev-build - Build cross-development tools. # xdev-build - Build cross-development tools.
Expand Down Expand Up @@ -61,9 +62,10 @@
# Most of the user-driven targets (as listed above) are implemented in # Most of the user-driven targets (as listed above) are implemented in
# Makefile.inc1. The exceptions are universe, tinderbox and targets. # Makefile.inc1. The exceptions are universe, tinderbox and targets.
# #
# If you want to build your system from source be sure that /usr/obj has # If you want to build your system from source, be sure that /usr/obj has
# at least 6GB of diskspace available. A complete 'universe' build requires # at least 6 GB of disk space available. A complete 'universe' build of
# about 100GB of space. # r340283 (2018-11) required 167 GB of space. ZFS lz4 compression
# achieved a 2.18x ratio, reducing actual space to 81 GB.
# #
# For individuals wanting to build from the sources currently on their # For individuals wanting to build from the sources currently on their
# system, the simple instructions are: # system, the simple instructions are:
Expand Down Expand Up @@ -135,6 +137,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
reinstallkernel reinstallkernel.debug \ reinstallkernel reinstallkernel.debug \
installworld kernel-toolchain libraries maninstall \ installworld kernel-toolchain libraries maninstall \
obj objlink showconfig tags toolchain update \ obj objlink showconfig tags toolchain update \
sysent \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _build-metadata _cross-tools _includes _libraries \ _build-tools _build-metadata _cross-tools _includes _libraries \
build32 distribute32 install32 buildsoft distributesoft installsoft \ build32 distribute32 install32 buildsoft distributesoft installsoft \
Expand All @@ -143,7 +146,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
stage-packages \ stage-packages \
create-packages-world create-packages-kernel create-packages \ create-packages-world create-packages-kernel create-packages \
packages installconfig real-packages sign-packages package-pkg \ packages installconfig real-packages sign-packages package-pkg \
print-dir test-system-compiler print-dir test-system-compiler test-system-linker


# These targets require a TARGET and TARGET_ARCH be defined. # These targets require a TARGET and TARGET_ARCH be defined.
XTGTS= native-xtools native-xtools-install xdev xdev-build xdev-install \ XTGTS= native-xtools native-xtools-install xdev xdev-build xdev-install \
Expand All @@ -168,8 +171,8 @@ META_TGT_WHITELIST+= \
_* build32 buildfiles buildincludes buildkernel buildsoft \ _* build32 buildfiles buildincludes buildkernel buildsoft \
buildworld everything kernel-toolchain kernel-toolchains kernel \ buildworld everything kernel-toolchain kernel-toolchains kernel \
kernels libraries native-xtools showconfig test-system-compiler \ kernels libraries native-xtools showconfig test-system-compiler \
tinderbox toolchain \ test-system-linker tinderbox toolchain \
toolchains universe world worlds xdev xdev-build toolchains universe universe-toolchain world worlds xdev xdev-build


.ORDER: buildworld installworld .ORDER: buildworld installworld
.ORDER: buildworld distrib-dirs .ORDER: buildworld distrib-dirs
Expand Down Expand Up @@ -205,7 +208,7 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} MK_AUTO_OBJ=no \
# We often need to use the tree's version of make to build it. # We often need to use the tree's version of make to build it.
# Choices add to complexity though. # Choices add to complexity though.
# We cannot blindly use a make which may not be the one we want # We cannot blindly use a make which may not be the one we want
# so be exlicit - until all choice is removed. # so be explicit - until all choice is removed.
WANT_MAKE= bmake WANT_MAKE= bmake
.if !empty(.MAKE.MODE:Mmeta) .if !empty(.MAKE.MODE:Mmeta)
# 20160604 - support missing-meta,missing-filemon and performance improvements # 20160604 - support missing-meta,missing-filemon and performance improvements
Expand Down Expand Up @@ -480,14 +483,16 @@ worlds: .PHONY
# with a reasonable chance of success, regardless of how old your # with a reasonable chance of success, regardless of how old your
# existing system is. # existing system is.
# #
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) .if make(universe) || make(universe_kernels) || make(tinderbox) || \
make(targets) || make(universe-toolchain)
TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64
_UNIVERSE_TARGETS= ${TARGETS} _UNIVERSE_TARGETS= ${TARGETS}
TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm?= arm armv6 armv7
TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe
TARGET_ARCHES_riscv?= riscv64 riscv64sf # riscv64sf excluded due to PR 232085
TARGET_ARCHES_riscv?= riscv64
.for target in ${TARGETS} .for target in ${TARGETS}
TARGET_ARCHES_${target}?= ${target} TARGET_ARCHES_${target}?= ${target}
.endfor .endfor
Expand Down Expand Up @@ -542,6 +547,36 @@ universe_prologue: .PHONY
.if defined(DOING_TINDERBOX) .if defined(DOING_TINDERBOX)
@rm -f ${FAILFILE} @rm -f ${FAILFILE}
.endif .endif

universe-toolchain: .PHONY universe_prologue
@echo "--------------------------------------------------------------"
@echo "> Toolchain bootstrap started on `LC_ALL=C date`"
@echo "--------------------------------------------------------------"
${_+_}@cd ${.CURDIR}; \
env PATH=${PATH} ${SUB_MAKE} ${JFLAG} kernel-toolchain \
TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH} \
OBJTOP="${HOST_OBJTOP}" \
WITHOUT_SYSTEM_COMPILER=yes \
WITHOUT_SYSTEM_LINKER=yes \
TOOLS_PREFIX_UNDEF= \
kernel-toolchain \
MK_LLVM_TARGET_ALL=yes \
> _.${.TARGET} 2>&1 || \
(echo "${.TARGET} failed," \
"check _.${.TARGET} for details" | \
${MAKEFAIL}; false)
@if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \
echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \
false; \
fi
@if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/ld" ]; then \
echo "Missing host linker at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \
false; \
fi
@echo "--------------------------------------------------------------"
@echo "> Toolchain bootstrap completed on `LC_ALL=C date`"
@echo "--------------------------------------------------------------"

.for target in ${_UNIVERSE_TARGETS} .for target in ${_UNIVERSE_TARGETS}
universe: universe_${target} universe: universe_${target}
universe_epilogue: universe_${target} universe_epilogue: universe_${target}
Expand All @@ -550,10 +585,61 @@ universe_${target}_prologue: universe_prologue .PHONY
@echo ">> ${target} started on `LC_ALL=C date`" @echo ">> ${target} started on `LC_ALL=C date`"
universe_${target}_worlds: .PHONY universe_${target}_worlds: .PHONY


.if !make(targets) && !make(universe-toolchain)
.for target_arch in ${TARGET_ARCHES_${target}}
.if !defined(_need_clang_${target}_${target_arch})
_need_clang_${target}_${target_arch} != \
env TARGET=${target} TARGET_ARCH=${target_arch} \
${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \
${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP 2>/dev/null || \
echo unknown
.export _need_clang_${target}_${target_arch}
.endif
.if !defined(_need_lld_${target}_${target_arch})
_need_lld_${target}_${target_arch} != \
env TARGET=${target} TARGET_ARCH=${target_arch} \
${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \
${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP 2>/dev/null || \
echo unknown
.export _need_lld_${target}_${target_arch}
.endif
# Setup env for each arch to use the one clang.
.if defined(_need_clang_${target}_${target_arch}) && \
${_need_clang_${target}_${target_arch}} == "yes"
# No check on existing XCC or CROSS_BINUTILS_PREFIX, etc, is needed since
# we use the test-system-compiler logic to determine if clang needs to be
# built. It will be no from that logic if already using an external
# toolchain or /usr/bin/cc.
# 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" \
UNIVERSE_TOOLCHAIN_PATH=${HOST_OBJTOP}/tmp/usr/bin
.endif
.if defined(_need_lld_${target}_${target_arch}) && \
${_need_lld_${target}_${target_arch}} == "yes"
MAKE_PARAMS_${target}+= \
XLD="${HOST_OBJTOP}/tmp/usr/bin/ld"
.endif
.endfor
.endif # !make(targets)

.if !defined(MAKE_JUST_KERNELS) .if !defined(MAKE_JUST_KERNELS)
universe_${target}_done: universe_${target}_worlds .PHONY universe_${target}_done: universe_${target}_worlds .PHONY
.for target_arch in ${TARGET_ARCHES_${target}} .for target_arch in ${TARGET_ARCHES_${target}}
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY universe_${target}_worlds: universe_${target}_${target_arch} .PHONY
.if (defined(_need_clang_${target}_${target_arch}) && \
${_need_clang_${target}_${target_arch}} == "yes") || \
(defined(_need_lld_${target}_${target_arch}) && \
${_need_lld_${target}_${target_arch}} == "yes")
universe_${target}_${target_arch}: universe-toolchain
universe_${target}_prologue: universe-toolchain
.endif
universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
Expand All @@ -573,13 +659,13 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY
universe_${target}_done: universe_${target}_kernels .PHONY universe_${target}_done: universe_${target}_kernels .PHONY
universe_${target}_kernels: universe_${target}_worlds .PHONY universe_${target}_kernels: universe_${target}_worlds .PHONY
universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
.if exists(${KERNSRCDIR}/${target}/conf/NOTES) @if [ -e "${KERNSRCDIR}/${target}/conf/NOTES" ]; then \
@(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ (cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
${SUB_MAKE} LINT \ ${SUB_MAKE} LINT \
> ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
(echo "${target} 'make LINT' failed," \ (echo "${target} 'make LINT' failed," \
"check _.${target}.makeLINT for details"| ${MAKEFAIL})) "check _.${target}.makeLINT for details"| ${MAKEFAIL})); \
.endif fi
@cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \
universe_kernels universe_kernels
.endif # !MAKE_JUST_WORLDS .endif # !MAKE_JUST_WORLDS
Expand All @@ -590,10 +676,13 @@ universe_${target}_done:
@echo ">> ${target} completed on `LC_ALL=C date`" @echo ">> ${target} completed on `LC_ALL=C date`"
.endfor .endfor
.if make(universe_kernconfs) || make(universe_kernels) .if make(universe_kernconfs) || make(universe_kernels)
universe_kernels: universe_kernconfs .PHONY
.if !defined(TARGET) .if !defined(TARGET)
TARGET!= uname -m TARGET!= uname -m
.endif .endif
universe_kernels_prologue: .PHONY
@echo ">> ${TARGET} kernels started on `LC_ALL=C date`"
universe_kernels: universe_kernconfs .PHONY
@echo ">> ${TARGET} kernels completed on `LC_ALL=C date`"
.if defined(MAKE_ALL_KERNELS) .if defined(MAKE_ALL_KERNELS)
_THINNER=cat _THINNER=cat
.elif defined(MAKE_LINT_KERNELS) .elif defined(MAKE_LINT_KERNELS)
Expand All @@ -606,7 +695,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
-type f -maxdepth 0 \ -type f -maxdepth 0 \
! -name DEFAULTS ! -name NOTES | \ ! -name DEFAULTS ! -name NOTES | \
${_THINNER} ${_THINNER}
universe_kernconfs: .PHONY universe_kernconfs: universe_kernels_prologue .PHONY
.for kernel in ${KERNCONFS} .for kernel in ${KERNCONFS}
TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
Expand All @@ -616,6 +705,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
.endif .endif
universe_kernconfs: universe_kernconf_${TARGET}_${kernel} universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
universe_kernconf_${TARGET}_${kernel}: .MAKE universe_kernconf_${TARGET}_${kernel}: .MAKE
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
${SUB_MAKE} ${JFLAG} buildkernel \ ${SUB_MAKE} ${JFLAG} buildkernel \
TARGET=${TARGET} \ TARGET=${TARGET} \
Expand All @@ -625,6 +715,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
> _.${TARGET}.${kernel} 2>&1 || \ > _.${TARGET}.${kernel} 2>&1 || \
(echo "${TARGET} ${kernel} kernel failed," \ (echo "${TARGET} ${kernel} kernel failed," \
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`"
.endfor .endfor
.endif # make(universe_kernels) .endif # make(universe_kernels)
universe: universe_epilogue universe: universe_epilogue
Expand Down
Loading

0 comments on commit 0c4cc13

Please sign in to comment.