Skip to content

Commit 300ce5d

Browse files
committed
Merge branch 'master' into drm-next
Conflicts: lib/libc/Makefile
2 parents 859ec5e + 484ecb0 commit 300ce5d

File tree

703 files changed

+15160
-10615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

703 files changed

+15160
-10615
lines changed

Makefile

+15-7
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,22 @@ TARGET_ARCHES_${target}?= ${target}
441441

442442
MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc
443443

444-
# XXX Remove riscv from universe if the required toolchain package is missing.
445-
.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv}
446-
_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv}
447-
universe: universe_riscv_skip .PHONY
448-
universe_epilogue: universe_riscv_skip .PHONY
449-
universe_riscv_skip: universe_prologue .PHONY
450-
@echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build"
444+
# XXX Remove architectures only supported by external toolchain from universe
445+
# if required toolchain packages are missing.
446+
TOOLCHAINS_riscv= riscv64
447+
.for target in riscv
448+
.if ${_UNIVERSE_TARGETS:M${target}}
449+
.for toolchain in ${TOOLCHAINS_${target}}
450+
.if !exists(/usr/local/share/toolchains/${toolchain}-gcc.mk)
451+
_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}}
452+
universe: universe_${toolchain}_skip .PHONY
453+
universe_epilogue: universe_${toolchain}_skip .PHONY
454+
universe_${toolchain}_skip: universe_prologue .PHONY
455+
@echo ">> ${target} skipped - install ${toolchain}-xtoolchain-gcc port or package to build"
451456
.endif
457+
.endfor
458+
.endif
459+
.endfor
452460

453461
.if defined(UNIVERSE_TARGET)
454462
MAKE_JUST_WORLDS= YES

Makefile.inc1

+19-20
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ BUILD_ARCH!= uname -p
444444
.endif
445445
.endif
446446
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
447-
BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin
447+
BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin
448448
XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin
449449
STRICTTMPPATH= ${BPATH}:${XPATH}
450450
TMPPATH= ${STRICTTMPPATH}:${PATH}
@@ -624,8 +624,7 @@ XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
624624
# combined with --sysroot.
625625
XCFLAGS+= -B${WORLDTMP}/usr/lib
626626
# Force using libc++ for external GCC.
627-
# XXX: This should be checking MK_GNUCXX == no
628-
.if ${X_COMPILER_VERSION} >= 40800
627+
.if ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800
629628
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
630629
-nostdinc++
631630
.endif
@@ -761,6 +760,16 @@ _worldtmp: .PHONY
761760
rm -rf ${LIBCOMPATTMP}
762761
.endif
763762
.else
763+
.if exists(${WORLDTMP})
764+
@echo ">>> Deleting stale files in build tree..."
765+
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
766+
delete-old delete-old-libs >/dev/null
767+
.endif
768+
.if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP})
769+
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
770+
DESTDIR=${LIBCOMPATTMP} \
771+
delete-old delete-old-libs >/dev/null
772+
.endif
764773
rm -rf ${WORLDTMP}/legacy/usr/include
765774
.if ${USING_SYSTEM_COMPILER} == "yes"
766775
.for cc in cc c++
@@ -770,7 +779,6 @@ _worldtmp: .PHONY
770779
fi
771780
.endfor
772781
.endif # ${USING_SYSTEM_COMPILER} == "yes"
773-
.endif # !defined(NO_CLEAN)
774782

775783
# Our current approach to dependency tracking cannot cope with certain source
776784
# tree changes, particularly with respect to removing source files and
@@ -813,16 +821,9 @@ _worldtmp: .PHONY
813821
${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.*
814822
.endif
815823
.endfor
816-
# 20170724 remove stale lib/clang/libllvm/Options.inc file, of which there are
817-
# two different versions after r308421, one for llvm-lib, one for llvm-dlltool
818-
.for d in ${OBJTREE} ${WORLDTMP}
819-
.for f in ${d}${.CURDIR}/lib/clang/libllvm/Options.inc
820-
.if exists(${f}) || exists(${f}.d)
821-
@echo Removing stale generated ${f} files
822-
@rm -f ${f} ${f}.d
823-
.endif
824-
.endfor
825-
.endfor
824+
825+
.endif # !defined(NO_CLEAN)
826+
826827
.for _dir in \
827828
lib lib/casper usr legacy/bin legacy/usr
828829
mkdir -p ${WORLDTMP}/${_dir}
@@ -2337,11 +2338,12 @@ _cddl_lib_libumem= cddl/lib/libumem
23372338
_cddl_lib_libnvpair= cddl/lib/libnvpair
23382339
_cddl_lib_libavl= cddl/lib/libavl
23392340
_cddl_lib_libuutil= cddl/lib/libuutil
2341+
.if ${MK_ZFS} != "no"
23402342
_cddl_lib_libzfs_core= cddl/lib/libzfs_core
2343+
cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
2344+
.endif
23412345
_cddl_lib_libctf= cddl/lib/libctf
23422346
_cddl_lib= cddl/lib
2343-
cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
2344-
cddl/lib/libzfs__L: lib/libgeom__L
23452347
cddl/lib/libctf__L: lib/libz__L
23462348
.endif
23472349
# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built
@@ -2759,9 +2761,6 @@ CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${N
27592761
CD2MAKE+= BUILD_TOOLS_META=.NOMETA
27602762
.endif
27612763
XDDESTDIR=${DESTDIR}/${XDTP}
2762-
.if !defined(OSREL)
2763-
OSREL!= uname -r | sed -e 's/[-(].*//'
2764-
.endif
27652764

27662765
.ORDER: xdev-build xdev-install xdev-links
27672766
xdev: xdev-build xdev-install .PHONY
@@ -2855,7 +2854,7 @@ xdev-links: .PHONY
28552854
ln -sf ../../${XDTP}/usr/bin/$$i \
28562855
../../../../usr/bin/${XDDIR}-$$i; \
28572856
ln -sf ../../${XDTP}/usr/bin/$$i \
2858-
../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
2857+
../../../../usr/bin/${XDDIR}${_REVISION}-$$i; \
28592858
done
28602859
.else
28612860
xdev xdev-build xdev-install xdev-links: .PHONY

ObsoleteFiles.inc

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
# xargs -n1 | sort | uniq -d;
3939
# done
4040

41+
# 20170802: ksyms(4) ioctl interface was removed
42+
OLD_FILES+=usr/include/sys/ksyms.h
43+
4144
# 20170722: new clang import which bumps version from 4.0.0 to 5.0.0.
4245
OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h
4346
OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h

UPDATING

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
5151

5252
****************************** SPECIAL WARNING: ******************************
5353

54+
20170728:
55+
As of r321665, an NFSv4 server configuration that services
56+
Kerberos mounts or clients that do not support the uid/gid in
57+
owner/owner_group string capability, must explicitly enable
58+
the nfsuserd daemon by adding nfsuserd_enable="YES" to the
59+
machine's /etc/rc.conf file.
60+
5461
20170722:
5562
Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 5.0.0.
5663
Please see the 20141231 entry below for information about prerequisites

bin/cat/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
PACKAGE=runtime
77
PROG= cat
88

9-
.if ${MK_TESTS} != "no"
10-
SUBDIR+= tests
11-
.endif
9+
SUBDIR.${MK_TESTS}+= tests
1210

1311
.include <bsd.prog.mk>

bin/chmod/tests/chmod_test.sh

+17
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
#
2626
# $FreeBSD$
2727

28+
get_filesystem()
29+
{
30+
local mountpoint=$1
31+
32+
df -T $mountpoint | tail -n 1 | cut -wf 2
33+
}
34+
2835
atf_test_case RH_flag
2936
RH_flag_head()
3037
{
@@ -94,6 +101,11 @@ f_flag_body()
94101
{
95102
atf_check truncate -s 0 foo bar
96103
atf_check chmod 0750 foo bar
104+
case "$(get_filesystem .)" in
105+
zfs)
106+
atf_expect_fail "ZFS doesn't support UF_IMMUTABLE; returns EPERM - bug 221189"
107+
;;
108+
esac
97109
atf_check chflags uchg foo
98110
atf_check -e not-empty -s not-exit:0 chmod 0700 foo bar
99111
atf_check -o inline:'100750\n100700\n' stat -f '%p' foo bar
@@ -140,6 +152,11 @@ v_flag_body()
140152
atf_check truncate -s 0 foo bar
141153
atf_check chmod 0600 foo
142154
atf_check chmod 0750 bar
155+
case "$(get_filesystem .)" in
156+
zfs)
157+
atf_expect_fail "ZFS updates mode for foo unnecessarily - bug 221188"
158+
;;
159+
esac
143160
atf_check -o 'inline:bar\n' chmod -v 0600 foo bar
144161
atf_check chmod -v 0600 foo bar
145162
for f in foo bar; do

bin/date/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ PACKAGE=runtime
77
PROG= date
88
SRCS= date.c netdate.c vary.c
99

10-
.if ${MK_TESTS} != "no"
11-
SUBDIR+= tests
12-
.endif
10+
SUBDIR.${MK_TESTS}+= tests
1311

1412
.include <bsd.prog.mk>

bin/dd/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ test: ${PROG} gen
3838

3939
@rm -f gen 1M_zeroes* obs_zeroes
4040

41-
.if ${MK_TESTS} != "no"
42-
SUBDIR+= tests
43-
.endif
41+
SUBDIR.${MK_TESTS}+= tests
4442

4543
.include <bsd.prog.mk>

bin/echo/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
PACKAGE=runtime
77
PROG= echo
88

9-
.if ${MK_TESTS} != "no"
10-
SUBDIR+= tests
11-
.endif
9+
SUBDIR.${MK_TESTS}+= tests
1210

1311
.include <bsd.prog.mk>

bin/expr/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ CFLAGS+= -fwrapv
1212

1313
NO_WMISSING_VARIABLE_DECLARATIONS=
1414

15-
.if ${MK_TESTS} != "no"
16-
SUBDIR+= tests
17-
.endif
15+
SUBDIR.${MK_TESTS}+= tests
1816

1917
.include <bsd.prog.mk>

bin/ln/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ MAN= ln.1 symlink.7
1010
LINKS= ${BINDIR}/ln ${BINDIR}/link
1111
MLINKS= ln.1 link.1
1212

13-
.if ${MK_TESTS} != "no"
14-
SUBDIR+= tests
15-
.endif
13+
SUBDIR.${MK_TESTS}+= tests
1614

1715
.include <bsd.prog.mk>

bin/ls/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ CFLAGS+= -DCOLORLS
1414
LIBADD+= termcapw
1515
.endif
1616

17-
.if ${MK_TESTS} != "no"
18-
SUBDIR+= tests
19-
.endif
17+
SUBDIR.${MK_TESTS}+= tests
2018

2119
.include <bsd.prog.mk>

bin/mv/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
PACKAGE=runtime
77
PROG= mv
88

9-
.if ${MK_TESTS} != "no"
10-
SUBDIR+= tests
11-
.endif
9+
SUBDIR.${MK_TESTS}+= tests
1210

1311
.include <bsd.prog.mk>

bin/pax/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \
3333
gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \
3434
tables.c tar.c tty_subs.c
3535

36-
.if ${MK_TESTS} != "no"
37-
SUBDIR+= tests
38-
.endif
36+
SUBDIR.${MK_TESTS}+= tests
3937

4038
.include <bsd.prog.mk>

bin/pkill/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ MLINKS= pkill.1 pgrep.1
1919
SYMLINKS= ../..${BINDIR}/pkill /usr/bin/pkill
2020
SYMLINKS+= ../..${BINDIR}/pgrep /usr/bin/pgrep
2121

22-
.if ${MK_TESTS} != "no"
23-
SUBDIR+= tests
24-
.endif
22+
SUBDIR.${MK_TESTS}+= tests
2523

2624
.include <bsd.prog.mk>

bin/sh/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ syntax.c syntax.h: mksyntax
6464
token.h: mktokens
6565
sh ${.CURDIR}/mktokens
6666

67-
.if ${MK_TESTS} != "no"
68-
SUBDIR+= tests
69-
.endif
67+
SUBDIR.${MK_TESTS}+= tests
7068

7169
.include <bsd.prog.mk>

bin/sleep/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
PACKAGE=runtime
77
PROG= sleep
88

9-
.if ${MK_TESTS} != "no"
10-
SUBDIR+= tests
11-
.endif
9+
SUBDIR.${MK_TESTS}+= tests
1210

1311
.include <bsd.prog.mk>

bin/test/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ PROG= test
88
LINKS= ${BINDIR}/test ${BINDIR}/[
99
MLINKS= test.1 [.1
1010

11-
.if ${MK_TESTS} != "no"
12-
SUBDIR+= tests
13-
.endif
11+
SUBDIR.${MK_TESTS}+= tests
1412

1513
.include <bsd.prog.mk>

cddl/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
SUBDIR= lib .WAIT \
66
sbin usr.bin usr.sbin
77

8-
.if ${MK_TESTS} != "no"
9-
SUBDIR+=tests
10-
.endif
8+
SUBDIR.${MK_TESTS}+= tests
119

1210
SUBDIR_PARALLEL=
1311

cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh

+13
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
##
3939

4040

41+
reader()
42+
{
43+
while true
44+
do
45+
sleep 0.1
46+
cat /etc/motd > /dev/null
47+
done
48+
}
4149

4250
if [ $# != 1 ]; then
4351
echo expected one argument: '<'dtrace-path'>'
@@ -46,11 +54,16 @@ fi
4654

4755
dtrace=$1
4856

57+
reader &
58+
child=$!
59+
4960
$dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}'
5061
status=$?
5162

5263
if [ "$status" -ne 0 ]; then
5364
echo $tst: dtrace failed
5465
fi
5566

67+
kill $child
68+
5669
exit $status

cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh

+14
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,25 @@
3939
##
4040

4141

42+
reader()
43+
{
44+
while true
45+
do
46+
sleep 0.1
47+
cat /etc/motd > /dev/null
48+
done
49+
}
50+
4251
if [ $# != 1 ]; then
4352
echo expected one argument: '<'dtrace-path'>'
4453
exit 2
4554
fi
4655

4756
dtrace=$1
4857

58+
reader &
59+
child=$!
60+
4961
$dtrace -qZf wassup'{printf("Iamkool");}' \
5062
-qf read'{printf("I am done"); exit(0);}'
5163

@@ -55,4 +67,6 @@ if [ "$status" -ne 0 ]; then
5567
echo $tst: dtrace failed
5668
fi
5769

70+
kill $child
71+
5872
exit $status

0 commit comments

Comments
 (0)