Merge ^/head r320042 through r320397.
This commit is contained in:
commit
a3604b95ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang500-import/; revision=320398
5
Makefile
5
Makefile
@ -131,7 +131,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
|
|||||||
build32 distribute32 install32 buildsoft distributesoft installsoft \
|
build32 distribute32 install32 buildsoft distributesoft installsoft \
|
||||||
builddtb xdev xdev-build xdev-install \
|
builddtb xdev xdev-build xdev-install \
|
||||||
xdev-links native-xtools stageworld stagekernel stage-packages \
|
xdev-links native-xtools stageworld stagekernel stage-packages \
|
||||||
create-world-packages create-kernel-packages 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
|
||||||
|
|
||||||
@ -195,7 +195,8 @@ HAVE_MAKE= bmake
|
|||||||
.else
|
.else
|
||||||
HAVE_MAKE= fmake
|
HAVE_MAKE= fmake
|
||||||
.endif
|
.endif
|
||||||
.if ${HAVE_MAKE} != ${WANT_MAKE} || \
|
.if defined(ALWAYS_BOOTSTRAP_MAKE) || \
|
||||||
|
${HAVE_MAKE} != ${WANT_MAKE} || \
|
||||||
(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
|
(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
|
||||||
NEED_MAKE_UPGRADE= t
|
NEED_MAKE_UPGRADE= t
|
||||||
.endif
|
.endif
|
||||||
|
128
Makefile.inc1
128
Makefile.inc1
@ -87,7 +87,8 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
|
|||||||
|
|
||||||
# Pull in compiler metadata from buildworld/toolchain if possible to avoid
|
# Pull in compiler metadata from buildworld/toolchain if possible to avoid
|
||||||
# running CC from bsd.compiler.mk.
|
# running CC from bsd.compiler.mk.
|
||||||
.if make(installworld) || make(install)
|
.if make(installworld) || make(install) || make(distributeworld) || \
|
||||||
|
make(stageworld)
|
||||||
.-include "${OBJTREE}${.CURDIR}/compiler-metadata.mk"
|
.-include "${OBJTREE}${.CURDIR}/compiler-metadata.mk"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
@ -149,7 +150,8 @@ TEST_SYSTEM_COMPILER_VARS= \
|
|||||||
WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \
|
WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \
|
||||||
WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \
|
WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \
|
||||||
CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \
|
CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \
|
||||||
COMPILER_FREEBSD_VERSION
|
COMPILER_FREEBSD_VERSION \
|
||||||
|
LINKER_TYPE LINKER_VERSION
|
||||||
test-system-compiler: .PHONY
|
test-system-compiler: .PHONY
|
||||||
.for v in ${TEST_SYSTEM_COMPILER_VARS}
|
.for v in ${TEST_SYSTEM_COMPILER_VARS}
|
||||||
${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}"
|
${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}"
|
||||||
@ -181,7 +183,9 @@ CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \
|
|||||||
_COMPILER_METADATA_VARS= COMPILER_VERSION \
|
_COMPILER_METADATA_VARS= COMPILER_VERSION \
|
||||||
COMPILER_TYPE \
|
COMPILER_TYPE \
|
||||||
COMPILER_FEATURES \
|
COMPILER_FEATURES \
|
||||||
COMPILER_FREEBSD_VERSION
|
COMPILER_FREEBSD_VERSION \
|
||||||
|
LINKER_VERSION \
|
||||||
|
LINKER_TYPE
|
||||||
compiler-metadata.mk: .PHONY .META
|
compiler-metadata.mk: .PHONY .META
|
||||||
@: > ${.TARGET}
|
@: > ${.TARGET}
|
||||||
@echo ".info Using cached compiler metadata from build at $$(hostname) on $$(date)" \
|
@echo ".info Using cached compiler metadata from build at $$(hostname) on $$(date)" \
|
||||||
@ -518,6 +522,7 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
|||||||
# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile
|
# need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile
|
||||||
BSARGS= DESTDIR= \
|
BSARGS= DESTDIR= \
|
||||||
BOOTSTRAPPING=${OSRELDATE} \
|
BOOTSTRAPPING=${OSRELDATE} \
|
||||||
|
BWPHASE=${.TARGET:C,^_,,} \
|
||||||
SSP_CFLAGS= \
|
SSP_CFLAGS= \
|
||||||
MK_HTML=no NO_LINT=yes MK_MAN=no \
|
MK_HTML=no NO_LINT=yes MK_MAN=no \
|
||||||
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
|
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
|
||||||
@ -536,6 +541,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
|
|||||||
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
||||||
DESTDIR= \
|
DESTDIR= \
|
||||||
BOOTSTRAPPING=${OSRELDATE} \
|
BOOTSTRAPPING=${OSRELDATE} \
|
||||||
|
BWPHASE=${.TARGET:C,^_,,} \
|
||||||
SSP_CFLAGS= \
|
SSP_CFLAGS= \
|
||||||
-DNO_LINT \
|
-DNO_LINT \
|
||||||
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
|
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
|
||||||
@ -563,7 +569,8 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
|
|||||||
# world stage
|
# world stage
|
||||||
WMAKEENV= ${CROSSENV} \
|
WMAKEENV= ${CROSSENV} \
|
||||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||||
PATH=${TMPPATH}
|
PATH=${TMPPATH} \
|
||||||
|
SYSROOT=${WORLDTMP}
|
||||||
|
|
||||||
# make hierarchy
|
# make hierarchy
|
||||||
HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
|
HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q}
|
||||||
@ -688,7 +695,9 @@ NO_META_IGNORE_HOST_HEADERS= 1
|
|||||||
host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here
|
host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here
|
||||||
@cp -f /usr/include/osreldate.h ${.TARGET}
|
@cp -f /usr/include/osreldate.h ${.TARGET}
|
||||||
|
|
||||||
WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP}
|
WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \
|
||||||
|
BWPHASE=${.TARGET:C,^_,,} \
|
||||||
|
DESTDIR=${WORLDTMP}
|
||||||
|
|
||||||
IMAKEENV= ${CROSSENV}
|
IMAKEENV= ${CROSSENV}
|
||||||
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
|
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
|
||||||
@ -709,6 +718,7 @@ _INSTALL_DDIR= ${DESTDIR}/${DISTDIR}
|
|||||||
INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::}
|
INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::}
|
||||||
.if defined(NO_ROOT)
|
.if defined(NO_ROOT)
|
||||||
METALOG?= ${DESTDIR}/${DISTDIR}/METALOG
|
METALOG?= ${DESTDIR}/${DISTDIR}/METALOG
|
||||||
|
METALOG:= ${METALOG:C,//+,/,g}
|
||||||
IMAKE+= -DNO_ROOT METALOG=${METALOG}
|
IMAKE+= -DNO_ROOT METALOG=${METALOG}
|
||||||
INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR}
|
INSTALLFLAGS+= -U -M ${METALOG} -D ${INSTALL_DDIR}
|
||||||
MTREEFLAGS+= -W
|
MTREEFLAGS+= -W
|
||||||
@ -722,7 +732,7 @@ IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}"
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
# kernel stage
|
# kernel stage
|
||||||
KMAKEENV= ${WMAKEENV}
|
KMAKEENV= ${WMAKEENV:NSYSROOT=*}
|
||||||
KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
|
KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -752,14 +762,18 @@ _worldtmp: .PHONY
|
|||||||
.else
|
.else
|
||||||
rm -rf ${WORLDTMP}/legacy/usr/include
|
rm -rf ${WORLDTMP}/legacy/usr/include
|
||||||
.endif
|
.endif
|
||||||
# Dependencies cannot cope with certain source tree changes, particularly
|
|
||||||
# with respect to removing source files and replacing generated files.
|
# Our current approach to dependency tracking cannot cope with certain source
|
||||||
# Handle these cases here in an ad-hoc fashion.
|
# tree changes, particularly with respect to removing source files and
|
||||||
# 20160829 remove stale dependencies for ptrace stub, rewritten in C
|
# replacing generated files. Handle these cases here in an ad-hoc fashion.
|
||||||
# in r305012
|
#
|
||||||
.for f in ptrace
|
# Syscall stubs rewritten in C
|
||||||
|
# Date SVN Rev Syscalls
|
||||||
|
# 20160829 r305012 ptrace
|
||||||
|
# 20170624 r320278 fstat fstatat fstatfs getdirentries getfsstat statfs
|
||||||
|
.for f in fstat fstatat fstatfs getdirentries getfsstat ptrace statfs
|
||||||
.if exists(${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o)
|
.if exists(${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o)
|
||||||
@if egrep -q '/${f}.[sS]' \
|
@if egrep -qw '${f}\.[sS]' \
|
||||||
${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o; then \
|
${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.o; then \
|
||||||
echo Removing stale dependencies for ${f} syscall wrappers; \
|
echo Removing stale dependencies for ${f} syscall wrappers; \
|
||||||
rm -f ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \
|
rm -f ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \
|
||||||
@ -873,7 +887,7 @@ _cross-tools:
|
|||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@echo ">>> stage 3: cross tools"
|
@echo ">>> stage 3: cross tools"
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@rm -f ${.OBJDIR}/compiler-metadata.mk
|
@rm -f ${OBJTREE}${.CURDIR}/compiler-metadata.mk
|
||||||
${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
|
${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
|
||||||
${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools
|
${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools
|
||||||
_build-metadata:
|
_build-metadata:
|
||||||
@ -1527,49 +1541,77 @@ package-pkg: .PHONY
|
|||||||
|
|
||||||
real-packages: stage-packages create-packages sign-packages .PHONY
|
real-packages: stage-packages create-packages sign-packages .PHONY
|
||||||
|
|
||||||
stage-packages: .PHONY
|
stage-packages-world: .PHONY
|
||||||
@mkdir -p ${REPODIR} ${WSTAGEDIR} ${KSTAGEDIR}
|
@mkdir -p ${WSTAGEDIR}
|
||||||
${_+_}@cd ${.CURDIR}; \
|
${_+_}@cd ${.CURDIR}; \
|
||||||
${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT -B stageworld ; \
|
${MAKE} DESTDIR=${WSTAGEDIR} -DNO_ROOT stageworld
|
||||||
${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT -B stagekernel
|
|
||||||
|
|
||||||
create-packages: _pkgbootstrap .PHONY
|
stage-packages-kernel: .PHONY
|
||||||
@mkdir -p ${REPODIR}
|
@mkdir -p ${KSTAGEDIR}
|
||||||
${_+_}@cd ${.CURDIR}; \
|
${_+_}@cd ${.CURDIR}; \
|
||||||
${MAKE} DESTDIR=${WSTAGEDIR} \
|
${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT stagekernel
|
||||||
PKG_VERSION=${PKG_VERSION} create-world-packages ; \
|
|
||||||
${MAKE} DESTDIR=${KSTAGEDIR} \
|
stage-packages: .PHONY stage-packages-world stage-packages-kernel
|
||||||
|
|
||||||
|
_repodir: .PHONY
|
||||||
|
@mkdir -p ${REPODIR}
|
||||||
|
|
||||||
|
create-packages-world: _pkgbootstrap _repodir .PHONY
|
||||||
|
${_+_}@cd ${.CURDIR}; \
|
||||||
|
${MAKE} -f Makefile.inc1 \
|
||||||
|
DESTDIR=${WSTAGEDIR} \
|
||||||
|
PKG_VERSION=${PKG_VERSION} create-world-packages
|
||||||
|
|
||||||
|
create-packages-kernel: _pkgbootstrap _repodir .PHONY
|
||||||
|
${_+_}@cd ${.CURDIR}; \
|
||||||
|
${MAKE} -f Makefile.inc1 \
|
||||||
|
DESTDIR=${KSTAGEDIR} \
|
||||||
PKG_VERSION=${PKG_VERSION} DISTDIR=kernel \
|
PKG_VERSION=${PKG_VERSION} DISTDIR=kernel \
|
||||||
create-kernel-packages
|
create-kernel-packages
|
||||||
|
|
||||||
|
create-packages: .PHONY create-packages-world create-packages-kernel
|
||||||
|
|
||||||
create-world-packages: _pkgbootstrap .PHONY
|
create-world-packages: _pkgbootstrap .PHONY
|
||||||
@rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || :
|
@rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || :
|
||||||
@cd ${WSTAGEDIR} ; \
|
@cd ${WSTAGEDIR} ; \
|
||||||
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
||||||
${WSTAGEDIR}/METALOG
|
${WSTAGEDIR}/METALOG
|
||||||
@for plist in ${WSTAGEDIR}/*.plist; do \
|
@for plist in ${WSTAGEDIR}/*.plist; do \
|
||||||
plist=$${plist##*/} ; \
|
plist=$${plist##*/} ; \
|
||||||
pkgname=$${plist%.plist} ; \
|
pkgname=$${plist%.plist} ; \
|
||||||
sh ${SRCDIR}/release/packages/generate-ucl.sh -o $${pkgname} \
|
echo "_PKGS+= $${pkgname}" ; \
|
||||||
-s ${SRCDIR} -u ${WSTAGEDIR}/$${pkgname}.ucl ; \
|
done > ${WSTAGEDIR}/packages.mk
|
||||||
done
|
${_+_}@cd ${.CURDIR}; \
|
||||||
@for plist in ${WSTAGEDIR}/*.plist; do \
|
${MAKE} -f Makefile.inc1 create-world-packages-jobs \
|
||||||
plist=$${plist##*/} ; \
|
.MAKE.JOB.PREFIX=
|
||||||
pkgname=$${plist%.plist} ; \
|
|
||||||
awk -F\" ' \
|
|
||||||
/^name/ { printf("===> Creating %s-", $$2); next } \
|
|
||||||
/^version/ { print $$2; next } \
|
|
||||||
' ${WSTAGEDIR}/$${pkgname}.ucl ; \
|
|
||||||
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
|
|
||||||
create -M ${WSTAGEDIR}/$${pkgname}.ucl \
|
|
||||||
-p ${WSTAGEDIR}/$${pkgname}.plist \
|
|
||||||
-r ${WSTAGEDIR} \
|
|
||||||
-o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
create-kernel-packages: _pkgbootstrap .PHONY
|
.if make(create-world-packages-jobs)
|
||||||
|
.include "${WSTAGEDIR}/packages.mk"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
create-world-packages-jobs: .PHONY
|
||||||
|
.for pkgname in ${_PKGS}
|
||||||
|
create-world-packages-jobs: create-world-package-${pkgname}
|
||||||
|
create-world-package-${pkgname}: .PHONY
|
||||||
|
@sh ${SRCDIR}/release/packages/generate-ucl.sh -o ${pkgname} \
|
||||||
|
-s ${SRCDIR} -u ${WSTAGEDIR}/${pkgname}.ucl
|
||||||
|
@awk -F\" ' \
|
||||||
|
/^name/ { printf("===> Creating %s-", $$2); next } \
|
||||||
|
/^version/ { print $$2; next } \
|
||||||
|
' ${WSTAGEDIR}/${pkgname}.ucl ; \
|
||||||
|
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
|
||||||
|
create -M ${WSTAGEDIR}/${pkgname}.ucl \
|
||||||
|
-p ${WSTAGEDIR}/${pkgname}.plist \
|
||||||
|
-r ${WSTAGEDIR} \
|
||||||
|
-o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
create-kernel-packages: .PHONY
|
||||||
|
_default_flavor= -default
|
||||||
.if exists(${KSTAGEDIR}/kernel.meta)
|
.if exists(${KSTAGEDIR}/kernel.meta)
|
||||||
.for flavor in "" -debug
|
.for flavor in "" -debug
|
||||||
|
create-kernel-packages: create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}
|
||||||
|
create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY
|
||||||
@cd ${KSTAGEDIR}/${DISTDIR} ; \
|
@cd ${KSTAGEDIR}/${DISTDIR} ; \
|
||||||
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
||||||
-v kernel=yes -v _kernconf=${INSTALLKERNEL} \
|
-v kernel=yes -v _kernconf=${INSTALLKERNEL} \
|
||||||
@ -1599,6 +1641,8 @@ create-kernel-packages: _pkgbootstrap .PHONY
|
|||||||
.for _kernel in ${BUILDKERNELS:[2..-1]}
|
.for _kernel in ${BUILDKERNELS:[2..-1]}
|
||||||
.if exists(${KSTAGEDIR}/kernel.${_kernel}.meta)
|
.if exists(${KSTAGEDIR}/kernel.${_kernel}.meta)
|
||||||
.for flavor in "" -debug
|
.for flavor in "" -debug
|
||||||
|
create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}
|
||||||
|
create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY
|
||||||
@cd ${KSTAGEDIR}/kernel.${_kernel} ; \
|
@cd ${KSTAGEDIR}/kernel.${_kernel} ; \
|
||||||
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
|
||||||
-v kernel=yes -v _kernconf=${_kernel} \
|
-v kernel=yes -v _kernconf=${_kernel} \
|
||||||
|
@ -111,6 +111,7 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
|
|||||||
LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
|
LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
|
||||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||||
PATH=${TMPPATH} \
|
PATH=${TMPPATH} \
|
||||||
|
SYSROOT=${LIBCOMPATTMP} \
|
||||||
LIBDIR=/usr/lib${libcompat} \
|
LIBDIR=/usr/lib${libcompat} \
|
||||||
SHLIBDIR=/usr/lib${libcompat} \
|
SHLIBDIR=/usr/lib${libcompat} \
|
||||||
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
|
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
|
||||||
|
48
UPDATING
48
UPDATING
@ -56,6 +56,46 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
|||||||
Please see the 20141231 entry below for information about prerequisites
|
Please see the 20141231 entry below for information about prerequisites
|
||||||
and upgrading, if you are not already using clang 3.5.0 or higher.
|
and upgrading, if you are not already using clang 3.5.0 or higher.
|
||||||
|
|
||||||
|
20170625:
|
||||||
|
The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is
|
||||||
|
a very major ABI incompatible change, so users of FreeBSD/powerpc must
|
||||||
|
be careful when performing source upgrades. It is best to run
|
||||||
|
'make installworld' from an alternate root system, either a live
|
||||||
|
CD/memory stick, or a temporary root partition. Additionally, all ports
|
||||||
|
must be recompiled. powerpc64 is largely unaffected, except in the case
|
||||||
|
of 32-bit compatibility. All 32-bit binaries will be affected.
|
||||||
|
|
||||||
|
20170623:
|
||||||
|
Forward compatibility for the "ino64" project have been committed. This
|
||||||
|
will allow most new binaries to run on older kernels in a limited
|
||||||
|
fashion. This prevents many of the common foot-shooting actions in the
|
||||||
|
upgrade as well as the limited ability to roll back the kernel across
|
||||||
|
the ino64 upgrade. Complicated use cases may not work properly, though
|
||||||
|
enough simpler ones work to allow recovery in most situations.
|
||||||
|
|
||||||
|
20170620:
|
||||||
|
Switch back to the BSDL dtc (Device Tree Compiler). Set WITH_GPL_DTC
|
||||||
|
if you require the GPL compiler.
|
||||||
|
|
||||||
|
20170618:
|
||||||
|
The internal ABI used for communication between the NFS kernel modules
|
||||||
|
was changed by r320085, so __FreeBSD_version was bumped to
|
||||||
|
ensure all the NFS related modules are updated together.
|
||||||
|
|
||||||
|
20170617:
|
||||||
|
The ABI of struct event was changed by extending the data
|
||||||
|
member to 64bit and adding ext fields. For upgrade, same
|
||||||
|
precautions as for the entry 20170523 "ino64" must be
|
||||||
|
followed.
|
||||||
|
|
||||||
|
20170531:
|
||||||
|
The GNU roff toolchain has been removed from base. To render manpages
|
||||||
|
which are not supported by mandoc(1), man(1) can fallback on GNU roff
|
||||||
|
from ports (and recommends to install it).
|
||||||
|
To render roff(7) documents, consider using GNU roff from ports or the
|
||||||
|
heirloom doctools roff toolchain from ports via pkg install groff or
|
||||||
|
via pkg install heirloom-doctools.
|
||||||
|
|
||||||
20170524:
|
20170524:
|
||||||
The ath(4) and ath_hal(4) modules now build piecemeal to allow for
|
The ath(4) and ath_hal(4) modules now build piecemeal to allow for
|
||||||
smaller runtime footprint builds. This is useful for embedded systems
|
smaller runtime footprint builds. This is useful for embedded systems
|
||||||
@ -81,14 +121,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
|||||||
|
|
||||||
For further comments/feedback, poke adrian@ .
|
For further comments/feedback, poke adrian@ .
|
||||||
|
|
||||||
20170531:
|
|
||||||
The GNU roff toolchain has been removed from base. To render manpages
|
|
||||||
which are not supported by mandoc(1), man(1) can fallback on GNU roff
|
|
||||||
from ports (and recommends to install it).
|
|
||||||
To render roff(7) documents, consider using GNU roff from ports or the
|
|
||||||
heirloom doctools roff toolchain from ports via pkg install groff or
|
|
||||||
via pkg install heirloom-doctools.
|
|
||||||
|
|
||||||
20170523:
|
20170523:
|
||||||
The "ino64" 64-bit inode project has been committed, which extends
|
The "ino64" 64-bit inode project has been committed, which extends
|
||||||
a number of types to 64 bits. Upgrading in place requires care and
|
a number of types to 64 bits. Upgrading in place requires care and
|
||||||
|
@ -27,29 +27,33 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
atf_test_case n_output
|
atf_test_case n_output
|
||||||
n_output_head() {
|
n_output_head()
|
||||||
atf_set "descr" "Verify that echo(1) does not print the trailing " \
|
{
|
||||||
"newline character with option '-n'"
|
atf_set "descr" "Verify that echo(1) does not print the trailing " \
|
||||||
|
"newline character with option '-n'"
|
||||||
}
|
}
|
||||||
|
|
||||||
n_output_body() {
|
n_output_body()
|
||||||
atf_check -s ignore -o inline:"Hello world" \
|
{
|
||||||
/bin/echo -n "Hello world"
|
atf_check -s ignore -o inline:"Hello world" \
|
||||||
|
/bin/echo -n "Hello world"
|
||||||
}
|
}
|
||||||
|
|
||||||
atf_test_case append_c_output
|
atf_test_case append_c_output
|
||||||
append_c_output_head() {
|
append_c_output_head()
|
||||||
atf_set "descr" "Verify that echo(1) does not print the trailing newline " \
|
{
|
||||||
"character when '\c' is appended to the end of the string"
|
atf_set "descr" "Verify that echo(1) does not print the trailing newline " \
|
||||||
|
"character when '\c' is appended to the end of the string"
|
||||||
}
|
}
|
||||||
|
|
||||||
append_c_output_body() {
|
append_c_output_body()
|
||||||
atf_check -s ignore -o inline:"Hello world" \
|
{
|
||||||
/bin/echo "Hello world\c"
|
atf_check -s ignore -o inline:"Hello world" \
|
||||||
|
/bin/echo "Hello world\c"
|
||||||
}
|
}
|
||||||
|
|
||||||
atf_init_test_cases()
|
atf_init_test_cases()
|
||||||
{
|
{
|
||||||
atf_add_test_case n_output
|
atf_add_test_case n_output
|
||||||
atf_add_test_case append_c_output
|
atf_add_test_case append_c_output
|
||||||
}
|
}
|
||||||
|
@ -245,11 +245,11 @@ linkit(const char *source, const char *target, int isdir)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If the target is a directory (and not a symlink if hflag),
|
* If the target is a directory (and not a symlink if hflag),
|
||||||
* append the source's name.
|
* append the source's name, unless Fflag is set.
|
||||||
*/
|
*/
|
||||||
if (isdir ||
|
if (!Fflag && (isdir ||
|
||||||
(lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) ||
|
(lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) ||
|
||||||
(!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode))) {
|
(!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode)))) {
|
||||||
if (strlcpy(bbuf, source, sizeof(bbuf)) >= sizeof(bbuf) ||
|
if (strlcpy(bbuf, source, sizeof(bbuf)) >= sizeof(bbuf) ||
|
||||||
(p = basename(bbuf)) == NULL ||
|
(p = basename(bbuf)) == NULL ||
|
||||||
snprintf(path, sizeof(path), "%s/%s", target, p) >=
|
snprintf(path, sizeof(path), "%s/%s", target, p) >=
|
||||||
|
@ -160,10 +160,10 @@ sF_flag_head()
|
|||||||
|
|
||||||
sF_flag_body()
|
sF_flag_body()
|
||||||
{
|
{
|
||||||
atf_expect_fail "B isn't being unlinked (bug 219943)"
|
|
||||||
atf_check mkdir A B
|
atf_check mkdir A B
|
||||||
atf_check ln -sF A B
|
atf_check ln -sF A B
|
||||||
atf_check -o inline:'Symbolic Link\n' stat -f %SHT B
|
atf_check -o inline:'Symbolic Link\n' stat -f %SHT B
|
||||||
|
atf_check -o inline:'A\n' readlink B
|
||||||
}
|
}
|
||||||
|
|
||||||
atf_test_case sf_flag
|
atf_test_case sf_flag
|
||||||
|
11
bin/sh/cd.c
11
bin/sh/cd.c
@ -164,8 +164,17 @@ docd(char *dest, int print, int phys)
|
|||||||
if ((phys || (rc = cdlogical(dest)) < 0) && (rc = cdphysical(dest)) < 0)
|
if ((phys || (rc = cdlogical(dest)) < 0) && (rc = cdphysical(dest)) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
if (print && iflag && curdir)
|
if (print && iflag && curdir) {
|
||||||
out1fmt("%s\n", curdir);
|
out1fmt("%s\n", curdir);
|
||||||
|
/*
|
||||||
|
* Ignore write errors to preserve the invariant that the
|
||||||
|
* current directory is changed iff the exit status is 0
|
||||||
|
* (or 1 if -e was given and the full pathname could not be
|
||||||
|
* determined).
|
||||||
|
*/
|
||||||
|
flushout(out1);
|
||||||
|
outclearerror(out1);
|
||||||
|
}
|
||||||
|
|
||||||
return (rc);
|
return (rc);
|
||||||
}
|
}
|
||||||
|
@ -2018,6 +2018,11 @@ to return exit status 1 if the full pathname of the new directory
|
|||||||
cannot be determined reliably or at all.
|
cannot be determined reliably or at all.
|
||||||
Normally this is not considered an error,
|
Normally this is not considered an error,
|
||||||
although a warning is printed.
|
although a warning is printed.
|
||||||
|
.Pp
|
||||||
|
If changing the directory fails, the exit status is greater than 1.
|
||||||
|
If the directory is changed, the exit status is 0, or also 1 if
|
||||||
|
.Fl e
|
||||||
|
was given.
|
||||||
.It Ic chdir
|
.It Ic chdir
|
||||||
A synonym for the
|
A synonym for the
|
||||||
.Ic cd
|
.Ic cd
|
||||||
|
@ -51,6 +51,7 @@ ${PACKAGE}FILES+= cd6.0
|
|||||||
${PACKAGE}FILES+= cd7.0
|
${PACKAGE}FILES+= cd7.0
|
||||||
${PACKAGE}FILES+= cd8.0
|
${PACKAGE}FILES+= cd8.0
|
||||||
${PACKAGE}FILES+= cd9.0 cd9.0.stdout
|
${PACKAGE}FILES+= cd9.0 cd9.0.stdout
|
||||||
|
${PACKAGE}FILES+= cd10.0
|
||||||
${PACKAGE}FILES+= command1.0
|
${PACKAGE}FILES+= command1.0
|
||||||
${PACKAGE}FILES+= command2.0
|
${PACKAGE}FILES+= command2.0
|
||||||
${PACKAGE}FILES+= command3.0
|
${PACKAGE}FILES+= command3.0
|
||||||
|
6
bin/sh/tests/builtins/cd10.0
Normal file
6
bin/sh/tests/builtins/cd10.0
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
# Precondition
|
||||||
|
(cd /bin) || exit
|
||||||
|
# Verify write error is ignored.
|
||||||
|
$SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'
|
@ -59,6 +59,7 @@
|
|||||||
#include <sys/arc.h>
|
#include <sys/arc.h>
|
||||||
#include <sys/ddt.h>
|
#include <sys/ddt.h>
|
||||||
#include <sys/zfeature.h>
|
#include <sys/zfeature.h>
|
||||||
|
#include <sys/abd.h>
|
||||||
#include <zfs_comutil.h>
|
#include <zfs_comutil.h>
|
||||||
#undef verify
|
#undef verify
|
||||||
#include <libzfs.h>
|
#include <libzfs.h>
|
||||||
@ -2410,7 +2411,7 @@ zdb_blkptr_done(zio_t *zio)
|
|||||||
zdb_cb_t *zcb = zio->io_private;
|
zdb_cb_t *zcb = zio->io_private;
|
||||||
zbookmark_phys_t *zb = &zio->io_bookmark;
|
zbookmark_phys_t *zb = &zio->io_bookmark;
|
||||||
|
|
||||||
zio_data_buf_free(zio->io_data, zio->io_size);
|
abd_free(zio->io_abd);
|
||||||
|
|
||||||
mutex_enter(&spa->spa_scrub_lock);
|
mutex_enter(&spa->spa_scrub_lock);
|
||||||
spa->spa_scrub_inflight--;
|
spa->spa_scrub_inflight--;
|
||||||
@ -2477,7 +2478,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
|
|||||||
if (!BP_IS_EMBEDDED(bp) &&
|
if (!BP_IS_EMBEDDED(bp) &&
|
||||||
(dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) {
|
(dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata))) {
|
||||||
size_t size = BP_GET_PSIZE(bp);
|
size_t size = BP_GET_PSIZE(bp);
|
||||||
void *data = zio_data_buf_alloc(size);
|
abd_t *abd = abd_alloc(size, B_FALSE);
|
||||||
int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW;
|
int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW;
|
||||||
|
|
||||||
/* If it's an intent log block, failure is expected. */
|
/* If it's an intent log block, failure is expected. */
|
||||||
@ -2490,7 +2491,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
|
|||||||
spa->spa_scrub_inflight++;
|
spa->spa_scrub_inflight++;
|
||||||
mutex_exit(&spa->spa_scrub_lock);
|
mutex_exit(&spa->spa_scrub_lock);
|
||||||
|
|
||||||
zio_nowait(zio_read(NULL, spa, bp, data, size,
|
zio_nowait(zio_read(NULL, spa, bp, abd, size,
|
||||||
zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb));
|
zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3270,6 +3271,13 @@ zdb_vdev_lookup(vdev_t *vdev, char *path)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ARGSUSED */
|
||||||
|
static int
|
||||||
|
random_get_pseudo_bytes_cb(void *buf, size_t len, void *unused)
|
||||||
|
{
|
||||||
|
return (random_get_pseudo_bytes(buf, len));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read a block from a pool and print it out. The syntax of the
|
* Read a block from a pool and print it out. The syntax of the
|
||||||
* block descriptor is:
|
* block descriptor is:
|
||||||
@ -3301,7 +3309,8 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
uint64_t offset = 0, size = 0, psize = 0, lsize = 0, blkptr_offset = 0;
|
uint64_t offset = 0, size = 0, psize = 0, lsize = 0, blkptr_offset = 0;
|
||||||
zio_t *zio;
|
zio_t *zio;
|
||||||
vdev_t *vd;
|
vdev_t *vd;
|
||||||
void *pbuf, *lbuf, *buf;
|
abd_t *pabd;
|
||||||
|
void *lbuf, *buf;
|
||||||
char *s, *p, *dup, *vdev, *flagstr;
|
char *s, *p, *dup, *vdev, *flagstr;
|
||||||
int i, error;
|
int i, error;
|
||||||
|
|
||||||
@ -3373,7 +3382,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
psize = size;
|
psize = size;
|
||||||
lsize = size;
|
lsize = size;
|
||||||
|
|
||||||
pbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
pabd = abd_alloc_linear(SPA_MAXBLOCKSIZE, B_FALSE);
|
||||||
lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
||||||
|
|
||||||
BP_ZERO(bp);
|
BP_ZERO(bp);
|
||||||
@ -3401,15 +3410,15 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
/*
|
/*
|
||||||
* Treat this as a normal block read.
|
* Treat this as a normal block read.
|
||||||
*/
|
*/
|
||||||
zio_nowait(zio_read(zio, spa, bp, pbuf, psize, NULL, NULL,
|
zio_nowait(zio_read(zio, spa, bp, pabd, psize, NULL, NULL,
|
||||||
ZIO_PRIORITY_SYNC_READ,
|
ZIO_PRIORITY_SYNC_READ,
|
||||||
ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL));
|
ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL));
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Treat this as a vdev child I/O.
|
* Treat this as a vdev child I/O.
|
||||||
*/
|
*/
|
||||||
zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pbuf, psize,
|
zio_nowait(zio_vdev_child_io(zio, bp, vd, offset, pabd,
|
||||||
ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ,
|
psize, ZIO_TYPE_READ, ZIO_PRIORITY_SYNC_READ,
|
||||||
ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE |
|
ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE |
|
||||||
ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY |
|
ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY |
|
||||||
ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL));
|
ZIO_FLAG_CANFAIL | ZIO_FLAG_RAW, NULL, NULL));
|
||||||
@ -3432,21 +3441,21 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
void *pbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
void *pbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
||||||
void *lbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
void *lbuf2 = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
||||||
|
|
||||||
bcopy(pbuf, pbuf2, psize);
|
abd_copy_to_buf(pbuf2, pabd, psize);
|
||||||
|
|
||||||
VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf + psize,
|
VERIFY0(abd_iterate_func(pabd, psize, SPA_MAXBLOCKSIZE - psize,
|
||||||
SPA_MAXBLOCKSIZE - psize) == 0);
|
random_get_pseudo_bytes_cb, NULL));
|
||||||
|
|
||||||
VERIFY(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize,
|
VERIFY0(random_get_pseudo_bytes((uint8_t *)pbuf2 + psize,
|
||||||
SPA_MAXBLOCKSIZE - psize) == 0);
|
SPA_MAXBLOCKSIZE - psize));
|
||||||
|
|
||||||
for (lsize = SPA_MAXBLOCKSIZE; lsize > psize;
|
for (lsize = SPA_MAXBLOCKSIZE; lsize > psize;
|
||||||
lsize -= SPA_MINBLOCKSIZE) {
|
lsize -= SPA_MINBLOCKSIZE) {
|
||||||
for (c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++) {
|
for (c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++) {
|
||||||
if (zio_decompress_data(c, pbuf, lbuf,
|
if (zio_decompress_data(c, pabd,
|
||||||
psize, lsize) == 0 &&
|
lbuf, psize, lsize) == 0 &&
|
||||||
zio_decompress_data(c, pbuf2, lbuf2,
|
zio_decompress_data_buf(c, pbuf2,
|
||||||
psize, lsize) == 0 &&
|
lbuf2, psize, lsize) == 0 &&
|
||||||
bcmp(lbuf, lbuf2, lsize) == 0)
|
bcmp(lbuf, lbuf2, lsize) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3465,7 +3474,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
buf = lbuf;
|
buf = lbuf;
|
||||||
size = lsize;
|
size = lsize;
|
||||||
} else {
|
} else {
|
||||||
buf = pbuf;
|
buf = abd_to_buf(pabd);
|
||||||
size = psize;
|
size = psize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3483,7 +3492,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
zdb_dump_block(thing, buf, size, flags);
|
zdb_dump_block(thing, buf, size, flags);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
umem_free(pbuf, SPA_MAXBLOCKSIZE);
|
abd_free(pabd);
|
||||||
umem_free(lbuf, SPA_MAXBLOCKSIZE);
|
umem_free(lbuf, SPA_MAXBLOCKSIZE);
|
||||||
free(dup);
|
free(dup);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
|
* Copyright (c) 2013, 2016 by Delphix. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -41,6 +41,7 @@
|
|||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <sys/zil.h>
|
#include <sys/zil.h>
|
||||||
#include <sys/zil_impl.h>
|
#include <sys/zil_impl.h>
|
||||||
|
#include <sys/abd.h>
|
||||||
|
|
||||||
extern uint8_t dump_opt[256];
|
extern uint8_t dump_opt[256];
|
||||||
|
|
||||||
@ -116,14 +117,28 @@ zil_prt_rec_rename(zilog_t *zilog, int txtype, lr_rename_t *lr)
|
|||||||
(void) printf("%ssrc %s tgt %s\n", prefix, snm, tnm);
|
(void) printf("%ssrc %s tgt %s\n", prefix, snm, tnm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ARGSUSED */
|
||||||
|
static int
|
||||||
|
zil_prt_rec_write_cb(void *data, size_t len, void *unused)
|
||||||
|
{
|
||||||
|
char *cdata = data;
|
||||||
|
for (int i = 0; i < len; i++) {
|
||||||
|
if (isprint(*cdata))
|
||||||
|
(void) printf("%c ", *cdata);
|
||||||
|
else
|
||||||
|
(void) printf("%2X", *cdata);
|
||||||
|
cdata++;
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static void
|
static void
|
||||||
zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr)
|
zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr)
|
||||||
{
|
{
|
||||||
char *data, *dlimit;
|
abd_t *data;
|
||||||
blkptr_t *bp = &lr->lr_blkptr;
|
blkptr_t *bp = &lr->lr_blkptr;
|
||||||
zbookmark_phys_t zb;
|
zbookmark_phys_t zb;
|
||||||
char buf[SPA_MAXBLOCKSIZE];
|
|
||||||
int verbose = MAX(dump_opt['d'], dump_opt['i']);
|
int verbose = MAX(dump_opt['d'], dump_opt['i']);
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -144,7 +159,6 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr)
|
|||||||
if (BP_IS_HOLE(bp)) {
|
if (BP_IS_HOLE(bp)) {
|
||||||
(void) printf("\t\t\tLSIZE 0x%llx\n",
|
(void) printf("\t\t\tLSIZE 0x%llx\n",
|
||||||
(u_longlong_t)BP_GET_LSIZE(bp));
|
(u_longlong_t)BP_GET_LSIZE(bp));
|
||||||
bzero(buf, sizeof (buf));
|
|
||||||
(void) printf("%s<hole>\n", prefix);
|
(void) printf("%s<hole>\n", prefix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -157,28 +171,26 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, lr_write_t *lr)
|
|||||||
lr->lr_foid, ZB_ZIL_LEVEL,
|
lr->lr_foid, ZB_ZIL_LEVEL,
|
||||||
lr->lr_offset / BP_GET_LSIZE(bp));
|
lr->lr_offset / BP_GET_LSIZE(bp));
|
||||||
|
|
||||||
|
data = abd_alloc(BP_GET_LSIZE(bp), B_FALSE);
|
||||||
error = zio_wait(zio_read(NULL, zilog->zl_spa,
|
error = zio_wait(zio_read(NULL, zilog->zl_spa,
|
||||||
bp, buf, BP_GET_LSIZE(bp), NULL, NULL,
|
bp, data, BP_GET_LSIZE(bp), NULL, NULL,
|
||||||
ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &zb));
|
ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &zb));
|
||||||
if (error)
|
if (error)
|
||||||
return;
|
goto out;
|
||||||
data = buf;
|
|
||||||
} else {
|
} else {
|
||||||
data = (char *)(lr + 1);
|
/* data is stored after the end of the lr_write record */
|
||||||
|
data = abd_alloc(lr->lr_length, B_FALSE);
|
||||||
|
abd_copy_from_buf(data, lr + 1, lr->lr_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
dlimit = data + MIN(lr->lr_length,
|
|
||||||
(verbose < 6 ? 20 : SPA_MAXBLOCKSIZE));
|
|
||||||
|
|
||||||
(void) printf("%s", prefix);
|
(void) printf("%s", prefix);
|
||||||
while (data < dlimit) {
|
(void) abd_iterate_func(data,
|
||||||
if (isprint(*data))
|
0, MIN(lr->lr_length, (verbose < 6 ? 20 : SPA_MAXBLOCKSIZE)),
|
||||||
(void) printf("%c ", *data);
|
zil_prt_rec_write_cb, NULL);
|
||||||
else
|
|
||||||
(void) printf("%2X", *data);
|
|
||||||
data++;
|
|
||||||
}
|
|
||||||
(void) printf("\n");
|
(void) printf("\n");
|
||||||
|
|
||||||
|
out:
|
||||||
|
abd_free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
|
@ -112,6 +112,7 @@
|
|||||||
#include <sys/refcount.h>
|
#include <sys/refcount.h>
|
||||||
#include <sys/zfeature.h>
|
#include <sys/zfeature.h>
|
||||||
#include <sys/dsl_userhold.h>
|
#include <sys/dsl_userhold.h>
|
||||||
|
#include <sys/abd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdio_ext.h>
|
#include <stdio_ext.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -190,6 +191,7 @@ extern uint64_t metaslab_df_alloc_threshold;
|
|||||||
extern uint64_t zfs_deadman_synctime_ms;
|
extern uint64_t zfs_deadman_synctime_ms;
|
||||||
extern int metaslab_preload_limit;
|
extern int metaslab_preload_limit;
|
||||||
extern boolean_t zfs_compressed_arc_enabled;
|
extern boolean_t zfs_compressed_arc_enabled;
|
||||||
|
extern boolean_t zfs_abd_scatter_enabled;
|
||||||
|
|
||||||
static ztest_shared_opts_t *ztest_shared_opts;
|
static ztest_shared_opts_t *ztest_shared_opts;
|
||||||
static ztest_shared_opts_t ztest_opts;
|
static ztest_shared_opts_t ztest_opts;
|
||||||
@ -5042,7 +5044,7 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id)
|
|||||||
enum zio_checksum checksum = spa_dedup_checksum(spa);
|
enum zio_checksum checksum = spa_dedup_checksum(spa);
|
||||||
dmu_buf_t *db;
|
dmu_buf_t *db;
|
||||||
dmu_tx_t *tx;
|
dmu_tx_t *tx;
|
||||||
void *buf;
|
abd_t *abd;
|
||||||
blkptr_t blk;
|
blkptr_t blk;
|
||||||
int copies = 2 * ZIO_DEDUPDITTO_MIN;
|
int copies = 2 * ZIO_DEDUPDITTO_MIN;
|
||||||
|
|
||||||
@ -5122,14 +5124,14 @@ ztest_ddt_repair(ztest_ds_t *zd, uint64_t id)
|
|||||||
* Damage the block. Dedup-ditto will save us when we read it later.
|
* Damage the block. Dedup-ditto will save us when we read it later.
|
||||||
*/
|
*/
|
||||||
psize = BP_GET_PSIZE(&blk);
|
psize = BP_GET_PSIZE(&blk);
|
||||||
buf = zio_buf_alloc(psize);
|
abd = abd_alloc_linear(psize, B_TRUE);
|
||||||
ztest_pattern_set(buf, psize, ~pattern);
|
ztest_pattern_set(abd_to_buf(abd), psize, ~pattern);
|
||||||
|
|
||||||
(void) zio_wait(zio_rewrite(NULL, spa, 0, &blk,
|
(void) zio_wait(zio_rewrite(NULL, spa, 0, &blk,
|
||||||
buf, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE,
|
abd, psize, NULL, NULL, ZIO_PRIORITY_SYNC_WRITE,
|
||||||
ZIO_FLAG_CANFAIL | ZIO_FLAG_INDUCE_DAMAGE, NULL));
|
ZIO_FLAG_CANFAIL | ZIO_FLAG_INDUCE_DAMAGE, NULL));
|
||||||
|
|
||||||
zio_buf_free(buf, psize);
|
abd_free(abd);
|
||||||
|
|
||||||
(void) rw_unlock(&ztest_name_lock);
|
(void) rw_unlock(&ztest_name_lock);
|
||||||
}
|
}
|
||||||
@ -5413,6 +5415,12 @@ ztest_resume_thread(void *arg)
|
|||||||
*/
|
*/
|
||||||
if (ztest_random(10) == 0)
|
if (ztest_random(10) == 0)
|
||||||
zfs_compressed_arc_enabled = ztest_random(2);
|
zfs_compressed_arc_enabled = ztest_random(2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Periodically change the zfs_abd_scatter_enabled setting.
|
||||||
|
*/
|
||||||
|
if (ztest_random(10) == 0)
|
||||||
|
zfs_abd_scatter_enabled = ztest_random(2);
|
||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@ -199,19 +199,19 @@ dump_record(dmu_replay_record_t *drr, void *payload, int payload_len,
|
|||||||
{
|
{
|
||||||
ASSERT3U(offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum),
|
ASSERT3U(offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum),
|
||||||
==, sizeof (dmu_replay_record_t) - sizeof (zio_cksum_t));
|
==, sizeof (dmu_replay_record_t) - sizeof (zio_cksum_t));
|
||||||
fletcher_4_incremental_native(drr,
|
(void) fletcher_4_incremental_native(drr,
|
||||||
offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), zc);
|
offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), zc);
|
||||||
if (drr->drr_type != DRR_BEGIN) {
|
if (drr->drr_type != DRR_BEGIN) {
|
||||||
ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u.
|
ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u.
|
||||||
drr_checksum.drr_checksum));
|
drr_checksum.drr_checksum));
|
||||||
drr->drr_u.drr_checksum.drr_checksum = *zc;
|
drr->drr_u.drr_checksum.drr_checksum = *zc;
|
||||||
}
|
}
|
||||||
fletcher_4_incremental_native(&drr->drr_u.drr_checksum.drr_checksum,
|
(void) fletcher_4_incremental_native(
|
||||||
sizeof (zio_cksum_t), zc);
|
&drr->drr_u.drr_checksum.drr_checksum, sizeof (zio_cksum_t), zc);
|
||||||
if (write(outfd, drr, sizeof (*drr)) == -1)
|
if (write(outfd, drr, sizeof (*drr)) == -1)
|
||||||
return (errno);
|
return (errno);
|
||||||
if (payload_len != 0) {
|
if (payload_len != 0) {
|
||||||
fletcher_4_incremental_native(payload, payload_len, zc);
|
(void) fletcher_4_incremental_native(payload, payload_len, zc);
|
||||||
if (write(outfd, payload, payload_len) == -1)
|
if (write(outfd, payload, payload_len) == -1)
|
||||||
return (errno);
|
return (errno);
|
||||||
}
|
}
|
||||||
@ -2096,9 +2096,9 @@ recv_read(libzfs_handle_t *hdl, int fd, void *buf, int ilen,
|
|||||||
|
|
||||||
if (zc) {
|
if (zc) {
|
||||||
if (byteswap)
|
if (byteswap)
|
||||||
fletcher_4_incremental_byteswap(buf, ilen, zc);
|
(void) fletcher_4_incremental_byteswap(buf, ilen, zc);
|
||||||
else
|
else
|
||||||
fletcher_4_incremental_native(buf, ilen, zc);
|
(void) fletcher_4_incremental_native(buf, ilen, zc);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -3688,7 +3688,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap,
|
|||||||
* recv_read() above; do it again correctly.
|
* recv_read() above; do it again correctly.
|
||||||
*/
|
*/
|
||||||
bzero(&zcksum, sizeof (zio_cksum_t));
|
bzero(&zcksum, sizeof (zio_cksum_t));
|
||||||
fletcher_4_incremental_byteswap(&drr, sizeof (drr), &zcksum);
|
(void) fletcher_4_incremental_byteswap(&drr,
|
||||||
|
sizeof (drr), &zcksum);
|
||||||
flags->byteswap = B_TRUE;
|
flags->byteswap = B_TRUE;
|
||||||
|
|
||||||
drr.drr_type = BSWAP_32(drr.drr_type);
|
drr.drr_type = BSWAP_32(drr.drr_type);
|
||||||
|
@ -11,16 +11,10 @@ SRCS=
|
|||||||
# Use #include <zfsd/xxx.h> in test programs.
|
# Use #include <zfsd/xxx.h> in test programs.
|
||||||
INCFLAGS+= -I${.CURDIR:H:H}
|
INCFLAGS+= -I${.CURDIR:H:H}
|
||||||
|
|
||||||
.if defined(DESTDIR)
|
.if defined(DESTDIR) || defined(SYSROOT)
|
||||||
INCFLAGS+= -I${DESTDIR}/usr/include
|
INCFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include
|
||||||
LIBRARY_PATH= ${DESTDIR}/lib:${DESTDIR}/usr/lib
|
LDFLAGS.zfsd_unittest+= -L${SYSROOT:U${DESTDIR}}/lib \
|
||||||
LDFLAGS.zfsd_unittest+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib
|
-L${SYSROOT:U${DESTDIR}}/usr/lib
|
||||||
.elif defined(WORLDTMP)
|
|
||||||
INCFLAGS+= -I${WORLDTMP}/usr/include
|
|
||||||
LIBRARY_PATH= ${WORLDTMP}/lib:${WORLDTMP}/usr/lib
|
|
||||||
LDFLAGS.zfsd_unittest+= -L${WORLDTMP}/lib -L${WORLDTMP}/usr/lib
|
|
||||||
.else
|
|
||||||
LIBRARY_PATH=
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Googletest options
|
# Googletest options
|
||||||
|
@ -437,7 +437,7 @@ void
|
|||||||
ZfsDaemon::ClosePIDFile()
|
ZfsDaemon::ClosePIDFile()
|
||||||
{
|
{
|
||||||
if (s_pidFH != NULL)
|
if (s_pidFH != NULL)
|
||||||
pidfile_close(s_pidFH);
|
pidfile_remove(s_pidFH);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
#include "_elftc.h"
|
#include "_elftc.h"
|
||||||
|
|
||||||
ELFTC_VCSID("$Id: elfdump.c 3497 2016-10-17 20:57:22Z emaste $");
|
ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $");
|
||||||
|
|
||||||
#if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
|
#if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
|
||||||
#include "native-elf-format.h"
|
#include "native-elf-format.h"
|
||||||
@ -2226,8 +2226,8 @@ elf_print_svr4_hash64(struct elfdump *ed, struct section *s)
|
|||||||
uint64_t *buf;
|
uint64_t *buf;
|
||||||
uint64_t *bucket, *chain;
|
uint64_t *bucket, *chain;
|
||||||
uint64_t nbucket, nchain;
|
uint64_t nbucket, nchain;
|
||||||
uint64_t *bl, *c, maxl, total;
|
uint64_t *bl, *c, j, maxl, total;
|
||||||
uint64_t i, j;
|
size_t i;
|
||||||
int elferr, first;
|
int elferr, first;
|
||||||
char idx[10];
|
char idx[10];
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: _libelftc.h 3174 2015-03-27 17:13:41Z emaste $
|
* $Id: _libelftc.h 3531 2017-06-05 05:08:43Z kaiwang27 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBELFTC_H_
|
#ifndef __LIBELFTC_H_
|
||||||
@ -82,6 +82,8 @@ bool vector_str_init(struct vector_str *_vs);
|
|||||||
bool vector_str_pop(struct vector_str *_vs);
|
bool vector_str_pop(struct vector_str *_vs);
|
||||||
bool vector_str_push(struct vector_str *_vs, const char *_str,
|
bool vector_str_push(struct vector_str *_vs, const char *_str,
|
||||||
size_t _len);
|
size_t _len);
|
||||||
|
bool vector_str_push_vector(struct vector_str *_dst,
|
||||||
|
struct vector_str *_org);
|
||||||
bool vector_str_push_vector_head(struct vector_str *_dst,
|
bool vector_str_push_vector_head(struct vector_str *_dst,
|
||||||
struct vector_str *_org);
|
struct vector_str *_org);
|
||||||
char *vector_str_substr(const struct vector_str *_vs, size_t _begin,
|
char *vector_str_substr(const struct vector_str *_vs, size_t _begin,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include "_libelftc.h"
|
#include "_libelftc.h"
|
||||||
|
|
||||||
ELFTC_VCSID("$Id: libelftc_vstr.c 2065 2011-10-26 15:24:47Z jkoshy $");
|
ELFTC_VCSID("$Id: libelftc_vstr.c 3531 2017-06-05 05:08:43Z kaiwang27 $");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file vector_str.c
|
* @file vector_str.c
|
||||||
@ -280,6 +280,47 @@ vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org)
|
|||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Push org vector to the tail of det vector.
|
||||||
|
* @return false at failed, true at success.
|
||||||
|
*/
|
||||||
|
bool
|
||||||
|
vector_str_push_vector(struct vector_str *dst, struct vector_str *org)
|
||||||
|
{
|
||||||
|
size_t i, j, tmp_cap;
|
||||||
|
char **tmp_ctn;
|
||||||
|
|
||||||
|
if (dst == NULL || org == NULL)
|
||||||
|
return (false);
|
||||||
|
|
||||||
|
tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
|
||||||
|
|
||||||
|
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
|
||||||
|
return (false);
|
||||||
|
|
||||||
|
for (i = 0; i < dst->size; ++i)
|
||||||
|
tmp_ctn[i] = dst->container[i];
|
||||||
|
|
||||||
|
for (i = 0; i < org->size; ++i)
|
||||||
|
if ((tmp_ctn[i + dst->size] = strdup(org->container[i])) ==
|
||||||
|
NULL) {
|
||||||
|
for (j = 0; j < i + dst->size; ++j)
|
||||||
|
free(tmp_ctn[j]);
|
||||||
|
|
||||||
|
free(tmp_ctn);
|
||||||
|
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(dst->container);
|
||||||
|
|
||||||
|
dst->container = tmp_ctn;
|
||||||
|
dst->capacity = tmp_cap;
|
||||||
|
dst->size += org->size;
|
||||||
|
|
||||||
|
return (true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get new allocated flat string from vector between begin and end.
|
* @brief Get new allocated flat string from vector between begin and end.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,7 @@ const char *familyname(int family)
|
|||||||
{
|
{
|
||||||
if (family == AF_INET)
|
if (family == AF_INET)
|
||||||
return "inet";
|
return "inet";
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
if (family == AF_INET6)
|
if (family == AF_INET6)
|
||||||
return "inet6";
|
return "inet6";
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,7 +35,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields)
|
|||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
} else if ((opts & OPT_DEBUG) != 0) {
|
} else if ((opts & OPT_DEBUG) != 0) {
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
if (ipe.ipe_family == AF_INET6) {
|
if (ipe.ipe_family == AF_INET6) {
|
||||||
char buf[INET6_ADDRSTRLEN + 1];
|
char buf[INET6_ADDRSTRLEN + 1];
|
||||||
const char *str;
|
const char *str;
|
||||||
@ -59,7 +59,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields)
|
|||||||
} else if (ipe.ipe_family == AF_INET) {
|
} else if (ipe.ipe_family == AF_INET) {
|
||||||
#else
|
#else
|
||||||
if (ipe.ipe_family == AF_INET) {
|
if (ipe.ipe_family == AF_INET) {
|
||||||
#endif /* AF_INET6 */
|
#endif /* USE_INET6 */
|
||||||
PRINTF("\t%d\tAddress: %s", hv,
|
PRINTF("\t%d\tAddress: %s", hv,
|
||||||
inet_ntoa(ipe.ipe_addr.in4));
|
inet_ntoa(ipe.ipe_addr.in4));
|
||||||
printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr);
|
printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr);
|
||||||
|
@ -25,7 +25,7 @@ printip(family, addr)
|
|||||||
else
|
else
|
||||||
PRINTF("%s", inet_ntoa(ipa));
|
PRINTF("%s", inet_ntoa(ipa));
|
||||||
}
|
}
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
else if (family == AF_INET6) {
|
else if (family == AF_INET6) {
|
||||||
char buf[INET6_ADDRSTRLEN + 1];
|
char buf[INET6_ADDRSTRLEN + 1];
|
||||||
const char *str;
|
const char *str;
|
||||||
|
@ -33,7 +33,7 @@ printpoolnode(np, opts, fields)
|
|||||||
printmask(np->ipn_addr.adf_family,
|
printmask(np->ipn_addr.adf_family,
|
||||||
(u_32_t *)&np->ipn_mask.adf_addr);
|
(u_32_t *)&np->ipn_mask.adf_addr);
|
||||||
} else {
|
} else {
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
if (np->ipn_addr.adf_family == AF_INET6) {
|
if (np->ipn_addr.adf_family == AF_INET6) {
|
||||||
char buf[INET6_ADDRSTRLEN + 1];
|
char buf[INET6_ADDRSTRLEN + 1];
|
||||||
const char *str;
|
const char *str;
|
||||||
@ -54,9 +54,7 @@ printpoolnode(np, opts, fields)
|
|||||||
} else {
|
} else {
|
||||||
PRINTF("\tAddress: family: %d\n",
|
PRINTF("\tAddress: family: %d\n",
|
||||||
np->ipn_addr.adf_family);
|
np->ipn_addr.adf_family);
|
||||||
#ifdef AF_INET6
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
printmask(np->ipn_addr.adf_family,
|
printmask(np->ipn_addr.adf_family,
|
||||||
(u_32_t *)&np->ipn_mask.adf_addr);
|
(u_32_t *)&np->ipn_mask.adf_addr);
|
||||||
#ifdef USE_QUAD_T
|
#ifdef USE_QUAD_T
|
||||||
|
@ -2303,7 +2303,7 @@ makepool(list)
|
|||||||
|
|
||||||
for (n = top, a = list; (n != NULL) && (a != NULL); a = a->al_next) {
|
for (n = top, a = list; (n != NULL) && (a != NULL); a = a->al_next) {
|
||||||
if (use_inet6 == 1) {
|
if (use_inet6 == 1) {
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
n->ipn_addr.adf_family = AF_INET6;
|
n->ipn_addr.adf_family = AF_INET6;
|
||||||
n->ipn_addr.adf_addr = a->al_i6addr;
|
n->ipn_addr.adf_addr = a->al_i6addr;
|
||||||
n->ipn_addr.adf_len = offsetof(addrfamily_t,
|
n->ipn_addr.adf_len = offsetof(addrfamily_t,
|
||||||
|
@ -201,17 +201,27 @@ poolnodecommand(remove, argc, argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'T' :
|
case 'T' :
|
||||||
ttl = atoi(optarg);
|
if (remove == 0) {
|
||||||
if (ttl < 0) {
|
ttl = atoi(optarg);
|
||||||
fprintf(stderr, "cannot set negative ttl\n");
|
if (ttl < 0) {
|
||||||
return -1;
|
fprintf(stderr, "cannot set negative ttl\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
usage(argv[0]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'v' :
|
case 'v' :
|
||||||
opts |= OPT_VERBOSE;
|
opts |= OPT_VERBOSE;
|
||||||
break;
|
break;
|
||||||
|
default :
|
||||||
|
usage(argv[0]);
|
||||||
|
break; /* keep compiler happy */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc - 1 - optind > 0)
|
||||||
|
usage(argv[0]);
|
||||||
|
|
||||||
if (argv[optind] != NULL && ipset == 0) {
|
if (argv[optind] != NULL && ipset == 0) {
|
||||||
if (setnodeaddr(type, role, ptr, argv[optind]) == 0)
|
if (setnodeaddr(type, role, ptr, argv[optind]) == 0)
|
||||||
ipset = 1;
|
ipset = 1;
|
||||||
@ -268,7 +278,7 @@ poolcommand(remove, argc, argv)
|
|||||||
bzero((char *)&iph, sizeof(iph));
|
bzero((char *)&iph, sizeof(iph));
|
||||||
bzero((char *)&pool, sizeof(pool));
|
bzero((char *)&pool, sizeof(pool));
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "dm:no:RSv")) != -1)
|
while ((c = getopt(argc, argv, "dm:no:RS:v")) != -1)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'd' :
|
case 'd' :
|
||||||
@ -292,13 +302,22 @@ poolcommand(remove, argc, argv)
|
|||||||
opts |= OPT_NORESOLVE;
|
opts |= OPT_NORESOLVE;
|
||||||
break;
|
break;
|
||||||
case 'S' :
|
case 'S' :
|
||||||
iph.iph_seed = atoi(optarg);
|
if (remove == 0)
|
||||||
|
iph.iph_seed = atoi(optarg);
|
||||||
|
else
|
||||||
|
usage(argv[0]);
|
||||||
break;
|
break;
|
||||||
case 'v' :
|
case 'v' :
|
||||||
opts |= OPT_VERBOSE;
|
opts |= OPT_VERBOSE;
|
||||||
break;
|
break;
|
||||||
|
default :
|
||||||
|
usage(argv[0]);
|
||||||
|
break; /* keep compiler happy */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc - 1 - optind > 0)
|
||||||
|
usage(argv[0]);
|
||||||
|
|
||||||
if (opts & OPT_DEBUG)
|
if (opts & OPT_DEBUG)
|
||||||
fprintf(stderr, "poolcommand: opts = %#x\n", opts);
|
fprintf(stderr, "poolcommand: opts = %#x\n", opts);
|
||||||
|
|
||||||
@ -568,7 +587,7 @@ poolflush(argc, argv)
|
|||||||
break; /* keep compiler happy */
|
break; /* keep compiler happy */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc - 1 - optind > 0)
|
if (argc - optind > 0)
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
|
|
||||||
if (opts & OPT_DEBUG)
|
if (opts & OPT_DEBUG)
|
||||||
|
@ -273,7 +273,7 @@ grouplist:
|
|||||||
| addrmask next { $$ = calloc(1, sizeof(iphtent_t));
|
| addrmask next { $$ = calloc(1, sizeof(iphtent_t));
|
||||||
$$->ipe_addr = $1[0].adf_addr;
|
$$->ipe_addr = $1[0].adf_addr;
|
||||||
$$->ipe_mask = $1[1].adf_addr;
|
$$->ipe_mask = $1[1].adf_addr;
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
if (use_inet6)
|
if (use_inet6)
|
||||||
$$->ipe_family = AF_INET6;
|
$$->ipe_family = AF_INET6;
|
||||||
else
|
else
|
||||||
@ -297,7 +297,7 @@ groupentry:
|
|||||||
$$->ipe_mask = $1[1].adf_addr;
|
$$->ipe_mask = $1[1].adf_addr;
|
||||||
strncpy($$->ipe_group, $3,
|
strncpy($$->ipe_group, $3,
|
||||||
FR_GROUPLEN);
|
FR_GROUPLEN);
|
||||||
#ifdef AF_INET6
|
#ifdef USE_INET6
|
||||||
if (use_inet6)
|
if (use_inet6)
|
||||||
$$->ipe_family = AF_INET6;
|
$$->ipe_family = AF_INET6;
|
||||||
else
|
else
|
||||||
|
@ -139,11 +139,7 @@ ATF_TC_BODY(proc1, tc)
|
|||||||
printf(" NOTE_FORK");
|
printf(" NOTE_FORK");
|
||||||
}
|
}
|
||||||
if (event[0].fflags & NOTE_CHILD)
|
if (event[0].fflags & NOTE_CHILD)
|
||||||
#ifdef __FreeBSD__
|
|
||||||
printf(" NOTE_CHILD, parent = %" PRIdPTR, event[0].data);
|
|
||||||
#else
|
|
||||||
printf(" NOTE_CHILD, parent = %" PRId64, event[0].data);
|
printf(" NOTE_CHILD, parent = %" PRId64, event[0].data);
|
||||||
#endif
|
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
@ -127,11 +127,7 @@ ATF_TC_BODY(sig, tc)
|
|||||||
if (n == 0)
|
if (n == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
(void)printf("sig: kevent flags: 0x%x, data: %" PRIdPTR " (# "
|
|
||||||
#else
|
|
||||||
(void)printf("sig: kevent flags: 0x%x, data: %" PRId64 " (# "
|
(void)printf("sig: kevent flags: 0x%x, data: %" PRId64 " (# "
|
||||||
#endif
|
|
||||||
"times signal posted)\n", event[0].flags, event[0].data);
|
"times signal posted)\n", event[0].flags, event[0].data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,10 +28,6 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
|
|||||||
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
|
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INET6
|
|
||||||
extern char *malloc();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Application-specific. */
|
/* Application-specific. */
|
||||||
|
|
||||||
#include "tcpd.h"
|
#include "tcpd.h"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#
|
#
|
||||||
# In the following text, the symbol '#' introduces
|
# In the following text, the symbol '#' introduces
|
||||||
# a comment, which continues from that symbol until
|
# a comment, which continues from that symbol until
|
||||||
# the end of the line. A plain comment line has a
|
# the end of the line. A plain comment line has a
|
||||||
# whitespace character following the comment indicator.
|
# whitespace character following the comment indicator.
|
||||||
# There are also special comment lines defined below.
|
# There are also special comment lines defined below.
|
||||||
# A special comment will always have a non-whitespace
|
# A special comment will always have a non-whitespace
|
||||||
# character in column 2.
|
# character in column 2.
|
||||||
#
|
#
|
||||||
# A blank line should be ignored.
|
# A blank line should be ignored.
|
||||||
@ -15,17 +15,22 @@
|
|||||||
# are transmitted by almost all time services.
|
# are transmitted by almost all time services.
|
||||||
#
|
#
|
||||||
# The first column shows an epoch as a number of seconds
|
# The first column shows an epoch as a number of seconds
|
||||||
# since 1900.0 and the second column shows the number of
|
# since 1 January 1900, 00:00:00 (1900.0 is also used to
|
||||||
# seconds that must be added to UTC to compute TAI for
|
# indicate the same epoch.) Both of these time stamp formats
|
||||||
# any timestamp at or after that epoch. The value on
|
# ignore the complexities of the time scales that were
|
||||||
# each line is valid from the indicated initial instant
|
# used before the current definition of UTC at the start
|
||||||
# until the epoch given on the next one or indefinitely
|
# of 1972. (See note 3 below.)
|
||||||
# into the future if there is no next line.
|
# The second column shows the number of seconds that
|
||||||
|
# must be added to UTC to compute TAI for any timestamp
|
||||||
|
# at or after that epoch. The value on each line is
|
||||||
|
# valid from the indicated initial instant until the
|
||||||
|
# epoch given on the next one or indefinitely into the
|
||||||
|
# future if there is no next line.
|
||||||
# (The comment on each line shows the representation of
|
# (The comment on each line shows the representation of
|
||||||
# the corresponding initial epoch in the usual
|
# the corresponding initial epoch in the usual
|
||||||
# day-month-year format. The epoch always begins at
|
# day-month-year format. The epoch always begins at
|
||||||
# 00:00:00 UTC on the indicated day. See Note 5 below.)
|
# 00:00:00 UTC on the indicated day. See Note 5 below.)
|
||||||
#
|
#
|
||||||
# Important notes:
|
# Important notes:
|
||||||
#
|
#
|
||||||
# 1. Coordinated Universal Time (UTC) is often referred to
|
# 1. Coordinated Universal Time (UTC) is often referred to
|
||||||
@ -33,7 +38,7 @@
|
|||||||
# longer used, and the use of GMT to designate UTC is
|
# longer used, and the use of GMT to designate UTC is
|
||||||
# discouraged.
|
# discouraged.
|
||||||
#
|
#
|
||||||
# 2. The UTC time scale is realized by many national
|
# 2. The UTC time scale is realized by many national
|
||||||
# laboratories and timing centers. Each laboratory
|
# laboratories and timing centers. Each laboratory
|
||||||
# identifies its realization with its name: Thus
|
# identifies its realization with its name: Thus
|
||||||
# UTC(NIST), UTC(USNO), etc. The differences among
|
# UTC(NIST), UTC(USNO), etc. The differences among
|
||||||
@ -42,12 +47,12 @@
|
|||||||
# and can be ignored for many purposes. These differences
|
# and can be ignored for many purposes. These differences
|
||||||
# are tabulated in Circular T, which is published monthly
|
# are tabulated in Circular T, which is published monthly
|
||||||
# by the International Bureau of Weights and Measures
|
# by the International Bureau of Weights and Measures
|
||||||
# (BIPM). See www.bipm.fr for more information.
|
# (BIPM). See www.bipm.org for more information.
|
||||||
#
|
#
|
||||||
# 3. The current defintion of the relationship between UTC
|
# 3. The current definition of the relationship between UTC
|
||||||
# and TAI dates from 1 January 1972. A number of different
|
# and TAI dates from 1 January 1972. A number of different
|
||||||
# time scales were in use before than epoch, and it can be
|
# time scales were in use before that epoch, and it can be
|
||||||
# quite difficult to compute precise timestamps and time
|
# quite difficult to compute precise timestamps and time
|
||||||
# intervals in those "prehistoric" days. For more information,
|
# intervals in those "prehistoric" days. For more information,
|
||||||
# consult:
|
# consult:
|
||||||
#
|
#
|
||||||
@ -58,36 +63,34 @@
|
|||||||
# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905,
|
# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905,
|
||||||
# July, 1991.
|
# July, 1991.
|
||||||
#
|
#
|
||||||
# 4. The insertion of leap seconds into UTC is currently the
|
# 4. The decision to insert a leap second into UTC is currently
|
||||||
# responsibility of the International Earth Rotation Service,
|
# the responsibility of the International Earth Rotation and
|
||||||
# which is located at the Paris Observatory:
|
# Reference Systems Service. (The name was changed from the
|
||||||
|
# International Earth Rotation Service, but the acronym IERS
|
||||||
|
# is still used.)
|
||||||
#
|
#
|
||||||
# Central Bureau of IERS
|
# Leap seconds are announced by the IERS in its Bulletin C.
|
||||||
# 61, Avenue de l'Observatoire
|
|
||||||
# 75014 Paris, France.
|
|
||||||
#
|
#
|
||||||
# Leap seconds are announced by the IERS in its Bulletin C
|
# See www.iers.org for more details.
|
||||||
#
|
#
|
||||||
# See hpiers.obspm.fr or www.iers.org for more details.
|
# Every national laboratory and timing center uses the
|
||||||
#
|
# data from the BIPM and the IERS to construct UTC(lab),
|
||||||
# All national laboratories and timing centers use the
|
# their local realization of UTC.
|
||||||
# data from the BIPM and the IERS to construct their
|
|
||||||
# local realizations of UTC.
|
|
||||||
#
|
#
|
||||||
# Although the definition also includes the possibility
|
# Although the definition also includes the possibility
|
||||||
# of dropping seconds ("negative" leap seconds), this has
|
# of dropping seconds ("negative" leap seconds), this has
|
||||||
# never been done and is unlikely to be necessary in the
|
# never been done and is unlikely to be necessary in the
|
||||||
# foreseeable future.
|
# foreseeable future.
|
||||||
#
|
#
|
||||||
# 5. If your system keeps time as the number of seconds since
|
# 5. If your system keeps time as the number of seconds since
|
||||||
# some epoch (e.g., NTP timestamps), then the algorithm for
|
# some epoch (e.g., NTP timestamps), then the algorithm for
|
||||||
# assigning a UTC time stamp to an event that happens during a positive
|
# assigning a UTC time stamp to an event that happens during a positive
|
||||||
# leap second is not well defined. The official name of that leap
|
# leap second is not well defined. The official name of that leap
|
||||||
# second is 23:59:60, but there is no way of representing that time
|
# second is 23:59:60, but there is no way of representing that time
|
||||||
# in these systems.
|
# in these systems.
|
||||||
# Many systems of this type effectively stop the system clock for
|
# Many systems of this type effectively stop the system clock for
|
||||||
# one second during the leap second and use a time that is equivalent
|
# one second during the leap second and use a time that is equivalent
|
||||||
# to 23:59:59 UTC twice. For these systems, the corresponding TAI
|
# to 23:59:59 UTC twice. For these systems, the corresponding TAI
|
||||||
# timestamp would be obtained by advancing to the next entry in the
|
# timestamp would be obtained by advancing to the next entry in the
|
||||||
# following table when the time equivalent to 23:59:59 UTC
|
# following table when the time equivalent to 23:59:59 UTC
|
||||||
# is used for the second time. Thus the leap second which
|
# is used for the second time. Thus the leap second which
|
||||||
@ -102,7 +105,7 @@
|
|||||||
#
|
#
|
||||||
# If your system realizes the leap second by repeating 00:00:00 UTC twice
|
# If your system realizes the leap second by repeating 00:00:00 UTC twice
|
||||||
# (this is possible but not usual), then the advance to the next entry
|
# (this is possible but not usual), then the advance to the next entry
|
||||||
# in the table must occur the second time that a time equivlent to
|
# in the table must occur the second time that a time equivalent to
|
||||||
# 00:00:00 UTC is used. Thus, using the same example as above:
|
# 00:00:00 UTC is used. Thus, using the same example as above:
|
||||||
#
|
#
|
||||||
# ...
|
# ...
|
||||||
@ -112,66 +115,94 @@
|
|||||||
# ...
|
# ...
|
||||||
#
|
#
|
||||||
# in both cases the use of timestamps based on TAI produces a smooth
|
# in both cases the use of timestamps based on TAI produces a smooth
|
||||||
# time scale with no discontinuity in the time interval.
|
# time scale with no discontinuity in the time interval. However,
|
||||||
|
# although the long-term behavior of the time scale is correct in both
|
||||||
|
# methods, the second method is technically not correct because it adds
|
||||||
|
# the extra second to the wrong day.
|
||||||
#
|
#
|
||||||
# This complexity would not be needed for negative leap seconds (if they
|
# This complexity would not be needed for negative leap seconds (if they
|
||||||
# are ever used). The UTC time would skip 23:59:59 and advance from
|
# are ever used). The UTC time would skip 23:59:59 and advance from
|
||||||
# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by
|
# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by
|
||||||
# 1 second at the same instant. This is a much easier situation to deal
|
# 1 second at the same instant. This is a much easier situation to deal
|
||||||
# with, since the difficulty of unambiguously representing the epoch
|
# with, since the difficulty of unambiguously representing the epoch
|
||||||
# during the leap second does not arise.
|
# during the leap second does not arise.
|
||||||
#
|
#
|
||||||
|
# Some systems implement leap seconds by amortizing the leap second
|
||||||
|
# over the last few minutes of the day. The frequency of the local
|
||||||
|
# clock is decreased (or increased) to realize the positive (or
|
||||||
|
# negative) leap second. This method removes the time step described
|
||||||
|
# above. Although the long-term behavior of the time scale is correct
|
||||||
|
# in this case, this method introduces an error during the adjustment
|
||||||
|
# period both in time and in frequency with respect to the official
|
||||||
|
# definition of UTC.
|
||||||
|
#
|
||||||
# Questions or comments to:
|
# Questions or comments to:
|
||||||
# Jeff Prillaman
|
# Judah Levine
|
||||||
# Time Service Department
|
# Time and Frequency Division
|
||||||
# US Naval Observatory
|
# NIST
|
||||||
# Washington, DC
|
# Boulder, Colorado
|
||||||
# jeffrey.prillaman@usno.navy.mil
|
# Judah.Levine@nist.gov
|
||||||
#
|
#
|
||||||
# Last Update of leap second values: 6 Jul 2016
|
# Last Update of leap second values: 8 July 2016
|
||||||
#
|
#
|
||||||
# The following line shows this last update date in NTP timestamp
|
# The following line shows this last update date in NTP timestamp
|
||||||
# format. This is the date on which the most recent change to
|
# format. This is the date on which the most recent change to
|
||||||
# the leap second data was added to the file. This line can
|
# the leap second data was added to the file. This line can
|
||||||
# be identified by the unique pair of characters in the first two
|
# be identified by the unique pair of characters in the first two
|
||||||
# columns as shown below.
|
# columns as shown below.
|
||||||
#
|
#
|
||||||
#$ 3676752000
|
#$ 3676924800
|
||||||
#
|
#
|
||||||
# The data in this file will be updated periodically as new leap
|
# The NTP timestamps are in units of seconds since the NTP epoch,
|
||||||
|
# which is 1 January 1900, 00:00:00. The Modified Julian Day number
|
||||||
|
# corresponding to the NTP time stamp, X, can be computed as
|
||||||
|
#
|
||||||
|
# X/86400 + 15020
|
||||||
|
#
|
||||||
|
# where the first term converts seconds to days and the second
|
||||||
|
# term adds the MJD corresponding to the time origin defined above.
|
||||||
|
# The integer portion of the result is the integer MJD for that
|
||||||
|
# day, and any remainder is the time of day, expressed as the
|
||||||
|
# fraction of the day since 0 hours UTC. The conversion from day
|
||||||
|
# fraction to seconds or to hours, minutes, and seconds may involve
|
||||||
|
# rounding or truncation, depending on the method used in the
|
||||||
|
# computation.
|
||||||
|
#
|
||||||
|
# The data in this file will be updated periodically as new leap
|
||||||
# seconds are announced. In addition to being entered on the line
|
# seconds are announced. In addition to being entered on the line
|
||||||
# above, the update time (in NTP format) will be added to the basic
|
# above, the update time (in NTP format) will be added to the basic
|
||||||
# file name leap-seconds to form the name leap-seconds.<NTP TIME>.
|
# file name leap-seconds to form the name leap-seconds.<NTP TIME>.
|
||||||
# In addition, the generic name leap-seconds.list will always point to
|
# In addition, the generic name leap-seconds.list will always point to
|
||||||
# the most recent version of the file.
|
# the most recent version of the file.
|
||||||
#
|
#
|
||||||
# This update procedure will be performed only when a new leap second
|
# This update procedure will be performed only when a new leap second
|
||||||
# is announced.
|
# is announced.
|
||||||
#
|
#
|
||||||
# The following entry specifies the expiration date of the data
|
# The following entry specifies the expiration date of the data
|
||||||
# in this file in units of seconds since 1900.0. This expiration date
|
# in this file in units of seconds since the origin at the instant
|
||||||
# will be changed at least twice per year whether or not a new leap
|
# 1 January 1900, 00:00:00. This expiration date will be changed
|
||||||
# second is announced. These semi-annual changes will be made no
|
# at least twice per year whether or not a new leap second is
|
||||||
# later than 1 June and 1 December of each year to indicate what
|
# announced. These semi-annual changes will be made no later
|
||||||
# action (if any) is to be taken on 30 June and 31 December,
|
# than 1 June and 1 December of each year to indicate what
|
||||||
|
# action (if any) is to be taken on 30 June and 31 December,
|
||||||
# respectively. (These are the customary effective dates for new
|
# respectively. (These are the customary effective dates for new
|
||||||
# leap seconds.) This expiration date will be identified by a
|
# leap seconds.) This expiration date will be identified by a
|
||||||
# unique pair of characters in columns 1 and 2 as shown below.
|
# unique pair of characters in columns 1 and 2 as shown below.
|
||||||
# In the unlikely event that a leap second is announced with an
|
# In the unlikely event that a leap second is announced with an
|
||||||
# effective date other than 30 June or 31 December, then this
|
# effective date other than 30 June or 31 December, then this
|
||||||
# file will be edited to include that leap second as soon as it is
|
# file will be edited to include that leap second as soon as it is
|
||||||
# announced or at least one month before the effective date
|
# announced or at least one month before the effective date
|
||||||
# (whichever is later).
|
# (whichever is later).
|
||||||
# If an announcement by the IERS specifies that no leap second is
|
# If an announcement by the IERS specifies that no leap second is
|
||||||
# scheduled, then only the expiration date of the file will
|
# scheduled, then only the expiration date of the file will
|
||||||
# be advanced to show that the information in the file is still
|
# be advanced to show that the information in the file is still
|
||||||
# current -- the update time stamp, the data and the name of the file
|
# current -- the update time stamp, the data and the name of the file
|
||||||
# will not change.
|
# will not change.
|
||||||
#
|
#
|
||||||
# Updated through IERS Bulletin C 52
|
# Updated through IERS Bulletin C53
|
||||||
# File expires on: 1 Jun 2017
|
# File expires on: 28 December 2017
|
||||||
#
|
#
|
||||||
#@ 3705264000
|
#@ 3723408000
|
||||||
#
|
#
|
||||||
2272060800 10 # 1 Jan 1972
|
2272060800 10 # 1 Jan 1972
|
||||||
2287785600 11 # 1 Jul 1972
|
2287785600 11 # 1 Jul 1972
|
||||||
@ -205,16 +236,15 @@
|
|||||||
# the following special comment contains the
|
# the following special comment contains the
|
||||||
# hash value of the data in this file computed
|
# hash value of the data in this file computed
|
||||||
# use the secure hash algorithm as specified
|
# use the secure hash algorithm as specified
|
||||||
# by FIPS 180-1. See the files in ~/sha for
|
# by FIPS 180-1. See the files in ~/pub/sha for
|
||||||
# the details of how this hash value is
|
# the details of how this hash value is
|
||||||
# computed. Note that the hash computation
|
# computed. Note that the hash computation
|
||||||
# ignores comments and whitespace characters
|
# ignores comments and whitespace characters
|
||||||
# in data lines. It includes the NTP values
|
# in data lines. It includes the NTP values
|
||||||
# of both the last modification time and the
|
# of both the last modification time and the
|
||||||
# expiration time of the file, but not the
|
# expiration time of the file, but not the
|
||||||
# white space on those lines.
|
# white space on those lines.
|
||||||
# the hash line is also ignored in the
|
# the hash line is also ignored in the
|
||||||
# computation.
|
# computation.
|
||||||
#
|
#
|
||||||
#h 63f8fea8 587c099d abcf130a ad525eae 3e105052
|
#h 62cf8c5d 8bbb6dcc c61e3b56 c308343 869bb80d
|
||||||
#
|
|
||||||
|
@ -14,7 +14,7 @@ SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
|
|||||||
xstrtoumax.c
|
xstrtoumax.c
|
||||||
CLEANFILES+= gnugrep.1
|
CLEANFILES+= gnugrep.1
|
||||||
|
|
||||||
CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H
|
CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
|
||||||
|
|
||||||
.if ${MK_BSD_GREP} != "yes"
|
.if ${MK_BSD_GREP} != "yes"
|
||||||
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
|
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
|
||||||
|
115
include/Makefile
115
include/Makefile
@ -133,23 +133,24 @@ _MARCHS+= x86
|
|||||||
|
|
||||||
META_TARGETS+= compat
|
META_TARGETS+= compat
|
||||||
stage_includes: ${SHARED}
|
stage_includes: ${SHARED}
|
||||||
|
SDESTDIR= ${SYSROOT:U${DESTDIR}}
|
||||||
|
|
||||||
# Take care of stale directory-level symlinks.
|
# Take care of stale directory-level symlinks.
|
||||||
compat:
|
compat:
|
||||||
.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
|
.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
|
||||||
if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
if [ -L ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
|
||||||
rm -f ${DESTDIR}${INCLUDEDIR}/$i; \
|
rm -f ${SDESTDIR}${INCLUDEDIR}/$i; \
|
||||||
fi
|
fi
|
||||||
.endfor
|
.endfor
|
||||||
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
|
||||||
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
|
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
|
||||||
-p ${DESTDIR}${INCLUDEDIR} > /dev/null
|
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
|
||||||
|
|
||||||
copies: .PHONY .META
|
copies: .PHONY .META
|
||||||
.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
|
.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
|
||||||
${_MARCHS}
|
${_MARCHS}
|
||||||
if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
if [ -d ${SDESTDIR}${INCLUDEDIR}/$i ]; then \
|
||||||
cd ${DESTDIR}${INCLUDEDIR}/$i; \
|
cd ${SDESTDIR}${INCLUDEDIR}/$i; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
if [ -L $$h ]; then rm -f $$h; fi; \
|
if [ -L $$h ]; then rm -f $$h; fi; \
|
||||||
done; \
|
done; \
|
||||||
@ -158,101 +159,101 @@ copies: .PHONY .META
|
|||||||
.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS}
|
.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS}
|
||||||
cd ${SRCTOP}/sys; \
|
cd ${SRCTOP}/sys; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/$i
|
${SDESTDIR}${INCLUDEDIR}/$i
|
||||||
.endfor
|
.endfor
|
||||||
cd ${SRCTOP}/sys/dev/acpica; \
|
cd ${SRCTOP}/sys/dev/acpica; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/acpica; \
|
${SDESTDIR}${INCLUDEDIR}/dev/acpica; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/acpica
|
${SDESTDIR}${INCLUDEDIR}/dev/acpica
|
||||||
cd ${SRCTOP}/sys/dev/agp; \
|
cd ${SRCTOP}/sys/dev/agp; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/agp
|
${SDESTDIR}${INCLUDEDIR}/dev/agp
|
||||||
cd ${SRCTOP}/sys/dev/bktr; \
|
cd ${SRCTOP}/sys/dev/bktr; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/bktr
|
${SDESTDIR}${INCLUDEDIR}/dev/bktr
|
||||||
.if ${MK_NAND} != "no"
|
.if ${MK_NAND} != "no"
|
||||||
cd ${SRCTOP}/sys/dev/nand; \
|
cd ${SRCTOP}/sys/dev/nand; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nandsim.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/nand; \
|
${SDESTDIR}${INCLUDEDIR}/dev/nand; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/nand
|
${SDESTDIR}${INCLUDEDIR}/dev/nand
|
||||||
.endif
|
.endif
|
||||||
cd ${SRCTOP}/sys/dev/evdev; \
|
cd ${SRCTOP}/sys/dev/evdev; \
|
||||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/evdev; \
|
${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
|
||||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/evdev; \
|
${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
|
||||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/evdev
|
${SDESTDIR}${INCLUDEDIR}/dev/evdev
|
||||||
cd ${SRCTOP}/sys/dev/hyperv/include; \
|
cd ${SRCTOP}/sys/dev/hyperv/include; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hyperv.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/hyperv
|
${SDESTDIR}${INCLUDEDIR}/dev/hyperv
|
||||||
cd ${SRCTOP}/sys/dev/hyperv/utilities; \
|
cd ${SRCTOP}/sys/dev/hyperv/utilities; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/hyperv
|
${SDESTDIR}${INCLUDEDIR}/dev/hyperv
|
||||||
cd ${SRCTOP}/sys/dev/pci; \
|
cd ${SRCTOP}/sys/dev/pci; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/pci
|
${SDESTDIR}${INCLUDEDIR}/dev/pci
|
||||||
cd ${SRCTOP}/sys/fs/cd9660/; \
|
cd ${SRCTOP}/sys/fs/cd9660/; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/isofs/cd9660
|
${SDESTDIR}${INCLUDEDIR}/isofs/cd9660
|
||||||
.if ${MK_IPFILTER} != "no"
|
.if ${MK_IPFILTER} != "no"
|
||||||
cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \
|
cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/netinet
|
${SDESTDIR}${INCLUDEDIR}/netinet
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_PF} != "no"
|
.if ${MK_PF} != "no"
|
||||||
cd ${SRCTOP}/sys/netpfil/pf; \
|
cd ${SRCTOP}/sys/netpfil/pf; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/netpfil/pf
|
${SDESTDIR}${INCLUDEDIR}/netpfil/pf
|
||||||
.endif
|
.endif
|
||||||
cd ${SRCTOP}/sys/crypto; \
|
cd ${SRCTOP}/sys/crypto; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/crypto
|
${SDESTDIR}${INCLUDEDIR}/crypto
|
||||||
cd ${SRCTOP}/sys/opencrypto; \
|
cd ${SRCTOP}/sys/opencrypto; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/crypto
|
${SDESTDIR}${INCLUDEDIR}/crypto
|
||||||
cd ${SRCTOP}/sys/${MACHINE}/include; \
|
cd ${SRCTOP}/sys/${MACHINE}/include; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/machine
|
${SDESTDIR}${INCLUDEDIR}/machine
|
||||||
.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
|
.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
|
||||||
cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
|
cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/machine/pc
|
${SDESTDIR}${INCLUDEDIR}/machine/pc
|
||||||
.endif
|
.endif
|
||||||
.for _MARCH in ${_MARCHS}
|
.for _MARCH in ${_MARCHS}
|
||||||
.if exists(${SRCTOP}/sys/${_MARCH}/include)
|
.if exists(${SRCTOP}/sys/${_MARCH}/include)
|
||||||
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
||||||
cd ${SRCTOP}/sys/${_MARCH}/include; \
|
cd ${SRCTOP}/sys/${_MARCH}/include; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}
|
||||||
.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
|
.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
|
||||||
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
||||||
cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
|
cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
cd ${SRCTOP}/sys/rpc; \
|
cd ${SRCTOP}/sys/rpc; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 types.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 types.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/rpc
|
${SDESTDIR}${INCLUDEDIR}/rpc
|
||||||
cd ${SRCTOP}/sys/teken; \
|
cd ${SRCTOP}/sys/teken; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/teken
|
${SDESTDIR}${INCLUDEDIR}/teken
|
||||||
.if ${MK_CDDL} != "no"
|
.if ${MK_CDDL} != "no"
|
||||||
cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common; \
|
cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libzfs_core.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libzfs_core.h \
|
||||||
${DESTDIR}${INCLUDEDIR}
|
${SDESTDIR}${INCLUDEDIR}
|
||||||
cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair; \
|
cd ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libnvpair.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 libnvpair.h \
|
||||||
${DESTDIR}${INCLUDEDIR}
|
${SDESTDIR}${INCLUDEDIR}
|
||||||
cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \
|
cd ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys; \
|
||||||
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \
|
${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/sys
|
${SDESTDIR}${INCLUDEDIR}/sys
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
symlinks: .PHONY .META
|
symlinks: .PHONY .META
|
||||||
@ -260,115 +261,115 @@ symlinks: .PHONY .META
|
|||||||
.for i in ${LDIRS}
|
.for i in ${LDIRS}
|
||||||
cd ${SRCTOP}/sys/$i; \
|
cd ${SRCTOP}/sys/$i; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \
|
||||||
done
|
done
|
||||||
.endfor
|
.endfor
|
||||||
.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci}
|
.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci}
|
||||||
cd ${SRCTOP}/sys/$i; \
|
cd ${SRCTOP}/sys/$i; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \
|
||||||
done
|
done
|
||||||
.endfor
|
.endfor
|
||||||
cd ${SRCTOP}/sys/dev/acpica; \
|
cd ${SRCTOP}/sys/dev/acpica; \
|
||||||
for h in acpiio.h acpi_hpet.h; do \
|
for h in acpiio.h acpi_hpet.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/acpica/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/acpica/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/acpica; \
|
${SDESTDIR}${INCLUDEDIR}/dev/acpica; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/dev/agp; \
|
cd ${SRCTOP}/sys/dev/agp; \
|
||||||
for h in agpreg.h; do \
|
for h in agpreg.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/agp; \
|
${SDESTDIR}${INCLUDEDIR}/dev/agp; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/dev/bktr; \
|
cd ${SRCTOP}/sys/dev/bktr; \
|
||||||
for h in ioctl_*.h; do \
|
for h in ioctl_*.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/bktr; \
|
${SDESTDIR}${INCLUDEDIR}/dev/bktr; \
|
||||||
done
|
done
|
||||||
.if ${MK_NAND} != "no"
|
.if ${MK_NAND} != "no"
|
||||||
cd ${SRCTOP}/sys/dev/nand; \
|
cd ${SRCTOP}/sys/dev/nand; \
|
||||||
for h in nandsim.h nand_dev.h; do \
|
for h in nandsim.h nand_dev.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/nand/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/nand; \
|
${SDESTDIR}${INCLUDEDIR}/dev/nand; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
cd ${SRCTOP}/sys/dev/evdev; \
|
cd ${SRCTOP}/sys/dev/evdev; \
|
||||||
for h in input.h input-event-codes.h uinput.h; do \
|
for h in input.h input-event-codes.h uinput.h; do \
|
||||||
ln -fs ../../../../sys/dev/evdev/$$h \
|
ln -fs ../../../../sys/dev/evdev/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/evdev; \
|
${SDESTDIR}${INCLUDEDIR}/dev/evdev; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/dev/hyperv/include; \
|
cd ${SRCTOP}/sys/dev/hyperv/include; \
|
||||||
for h in hyperv.h; do \
|
for h in hyperv.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/include/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/include/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/hyperv; \
|
${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/dev/hyperv/utilities; \
|
cd ${SRCTOP}/sys/dev/hyperv/utilities; \
|
||||||
for h in hv_snapshot.h; do \
|
for h in hv_snapshot.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/hyperv; \
|
${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/dev/pci; \
|
cd ${SRCTOP}/sys/dev/pci; \
|
||||||
for h in pcireg.h; do \
|
for h in pcireg.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/dev/pci; \
|
${SDESTDIR}${INCLUDEDIR}/dev/pci; \
|
||||||
done
|
done
|
||||||
.for i in ${LSUBSUBDIRS}
|
.for i in ${LSUBSUBDIRS}
|
||||||
cd ${SRCTOP}/sys/$i; \
|
cd ${SRCTOP}/sys/$i; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \
|
||||||
done
|
done
|
||||||
.endfor
|
.endfor
|
||||||
.if ${MK_IPFILTER} != "no"
|
.if ${MK_IPFILTER} != "no"
|
||||||
cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \
|
cd ${SRCTOP}/sys/contrib/ipfilter/netinet; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/contrib/ipfilter/netinet/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/contrib/ipfilter/netinet/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/netinet; \
|
${SDESTDIR}${INCLUDEDIR}/netinet; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_PF} != "no"
|
.if ${MK_PF} != "no"
|
||||||
cd ${SRCTOP}/sys/netpfil/pf; \
|
cd ${SRCTOP}/sys/netpfil/pf; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/netpfil/pf/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/netpfil/pf/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/netpfil/pf; \
|
${SDESTDIR}${INCLUDEDIR}/netpfil/pf; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
cd ${SRCTOP}/sys/crypto; \
|
cd ${SRCTOP}/sys/crypto; \
|
||||||
for h in rijndael/rijndael.h; do \
|
for h in rijndael/rijndael.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/crypto/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/crypto/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/crypto; \
|
${SDESTDIR}${INCLUDEDIR}/crypto; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/opencrypto; \
|
cd ${SRCTOP}/sys/opencrypto; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/opencrypto/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/opencrypto/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/crypto; \
|
${SDESTDIR}${INCLUDEDIR}/crypto; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/${MACHINE}/include; \
|
cd ${SRCTOP}/sys/${MACHINE}/include; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${MACHINE}/include/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${MACHINE}/include/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/machine; \
|
${SDESTDIR}${INCLUDEDIR}/machine; \
|
||||||
done
|
done
|
||||||
.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
|
.if exists(${SRCTOP}/sys/${MACHINE}/include/pc)
|
||||||
cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
|
cd ${SRCTOP}/sys/${MACHINE}/include/pc; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${MACHINE}/include/pc/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${MACHINE}/include/pc/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/machine/pc; \
|
${SDESTDIR}${INCLUDEDIR}/machine/pc; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
.for _MARCH in ${_MARCHS}
|
.for _MARCH in ${_MARCHS}
|
||||||
.if exists(${SRCTOP}/sys/${_MARCH}/include)
|
.if exists(${SRCTOP}/sys/${_MARCH}/include)
|
||||||
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
||||||
cd ${SRCTOP}/sys/${_MARCH}/include; \
|
cd ${SRCTOP}/sys/${_MARCH}/include; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${_MARCH}/include/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/${_MARCH}/include/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \
|
||||||
done
|
done
|
||||||
.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
|
.if exists(${SRCTOP}/sys/${_MARCH}/include/pc)
|
||||||
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
||||||
cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
|
cd ${SRCTOP}/sys/${_MARCH}/include/pc; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${_MARCH}/include/pc/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/${_MARCH}/include/pc/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
@ -376,12 +377,12 @@ symlinks: .PHONY .META
|
|||||||
cd ${SRCTOP}/sys/fs/cd9660; \
|
cd ${SRCTOP}/sys/fs/cd9660; \
|
||||||
for h in *.h; do \
|
for h in *.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/fs/cd9660/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/fs/cd9660/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/isofs/cd9660; \
|
${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \
|
||||||
done
|
done
|
||||||
cd ${SRCTOP}/sys/rpc; \
|
cd ${SRCTOP}/sys/rpc; \
|
||||||
for h in types.h; do \
|
for h in types.h; do \
|
||||||
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \
|
${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/rpc; \
|
${SDESTDIR}${INCLUDEDIR}/rpc; \
|
||||||
done
|
done
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -62,7 +62,7 @@ typedef ___wchar_t wchar_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
|
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
|
||||||
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
|
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
|
||||||
typedef __max_align_t max_align_t;
|
typedef __max_align_t max_align_t;
|
||||||
#define __CLANG_MAX_ALIGN_T_DEFINED
|
#define __CLANG_MAX_ALIGN_T_DEFINED
|
||||||
|
@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
ENTRY(sigsetjmp)
|
ENTRY(sigsetjmp)
|
||||||
cmp x1, #0
|
cmp x1, #0
|
||||||
b.eq _C_LABEL(_setjmp)
|
b.eq 1f
|
||||||
b _C_LABEL(setjmp)
|
b _C_LABEL(setjmp)
|
||||||
|
1:
|
||||||
|
b _C_LABEL(_setjmp)
|
||||||
END(sigsetjmp)
|
END(sigsetjmp)
|
||||||
|
|
||||||
ENTRY(siglongjmp)
|
ENTRY(siglongjmp)
|
||||||
@ -45,8 +47,10 @@ ENTRY(siglongjmp)
|
|||||||
|
|
||||||
/* Check the magic */
|
/* Check the magic */
|
||||||
cmp x2, x3
|
cmp x2, x3
|
||||||
b.eq _C_LABEL(_longjmp)
|
b.eq 1f
|
||||||
b _C_LABEL(longjmp)
|
b _C_LABEL(longjmp)
|
||||||
|
1:
|
||||||
|
b _C_LABEL(_longjmp)
|
||||||
.align 3
|
.align 3
|
||||||
.Lmagic:
|
.Lmagic:
|
||||||
.quad _JB_MAGIC__SETJMP
|
.quad _JB_MAGIC__SETJMP
|
||||||
|
@ -129,8 +129,8 @@ syslog(int pri, const char *fmt, ...)
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
vsyslog(int pri, const char *fmt, va_list ap)
|
vsyslog1(int pri, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
char ch, *p;
|
char ch, *p;
|
||||||
@ -151,13 +151,9 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
|
|
||||||
saved_errno = errno;
|
saved_errno = errno;
|
||||||
|
|
||||||
THREAD_LOCK();
|
|
||||||
|
|
||||||
/* Check priority against setlogmask values. */
|
/* Check priority against setlogmask values. */
|
||||||
if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) {
|
if (!(LOG_MASK(LOG_PRI(pri)) & LogMask))
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* Set default facility if none specified. */
|
/* Set default facility if none specified. */
|
||||||
if ((pri & LOG_FACMASK) == 0)
|
if ((pri & LOG_FACMASK) == 0)
|
||||||
@ -167,10 +163,8 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
tbuf_cookie.base = tbuf;
|
tbuf_cookie.base = tbuf;
|
||||||
tbuf_cookie.left = sizeof(tbuf);
|
tbuf_cookie.left = sizeof(tbuf);
|
||||||
fp = fwopen(&tbuf_cookie, writehook);
|
fp = fwopen(&tbuf_cookie, writehook);
|
||||||
if (fp == NULL) {
|
if (fp == NULL)
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* Build the message. */
|
/* Build the message. */
|
||||||
(void)time(&now);
|
(void)time(&now);
|
||||||
@ -200,7 +194,6 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
fmt_fp = fwopen(&fmt_cookie, writehook);
|
fmt_fp = fwopen(&fmt_cookie, writehook);
|
||||||
if (fmt_fp == NULL) {
|
if (fmt_fp == NULL) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,10 +278,8 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
*/
|
*/
|
||||||
disconnectlog();
|
disconnectlog();
|
||||||
connectlog();
|
connectlog();
|
||||||
if (send(LogFile, tbuf, cnt, 0) >= 0) {
|
if (send(LogFile, tbuf, cnt, 0) >= 0)
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* if the resend failed, fall through to
|
* if the resend failed, fall through to
|
||||||
* possible scenario 2
|
* possible scenario 2
|
||||||
@ -303,15 +294,11 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
if (status == CONNPRIV)
|
if (status == CONNPRIV)
|
||||||
break;
|
break;
|
||||||
_usleep(1);
|
_usleep(1);
|
||||||
if (send(LogFile, tbuf, cnt, 0) >= 0) {
|
if (send(LogFile, tbuf, cnt, 0) >= 0)
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
THREAD_UNLOCK();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Output the message to the console; try not to block
|
* Output the message to the console; try not to block
|
||||||
@ -333,10 +320,25 @@ vsyslog(int pri, const char *fmt, va_list ap)
|
|||||||
(void)_writev(fd, iov, 2);
|
(void)_writev(fd, iov, 2);
|
||||||
(void)_close(fd);
|
(void)_close(fd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
syslog_cancel_cleanup(void *arg __unused)
|
||||||
|
{
|
||||||
|
|
||||||
THREAD_UNLOCK();
|
THREAD_UNLOCK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
vsyslog(int pri, const char *fmt, va_list ap)
|
||||||
|
{
|
||||||
|
|
||||||
|
THREAD_LOCK();
|
||||||
|
pthread_cleanup_push(syslog_cancel_cleanup, NULL);
|
||||||
|
vsyslog1(pri, fmt, ap);
|
||||||
|
pthread_cleanup_pop(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Should be called with mutex acquired */
|
/* Should be called with mutex acquired */
|
||||||
static void
|
static void
|
||||||
disconnectlog(void)
|
disconnectlog(void)
|
||||||
@ -423,9 +425,11 @@ openlog_unlocked(const char *ident, int logstat, int logfac)
|
|||||||
void
|
void
|
||||||
openlog(const char *ident, int logstat, int logfac)
|
openlog(const char *ident, int logstat, int logfac)
|
||||||
{
|
{
|
||||||
|
|
||||||
THREAD_LOCK();
|
THREAD_LOCK();
|
||||||
|
pthread_cleanup_push(syslog_cancel_cleanup, NULL);
|
||||||
openlog_unlocked(ident, logstat, logfac);
|
openlog_unlocked(ident, logstat, logfac);
|
||||||
THREAD_UNLOCK();
|
pthread_cleanup_pop(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ __sym_compat(statfs, freebsd11_statfs, FBSD_1.0);
|
|||||||
__sym_compat(mknod, freebsd11_mknod, FBSD_1.0);
|
__sym_compat(mknod, freebsd11_mknod, FBSD_1.0);
|
||||||
__sym_compat(mknodat, freebsd11_mknodat, FBSD_1.1);
|
__sym_compat(mknodat, freebsd11_mknodat, FBSD_1.1);
|
||||||
|
|
||||||
|
__sym_compat(kevent, freebsd11_kevent, FBSD_1.0);
|
||||||
|
|
||||||
#undef __sym_compat
|
#undef __sym_compat
|
||||||
|
|
||||||
#define __weak_reference(sym,alias) \
|
#define __weak_reference(sym,alias) \
|
||||||
|
@ -311,6 +311,7 @@ struct rusage;
|
|||||||
struct sigaction;
|
struct sigaction;
|
||||||
struct sockaddr;
|
struct sockaddr;
|
||||||
struct stat;
|
struct stat;
|
||||||
|
struct statfs;
|
||||||
struct timespec;
|
struct timespec;
|
||||||
struct timeval;
|
struct timeval;
|
||||||
struct timezone;
|
struct timezone;
|
||||||
@ -327,13 +328,16 @@ int __sys_clock_nanosleep(__clockid_t, int,
|
|||||||
const struct timespec *, struct timespec *);
|
const struct timespec *, struct timespec *);
|
||||||
int __sys_close(int);
|
int __sys_close(int);
|
||||||
int __sys_connect(int, const struct sockaddr *, __socklen_t);
|
int __sys_connect(int, const struct sockaddr *, __socklen_t);
|
||||||
__ssize_t __sys_getdirentries(int, char *, __size_t, __off_t *);
|
|
||||||
int __sys_fcntl(int, int, ...);
|
int __sys_fcntl(int, int, ...);
|
||||||
int __sys_fdatasync(int);
|
int __sys_fdatasync(int);
|
||||||
|
int __sys_fstat(int fd, struct stat *);
|
||||||
|
int __sys_fstatfs(int fd, struct statfs *);
|
||||||
int __sys_fstatat(int, const char *, struct stat *, int);
|
int __sys_fstatat(int, const char *, struct stat *, int);
|
||||||
int __sys_fsync(int);
|
int __sys_fsync(int);
|
||||||
__pid_t __sys_fork(void);
|
__pid_t __sys_fork(void);
|
||||||
int __sys_ftruncate(int, __off_t);
|
int __sys_ftruncate(int, __off_t);
|
||||||
|
__ssize_t __sys_getdirentries(int, char *, __size_t, __off_t *);
|
||||||
|
int __sys_getfsstat(struct statfs *, long, int);
|
||||||
int __sys_gettimeofday(struct timeval *, struct timezone *);
|
int __sys_gettimeofday(struct timeval *, struct timezone *);
|
||||||
int __sys_kevent(int, const struct kevent *, int, struct kevent *,
|
int __sys_kevent(int, const struct kevent *, int, struct kevent *,
|
||||||
int, const struct timespec *);
|
int, const struct timespec *);
|
||||||
@ -372,6 +376,7 @@ int __sys_sigtimedwait(const __sigset_t *, struct __siginfo *,
|
|||||||
const struct timespec *);
|
const struct timespec *);
|
||||||
int __sys_sigwait(const __sigset_t *, int *);
|
int __sys_sigwait(const __sigset_t *, int *);
|
||||||
int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *);
|
int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *);
|
||||||
|
int __sys_statfs(const char *, struct statfs *);
|
||||||
int __sys_swapcontext(struct __ucontext *,
|
int __sys_swapcontext(struct __ucontext *,
|
||||||
const struct __ucontext *);
|
const struct __ucontext *);
|
||||||
int __sys_thr_kill(long, int);
|
int __sys_thr_kill(long, int);
|
||||||
|
@ -499,14 +499,15 @@ local_rpcb(void)
|
|||||||
hostname = IN6_LOCALHOST_STRING;
|
hostname = IN6_LOCALHOST_STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endnetconfig(nc_handle);
|
|
||||||
if (tmpnconf == NULL) {
|
if (tmpnconf == NULL) {
|
||||||
|
endnetconfig(nc_handle);
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
||||||
mutex_unlock(&loopnconf_lock);
|
mutex_unlock(&loopnconf_lock);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
loopnconf = getnetconfigent(tmpnconf->nc_netid);
|
loopnconf = getnetconfigent(tmpnconf->nc_netid);
|
||||||
/* loopnconf is never freed */
|
/* loopnconf is never freed */
|
||||||
|
endnetconfig(nc_handle);
|
||||||
}
|
}
|
||||||
mutex_unlock(&loopnconf_lock);
|
mutex_unlock(&loopnconf_lock);
|
||||||
client = getclnthandle(hostname, loopnconf, NULL);
|
client = getclnthandle(hostname, loopnconf, NULL);
|
||||||
|
@ -37,6 +37,14 @@ SRCS+= \
|
|||||||
|
|
||||||
SRCS+= getdents.c lstat.c mknod.c stat.c
|
SRCS+= getdents.c lstat.c mknod.c stat.c
|
||||||
|
|
||||||
|
SRCS+= fstat.c fstatat.c fstatfs.c getfsstat.c statfs.c
|
||||||
|
NOASM+= fstat.o fstatat.o fstatfs.o getfsstat.o statfs.o
|
||||||
|
PSEUDO+= _fstat.o _fstatat.o _fstatfs.o _getfsstat.o _statfs.o
|
||||||
|
|
||||||
|
SRCS+= getdirentries.c
|
||||||
|
NOASM+= getdirentries.o
|
||||||
|
PSEUDO+= _getdirentries.o
|
||||||
|
|
||||||
SRCS+= pipe.c
|
SRCS+= pipe.c
|
||||||
|
|
||||||
INTERPOSED = \
|
INTERPOSED = \
|
||||||
@ -421,8 +429,7 @@ MLINKS+=open.2 openat.2
|
|||||||
MLINKS+=pathconf.2 fpathconf.2
|
MLINKS+=pathconf.2 fpathconf.2
|
||||||
MLINKS+=pathconf.2 lpathconf.2
|
MLINKS+=pathconf.2 lpathconf.2
|
||||||
MLINKS+=pdfork.2 pdgetpid.2\
|
MLINKS+=pdfork.2 pdgetpid.2\
|
||||||
pdfork.2 pdkill.2 \
|
pdfork.2 pdkill.2
|
||||||
pdfork.2 pdwait4.2
|
|
||||||
MLINKS+=pipe.2 pipe2.2
|
MLINKS+=pipe.2 pipe2.2
|
||||||
MLINKS+=poll.2 ppoll.2
|
MLINKS+=poll.2 ppoll.2
|
||||||
MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \
|
MLINKS+=rctl_add_rule.2 rctl_get_limits.2 \
|
||||||
|
@ -121,7 +121,6 @@ FBSD_1.0 {
|
|||||||
jail;
|
jail;
|
||||||
jail_attach;
|
jail_attach;
|
||||||
kenv;
|
kenv;
|
||||||
kevent;
|
|
||||||
kill;
|
kill;
|
||||||
kldfind;
|
kldfind;
|
||||||
kldfirstmod;
|
kldfirstmod;
|
||||||
@ -393,6 +392,7 @@ FBSD_1.5 {
|
|||||||
getdents;
|
getdents;
|
||||||
getdirentries;
|
getdirentries;
|
||||||
getfsstat;
|
getfsstat;
|
||||||
|
kevent;
|
||||||
lstat;
|
lstat;
|
||||||
mknod;
|
mknod;
|
||||||
mknodat;
|
mknodat;
|
||||||
|
102
lib/libc/sys/compat-ino64.h
Normal file
102
lib/libc/sys/compat-ino64.h
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*-
|
||||||
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
|
* 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$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Forward compatibility shim to convert old stat buffer to
|
||||||
|
* new so we can call the old system call, but return data in
|
||||||
|
* the new system call's format.
|
||||||
|
*/
|
||||||
|
#define _WANT_FREEBSD11_STATFS
|
||||||
|
#include <sys/fcntl.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
|
||||||
|
#define _WANT_FREEBSD11_STAT
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define INO64_FIRST 1200031
|
||||||
|
|
||||||
|
static __inline void
|
||||||
|
__stat11_to_stat(const struct freebsd11_stat *sb11, struct stat *sb)
|
||||||
|
{
|
||||||
|
|
||||||
|
sb->st_dev = sb11->st_dev;
|
||||||
|
sb->st_ino = sb11->st_ino;
|
||||||
|
sb->st_nlink = sb11->st_nlink;
|
||||||
|
sb->st_mode = sb11->st_mode;
|
||||||
|
sb->st_uid = sb11->st_uid;
|
||||||
|
sb->st_gid = sb11->st_gid;
|
||||||
|
sb->st_rdev = sb11->st_rdev;
|
||||||
|
sb->st_atim = sb11->st_atim;
|
||||||
|
sb->st_mtim = sb11->st_mtim;
|
||||||
|
sb->st_ctim = sb11->st_ctim;
|
||||||
|
#ifdef __STAT_TIME_T_EXT
|
||||||
|
sb->st_atim_ext = 0;
|
||||||
|
sb->st_mtim_ext = 0;
|
||||||
|
sb->st_ctim_ext = 0;
|
||||||
|
sb->st_btim_ext = 0;
|
||||||
|
#endif
|
||||||
|
sb->st_birthtim = sb11->st_birthtim;
|
||||||
|
sb->st_size = sb11->st_size;
|
||||||
|
sb->st_blocks = sb11->st_blocks;
|
||||||
|
sb->st_blksize = sb11->st_blksize;
|
||||||
|
sb->st_flags = sb11->st_flags;
|
||||||
|
sb->st_gen = sb11->st_gen;
|
||||||
|
sb->st_padding0 = 0;
|
||||||
|
sb->st_padding1 = 0;
|
||||||
|
memset(sb->st_spare, 0, sizeof(sb->st_spare));
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline void
|
||||||
|
__statfs11_to_statfs(const struct freebsd11_statfs *sf11, struct statfs *sf)
|
||||||
|
{
|
||||||
|
|
||||||
|
sf->f_version = STATFS_VERSION;
|
||||||
|
sf->f_type = sf11->f_type;
|
||||||
|
sf->f_flags = sf11->f_flags;
|
||||||
|
sf->f_bsize = sf11->f_bsize;
|
||||||
|
sf->f_iosize = sf11->f_iosize;
|
||||||
|
sf->f_blocks = sf11->f_blocks;
|
||||||
|
sf->f_bfree = sf11->f_bfree;
|
||||||
|
sf->f_bavail = sf11->f_bavail;
|
||||||
|
sf->f_files = sf11->f_files;
|
||||||
|
sf->f_ffree = sf11->f_ffree;
|
||||||
|
sf->f_syncwrites = sf11->f_syncwrites;
|
||||||
|
sf->f_asyncwrites = sf11->f_asyncwrites;
|
||||||
|
sf->f_syncreads = sf11->f_syncreads;
|
||||||
|
sf->f_asyncreads = sf11->f_asyncreads;
|
||||||
|
sf->f_namemax = sf11->f_namemax;
|
||||||
|
sf->f_owner = sf11->f_owner;
|
||||||
|
sf->f_fsid = sf11->f_fsid;
|
||||||
|
memset(sf->f_spare, 0, sizeof(sf->f_spare));
|
||||||
|
memset(sf->f_charspare, 0, sizeof(sf->f_charspare));
|
||||||
|
strlcpy(sf->f_fstypename, sf11->f_fstypename, sizeof(sf->f_fstypename));
|
||||||
|
strlcpy(sf->f_mntfromname, sf11->f_mntfromname, sizeof(sf->f_mntfromname));
|
||||||
|
strlcpy(sf->f_mntonname, sf11->f_mntonname, sizeof(sf->f_mntonname));
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2016 Emmanuel Vadot <manu@bidouilliste.com>
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -22,24 +22,33 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sun6i-a31s-sinovoip-bpi-m2.dts"
|
#include <sys/cdefs.h>
|
||||||
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
&mmc2 {
|
#include "namespace.h"
|
||||||
status = "disabled";
|
#include <sys/param.h>
|
||||||
};
|
#include <sys/syscall.h>
|
||||||
|
#include "compat-ino64.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
&p2wi {
|
#include "libc_private.h"
|
||||||
status = "okay";
|
|
||||||
axp22x: pmic@68 {
|
|
||||||
compatible = "x-powers,axp221";
|
|
||||||
reg = <0x68>;
|
|
||||||
interrupt-parent = <&nmi_intc>;
|
|
||||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "axp22x.dtsi"
|
#undef fstat
|
||||||
|
__weak_reference(_fstat, fstat);
|
||||||
|
|
||||||
|
#pragma weak _fstat
|
||||||
|
int
|
||||||
|
_fstat(int fd, struct stat *sb)
|
||||||
|
{
|
||||||
|
struct freebsd11_stat stat11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_fstat(fd, sb));
|
||||||
|
rv = syscall(SYS_freebsd11_fstat, fd, &stat11);
|
||||||
|
if (rv == 0)
|
||||||
|
__stat11_to_stat(&stat11, sb);
|
||||||
|
return (rv);
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org>
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -22,27 +22,29 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sun7i-a20-pcduino3.dts"
|
#include <sys/cdefs.h>
|
||||||
#include "sun7i-a20-hdmi.dtsi"
|
__FBSDID("$FreeBSD$");
|
||||||
#include "xpowers-axp209.dtsi"
|
|
||||||
|
|
||||||
/ {
|
#include "namespace.h"
|
||||||
soc@01c00000 {
|
#include <sys/param.h>
|
||||||
hdmi@01c16000 {
|
#include <sys/syscall.h>
|
||||||
status = "okay";
|
#include "compat-ino64.h"
|
||||||
};
|
#include <unistd.h>
|
||||||
|
|
||||||
hdmiaudio {
|
#include "libc_private.h"
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&gmac {
|
int
|
||||||
pinctrl-0 = <&gmac_pins_rgmii_a>;
|
fstatat(int fd, const char *path, struct stat *sb, int flag)
|
||||||
phy-mode = "rgmii";
|
{
|
||||||
};
|
struct freebsd11_stat stat11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_fstatat(fd, path, sb, flag));
|
||||||
|
rv = syscall(SYS_freebsd11_fstatat, fd, path, &stat11, flag);
|
||||||
|
if (rv == 0)
|
||||||
|
__stat11_to_stat(&stat11, sb);
|
||||||
|
return (rv);
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org>
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* Copyright (c) 2016 Emmanuel Vadot <manu@bidouilliste.com>
|
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -23,22 +22,33 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sun7i-a20-cubieboard2.dts"
|
#include <sys/cdefs.h>
|
||||||
#include "sun7i-a20-hdmi.dtsi"
|
__FBSDID("$FreeBSD$");
|
||||||
#include "xpowers-axp209.dtsi"
|
|
||||||
|
|
||||||
/ {
|
#include "namespace.h"
|
||||||
soc@01c00000 {
|
#include <sys/param.h>
|
||||||
hdmi@01c16000 {
|
#include <sys/syscall.h>
|
||||||
status = "okay";
|
#include "compat-ino64.h"
|
||||||
};
|
#include <unistd.h>
|
||||||
|
|
||||||
hdmiaudio {
|
#include "libc_private.h"
|
||||||
status = "okay";
|
|
||||||
};
|
#undef fstatfs
|
||||||
};
|
__weak_reference(_fstatfs, fstatfs);
|
||||||
};
|
|
||||||
|
#pragma weak _fstatfs
|
||||||
|
int
|
||||||
|
_fstatfs(int fd, struct statfs *buf)
|
||||||
|
{
|
||||||
|
struct freebsd11_statfs statfs11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_fstatfs(fd, buf));
|
||||||
|
rv = syscall(SYS_freebsd11_fstatfs, fd, &statfs11);
|
||||||
|
if (rv == 0)
|
||||||
|
__statfs11_to_statfs(&statfs11, buf);
|
||||||
|
return (rv);
|
||||||
|
}
|
@ -36,6 +36,11 @@ __FBSDID("$FreeBSD$");
|
|||||||
ssize_t
|
ssize_t
|
||||||
getdents(int fd, char *buf, size_t nbytes)
|
getdents(int fd, char *buf, size_t nbytes)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* _getdirentries knows how to call the right thing and
|
||||||
|
* return it in the new format. It assumes that the entire
|
||||||
|
* libc expecting the new format.
|
||||||
|
*/
|
||||||
|
|
||||||
return (__sys_getdirentries(fd, buf, nbytes, NULL));
|
return (_getdirentries(fd, buf, nbytes, NULL));
|
||||||
}
|
}
|
||||||
|
117
lib/libc/sys/getdirentries.c
Normal file
117
lib/libc/sys/getdirentries.c
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*-
|
||||||
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
#define _WANT_FREEBSD11_DIRENT
|
||||||
|
|
||||||
|
#include "namespace.h"
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include "compat-ino64.h"
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "libc_private.h"
|
||||||
|
|
||||||
|
static ssize_t
|
||||||
|
__cvt_dirents_from11(const char *de11, ssize_t len11, char *de, ssize_t len)
|
||||||
|
{
|
||||||
|
struct dirent *dst;
|
||||||
|
const struct freebsd11_dirent *src;
|
||||||
|
const char *edst, *esrc;
|
||||||
|
ssize_t rlen;
|
||||||
|
|
||||||
|
src = (const struct freebsd11_dirent *)de11;
|
||||||
|
dst = (struct dirent *)de;
|
||||||
|
esrc = de11 + len11;
|
||||||
|
edst = de + len;
|
||||||
|
while ((const char *)src < esrc && (const char *)dst < edst) {
|
||||||
|
rlen = roundup(offsetof(struct dirent, d_name) + src->d_namlen + 1, 8);
|
||||||
|
if ((const char *)dst + rlen >= edst)
|
||||||
|
break;
|
||||||
|
dst->d_fileno = src->d_fileno;
|
||||||
|
dst->d_off = 0; /* nothing uses it yet, so safe for now */
|
||||||
|
dst->d_reclen = rlen;
|
||||||
|
dst->d_type = src->d_type;
|
||||||
|
dst->d_pad0 = 0;
|
||||||
|
dst->d_namlen = src->d_namlen;
|
||||||
|
dst->d_pad1 = 0;
|
||||||
|
memset(dst->d_name, 0, roundup(src->d_namlen + 1, 8));
|
||||||
|
memcpy(dst->d_name, src->d_name, src->d_namlen);
|
||||||
|
dst = (struct dirent *)((char *)dst + rlen);
|
||||||
|
src = (const struct freebsd11_dirent *)((const char *)src + src->d_reclen);
|
||||||
|
}
|
||||||
|
return ((char *)dst - de);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef getdirentries
|
||||||
|
__weak_reference(_getdirentries, getdirentries);
|
||||||
|
|
||||||
|
#pragma weak _getdirentries
|
||||||
|
ssize_t
|
||||||
|
_getdirentries(int fd, char *buf, size_t nbytes, off_t *basep)
|
||||||
|
{
|
||||||
|
char *oldbuf;
|
||||||
|
size_t len;
|
||||||
|
ssize_t rv;
|
||||||
|
|
||||||
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_getdirentries(fd, buf, nbytes, basep));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Because the old system call returns entries that are smaller than the
|
||||||
|
* new, we could wind up in a situation where we have too many to fit in
|
||||||
|
* the buffer with the new encoding. So sacrifice a small bit of
|
||||||
|
* efficiency to ensure that never happens. We pick 1/4 the size round
|
||||||
|
* up to the next DIRBLKSIZ. This will guarnatee enough room exists in
|
||||||
|
* the dst buffer due to changes in efficiency in packing dirent
|
||||||
|
* entries. We don't check against minimum block size to avoid a lot of
|
||||||
|
* stat calls, we'll see if that's wise or not.
|
||||||
|
* TBD: Will this difference matter to lseek?
|
||||||
|
*/
|
||||||
|
len = roundup(nbytes / 4, DIRBLKSIZ);
|
||||||
|
oldbuf = malloc(len);
|
||||||
|
if (oldbuf == NULL) {
|
||||||
|
errno = EINVAL; /* ENOMEM not in possible list */
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
rv = syscall(SYS_freebsd11_getdirentries, fd, oldbuf, len, basep);
|
||||||
|
if (rv == -1) {
|
||||||
|
free(oldbuf);
|
||||||
|
return (rv);
|
||||||
|
}
|
||||||
|
if (rv > 0)
|
||||||
|
rv = __cvt_dirents_from11(oldbuf, rv, buf, nbytes);
|
||||||
|
free(oldbuf);
|
||||||
|
|
||||||
|
return (rv);
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2015 Emmanuel Vadot <manu@bidouilliste.com>
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -22,64 +22,44 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sun7i-a20-olimex-som-evb.dts"
|
#include <sys/cdefs.h>
|
||||||
#include "sun7i-a20-hdmi.dtsi"
|
__FBSDID("$FreeBSD$");
|
||||||
#include "xpowers-axp209.dtsi"
|
|
||||||
|
|
||||||
/ {
|
#include "namespace.h"
|
||||||
soc@01c00000 {
|
#include <sys/param.h>
|
||||||
hdmi@01c16000 {
|
#include "compat-ino64.h"
|
||||||
status = "okay";
|
#include <sys/errno.h>
|
||||||
};
|
#include <sys/syscall.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
hdmiaudio {
|
#include "libc_private.h"
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cpu0 {
|
int
|
||||||
cpu-supply = <®_dcdc2>;
|
getfsstat(struct statfs *buf, long bufsize, int flags)
|
||||||
};
|
{
|
||||||
|
struct freebsd11_statfs *statfs11 = NULL;
|
||||||
|
ssize_t len = 0;
|
||||||
|
int rv, i;
|
||||||
|
|
||||||
&i2c1 {
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
pinctrl-names = "default";
|
return (__sys_getfsstat(buf, bufsize, flags));
|
||||||
pinctrl-0 = <&i2c1_pins_a>;
|
if (buf != NULL) {
|
||||||
status = "okay";
|
len = sizeof(struct freebsd11_statfs) * /* Round down on purpose to avoid */
|
||||||
};
|
(bufsize / sizeof(struct statfs)); /* overflow on translation. */
|
||||||
|
statfs11 = malloc(len);
|
||||||
&i2c2 {
|
if (statfs11 == NULL) {
|
||||||
pinctrl-names = "default";
|
errno = ENOMEM;
|
||||||
pinctrl-0 = <&i2c2_pins_a>;
|
return (-1);
|
||||||
status = "okay";
|
}
|
||||||
};
|
}
|
||||||
|
rv = syscall(SYS_freebsd11_getfsstat, statfs11, len, flags);
|
||||||
&spi1 {
|
if (rv != -1 && buf != NULL) {
|
||||||
pinctrl-names = "default";
|
for (i = 0; i < rv; i++)
|
||||||
pinctrl-0 = <&spi1_pins_a>,
|
__statfs11_to_statfs(&statfs11[i], &buf[i]);
|
||||||
<&spi1_cs0_pins_a>;
|
}
|
||||||
status = "okay";
|
free(statfs11);
|
||||||
};
|
return (rv);
|
||||||
|
}
|
||||||
&spi2 {
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&spi2_pins_a>,
|
|
||||||
<&spi2_cs0_pins_a>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart6 {
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&uart6_pins_a>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart7 {
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&uart7_pins_a>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd April 18, 2017
|
.Dd June 22, 2017
|
||||||
.Dt KQUEUE 2
|
.Dt KQUEUE 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -148,12 +148,13 @@ The
|
|||||||
structure is defined as:
|
structure is defined as:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
struct kevent {
|
struct kevent {
|
||||||
uintptr_t ident; /* identifier for this event */
|
uintptr_t ident; /* identifier for this event */
|
||||||
short filter; /* filter for event */
|
short filter; /* filter for event */
|
||||||
u_short flags; /* action flags for kqueue */
|
u_short flags; /* action flags for kqueue */
|
||||||
u_int fflags; /* filter flag value */
|
u_int fflags; /* filter flag value */
|
||||||
intptr_t data; /* filter data value */
|
int64_t data; /* filter data value */
|
||||||
void *udata; /* opaque user data identifier */
|
void *udata; /* opaque user data identifier */
|
||||||
|
uint64_t ext[4]; /* extentions */
|
||||||
};
|
};
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
@ -177,6 +178,20 @@ Filter-specific flags.
|
|||||||
Filter-specific data value.
|
Filter-specific data value.
|
||||||
.It Fa udata
|
.It Fa udata
|
||||||
Opaque user-defined value passed through the kernel unchanged.
|
Opaque user-defined value passed through the kernel unchanged.
|
||||||
|
.It Fa ext
|
||||||
|
Extended data passed to and from kernel.
|
||||||
|
The
|
||||||
|
.Fa ext[0]
|
||||||
|
and
|
||||||
|
.Fa ext[1]
|
||||||
|
members use is defined by the filter.
|
||||||
|
If the filter does not use them, the members are copied unchanged.
|
||||||
|
The
|
||||||
|
.Fa ext[2]
|
||||||
|
and
|
||||||
|
.Fa ext[3]
|
||||||
|
members are always passed throught the kernel as-is,
|
||||||
|
making additional context available to application.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
@ -336,33 +351,18 @@ case.
|
|||||||
Takes a descriptor as the identifier, and returns whenever
|
Takes a descriptor as the identifier, and returns whenever
|
||||||
there is no remaining data in the write buffer.
|
there is no remaining data in the write buffer.
|
||||||
.It Dv EVFILT_AIO
|
.It Dv EVFILT_AIO
|
||||||
The sigevent portion of the AIO request is filled in, with
|
Events for this filter are not registered with
|
||||||
.Va sigev_notify_kqueue
|
.Fn kevent
|
||||||
containing the descriptor of the kqueue that the event should
|
directly but are registered via the
|
||||||
be attached to,
|
.Va aio_sigevent
|
||||||
.Va sigev_notify_kevent_flags
|
member of an asychronous I/O request when it is scheduled via an asychronous I/O
|
||||||
containing the kevent flags which should be
|
system call such as
|
||||||
.Dv EV_ONESHOT ,
|
.Fn aio_read .
|
||||||
.Dv EV_CLEAR
|
|
||||||
or
|
|
||||||
.Dv EV_DISPATCH ,
|
|
||||||
.Va sigev_value
|
|
||||||
containing the udata value, and
|
|
||||||
.Va sigev_notify
|
|
||||||
set to
|
|
||||||
.Dv SIGEV_KEVENT .
|
|
||||||
When the
|
|
||||||
.Fn aio_*
|
|
||||||
system call is made, the event will be registered
|
|
||||||
with the specified kqueue, and the
|
|
||||||
.Va ident
|
|
||||||
argument set to the
|
|
||||||
.Fa struct aiocb
|
|
||||||
returned by the
|
|
||||||
.Fn aio_*
|
|
||||||
system call.
|
|
||||||
The filter returns under the same conditions as
|
The filter returns under the same conditions as
|
||||||
.Fn aio_error .
|
.Fn aio_error .
|
||||||
|
For more details on this filter see
|
||||||
|
.Xr sigevent 3 and
|
||||||
|
.Xr aio 4 .
|
||||||
.It Dv EVFILT_VNODE
|
.It Dv EVFILT_VNODE
|
||||||
Takes a file descriptor as the identifier and the events to watch for in
|
Takes a file descriptor as the identifier and the events to watch for in
|
||||||
.Va fflags ,
|
.Va fflags ,
|
||||||
@ -515,16 +515,26 @@ Establishes an arbitrary timer identified by
|
|||||||
.Va ident .
|
.Va ident .
|
||||||
When adding a timer,
|
When adding a timer,
|
||||||
.Va data
|
.Va data
|
||||||
specifies the timeout period.
|
specifies the moment to fire the timer (for
|
||||||
|
.Dv NOTE_ABSTIME )
|
||||||
|
or the timeout period.
|
||||||
The timer will be periodic unless
|
The timer will be periodic unless
|
||||||
.Dv EV_ONESHOT
|
.Dv EV_ONESHOT
|
||||||
|
or
|
||||||
|
.Dv NOTE_ABSTIME
|
||||||
is specified.
|
is specified.
|
||||||
On return,
|
On return,
|
||||||
.Va data
|
.Va data
|
||||||
contains the number of times the timeout has expired since the last call to
|
contains the number of times the timeout has expired since the last call to
|
||||||
.Fn kevent .
|
.Fn kevent .
|
||||||
This filter automatically sets the EV_CLEAR flag internally.
|
For non-monotonic timers, this filter automatically sets the
|
||||||
.Bl -tag -width "Dv NOTE_USECONDS"
|
.Dv EV_CLEAR
|
||||||
|
flag internally.
|
||||||
|
.Pp
|
||||||
|
The filter accepts the following flags in the
|
||||||
|
.Va fflags
|
||||||
|
argument:
|
||||||
|
.Bl -tag -width "Dv NOTE_MSECONDS"
|
||||||
.It Dv NOTE_SECONDS
|
.It Dv NOTE_SECONDS
|
||||||
.Va data
|
.Va data
|
||||||
is in seconds.
|
is in seconds.
|
||||||
@ -537,6 +547,8 @@ is in microseconds.
|
|||||||
.It Dv NOTE_NSECONDS
|
.It Dv NOTE_NSECONDS
|
||||||
.Va data
|
.Va data
|
||||||
is in nanoseconds.
|
is in nanoseconds.
|
||||||
|
.It Dv NOTE_ABSTIME
|
||||||
|
The specified expiration time is absolute.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
If
|
If
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* Copyright (c) 2012 Gleb Kurtsou <gleb@FreeBSD.org>
|
* Copyright (c) 2012 Gleb Kurtsou <gleb@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -29,15 +30,22 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/fcntl.h>
|
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include "compat-ino64.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
lstat(const char *path, struct stat *sb)
|
lstat(const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
|
struct freebsd11_stat stat11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW));
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW));
|
||||||
|
rv = syscall(SYS_freebsd11_lstat, path, &stat11);
|
||||||
|
if (rv == 0)
|
||||||
|
__stat11_to_stat(&stat11, sb);
|
||||||
|
return (rv);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
|
.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd February 4, 2017
|
.Dd June 22, 2017
|
||||||
.Dt MMAP 2
|
.Dt MMAP 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -69,7 +69,7 @@ current) offsets in the object.
|
|||||||
In particular, the
|
In particular, the
|
||||||
.Fa offset
|
.Fa offset
|
||||||
value cannot be negative.
|
value cannot be negative.
|
||||||
If the object is truncated and the process later accesses a pages that
|
If the object is truncated and the process later accesses a page that
|
||||||
is wholly within the truncated region, the access is aborted and a
|
is wholly within the truncated region, the access is aborted and a
|
||||||
.Dv SIGBUS
|
.Dv SIGBUS
|
||||||
signal is delivered to the process.
|
signal is delivered to the process.
|
||||||
@ -199,9 +199,21 @@ In contrast, if
|
|||||||
.Dv MAP_EXCL
|
.Dv MAP_EXCL
|
||||||
is specified, the request will fail if a mapping
|
is specified, the request will fail if a mapping
|
||||||
already exists within the range.
|
already exists within the range.
|
||||||
.It Dv MAP_HASSEMAPHORE
|
.It Dv MAP_GUARD
|
||||||
Notify the kernel that the region may contain semaphores and that special
|
Instead of a mapping, create a guard of the specified size.
|
||||||
handling may be necessary.
|
Guards allow a process to create reservations in its address space,
|
||||||
|
which can later be replaced by actual mappings.
|
||||||
|
.Pp
|
||||||
|
.Fa mmap
|
||||||
|
will not create mappings in the address range of a guard unless
|
||||||
|
the request specifies
|
||||||
|
.Dv MAP_FIXED .
|
||||||
|
Guards can be destroyed with
|
||||||
|
.Xr munmap 2 .
|
||||||
|
Any memory access by a thread to the guarded range results
|
||||||
|
in the delivery of a
|
||||||
|
.Dv SIGSEGV
|
||||||
|
signal to that thread.
|
||||||
.It Dv MAP_NOCORE
|
.It Dv MAP_NOCORE
|
||||||
Region is not included in a core file.
|
Region is not included in a core file.
|
||||||
.It Dv MAP_NOSYNC
|
.It Dv MAP_NOSYNC
|
||||||
@ -306,6 +318,7 @@ must include at least
|
|||||||
.Dv PROT_READ
|
.Dv PROT_READ
|
||||||
and
|
and
|
||||||
.Dv PROT_WRITE .
|
.Dv PROT_WRITE .
|
||||||
|
.Pp
|
||||||
This option creates
|
This option creates
|
||||||
a memory region that grows to at most
|
a memory region that grows to at most
|
||||||
.Fa len
|
.Fa len
|
||||||
@ -316,6 +329,10 @@ stack top is the starting address returned by the call, plus
|
|||||||
bytes.
|
bytes.
|
||||||
The bottom of the stack at maximum growth is the starting
|
The bottom of the stack at maximum growth is the starting
|
||||||
address returned by the call.
|
address returned by the call.
|
||||||
|
The system uses guards to prevent the inadvertent use of
|
||||||
|
regions into which stacks created with
|
||||||
|
.Dv MAP_STACK
|
||||||
|
will automatically grow, without mapping the whole stack in advance.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
@ -409,6 +426,7 @@ were specified.
|
|||||||
.It Bq Er EINVAL
|
.It Bq Er EINVAL
|
||||||
None of
|
None of
|
||||||
.Dv MAP_ANON ,
|
.Dv MAP_ANON ,
|
||||||
|
.Dv MAP_GUARD ,
|
||||||
.Dv MAP_PRIVATE ,
|
.Dv MAP_PRIVATE ,
|
||||||
.Dv MAP_SHARED ,
|
.Dv MAP_SHARED ,
|
||||||
or
|
or
|
||||||
@ -458,6 +476,25 @@ were specified, but the requested region is already used by a mapping.
|
|||||||
was specified, but
|
was specified, but
|
||||||
.Dv MAP_FIXED
|
.Dv MAP_FIXED
|
||||||
was not.
|
was not.
|
||||||
|
.It Bq Er EINVAL
|
||||||
|
.Dv MAP_GUARD
|
||||||
|
was specified, but the
|
||||||
|
.Fa offset
|
||||||
|
argument was not zero, the
|
||||||
|
.Fa fd
|
||||||
|
argument was not -1, or the
|
||||||
|
.Fa prot
|
||||||
|
argument was not
|
||||||
|
.Dv PROT_NONE .
|
||||||
|
.It Bq Er EINVAL
|
||||||
|
.Dv MAP_GUARD
|
||||||
|
was specified together with one of the flags
|
||||||
|
.Dv MAP_ANON ,
|
||||||
|
.Dv MAP_PREFAULT ,
|
||||||
|
.Dv MAP_PREFAULT_READ ,
|
||||||
|
.Dv MAP_PRIVATE ,
|
||||||
|
.Dv MAP_SHARED ,
|
||||||
|
.Dv MAP_STACK .
|
||||||
.It Bq Er ENODEV
|
.It Bq Er ENODEV
|
||||||
.Dv MAP_ANON
|
.Dv MAP_ANON
|
||||||
has not been specified and
|
has not been specified and
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
.\" @(#)munmap.2 8.3 (Berkeley) 5/27/94
|
.\" @(#)munmap.2 8.3 (Berkeley) 5/27/94
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd May 27, 1994
|
.Dd June 22, 2017
|
||||||
.Dt MUNMAP 2
|
.Dt MUNMAP 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -44,7 +44,7 @@
|
|||||||
The
|
The
|
||||||
.Fn munmap
|
.Fn munmap
|
||||||
system call
|
system call
|
||||||
deletes the mappings for the specified address range,
|
deletes the mappings and guards for the specified address range,
|
||||||
and causes further references to addresses within the range
|
and causes further references to addresses within the range
|
||||||
to generate invalid memory references.
|
to generate invalid memory references.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
|
@ -32,14 +32,13 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 8, 2016
|
.Dd June 17, 2017
|
||||||
.Dt PDFORK 2
|
.Dt PDFORK 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm pdfork ,
|
.Nm pdfork ,
|
||||||
.Nm pdgetpid ,
|
.Nm pdgetpid ,
|
||||||
.Nm pdkill ,
|
.Nm pdkill
|
||||||
.Nm pdwait4
|
|
||||||
.Nd System calls to manage process descriptors
|
.Nd System calls to manage process descriptors
|
||||||
.Sh LIBRARY
|
.Sh LIBRARY
|
||||||
.Lb libc
|
.Lb libc
|
||||||
@ -51,8 +50,6 @@
|
|||||||
.Fn pdgetpid "int fd" "pid_t *pidp"
|
.Fn pdgetpid "int fd" "pid_t *pidp"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn pdkill "int fd" "int signum"
|
.Fn pdkill "int fd" "int signum"
|
||||||
.Ft int
|
|
||||||
.Fn pdwait4 "int fd" "int *status" "int options" "struct rusage *rusage"
|
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
Process descriptors are special file descriptors that represent processes,
|
Process descriptors are special file descriptors that represent processes,
|
||||||
and are created using
|
and are created using
|
||||||
@ -96,11 +93,6 @@ except that it accepts a process descriptor,
|
|||||||
.Fa fd ,
|
.Fa fd ,
|
||||||
rather than a PID.
|
rather than a PID.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn pdwait4
|
|
||||||
behaves identically to
|
|
||||||
.Xr wait4 2 ,
|
|
||||||
but operates with respect to a process descriptor argument rather than a PID.
|
|
||||||
.Pp
|
|
||||||
The following system calls also have effects specific to process descriptors:
|
The following system calls also have effects specific to process descriptors:
|
||||||
.Pp
|
.Pp
|
||||||
.Xr fstat 2
|
.Xr fstat 2
|
||||||
@ -146,9 +138,6 @@ does.
|
|||||||
and
|
and
|
||||||
.Fn pdkill
|
.Fn pdkill
|
||||||
return 0 on success and -1 on failure.
|
return 0 on success and -1 on failure.
|
||||||
.Pp
|
|
||||||
.Fn pdwait4
|
|
||||||
returns a PID on success and -1 on failure.
|
|
||||||
.Sh ERRORS
|
.Sh ERRORS
|
||||||
These functions may return the same error numbers as their PID-based equivalents
|
These functions may return the same error numbers as their PID-based equivalents
|
||||||
(e.g.
|
(e.g.
|
||||||
@ -180,9 +169,8 @@ for
|
|||||||
The
|
The
|
||||||
.Fn pdfork ,
|
.Fn pdfork ,
|
||||||
.Fn pdgetpid ,
|
.Fn pdgetpid ,
|
||||||
.Fn pdkill
|
|
||||||
and
|
and
|
||||||
.Fn pdwait4
|
.Fn pdkill
|
||||||
system calls first appeared in
|
system calls first appeared in
|
||||||
.Fx 9.0 .
|
.Fx 9.0 .
|
||||||
.Pp
|
.Pp
|
||||||
@ -197,6 +185,3 @@ and
|
|||||||
.An Jonathan Anderson Aq Mt jonathan@FreeBSD.org
|
.An Jonathan Anderson Aq Mt jonathan@FreeBSD.org
|
||||||
at the University of Cambridge Computer Laboratory with support from a grant
|
at the University of Cambridge Computer Laboratory with support from a grant
|
||||||
from Google, Inc.
|
from Google, Inc.
|
||||||
.Sh BUGS
|
|
||||||
.Fn pdwait4
|
|
||||||
has not yet been implemented.
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
.\" @(#)stat.2 8.4 (Berkeley) 5/1/95
|
.\" @(#)stat.2 8.4 (Berkeley) 5/1/95
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd January 14, 2016
|
.Dd June 23, 2017
|
||||||
.Dt STAT 2
|
.Dt STAT 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -62,7 +62,7 @@ The
|
|||||||
.Fn lstat
|
.Fn lstat
|
||||||
system call is like
|
system call is like
|
||||||
.Fn stat
|
.Fn stat
|
||||||
except in the case where the named file is a symbolic link,
|
except when the named file is a symbolic link,
|
||||||
in which case
|
in which case
|
||||||
.Fn lstat
|
.Fn lstat
|
||||||
returns information about the link,
|
returns information about the link,
|
||||||
@ -82,7 +82,7 @@ system call is equivalent to
|
|||||||
.Fn stat
|
.Fn stat
|
||||||
and
|
and
|
||||||
.Fn lstat
|
.Fn lstat
|
||||||
except in the case where the
|
except when the
|
||||||
.Fa path
|
.Fa path
|
||||||
specifies a relative path.
|
specifies a relative path.
|
||||||
In this case the status is retrieved from a file relative to
|
In this case the status is retrieved from a file relative to
|
||||||
@ -92,7 +92,7 @@ instead of the current working directory.
|
|||||||
.Pp
|
.Pp
|
||||||
The values for the
|
The values for the
|
||||||
.Fa flag
|
.Fa flag
|
||||||
are constructed by a bitwise-inclusive OR of flags from the following list,
|
are constructed by a bitwise-inclusive OR of flags from this list,
|
||||||
defined in
|
defined in
|
||||||
.In fcntl.h :
|
.In fcntl.h :
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
@ -129,16 +129,16 @@ and into which information is placed concerning the file.
|
|||||||
.Pp
|
.Pp
|
||||||
The fields of
|
The fields of
|
||||||
.Vt "struct stat"
|
.Vt "struct stat"
|
||||||
related to the file system are as follows:
|
related to the file system are:
|
||||||
.Bl -tag -width ".Va st_nlink"
|
.Bl -tag -width ".Va st_nlink"
|
||||||
.It Va st_dev
|
.It Va st_dev
|
||||||
The numeric ID of the device containing the file.
|
Numeric ID of the device containing the file.
|
||||||
.It Va st_ino
|
.It Va st_ino
|
||||||
The file's inode number.
|
The file's inode number.
|
||||||
.It Va st_nlink
|
.It Va st_nlink
|
||||||
The number of hard links to the file.
|
Number of hard links to the file.
|
||||||
.It Va st_flags
|
.It Va st_flags
|
||||||
The flags enabled for the file.
|
Flags enabled for the file.
|
||||||
See
|
See
|
||||||
.Xr chflags 2
|
.Xr chflags 2
|
||||||
for the list of flags and their description.
|
for the list of flags and their description.
|
||||||
@ -152,10 +152,10 @@ fields together identify the file uniquely within the system.
|
|||||||
.Pp
|
.Pp
|
||||||
The time-related fields of
|
The time-related fields of
|
||||||
.Vt "struct stat"
|
.Vt "struct stat"
|
||||||
are as follows:
|
are:
|
||||||
.Bl -tag -width ".Va st_birthtim"
|
.Bl -tag -width ".Va st_birthtim"
|
||||||
.It Va st_atim
|
.It Va st_atim
|
||||||
Time when file data last accessed.
|
Time when file data was last accessed.
|
||||||
Changed by the
|
Changed by the
|
||||||
.Xr mknod 2 ,
|
.Xr mknod 2 ,
|
||||||
.Xr utimes 2 ,
|
.Xr utimes 2 ,
|
||||||
@ -164,7 +164,7 @@ and
|
|||||||
.Xr readv 2
|
.Xr readv 2
|
||||||
system calls.
|
system calls.
|
||||||
.It Va st_mtim
|
.It Va st_mtim
|
||||||
Time when file data last modified.
|
Time when file data was last modified.
|
||||||
Changed by the
|
Changed by the
|
||||||
.Xr mkdir 2 ,
|
.Xr mkdir 2 ,
|
||||||
.Xr mkfifo 2 ,
|
.Xr mkfifo 2 ,
|
||||||
@ -199,7 +199,7 @@ system calls.
|
|||||||
Time when the inode was created.
|
Time when the inode was created.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The following time-related macros are defined for compatibility:
|
These time-related macros are defined for compatibility:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
#define st_atime st_atim.tv_sec
|
#define st_atime st_atim.tv_sec
|
||||||
#define st_mtime st_mtim.tv_sec
|
#define st_mtime st_mtim.tv_sec
|
||||||
@ -216,35 +216,35 @@ The following time-related macros are defined for compatibility:
|
|||||||
#endif
|
#endif
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The size-related fields of the
|
Size-related fields of the
|
||||||
.Vt "struct stat"
|
.Vt "struct stat"
|
||||||
are as follows:
|
are:
|
||||||
.Bl -tag -width ".Va st_blksize"
|
.Bl -tag -width ".Va st_blksize"
|
||||||
.It Va st_size
|
.It Va st_size
|
||||||
The file size in bytes.
|
File size in bytes.
|
||||||
.It Va st_blksize
|
.It Va st_blksize
|
||||||
The optimal I/O block size for the file.
|
Optimal I/O block size for the file.
|
||||||
.It Va st_blocks
|
.It Va st_blocks
|
||||||
The actual number of blocks allocated for the file in 512-byte units.
|
Actual number of blocks allocated for the file in 512-byte units.
|
||||||
As short symbolic links are stored in the inode, this number may
|
As short symbolic links are stored in the inode, this number may
|
||||||
be zero.
|
be zero.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The access-related fields of
|
The access-related fields of
|
||||||
.Vt "struct stat"
|
.Vt "struct stat"
|
||||||
are as follows:
|
are:
|
||||||
.Bl -tag -width ".Va st_mode"
|
.Bl -tag -width ".Va st_mode"
|
||||||
.It Va st_uid
|
.It Va st_uid
|
||||||
The user ID of the file's owner.
|
User ID of the file's owner.
|
||||||
.It Va st_gid
|
.It Va st_gid
|
||||||
The group ID of the file.
|
Group ID of the file.
|
||||||
.It Va st_mode
|
.It Va st_mode
|
||||||
Status of the file (see below).
|
Status of the file (see below).
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The status information word
|
The status information word
|
||||||
.Fa st_mode
|
.Fa st_mode
|
||||||
has the following bits:
|
has these bits:
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
#define S_IFMT 0170000 /* type of file mask */
|
#define S_IFMT 0170000 /* type of file mask */
|
||||||
#define S_IFIFO 0010000 /* named pipe (fifo) */
|
#define S_IFIFO 0010000 /* named pipe (fifo) */
|
||||||
@ -277,7 +277,7 @@ For a list of access modes, see
|
|||||||
.Xr access 2
|
.Xr access 2
|
||||||
and
|
and
|
||||||
.Xr chmod 2 .
|
.Xr chmod 2 .
|
||||||
The following macros are available to test whether a
|
These macros are available to test whether a
|
||||||
.Va st_mode
|
.Va st_mode
|
||||||
value passed in the
|
value passed in the
|
||||||
.Fa m
|
.Fa m
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* Copyright (c) 2012 Gleb Kurtsou <gleb@FreeBSD.org>
|
* Copyright (c) 2012 Gleb Kurtsou <gleb@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -29,15 +30,22 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/fcntl.h>
|
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <sys/stat.h>
|
#include "compat-ino64.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
stat(const char *path, struct stat *sb)
|
stat(const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
|
struct freebsd11_stat stat11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
return (__sys_fstatat(AT_FDCWD, path, sb, 0));
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_fstatat(AT_FDCWD, path, sb, 0));
|
||||||
|
rv = syscall(SYS_freebsd11_stat, path, &stat11);
|
||||||
|
if (rv == 0)
|
||||||
|
__stat11_to_stat(&stat11, sb);
|
||||||
|
return (rv);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2015 Oleksandr Tymoshenko <gonzo@freebsd.org>
|
* Copyright (c) 2017 M. Warner Losh <imp@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -22,24 +22,29 @@
|
|||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
* 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
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
|
||||||
* $FreeBSD$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
#include <sys/cdefs.h>
|
||||||
ocp {
|
__FBSDID("$FreeBSD$");
|
||||||
pruss@4A300000 {
|
|
||||||
compatible = "ti,pruss-v2";
|
|
||||||
reg = <0x4A300000 0x80000>;
|
|
||||||
interrupt-parent = <&intc>;
|
|
||||||
interrupts = <20 21 22 23 24 25 26 27>;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
#include "namespace.h"
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include "compat-ino64.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
};
|
#include "libc_private.h"
|
||||||
|
|
||||||
&tps {
|
int
|
||||||
interrupt-parent = <&intc>;
|
statfs(const char *path, struct statfs *buf)
|
||||||
interrupts = <7>;
|
{
|
||||||
};
|
struct freebsd11_statfs statfs11;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
if (__getosreldate() >= INO64_FIRST)
|
||||||
|
return (__sys_statfs(path, buf));
|
||||||
|
rv = syscall(SYS_freebsd11_statfs, path, &statfs11);
|
||||||
|
if (rv == 0)
|
||||||
|
__statfs11_to_statfs(&statfs11, buf);
|
||||||
|
return (rv);
|
||||||
|
}
|
@ -28,7 +28,7 @@
|
|||||||
.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
|
.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 1, 2016
|
.Dd June 17, 2017
|
||||||
.Dt WAIT 2
|
.Dt WAIT 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -601,9 +601,7 @@ must be checked against zero to determine if a process reported status.
|
|||||||
called with -1 to wait for any child process will ignore a child that is
|
called with -1 to wait for any child process will ignore a child that is
|
||||||
referenced by a process descriptor (see
|
referenced by a process descriptor (see
|
||||||
.Xr pdfork 2 ) .
|
.Xr pdfork 2 ) .
|
||||||
Specific processes can still be waited on by specifying the process ID
|
Specific processes can still be waited on by specifying the process ID.
|
||||||
or descriptor (see
|
|
||||||
.Xr pdwait 4 ) .
|
|
||||||
.Sh ERRORS
|
.Sh ERRORS
|
||||||
The
|
The
|
||||||
.Fn wait
|
.Fn wait
|
||||||
|
@ -21,7 +21,7 @@ OTHERSRCS+= yp_passwd.c yp_update.c
|
|||||||
|
|
||||||
RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C
|
RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C
|
||||||
|
|
||||||
INCDIRS= -I${DESTDIR}/usr/include/rpcsvc
|
INCDIRS= -I${SYSROOT:U${DESTDIR}}/usr/include/rpcsvc
|
||||||
|
|
||||||
CFLAGS+= -DYP ${INCDIRS}
|
CFLAGS+= -DYP ${INCDIRS}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}}
|
|||||||
|
|
||||||
DEPENDOBJS+= tables.h
|
DEPENDOBJS+= tables.h
|
||||||
tables.h: mktables
|
tables.h: mktables
|
||||||
sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET}
|
sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET}
|
||||||
|
|
||||||
# mkioctls runs find(1) for headers so needs to rebuild every time. This used
|
# mkioctls runs find(1) for headers so needs to rebuild every time. This used
|
||||||
# to be a hack only done in buildworld.
|
# to be a hack only done in buildworld.
|
||||||
@ -123,7 +123,7 @@ ioctl.c: .PHONY
|
|||||||
.endif
|
.endif
|
||||||
ioctl.c: mkioctls .META
|
ioctl.c: mkioctls .META
|
||||||
env CPP="${CPP}" \
|
env CPP="${CPP}" \
|
||||||
/bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET}
|
/bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET}
|
||||||
|
|
||||||
beforedepend: ioctl.c tables.h
|
beforedepend: ioctl.c tables.h
|
||||||
|
|
||||||
|
@ -65,17 +65,19 @@ gen_table()
|
|||||||
else
|
else
|
||||||
filter="egrep -v"
|
filter="egrep -v"
|
||||||
fi
|
fi
|
||||||
all_headers="${all_headers:+${all_headers} }${file}"
|
|
||||||
cat <<_EOF_
|
cat <<_EOF_
|
||||||
TABLE_START(${name})
|
TABLE_START(${name})
|
||||||
_EOF_
|
_EOF_
|
||||||
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \
|
if [ -e "${include_dir}/${file}" ]; then
|
||||||
$include_dir/$file | ${filter} ${excl} | \
|
all_headers="${all_headers:+${all_headers} }${file}"
|
||||||
awk '{ for (i = 1; i <= NF; i++) \
|
egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \
|
||||||
if ($i ~ /define/) \
|
$include_dir/$file | ${filter} ${excl} | \
|
||||||
break; \
|
awk '{ for (i = 1; i <= NF; i++) \
|
||||||
++i; \
|
if ($i ~ /define/) \
|
||||||
printf "TABLE_ENTRY(%s)\n", $i }'
|
break; \
|
||||||
|
++i; \
|
||||||
|
printf "TABLE_ENTRY(%s)\n", $i }'
|
||||||
|
fi
|
||||||
cat <<_EOF_
|
cat <<_EOF_
|
||||||
TABLE_END
|
TABLE_END
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *);
|
static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *);
|
||||||
static int convert_flags(int); /* Elf flags -> mmap flags */
|
static int convert_flags(int); /* Elf flags -> mmap flags */
|
||||||
|
|
||||||
|
int __getosreldate(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Map a shared object into memory. The "fd" argument is a file descriptor,
|
* Map a shared object into memory. The "fd" argument is a file descriptor,
|
||||||
* which must be open on the object and positioned at its beginning.
|
* which must be open on the object and positioned at its beginning.
|
||||||
@ -190,7 +192,8 @@ map_object(int fd, const char *path, const struct stat *sb)
|
|||||||
base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz);
|
base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz);
|
||||||
mapsize = base_vlimit - base_vaddr;
|
mapsize = base_vlimit - base_vaddr;
|
||||||
base_addr = (caddr_t) base_vaddr;
|
base_addr = (caddr_t) base_vaddr;
|
||||||
base_flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE;
|
base_flags = __getosreldate() >= P_OSREL_MAP_GUARD ? MAP_GUARD :
|
||||||
|
MAP_PRIVATE | MAP_ANON | MAP_NOCORE;
|
||||||
if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1])
|
if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1])
|
||||||
base_flags |= MAP_ALIGNED_SUPER;
|
base_flags |= MAP_ALIGNED_SUPER;
|
||||||
if (base_vaddr != 0)
|
if (base_vaddr != 0)
|
||||||
|
@ -30,8 +30,6 @@ arm_install_uboot() {
|
|||||||
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
|
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
|
||||||
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
|
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
|
||||||
${FATMOUNT}/ubldr.bin
|
${FATMOUNT}/ubldr.bin
|
||||||
chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/cubieboard2.dtb \
|
|
||||||
${UFSMOUNT}/boot/dtb/sun7i-a20-cubieboard2.dtb
|
|
||||||
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
|
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
|
||||||
sync
|
sync
|
||||||
umount_loop ${CHROOTDIR}/${FATMOUNT}
|
umount_loop ${CHROOTDIR}/${FATMOUNT}
|
||||||
|
65
release/arm64/RPI3.conf
Normal file
65
release/arm64/RPI3.conf
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
|
||||||
|
CHROOT_MAKEENV="TARGET=amd64 TARGET_ARCH=amd64"
|
||||||
|
SRCBRANCH="base/head@rHEAD"
|
||||||
|
EMBEDDEDBUILD=1
|
||||||
|
EMBEDDED_TARGET="arm64"
|
||||||
|
EMBEDDED_TARGET_ARCH="aarch64"
|
||||||
|
EMBEDDEDPORTS="sysutils/u-boot-rpi3 security/ca_root_nss"
|
||||||
|
KERNEL="GENERIC"
|
||||||
|
WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000"
|
||||||
|
IMAGE_SIZE="2G"
|
||||||
|
PART_SCHEME="MBR"
|
||||||
|
FAT_SIZE="50m -b 1m"
|
||||||
|
FAT_TYPE="16"
|
||||||
|
MD_ARGS="-x 63 -y 255"
|
||||||
|
NODOC=1
|
||||||
|
DTB_REPO="https://github.com/raspberrypi/firmware/blob/master/boot"
|
||||||
|
DTB="bcm2710-rpi-3-b.dtb"
|
||||||
|
OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo"
|
||||||
|
export BOARDNAME="RPI3"
|
||||||
|
|
||||||
|
arm_install_uboot() {
|
||||||
|
UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi3"
|
||||||
|
UBOOT_FILES="LICENCE.broadcom README armstub8.bin bootcode.bin config.txt \
|
||||||
|
fixup.dat fixup_cd.dat fixup_x.dat start.elf start_cd.elf \
|
||||||
|
start_x.elf u-boot.bin"
|
||||||
|
FATMOUNT="${DESTDIR%${KERNEL}}fat"
|
||||||
|
UFSMOUNT="${DESTDIR%${KERNEL}}ufs"
|
||||||
|
chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
|
||||||
|
chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
|
||||||
|
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
|
||||||
|
for _UF in ${UBOOT_FILES}; do
|
||||||
|
chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \
|
||||||
|
${FATMOUNT}/${_UF}
|
||||||
|
done
|
||||||
|
chroot ${CHROOTDIR} fetch -o "${FATMOUNT}/${DTB}" "${DTB_REPO}/${DTB}?raw=true"
|
||||||
|
chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays
|
||||||
|
for _OL in ${OVERLAYS}; do
|
||||||
|
chroot ${CHROOTDIR} fetch -o "${FATMOUNT}/overlays/${_OL}"\
|
||||||
|
"${DTB_REPO}/overlays/${_OL}?raw=true"
|
||||||
|
done
|
||||||
|
|
||||||
|
_OBJDIR="$(chroot ${CHROOTDIR} make -C ${WORLDDIR} -V .OBJDIR)"
|
||||||
|
_OBJDIR="$(realpath ${_OBJDIR})"
|
||||||
|
if [ -d "${CHROOTDIR}/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}" ]; then
|
||||||
|
BOOTFILES="/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}/usr/src/sys/boot"
|
||||||
|
else
|
||||||
|
BOOTFILES="/${_OBJDIR}/sys/boot"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
|
||||||
|
chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \
|
||||||
|
${FATMOUNT}/EFI/BOOT/bootaa64.efi
|
||||||
|
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
|
||||||
|
sync
|
||||||
|
umount_loop ${CHROOTDIR}/${FATMOUNT}
|
||||||
|
umount_loop ${CHROOTDIR}/${UFSMOUNT}
|
||||||
|
chroot ${CHROOTDIR} rmdir ${FATMOUNT}
|
||||||
|
chroot ${CHROOTDIR} rmdir ${UFSMOUNT}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2013-2015 The FreeBSD Foundation
|
# Copyright (c) 2013-2017 The FreeBSD Foundation
|
||||||
# Copyright (c) 2013 Glen Barber
|
# Copyright (c) 2013 Glen Barber
|
||||||
# Copyright (c) 2011 Nathan Whitehorn
|
# Copyright (c) 2011 Nathan Whitehorn
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -148,10 +148,11 @@ env_check() {
|
|||||||
WITH_COMPRESSED_IMAGES=
|
WITH_COMPRESSED_IMAGES=
|
||||||
NODOC=yes
|
NODOC=yes
|
||||||
case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in
|
case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in
|
||||||
arm:armv6)
|
arm:armv6|arm64:aarch64)
|
||||||
chroot_build_release_cmd="chroot_arm_armv6_build_release"
|
chroot_build_release_cmd="chroot_arm_build_release"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -205,8 +206,8 @@ env_check() {
|
|||||||
CHROOT_MAKEENV="${CHROOT_MAKEENV} \
|
CHROOT_MAKEENV="${CHROOT_MAKEENV} \
|
||||||
MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
|
MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
|
||||||
CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
|
CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
|
||||||
CHROOT_IMAKEFLAGS="${CONF_FILES}"
|
CHROOT_IMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}"
|
||||||
CHROOT_DMAKEFLAGS="${CONF_FILES}"
|
CHROOT_DMAKEFLAGS="${WORLD_FLAGS} ${CONF_FILES}"
|
||||||
RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} \
|
RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} \
|
||||||
${CONF_FILES}"
|
${CONF_FILES}"
|
||||||
RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \
|
RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \
|
||||||
@ -346,13 +347,19 @@ chroot_build_release() {
|
|||||||
return 0
|
return 0
|
||||||
} # chroot_build_release()
|
} # chroot_build_release()
|
||||||
|
|
||||||
# chroot_arm_armv6_build_release(): Create arm/armv6 SD card image.
|
# chroot_arm_build_release(): Create arm SD card image.
|
||||||
chroot_arm_armv6_build_release() {
|
chroot_arm_build_release() {
|
||||||
load_target_env
|
load_target_env
|
||||||
eval chroot ${CHROOTDIR} make -C /usr/src/release obj
|
eval chroot ${CHROOTDIR} make -C /usr/src/release obj
|
||||||
if [ -e "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr" ]; then
|
case ${EMBEDDED_TARGET} in
|
||||||
. "${RELENGDIR}/tools/${EMBEDDED_TARGET}.subr"
|
arm|arm64)
|
||||||
fi
|
if [ -e "${RELENGDIR}/tools/arm.subr" ]; then
|
||||||
|
. "${RELENGDIR}/tools/arm.subr"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
[ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}"
|
[ ! -z "${RELEASECONF}" ] && . "${RELEASECONF}"
|
||||||
WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)"
|
WORLDDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V WORLDDIR)"
|
||||||
OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)"
|
OBJDIR="$(eval chroot ${CHROOTDIR} make -C /usr/src/release -V .OBJDIR)"
|
||||||
@ -381,7 +388,7 @@ chroot_arm_armv6_build_release() {
|
|||||||
> CHECKSUM.SHA256
|
> CHECKSUM.SHA256
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
} # chroot_arm_armv6_build_release()
|
} # chroot_arm_build_release()
|
||||||
|
|
||||||
# main(): Start here.
|
# main(): Start here.
|
||||||
main() {
|
main() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2015 The FreeBSD Foundation
|
# Copyright (c) 2015-2017 The FreeBSD Foundation
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Portions of this software were developed by Glen Barber
|
# Portions of this software were developed by Glen Barber
|
||||||
@ -27,7 +27,7 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# Common subroutines used to build arm/armv6 images.
|
# Common subroutines used to build arm SD card images.
|
||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
@ -65,7 +65,7 @@ umount_loop() {
|
|||||||
arm_create_disk() {
|
arm_create_disk() {
|
||||||
# Create the target raw file and temporary work directory.
|
# Create the target raw file and temporary work directory.
|
||||||
chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev}
|
chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev}
|
||||||
chroot ${CHROOTDIR} gpart add -t '!12' -a 63 -s ${FAT_SIZE} ${mddev}
|
chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev}
|
||||||
chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev}
|
chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev}
|
||||||
chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1
|
chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1
|
||||||
chroot ${CHROOTDIR} gpart add -t freebsd ${mddev}
|
chroot ${CHROOTDIR} gpart add -t freebsd ${mddev}
|
||||||
|
@ -1108,6 +1108,7 @@ event_loop(void)
|
|||||||
if (FD_ISSET(seqpacket_fd, &fds))
|
if (FD_ISSET(seqpacket_fd, &fds))
|
||||||
new_client(seqpacket_fd, SOCK_SEQPACKET);
|
new_client(seqpacket_fd, SOCK_SEQPACKET);
|
||||||
}
|
}
|
||||||
|
cfg.remove_pidfile();
|
||||||
close(seqpacket_fd);
|
close(seqpacket_fd);
|
||||||
close(stream_fd);
|
close(stream_fd);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
ATF_TESTS_C= client_test
|
ATF_TESTS_C= client_test
|
||||||
TEST_METADATA.client_test= required_programs="devd"
|
TEST_METADATA.client_test= required_files="/var/run/devd.pid"
|
||||||
|
TEST_METADATA.client_test+= required_programs="devd"
|
||||||
TEST_METADATA.client_test+= required_user="root"
|
TEST_METADATA.client_test+= required_user="root"
|
||||||
TEST_METADATA.client_test+= timeout=15
|
TEST_METADATA.client_test+= timeout=15
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ SRCS= gvinum.c gvinum.h geom_vinum_share.c
|
|||||||
MAN= gvinum.8
|
MAN= gvinum.8
|
||||||
|
|
||||||
WARNS?= 2
|
WARNS?= 2
|
||||||
CFLAGS+= -I${SRCTOP}/sys -I${DESTDIR}/${INCLUDEDIR}/edit
|
CFLAGS+= -I${SRCTOP}/sys -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit
|
||||||
|
|
||||||
LIBADD= edit geom
|
LIBADD= edit geom
|
||||||
|
|
||||||
|
@ -626,6 +626,8 @@ list_pipes(struct dn_id *oid, struct dn_id *end)
|
|||||||
/* data rate */
|
/* data rate */
|
||||||
if (b == 0)
|
if (b == 0)
|
||||||
sprintf(bwbuf, "unlimited ");
|
sprintf(bwbuf, "unlimited ");
|
||||||
|
else if (b >= 1000000000)
|
||||||
|
sprintf(bwbuf, "%7.3f Gbit/s", b/1000000000);
|
||||||
else if (b >= 1000000)
|
else if (b >= 1000000)
|
||||||
sprintf(bwbuf, "%7.3f Mbit/s", b/1000000);
|
sprintf(bwbuf, "%7.3f Mbit/s", b/1000000);
|
||||||
else if (b >= 1000)
|
else if (b >= 1000)
|
||||||
@ -818,6 +820,9 @@ read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen)
|
|||||||
} else if (*end == 'M' || *end == 'm') {
|
} else if (*end == 'M' || *end == 'm') {
|
||||||
end++;
|
end++;
|
||||||
bw *= 1000000;
|
bw *= 1000000;
|
||||||
|
} else if (*end == 'G' || *end == 'g') {
|
||||||
|
end++;
|
||||||
|
bw *= 1000000000;
|
||||||
}
|
}
|
||||||
if ((*end == 'B' &&
|
if ((*end == 'B' &&
|
||||||
_substrcmp2(end, "Bi", "Bit/s") != 0) ||
|
_substrcmp2(end, "Bi", "Bit/s") != 0) ||
|
||||||
|
@ -2499,7 +2499,7 @@ The following parameters can be configured for a pipe:
|
|||||||
.It Cm bw Ar bandwidth | device
|
.It Cm bw Ar bandwidth | device
|
||||||
Bandwidth, measured in
|
Bandwidth, measured in
|
||||||
.Sm off
|
.Sm off
|
||||||
.Op Cm K | M
|
.Op Cm K | M | G
|
||||||
.Brq Cm bit/s | Byte/s .
|
.Brq Cm bit/s | Byte/s .
|
||||||
.Sm on
|
.Sm on
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -150,7 +150,8 @@ main(int argc, char *argv[])
|
|||||||
case 'L':
|
case 'L':
|
||||||
volumelabel = optarg;
|
volumelabel = optarg;
|
||||||
i = -1;
|
i = -1;
|
||||||
while (isalnum(volumelabel[++i]));
|
while (isalnum(volumelabel[++i]) ||
|
||||||
|
volumelabel[i] == '_');
|
||||||
if (volumelabel[i] != '\0') {
|
if (volumelabel[i] != '\0') {
|
||||||
errx(1, "bad volume label. Valid characters are alphanumerics.");
|
errx(1, "bad volume label. Valid characters are alphanumerics.");
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd July 21, 2016
|
.Dd June 22, 2017
|
||||||
.Dt AIO 4
|
.Dt AIO 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -161,11 +161,27 @@ field which can be used to request notification when an operation completes.
|
|||||||
For
|
For
|
||||||
.Dv SIGEV_KEVENT
|
.Dv SIGEV_KEVENT
|
||||||
notifications,
|
notifications,
|
||||||
the posted kevent will contain:
|
the
|
||||||
|
.Va sigevent
|
||||||
|
.Ap
|
||||||
|
s
|
||||||
|
.Va sigev_notify_kqueue
|
||||||
|
field should contain the descriptor of the kqueue that the event should be attached
|
||||||
|
to, its
|
||||||
|
.Va sigev_notify_kevent_flags
|
||||||
|
field may contain
|
||||||
|
.Dv EV_ONESHOT ,
|
||||||
|
.Dv EV_CLEAR , and/or
|
||||||
|
.Dv EV_DISPATCH , and its
|
||||||
|
.Va sigev_notify
|
||||||
|
field should be set to
|
||||||
|
.Dv SIGEV_KEVENT .
|
||||||
|
The posted kevent will contain:
|
||||||
.Bl -column ".Va filter"
|
.Bl -column ".Va filter"
|
||||||
.It Sy Member Ta Sy Value
|
.It Sy Member Ta Sy Value
|
||||||
.It Va ident Ta asynchronous I/O control buffer pointer
|
.It Va ident Ta asynchronous I/O control buffer pointer
|
||||||
.It Va filter Ta Dv EVFILT_AIO
|
.It Va filter Ta Dv EVFILT_AIO
|
||||||
|
.It Va flags Ta Dv EV_EOF
|
||||||
.It Va udata Ta
|
.It Va udata Ta
|
||||||
value stored in
|
value stored in
|
||||||
.Va aio_sigevent.sigev_value
|
.Va aio_sigevent.sigev_value
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd March 29, 2016
|
.Dd February 23, 2017
|
||||||
.Dt MAKE.CONF 5
|
.Dt MAKE.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -176,6 +176,11 @@ value, use
|
|||||||
.Dq Li +=
|
.Dq Li +=
|
||||||
instead of
|
instead of
|
||||||
.Dq Li = .
|
.Dq Li = .
|
||||||
|
.It Va DTC
|
||||||
|
.Pq Vt str
|
||||||
|
Select the compiler for DTS (Device Tree Syntax) file.
|
||||||
|
.Va DTC
|
||||||
|
is initially set to the value of dtc
|
||||||
.It Va INSTALL
|
.It Va INSTALL
|
||||||
.Pq Vt str
|
.Pq Vt str
|
||||||
the default install command.
|
the default install command.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
|
.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.Dd June 8, 2017
|
.Dd June 20, 2017
|
||||||
.Dt SRC.CONF 5
|
.Dt SRC.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -764,9 +764,9 @@ by linking against libgnuregex.
|
|||||||
Set to not build
|
Set to not build
|
||||||
.Xr gpioctl 8
|
.Xr gpioctl 8
|
||||||
as part of the base system.
|
as part of the base system.
|
||||||
.It Va WITHOUT_GPL_DTC
|
.It Va WITH_GPL_DTC
|
||||||
Set to build the BSD licensed version of the device tree compiler rather
|
Set to build the GPL'd version of the device tree compiler from elinux.org,
|
||||||
than the GPLed one from elinux.org.
|
instead of the BSD licensed one.
|
||||||
.It Va WITHOUT_GSSAPI
|
.It Va WITHOUT_GSSAPI
|
||||||
Set to not build libgssapi.
|
Set to not build libgssapi.
|
||||||
.It Va WITHOUT_HAST
|
.It Va WITHOUT_HAST
|
||||||
|
@ -203,8 +203,8 @@ Machine-dependent type sizes:
|
|||||||
.It mips64el Ta 8 Ta 8 Ta 8
|
.It mips64el Ta 8 Ta 8 Ta 8
|
||||||
.It mips64elhf Ta 8 Ta 8 Ta 8
|
.It mips64elhf Ta 8 Ta 8 Ta 8
|
||||||
.It mips64hf Ta 8 Ta 8 Ta 8
|
.It mips64hf Ta 8 Ta 8 Ta 8
|
||||||
.It powerpc Ta 4 Ta 8 Ta 4
|
.It powerpc Ta 4 Ta 8 Ta 8
|
||||||
.It powerpcspe Ta 4 Ta 8 Ta 4
|
.It powerpcspe Ta 4 Ta 8 Ta 8
|
||||||
.It powerpc64 Ta 8 Ta 8 Ta 8
|
.It powerpc64 Ta 8 Ta 8 Ta 8
|
||||||
.It riscv64 Ta 8 Ta 16 Ta 8
|
.It riscv64 Ta 8 Ta 16 Ta 8
|
||||||
.It riscv64sf Ta 8 Ta 16 Ta 8
|
.It riscv64sf Ta 8 Ta 16 Ta 8
|
||||||
|
@ -33,6 +33,7 @@ FILES= \
|
|||||||
bsd.kmod.mk \
|
bsd.kmod.mk \
|
||||||
bsd.lib.mk \
|
bsd.lib.mk \
|
||||||
bsd.libnames.mk \
|
bsd.libnames.mk \
|
||||||
|
bsd.linker.mk \
|
||||||
bsd.links.mk \
|
bsd.links.mk \
|
||||||
bsd.man.mk \
|
bsd.man.mk \
|
||||||
bsd.mkopt.mk \
|
bsd.mkopt.mk \
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# COMPILER_VERSION is a numeric constant equal to:
|
# COMPILER_VERSION is a numeric constant equal to:
|
||||||
# major * 10000 + minor * 100 + tiny
|
# major * 10000 + minor * 100 + tiny
|
||||||
# It too can be overriden on the command line. When testing it, be sure to
|
# It too can be overridden on the command line. When testing it, be sure to
|
||||||
# make sure that you are limiting the test to a specific compiler. Testing
|
# make sure that you are limiting the test to a specific compiler. Testing
|
||||||
# against 30300 for gcc likely isn't what you wanted (since versions of gcc
|
# against 30300 for gcc likely isn't what you wanted (since versions of gcc
|
||||||
# prior to 4.2 likely have no prayer of working).
|
# prior to 4.2 likely have no prayer of working).
|
||||||
@ -194,4 +194,5 @@ ${var}.${${X_}_cc_hash}:= ${${var}}
|
|||||||
.endif # ${cc} == "CC" || !empty(XCC)
|
.endif # ${cc} == "CC" || !empty(XCC)
|
||||||
.endfor # .for cc in CC XCC
|
.endfor # .for cc in CC XCC
|
||||||
|
|
||||||
|
.include <bsd.linker.mk>
|
||||||
.endif # !target(__<bsd.compiler.mk>__)
|
.endif # !target(__<bsd.compiler.mk>__)
|
||||||
|
@ -86,11 +86,13 @@ _meta_filemon= 1
|
|||||||
# Skip reading .depend when not needed to speed up tree-walks and simple
|
# Skip reading .depend when not needed to speed up tree-walks and simple
|
||||||
# lookups. See _SKIP_BUILD logic in bsd.init.mk for more details.
|
# lookups. See _SKIP_BUILD logic in bsd.init.mk for more details.
|
||||||
# Also skip generating or including .depend.* files if in meta+filemon mode
|
# Also skip generating or including .depend.* files if in meta+filemon mode
|
||||||
# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used.
|
# since it will track dependencies itself. OBJS_DEPEND_GUESS is still used
|
||||||
.if defined(_SKIP_BUILD) || defined(_meta_filemon)
|
# for _meta_filemon but not for _SKIP_DEPEND.
|
||||||
_SKIP_READ_DEPEND= 1
|
.if defined(_SKIP_BUILD)
|
||||||
.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \
|
_SKIP_DEPEND= 1
|
||||||
make(obj) || make(clean*) || make(destroy*)
|
.endif
|
||||||
|
.if ${MK_DIRDEPS_BUILD} == "no"
|
||||||
|
.if defined(_SKIP_DEPEND) || defined(_meta_filemon)
|
||||||
.MAKE.DEPENDFILE= /dev/null
|
.MAKE.DEPENDFILE= /dev/null
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
@ -181,6 +183,15 @@ DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
|
|||||||
DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,}
|
DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,}
|
||||||
.endif
|
.endif
|
||||||
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
|
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
|
||||||
|
.if defined(_SKIP_DEPEND)
|
||||||
|
# Don't bother statting any .meta files for .depend*
|
||||||
|
${DEPENDOBJS}: .NOMETA
|
||||||
|
${DEPENDFILE}: .NOMETA
|
||||||
|
# Unset these to avoid looping/statting on them later.
|
||||||
|
.undef DEPENDSRCS
|
||||||
|
.undef DEPENDOBJS
|
||||||
|
.undef DEPENDFILES_OBJS
|
||||||
|
.endif # defined(_SKIP_DEPEND)
|
||||||
DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}}
|
DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}}
|
||||||
DEPEND_CFLAGS+= -MT${.TARGET}
|
DEPEND_CFLAGS+= -MT${.TARGET}
|
||||||
.if !defined(_meta_filemon)
|
.if !defined(_meta_filemon)
|
||||||
@ -192,7 +203,6 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:}
|
|||||||
.else
|
.else
|
||||||
CFLAGS+= ${DEPEND_CFLAGS}
|
CFLAGS+= ${DEPEND_CFLAGS}
|
||||||
.endif
|
.endif
|
||||||
.if !defined(_SKIP_READ_DEPEND)
|
|
||||||
.for __depend_obj in ${DEPENDFILES_OBJS}
|
.for __depend_obj in ${DEPENDFILES_OBJS}
|
||||||
.if ${MAKE_VERSION} < 20160220
|
.if ${MAKE_VERSION} < 20160220
|
||||||
.sinclude "${.OBJDIR}/${__depend_obj}"
|
.sinclude "${.OBJDIR}/${__depend_obj}"
|
||||||
@ -200,7 +210,6 @@ CFLAGS+= ${DEPEND_CFLAGS}
|
|||||||
.dinclude "${.OBJDIR}/${__depend_obj}"
|
.dinclude "${.OBJDIR}/${__depend_obj}"
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
.endif # !defined(_SKIP_READ_DEPEND)
|
|
||||||
.endif # !defined(_meta_filemon)
|
.endif # !defined(_meta_filemon)
|
||||||
.endif # defined(SRCS)
|
.endif # defined(SRCS)
|
||||||
|
|
||||||
@ -267,12 +276,14 @@ DPSRCS+= ${SRCS}
|
|||||||
# targets are kept as they be used for generating something. The target is
|
# targets are kept as they be used for generating something. The target is
|
||||||
# kept to allow 'make depend' to generate files.
|
# kept to allow 'make depend' to generate files.
|
||||||
${DEPENDFILE}: ${DPSRCS}
|
${DEPENDFILE}: ${DPSRCS}
|
||||||
|
.if !defined(_SKIP_DEPEND)
|
||||||
.if exists(${.OBJDIR}/${DEPENDFILE}) || \
|
.if exists(${.OBJDIR}/${DEPENDFILE}) || \
|
||||||
((commands(beforedepend) || \
|
((commands(beforedepend) || \
|
||||||
(!defined(_meta_filemon) && commands(_EXTRADEPEND)) || \
|
(!defined(_meta_filemon) && commands(_EXTRADEPEND)) || \
|
||||||
commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta))
|
commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta))
|
||||||
rm -f ${DEPENDFILE}
|
rm -f ${DEPENDFILE}
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
.if !defined(_meta_filemon) && target(_EXTRADEPEND)
|
.if !defined(_meta_filemon) && target(_EXTRADEPEND)
|
||||||
_EXTRADEPEND: .USE
|
_EXTRADEPEND: .USE
|
||||||
${DEPENDFILE}: _EXTRADEPEND
|
${DEPENDFILE}: _EXTRADEPEND
|
||||||
|
@ -50,8 +50,9 @@ $xGRP= ${_gid}
|
|||||||
_SKIP_BUILD= not building at level 0
|
_SKIP_BUILD= not building at level 0
|
||||||
.elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \
|
.elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \
|
||||||
${.TARGETS:M*install*} == ${.TARGETS} || \
|
${.TARGETS:M*install*} == ${.TARGETS} || \
|
||||||
make(clean*) || make(obj) || make(analyze) || make(print-dir) || \
|
${.TARGETS:Mclean*} == ${.TARGETS} || \
|
||||||
make(destroy*)
|
${.TARGETS:Mdestroy*} == ${.TARGETS} || \
|
||||||
|
make(obj) || make(analyze) || make(print-dir)
|
||||||
# Skip building, but don't show a warning.
|
# Skip building, but don't show a warning.
|
||||||
_SKIP_BUILD=
|
_SKIP_BUILD=
|
||||||
.endif
|
.endif
|
||||||
|
@ -8,166 +8,168 @@
|
|||||||
.error bsd.libnames.mk cannot be included directly.
|
.error bsd.libnames.mk cannot be included directly.
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
LIBDESTDIR= ${SYSROOT:U${DESTDIR}}
|
||||||
|
|
||||||
.sinclude <src.libnames.mk>
|
.sinclude <src.libnames.mk>
|
||||||
|
|
||||||
# Src directory locations are also defined in src.libnames.mk.
|
# Src directory locations are also defined in src.libnames.mk.
|
||||||
|
|
||||||
LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o
|
LIBCRT0?= ${LIBDESTDIR}${LIBDIR_BASE}/crt0.o
|
||||||
|
|
||||||
LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a
|
LIB80211?= ${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a
|
||||||
LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a
|
LIBALIAS?= ${LIBDESTDIR}${LIBDIR_BASE}/libalias.a
|
||||||
LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a
|
LIBARCHIVE?= ${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a
|
||||||
LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a
|
LIBASN1?= ${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a
|
||||||
LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a
|
LIBATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libatm.a
|
||||||
LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a
|
LIBAUDITD?= ${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a
|
||||||
LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a
|
LIBAVL?= ${LIBDESTDIR}${LIBDIR_BASE}/libavl.a
|
||||||
LIBBEGEMOT?= ${DESTDIR}${LIBDIR}/libbegemot.a
|
LIBBEGEMOT?= ${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a
|
||||||
LIBBLACKLIST?= ${DESTDIR}${LIBDIR}/libblacklist.a
|
LIBBLACKLIST?= ${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a
|
||||||
LIBBLUETOOTH?= ${DESTDIR}${LIBDIR}/libbluetooth.a
|
LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a
|
||||||
LIBBSDXML?= ${DESTDIR}${LIBDIR}/libbsdxml.a
|
LIBBSDXML?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a
|
||||||
LIBBSM?= ${DESTDIR}${LIBDIR}/libbsm.a
|
LIBBSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a
|
||||||
LIBBSNMP?= ${DESTDIR}${LIBDIR}/libbsnmp.a
|
LIBBSNMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a
|
||||||
LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a
|
LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a
|
||||||
LIBC?= ${DESTDIR}${LIBDIR}/libc.a
|
LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a
|
||||||
LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a
|
LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a
|
||||||
LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a
|
LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a
|
||||||
LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a
|
LIBCAP_DNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_dns.a
|
||||||
LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a
|
LIBCAP_GRP?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_grp.a
|
||||||
LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a
|
LIBCAP_PWD?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_pwd.a
|
||||||
LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR}/libcap_random.a
|
LIBCAP_RANDOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_random.a
|
||||||
LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR}/libcap_sysctl.a
|
LIBCAP_SYSCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libcap_sysctl.a
|
||||||
LIBCASPER?= ${DESTDIR}${LIBDIR}/libcasper.a
|
LIBCASPER?= ${LIBDESTDIR}${LIBDIR_BASE}/libcasper.a
|
||||||
LIBCOMPAT?= ${DESTDIR}${LIBDIR}/libcompat.a
|
LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a
|
||||||
LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a
|
LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a
|
||||||
LIBCOM_ERR?= ${DESTDIR}${LIBDIR}/libcom_err.a
|
LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a
|
||||||
LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libc++.a
|
LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a
|
||||||
LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt.a
|
LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a
|
||||||
LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a
|
LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a
|
||||||
LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a
|
LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a
|
||||||
LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a
|
LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a
|
||||||
LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a
|
LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a
|
||||||
LIBCXGB4?= ${DESTDIR}${LIBDIR}/libcxgb4.a
|
LIBCXGB4?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a
|
||||||
LIBCXXRT?= ${DESTDIR}${LIBDIR}/libcxxrt.a
|
LIBCXXRT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a
|
||||||
LIBC_PIC?= ${DESTDIR}${LIBDIR}/libc_pic.a
|
LIBC_PIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a
|
||||||
LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a
|
LIBDEVCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a
|
||||||
LIBDEVDCTL?= ${DESTDIR}${LIBDIR}/libdevdctl.a
|
LIBDEVDCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a
|
||||||
LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a
|
LIBDEVINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a
|
||||||
LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a
|
LIBDEVSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a
|
||||||
LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a
|
LIBDIALOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a
|
||||||
LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a
|
LIBDNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libdns.a
|
||||||
LIBDPV?= ${DESTDIR}${LIBDIR}/libdpv.a
|
LIBDPV?= ${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a
|
||||||
LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a
|
LIBDTRACE?= ${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a
|
||||||
LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a
|
LIBDWARF?= ${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a
|
||||||
LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a
|
LIBEDIT?= ${LIBDESTDIR}${LIBDIR_BASE}/libedit.a
|
||||||
LIBEFIVAR?= ${DESTDIR}${LIBDIR}/libefivar.a
|
LIBEFIVAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a
|
||||||
LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a
|
LIBELF?= ${LIBDESTDIR}${LIBDIR_BASE}/libelf.a
|
||||||
LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a
|
LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a
|
||||||
LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a
|
LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a
|
||||||
LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a
|
LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a
|
||||||
LIBFL?= "don't use LIBFL, use LIBL"
|
LIBFL?= "don't use LIBFL, use LIBL"
|
||||||
LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a
|
LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a
|
||||||
LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a
|
LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
|
||||||
LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a
|
LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a
|
||||||
LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a
|
LIBGNUREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a
|
||||||
LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a
|
LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a
|
||||||
LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a
|
LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a
|
||||||
LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR}/libgssapi_krb5.a
|
LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a
|
||||||
LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a
|
LIBHDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a
|
||||||
LIBHEIMBASE?= ${DESTDIR}${LIBDIR}/libheimbase.a
|
LIBHEIMBASE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a
|
||||||
LIBHEIMNTLM?= ${DESTDIR}${LIBDIR}/libheimntlm.a
|
LIBHEIMNTLM?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a
|
||||||
LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR}/libheimsqlite.a
|
LIBHEIMSQLITE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a
|
||||||
LIBHX509?= ${DESTDIR}${LIBDIR}/libhx509.a
|
LIBHX509?= ${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a
|
||||||
LIBIBCM?= ${DESTDIR}${LIBDIR}/libibcm.a
|
LIBIBCM?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a
|
||||||
LIBIBCOMMON?= ${DESTDIR}${LIBDIR}/libibcommon.a
|
LIBIBCOMMON?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcommon.a
|
||||||
LIBIBMAD?= ${DESTDIR}${LIBDIR}/libibmad.a
|
LIBIBMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a
|
||||||
LIBIBSDP?= ${DESTDIR}${LIBDIR}/libibsdp.a
|
LIBIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libibsdp.a
|
||||||
LIBIBUMAD?= ${DESTDIR}${LIBDIR}/libibumad.a
|
LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a
|
||||||
LIBIBVERBS?= ${DESTDIR}${LIBDIR}/libibverbs.a
|
LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a
|
||||||
LIBIFCONFIG?= ${DESTDIR}${LIBDIR}/libifconfig.a
|
LIBIFCONFIG?= ${LIBDESTDIR}${LIBDIR_BASE}/libifconfig.a
|
||||||
LIBIPSEC?= ${DESTDIR}${LIBDIR}/libipsec.a
|
LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a
|
||||||
LIBJAIL?= ${DESTDIR}${LIBDIR}/libjail.a
|
LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
|
||||||
LIBKADM5CLNT?= ${DESTDIR}${LIBDIR}/libkadm5clnt.a
|
LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
|
||||||
LIBKADM5SRV?= ${DESTDIR}${LIBDIR}/libkadm5srv.a
|
LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a
|
||||||
LIBKAFS5?= ${DESTDIR}${LIBDIR}/libkafs5.a
|
LIBKAFS5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a
|
||||||
LIBKDC?= ${DESTDIR}${LIBDIR}/libkdc.a
|
LIBKDC?= ${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a
|
||||||
LIBKEYCAP?= ${DESTDIR}${LIBDIR}/libkeycap.a
|
LIBKEYCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a
|
||||||
LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a
|
LIBKICONV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a
|
||||||
LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a
|
LIBKRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a
|
||||||
LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
|
LIBKVM?= ${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a
|
||||||
LIBL?= ${DESTDIR}${LIBDIR}/libl.a
|
LIBL?= ${LIBDESTDIR}${LIBDIR_BASE}/libl.a
|
||||||
LIBLN?= "don't use LIBLN, use LIBL"
|
LIBLN?= "don't use LIBLN, use LIBL"
|
||||||
LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a
|
LIBLZMA?= ${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a
|
||||||
LIBM?= ${DESTDIR}${LIBDIR}/libm.a
|
LIBM?= ${LIBDESTDIR}${LIBDIR_BASE}/libm.a
|
||||||
LIBMAGIC?= ${DESTDIR}${LIBDIR}/libmagic.a
|
LIBMAGIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a
|
||||||
LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a
|
LIBMD?= ${LIBDESTDIR}${LIBDIR_BASE}/libmd.a
|
||||||
LIBMEMSTAT?= ${DESTDIR}${LIBDIR}/libmemstat.a
|
LIBMEMSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a
|
||||||
LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a
|
LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a
|
||||||
LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a
|
LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a
|
||||||
LIBMLX4?= ${DESTDIR}${LIBDIR}/libmlx4.a
|
LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a
|
||||||
LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a
|
LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a
|
||||||
LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a
|
LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a
|
||||||
LIBMTHCA?= ${DESTDIR}${LIBDIR}/libmthca.a
|
LIBMTHCA?= ${LIBDESTDIR}${LIBDIR_BASE}/libmthca.a
|
||||||
LIBNANDFS?= ${DESTDIR}${LIBDIR}/libnandfs.a
|
LIBNANDFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libnandfs.a
|
||||||
LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a
|
LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a
|
||||||
LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a
|
LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a
|
||||||
LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a
|
LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a
|
||||||
LIBNGATM?= ${DESTDIR}${LIBDIR}/libngatm.a
|
LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a
|
||||||
LIBNV?= ${DESTDIR}${LIBDIR}/libnv.a
|
LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a
|
||||||
LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpair.a
|
LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a
|
||||||
LIBOPENSM?= ${DESTDIR}${LIBDIR}/libopensm.a
|
LIBOPENSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a
|
||||||
LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a
|
LIBOPIE?= ${LIBDESTDIR}${LIBDIR_BASE}/libopie.a
|
||||||
LIBOSMCOMP?= ${DESTDIR}${LIBDIR}/libosmcomp.a
|
LIBOSMCOMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a
|
||||||
LIBOSMVENDOR?= ${DESTDIR}${LIBDIR}/libosmvendor.a
|
LIBOSMVENDOR?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a
|
||||||
LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a
|
LIBPAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libpam.a
|
||||||
LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a
|
LIBPANEL?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a
|
||||||
LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a
|
LIBPANELW?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a
|
||||||
LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a
|
LIBPCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a
|
||||||
LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a
|
LIBPJDLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a
|
||||||
LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a
|
LIBPMC?= ${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a
|
||||||
LIBPROC?= ${DESTDIR}${LIBDIR}/libproc.a
|
LIBPROC?= ${LIBDESTDIR}${LIBDIR_BASE}/libproc.a
|
||||||
LIBPROCSTAT?= ${DESTDIR}${LIBDIR}/libprocstat.a
|
LIBPROCSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a
|
||||||
LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a
|
LIBPTHREAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a
|
||||||
LIBRADIUS?= ${DESTDIR}${LIBDIR}/libradius.a
|
LIBRADIUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libradius.a
|
||||||
LIBRDMACM?= ${DESTDIR}${LIBDIR}/librdmacm.a
|
LIBRDMACM?= ${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a
|
||||||
LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a
|
LIBROKEN?= ${LIBDESTDIR}${LIBDIR_BASE}/libroken.a
|
||||||
LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR}/librpcsec_gss.a
|
LIBRPCSEC_GSS?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a
|
||||||
LIBRPCSVC?= ${DESTDIR}${LIBDIR}/librpcsvc.a
|
LIBRPCSVC?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a
|
||||||
LIBRT?= ${DESTDIR}${LIBDIR}/librt.a
|
LIBRT?= ${LIBDESTDIR}${LIBDIR_BASE}/librt.a
|
||||||
LIBRTLD_DB?= ${DESTDIR}${LIBDIR}/librtld_db.a
|
LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a
|
||||||
LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a
|
LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a
|
||||||
LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a
|
LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a
|
||||||
LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a
|
LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a
|
||||||
LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a
|
LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a
|
||||||
LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a
|
LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a
|
||||||
LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a
|
LIBSTAND?= ${LIBDESTDIR}${LIBDIR_BASE}/libstand.a
|
||||||
LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a
|
LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a
|
||||||
LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a
|
LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a
|
||||||
LIBSYSDECODE?= ${DESTDIR}${LIBDIR}/libsysdecode.a
|
LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a
|
||||||
LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a
|
LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a
|
||||||
LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a
|
LIBTERMCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a
|
||||||
LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a
|
LIBTERMCAPW?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a
|
||||||
LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP"
|
LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP"
|
||||||
LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES"
|
LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES"
|
||||||
LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a
|
LIBUFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libufs.a
|
||||||
LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a
|
LIBUGIDFW?= ${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a
|
||||||
LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a
|
LIBULOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libulog.a
|
||||||
LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a
|
LIBUMEM?= ${LIBDESTDIR}${LIBDIR_BASE}/libumem.a
|
||||||
LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a
|
LIBUSB?= ${LIBDESTDIR}${LIBDIR_BASE}/libusb.a
|
||||||
LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a
|
LIBUSBHID?= ${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a
|
||||||
LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a
|
LIBUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libutil.a
|
||||||
LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a
|
LIBUUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a
|
||||||
LIBVGL?= ${DESTDIR}${LIBDIR}/libvgl.a
|
LIBVGL?= ${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a
|
||||||
LIBVMMAPI?= ${DESTDIR}${LIBDIR}/libvmmapi.a
|
LIBVMMAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a
|
||||||
LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a
|
LIBWIND?= ${LIBDESTDIR}${LIBDIR_BASE}/libwind.a
|
||||||
LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a
|
LIBWRAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a
|
||||||
LIBXO?= ${DESTDIR}${LIBDIR}/libxo.a
|
LIBXO?= ${LIBDESTDIR}${LIBDIR_BASE}/libxo.a
|
||||||
LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a
|
LIBXPG4?= ${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a
|
||||||
LIBY?= ${DESTDIR}${LIBDIR}/liby.a
|
LIBY?= ${LIBDESTDIR}${LIBDIR_BASE}/liby.a
|
||||||
LIBYPCLNT?= ${DESTDIR}${LIBDIR}/libypclnt.a
|
LIBYPCLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a
|
||||||
LIBZ?= ${DESTDIR}${LIBDIR}/libz.a
|
LIBZ?= ${LIBDESTDIR}${LIBDIR_BASE}/libz.a
|
||||||
LIBZFS?= ${DESTDIR}${LIBDIR}/libzfs.a
|
LIBZFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a
|
||||||
LIBZFS_CORE?= ${DESTDIR}${LIBDIR}/libzfs_core.a
|
LIBZFS_CORE?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a
|
||||||
LIBZPOOL?= ${DESTDIR}${LIBDIR}/libzpool.a
|
LIBZPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a
|
||||||
|
|
||||||
# enforce the 2 -lpthread and -lc to always be the last in that exact order
|
# enforce the 2 -lpthread and -lc to always be the last in that exact order
|
||||||
.if defined(LDADD)
|
.if defined(LDADD)
|
||||||
@ -184,7 +186,7 @@ LDADD:= ${LDADD:N-lc} -lc
|
|||||||
.if defined(_LIBRARIES) && defined(LIB) && \
|
.if defined(_LIBRARIES) && defined(LIB) && \
|
||||||
${_LIBRARIES:M${LIB}} != ""
|
${_LIBRARIES:M${LIB}} != ""
|
||||||
.if !defined(LIB${LIB:tu})
|
.if !defined(LIB${LIB:tu})
|
||||||
.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a
|
.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
@ -192,4 +194,26 @@ LDADD:= ${LDADD:N-lc} -lc
|
|||||||
.for lib in ${_LIBRARIES}
|
.for lib in ${_LIBRARIES}
|
||||||
LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
|
LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,}
|
||||||
.endfor
|
.endfor
|
||||||
|
.else
|
||||||
|
|
||||||
|
# Out of tree builds
|
||||||
|
|
||||||
|
# There are LIBADD defined in an out-of-tree build. Are they *all*
|
||||||
|
# in-tree libraries? If so convert them to LDADD to support
|
||||||
|
# partial checkouts.
|
||||||
|
.if !empty(LIBADD)
|
||||||
|
_convert_libadd= 1
|
||||||
|
.for l in ${LIBADD}
|
||||||
|
.if empty(LIB${l:tu})
|
||||||
|
_convert_libadd= 0
|
||||||
.endif
|
.endif
|
||||||
|
.endfor
|
||||||
|
.if ${_convert_libadd} == 1
|
||||||
|
.warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported.
|
||||||
|
.for l in ${LIBADD}
|
||||||
|
LDADD+= -l${l}
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.endif # defined(SRCTOP)
|
||||||
|
91
share/mk/bsd.linker.mk
Normal file
91
share/mk/bsd.linker.mk
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
# Setup variables for the linker.
|
||||||
|
#
|
||||||
|
# LINKER_TYPE is the major type of linker. Currently binutils and lld support
|
||||||
|
# automatic detection.
|
||||||
|
#
|
||||||
|
# LINKER_VERSION is a numeric constant equal to:
|
||||||
|
# major * 10000 + minor * 100 + tiny
|
||||||
|
# It too can be overridden on the command line.
|
||||||
|
#
|
||||||
|
# LINKER_FEATURES may contain one or more of the following, based on
|
||||||
|
# linker support for that feature:
|
||||||
|
#
|
||||||
|
# - build-id : support for generating a Build-ID note
|
||||||
|
#
|
||||||
|
# These variables with an X_ prefix will also be provided if XLD is set.
|
||||||
|
#
|
||||||
|
# This file may be included multiple times, but only has effect the first time.
|
||||||
|
#
|
||||||
|
|
||||||
|
.if !target(__<bsd.linker.mk>__)
|
||||||
|
__<bsd.linker.mk>__:
|
||||||
|
|
||||||
|
.for ld X_ in LD $${_empty_var_} XLD X_
|
||||||
|
.if ${ld} == "LD" || !empty(XLD)
|
||||||
|
# Try to import LINKER_TYPE and LINKER_VERSION from parent make.
|
||||||
|
# The value is only used/exported for the same environment that impacts
|
||||||
|
# LD and LINKER_* settings here.
|
||||||
|
_exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION ${X_}LINKER_FEATURES
|
||||||
|
${X_}_ld_hash= ${${ld}}${MACHINE}${PATH}
|
||||||
|
${X_}_ld_hash:= ${${X_}_ld_hash:hash}
|
||||||
|
# Only import if none of the vars are set somehow else.
|
||||||
|
_can_export= yes
|
||||||
|
.for var in ${_exported_vars}
|
||||||
|
.if defined(${var})
|
||||||
|
_can_export= no
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
.if ${_can_export} == yes
|
||||||
|
.for var in ${_exported_vars}
|
||||||
|
.if defined(${var}.${${X_}_ld_hash})
|
||||||
|
${var}= ${${var}.${${X_}_ld_hash}}
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
|
||||||
|
.if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION)
|
||||||
|
_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none
|
||||||
|
.if ${_ld_version} == "none"
|
||||||
|
.error Unable to determine linker type from ${ld}=${${ld}}
|
||||||
|
.endif
|
||||||
|
.if ${_ld_version:[1..2]} == "GNU ld"
|
||||||
|
${X_}LINKER_TYPE= bfd
|
||||||
|
_v= ${_ld_version:M[1-9].[0-9]*:[1]}
|
||||||
|
.elif ${_ld_version:[1]} == "LLD"
|
||||||
|
${X_}LINKER_TYPE= lld
|
||||||
|
_v= ${_ld_version:[2]}
|
||||||
|
.else
|
||||||
|
.error Unknown linker from ${ld}=${${ld}}: ${_ld_version}
|
||||||
|
.endif
|
||||||
|
${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \
|
||||||
|
awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}'
|
||||||
|
.undef _ld_version
|
||||||
|
.undef _v
|
||||||
|
${X_}LINKER_FEATURES=
|
||||||
|
.if ${${X_}LINKER_TYPE} != "bfd" || ${${X_}LINKER_VERSION} > 21750
|
||||||
|
${X_}LINKER_FEATURES+= build-id
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
.else
|
||||||
|
# Use LD's values
|
||||||
|
X_LINKER_TYPE= ${LINKER_TYPE}
|
||||||
|
X_LINKER_VERSION= ${LINKER_VERSION}
|
||||||
|
X_LINKER_FEATURES= ${LINKER_FEATURES}
|
||||||
|
.endif # ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
|
||||||
|
|
||||||
|
# Export the values so sub-makes don't have to look them up again, using the
|
||||||
|
# hash key computed above.
|
||||||
|
.for var in ${_exported_vars}
|
||||||
|
${var}.${${X_}_ld_hash}:= ${${var}}
|
||||||
|
.export-env ${var}.${${X_}_ld_hash}
|
||||||
|
.undef ${var}.${${X_}_ld_hash}
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.endif # ${ld} == "LD" || !empty(XLD)
|
||||||
|
.endfor # .for ld in LD XLD
|
||||||
|
|
||||||
|
|
||||||
|
.endif # !target(__<bsd.linker.mk>__)
|
@ -102,7 +102,7 @@ OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
|
|||||||
# case 2 (using MAKEOBJDIR), don't issue a warning. Otherwise,
|
# case 2 (using MAKEOBJDIR), don't issue a warning. Otherwise,
|
||||||
# issue a warning differentiating between cases 6 and (3 or 4).
|
# issue a warning differentiating between cases 6 and (3 or 4).
|
||||||
#
|
#
|
||||||
objwarn:
|
objwarn: .PHONY
|
||||||
.if !defined(NO_OBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} && \
|
.if !defined(NO_OBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} && \
|
||||||
!(defined(MAKEOBJDIRPREFIX) && exists(${CANONICALOBJDIR}/)) && \
|
!(defined(MAKEOBJDIRPREFIX) && exists(${CANONICALOBJDIR}/)) && \
|
||||||
!(defined(MAKEOBJDIR) && exists(${MAKEOBJDIR}/))
|
!(defined(MAKEOBJDIR) && exists(${MAKEOBJDIR}/))
|
||||||
|
@ -152,7 +152,13 @@ DTBOWN?= root
|
|||||||
DTBGRP?= wheel
|
DTBGRP?= wheel
|
||||||
DTBMODE?= 444
|
DTBMODE?= 444
|
||||||
|
|
||||||
LIBDIR?= /usr/lib
|
# Use make.conf / environment LIBDIR as default if set...
|
||||||
|
.if !empty(_PREMK_LIBDIR)
|
||||||
|
LIBDIR_BASE?= ${_PREMK_LIBDIR}
|
||||||
|
.endif
|
||||||
|
# otherwise use our expected default value.
|
||||||
|
LIBDIR_BASE?= /usr/lib
|
||||||
|
LIBDIR?= ${LIBDIR_BASE}
|
||||||
LIBCOMPATDIR?= /usr/lib/compat
|
LIBCOMPATDIR?= /usr/lib/compat
|
||||||
LIBDATADIR?= /usr/libdata
|
LIBDATADIR?= /usr/libdata
|
||||||
LIBEXECDIR?= /usr/libexec
|
LIBEXECDIR?= /usr/libexec
|
||||||
|
@ -53,7 +53,7 @@ STANDALONE_SUBDIR_TARGETS+= \
|
|||||||
maninstall manlint obj objlink
|
maninstall manlint obj objlink
|
||||||
|
|
||||||
# It is safe to install in parallel when staging.
|
# It is safe to install in parallel when staging.
|
||||||
.if defined(NO_ROOT)
|
.if defined(NO_ROOT) || !empty(SYSROOT)
|
||||||
STANDALONE_SUBDIR_TARGETS+= realinstall
|
STANDALONE_SUBDIR_TARGETS+= realinstall
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -42,6 +42,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
|
|||||||
OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
|
OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if !empty(LIBDIR)
|
||||||
|
_PREMK_LIBDIR:= ${LIBDIR}
|
||||||
|
.endif
|
||||||
|
|
||||||
.include "src.sys.mk"
|
.include "src.sys.mk"
|
||||||
|
|
||||||
.if ${.MAKE.MODE:Mmeta*} != ""
|
.if ${.MAKE.MODE:Mmeta*} != ""
|
||||||
|
@ -343,13 +343,13 @@ _DP_rdmacm= ibverbs
|
|||||||
|
|
||||||
# Define special cases
|
# Define special cases
|
||||||
LDADD_supcplusplus= -lsupc++
|
LDADD_supcplusplus= -lsupc++
|
||||||
LIBATF_C= ${DESTDIR}${LIBDIR}/libprivateatf-c.a
|
LIBATF_C= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c.a
|
||||||
LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a
|
LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a
|
||||||
LDADD_atf_c= -lprivateatf-c
|
LDADD_atf_c= -lprivateatf-c
|
||||||
LDADD_atf_cxx= -lprivateatf-c++
|
LDADD_atf_cxx= -lprivateatf-c++
|
||||||
|
|
||||||
.for _l in ${_PRIVATELIBS}
|
.for _l in ${_PRIVATELIBS}
|
||||||
LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a
|
LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for _l in ${_LIBRARIES}
|
.for _l in ${_LIBRARIES}
|
||||||
|
@ -101,7 +101,6 @@ __DEFAULT_YES_OPTIONS = \
|
|||||||
GNU_DIFF \
|
GNU_DIFF \
|
||||||
GNU_GREP \
|
GNU_GREP \
|
||||||
GPIO \
|
GPIO \
|
||||||
GPL_DTC \
|
|
||||||
HAST \
|
HAST \
|
||||||
HTML \
|
HTML \
|
||||||
HYPERV \
|
HYPERV \
|
||||||
@ -222,16 +221,16 @@ __TT=${MACHINE}
|
|||||||
${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
|
${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386")
|
||||||
# Clang is enabled, and will be installed as the default /usr/bin/cc.
|
# Clang is enabled, and will be installed as the default /usr/bin/cc.
|
||||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
|
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
|
||||||
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
|
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
|
||||||
.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64"
|
.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64"
|
||||||
# If an external compiler that supports C++11 is used as ${CC} and Clang
|
# If an external compiler that supports C++11 is used as ${CC} and Clang
|
||||||
# supports the target, then Clang is enabled but GCC is installed as the
|
# supports the target, then Clang is enabled but GCC is installed as the
|
||||||
# default /usr/bin/cc.
|
# default /usr/bin/cc.
|
||||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
|
__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
|
||||||
__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD
|
__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC GPL_DTC LLD
|
||||||
.else
|
.else
|
||||||
# Everything else disables Clang, and uses GCC instead.
|
# Everything else disables Clang, and uses GCC instead.
|
||||||
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
|
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC
|
||||||
__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
|
__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD
|
||||||
.endif
|
.endif
|
||||||
# In-tree binutils/gcc are older versions without modern architecture support.
|
# In-tree binutils/gcc are older versions without modern architecture support.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
FILES= gallant.fnt \
|
FILES= gallant.fnt \
|
||||||
|
terminus-b32.fnt \
|
||||||
vgarom-8x8.fnt \
|
vgarom-8x8.fnt \
|
||||||
vgarom-8x14.fnt \
|
vgarom-8x14.fnt \
|
||||||
vgarom-8x16.fnt \
|
vgarom-8x16.fnt \
|
||||||
|
1294
share/vt/fonts/terminus-b32.hex
Normal file
1294
share/vt/fonts/terminus-b32.hex
Normal file
File diff suppressed because it is too large
Load Diff
@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
|
|||||||
zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
|
zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
|
||||||
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
|
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
|
||||||
|
|
||||||
|
.if make(*install*)
|
||||||
|
TZS!= cd ${TZBUILDDIR} && find -s * -type f
|
||||||
|
.endif
|
||||||
|
|
||||||
beforeinstall: install-zoneinfo
|
beforeinstall: install-zoneinfo
|
||||||
install-zoneinfo:
|
install-zoneinfo:
|
||||||
mkdir -p ${DESTDIR}/usr/share/zoneinfo
|
mkdir -p ${DESTDIR}/usr/share/zoneinfo
|
||||||
cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS}
|
cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS}
|
||||||
cd ${TZBUILDDIR} && \
|
.for f in ${TZS}
|
||||||
find -s * -type f -exec ${INSTALL} ${TAG_ARGS} \
|
${INSTALL} ${TAG_ARGS} \
|
||||||
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
||||||
\{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
|
${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
|
||||||
|
.endfor
|
||||||
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
|
||||||
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
|
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs)
|
|||||||
/* FPU control/status */
|
/* FPU control/status */
|
||||||
penv_87->en_cw = penv_xmm->en_cw;
|
penv_87->en_cw = penv_xmm->en_cw;
|
||||||
penv_87->en_sw = penv_xmm->en_sw;
|
penv_87->en_sw = penv_xmm->en_sw;
|
||||||
penv_87->en_tw = penv_xmm->en_tw;
|
|
||||||
/*
|
/*
|
||||||
* XXX for en_fip/fcs/foo/fos, check if the fxsave format
|
* XXX for en_fip/fcs/foo/fos, check if the fxsave format
|
||||||
* uses the old-style layout for 32 bit user apps. If so,
|
* uses the old-style layout for 32 bit user apps. If so,
|
||||||
@ -170,9 +170,13 @@ fill_fpregs32(struct thread *td, struct fpreg32 *regs)
|
|||||||
/* Entry into the kernel always sets TF_HASSEGS */
|
/* Entry into the kernel always sets TF_HASSEGS */
|
||||||
penv_87->en_fos = td->td_frame->tf_ds;
|
penv_87->en_fos = td->td_frame->tf_ds;
|
||||||
|
|
||||||
/* FPU registers */
|
/* FPU registers and tags */
|
||||||
for (i = 0; i < 8; ++i)
|
penv_87->en_tw = 0xffff;
|
||||||
|
for (i = 0; i < 8; ++i) {
|
||||||
sv_87->sv_ac[i] = sv_fpu->sv_fp[i].fp_acc;
|
sv_87->sv_ac[i] = sv_fpu->sv_fp[i].fp_acc;
|
||||||
|
if ((penv_xmm->en_tw & (1 << i)) != 0)
|
||||||
|
penv_87->en_tw &= ~(3 << i * 2);
|
||||||
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -189,15 +193,19 @@ set_fpregs32(struct thread *td, struct fpreg32 *regs)
|
|||||||
/* FPU control/status */
|
/* FPU control/status */
|
||||||
penv_xmm->en_cw = penv_87->en_cw;
|
penv_xmm->en_cw = penv_87->en_cw;
|
||||||
penv_xmm->en_sw = penv_87->en_sw;
|
penv_xmm->en_sw = penv_87->en_sw;
|
||||||
penv_xmm->en_tw = penv_87->en_tw;
|
|
||||||
penv_xmm->en_rip = penv_87->en_fip;
|
penv_xmm->en_rip = penv_87->en_fip;
|
||||||
/* penv_87->en_fcs and en_fos ignored, see above */
|
/* penv_87->en_fcs and en_fos ignored, see above */
|
||||||
penv_xmm->en_opcode = penv_87->en_opcode;
|
penv_xmm->en_opcode = penv_87->en_opcode;
|
||||||
penv_xmm->en_rdp = penv_87->en_foo;
|
penv_xmm->en_rdp = penv_87->en_foo;
|
||||||
|
|
||||||
/* FPU registers */
|
/* FPU registers and tags */
|
||||||
for (i = 0; i < 8; ++i)
|
penv_xmm->en_tw = 0;
|
||||||
|
for (i = 0; i < 8; ++i) {
|
||||||
sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i];
|
sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i];
|
||||||
|
if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2))
|
||||||
|
penv_xmm->en_tw |= 1 << i;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 8; i < 16; ++i)
|
for (i = 8; i < 16; ++i)
|
||||||
bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc));
|
bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc));
|
||||||
fpuuserinited(td);
|
fpuuserinited(td);
|
||||||
|
@ -565,24 +565,38 @@ aw_fdt_configure_pins(device_t dev, phandle_t cfgxref)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
/* Getting all prop for configuring pins */
|
/* Getting all prop for configuring pins */
|
||||||
pins_nb = ofw_bus_string_list_to_array(node, "allwinner,pins", &pinlist);
|
pins_nb = ofw_bus_string_list_to_array(node, "pins", &pinlist);
|
||||||
if (pins_nb <= 0)
|
if (pins_nb <= 0) {
|
||||||
return (ENOENT);
|
pins_nb = ofw_bus_string_list_to_array(node, "allwinner,pins",
|
||||||
if (OF_getprop_alloc(node, "allwinner,function",
|
&pinlist);
|
||||||
|
if (pins_nb <= 0)
|
||||||
|
return (ENOENT);
|
||||||
|
}
|
||||||
|
if (OF_getprop_alloc(node, "function",
|
||||||
sizeof(*pin_function),
|
sizeof(*pin_function),
|
||||||
(void **)&pin_function) == -1) {
|
(void **)&pin_function) == -1) {
|
||||||
ret = ENOENT;
|
if (OF_getprop_alloc(node, "allwinner,function",
|
||||||
goto out;
|
sizeof(*pin_function),
|
||||||
|
(void **)&pin_function) == -1) {
|
||||||
|
ret = ENOENT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (OF_getencprop(node, "allwinner,drive",
|
if (OF_getencprop(node, "drive",
|
||||||
&pin_drive, sizeof(pin_drive)) == -1) {
|
&pin_drive, sizeof(pin_drive)) == -1) {
|
||||||
ret = ENOENT;
|
if (OF_getencprop(node, "allwinner,drive",
|
||||||
goto out;
|
&pin_drive, sizeof(pin_drive)) == -1) {
|
||||||
|
ret = ENOENT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (OF_getencprop(node, "allwinner,pull",
|
if (OF_getencprop(node, "pull",
|
||||||
&pin_pull, sizeof(pin_pull)) == -1) {
|
&pin_pull, sizeof(pin_pull)) == -1) {
|
||||||
ret = ENOENT;
|
if (OF_getencprop(node, "allwinner,pull",
|
||||||
goto out;
|
&pin_pull, sizeof(pin_pull)) == -1) {
|
||||||
|
ret = ENOENT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure each pin to the correct function, drive and pull */
|
/* Configure each pin to the correct function, drive and pull */
|
||||||
@ -697,6 +711,8 @@ a10_gpio_attach(device_t dev)
|
|||||||
/*
|
/*
|
||||||
* Register as a pinctrl device
|
* Register as a pinctrl device
|
||||||
*/
|
*/
|
||||||
|
fdt_pinctrl_register(dev, "pins");
|
||||||
|
fdt_pinctrl_configure_tree(dev);
|
||||||
fdt_pinctrl_register(dev, "allwinner,pins");
|
fdt_pinctrl_register(dev, "allwinner,pins");
|
||||||
fdt_pinctrl_configure_tree(dev);
|
fdt_pinctrl_configure_tree(dev);
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ static struct ofw_compat_data compat_data[] = {
|
|||||||
{ "allwinner,sun50i-a64", CLOCK_CCU },
|
{ "allwinner,sun50i-a64", CLOCK_CCU },
|
||||||
{ "allwinner,sun8i-a33", CLOCK_CCU },
|
{ "allwinner,sun8i-a33", CLOCK_CCU },
|
||||||
{ "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL },
|
{ "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL },
|
||||||
|
{ "allwinner,sun8i-h2-plus", CLOCK_CCU|CLOCK_PRCM },
|
||||||
{ "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM },
|
{ "allwinner,sun8i-h3", CLOCK_CCU|CLOCK_PRCM },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
@ -261,6 +261,21 @@ static platform_method_t a83t_methods[] = {
|
|||||||
FDT_PLATFORM_DEF(a83t, "a83t", 0, "allwinner,sun8i-a83t", 200);
|
FDT_PLATFORM_DEF(a83t, "a83t", 0, "allwinner,sun8i-a83t", 200);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SOC_ALLWINNER_H2PLUS)
|
||||||
|
static platform_method_t h2_plus_methods[] = {
|
||||||
|
PLATFORMMETHOD(platform_attach, h3_attach),
|
||||||
|
PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init),
|
||||||
|
PLATFORMMETHOD(platform_cpu_reset, allwinner_cpu_reset),
|
||||||
|
|
||||||
|
#ifdef SMP
|
||||||
|
PLATFORMMETHOD(platform_mp_start_ap, aw_mp_start_ap),
|
||||||
|
PLATFORMMETHOD(platform_mp_setmaxid, aw_mp_setmaxid),
|
||||||
|
#endif
|
||||||
|
PLATFORMMETHOD_END,
|
||||||
|
};
|
||||||
|
FDT_PLATFORM_DEF(h2_plus, "h2_plus", 0, "allwinner,sun8i-h2-plus", 200);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SOC_ALLWINNER_H3)
|
#if defined(SOC_ALLWINNER_H3)
|
||||||
static platform_method_t h3_methods[] = {
|
static platform_method_t h3_methods[] = {
|
||||||
PLATFORMMETHOD(platform_attach, h3_attach),
|
PLATFORMMETHOD(platform_attach, h3_attach),
|
||||||
@ -276,6 +291,8 @@ static platform_method_t h3_methods[] = {
|
|||||||
FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200);
|
FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
u_int
|
u_int
|
||||||
allwinner_soc_type(void)
|
allwinner_soc_type(void)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <machine/atomic.h>
|
#include <machine/atomic.h>
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
#include <machine/cpu-v6.h>
|
#include <machine/cpu.h>
|
||||||
#include <machine/md_var.h>
|
#include <machine/md_var.h>
|
||||||
|
|
||||||
#define BUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size
|
#define BUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size
|
||||||
@ -491,6 +491,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||||||
newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
|
newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
|
||||||
newtag->alignment = MAX(parent->alignment, newtag->alignment);
|
newtag->alignment = MAX(parent->alignment, newtag->alignment);
|
||||||
newtag->flags |= parent->flags & BUS_DMA_COULD_BOUNCE;
|
newtag->flags |= parent->flags & BUS_DMA_COULD_BOUNCE;
|
||||||
|
newtag->flags |= parent->flags & BUS_DMA_COHERENT;
|
||||||
if (newtag->boundary == 0)
|
if (newtag->boundary == 0)
|
||||||
newtag->boundary = parent->boundary;
|
newtag->boundary = parent->boundary;
|
||||||
else if (parent->boundary != 0)
|
else if (parent->boundary != 0)
|
||||||
@ -755,11 +756,19 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags,
|
|||||||
}
|
}
|
||||||
map->flags = DMAMAP_DMAMEM_ALLOC;
|
map->flags = DMAMAP_DMAMEM_ALLOC;
|
||||||
|
|
||||||
/* Choose a busdma buffer allocator based on memory type flags. */
|
/* For coherent memory, set the map flag that disables sync ops. */
|
||||||
if (flags & BUS_DMA_COHERENT) {
|
if (flags & BUS_DMA_COHERENT)
|
||||||
|
map->flags |= DMAMAP_COHERENT;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Choose a busdma buffer allocator based on memory type flags.
|
||||||
|
* If the tag's COHERENT flag is set, that means normal memory
|
||||||
|
* is already coherent, use the normal allocator.
|
||||||
|
*/
|
||||||
|
if ((flags & BUS_DMA_COHERENT) &&
|
||||||
|
((dmat->flags & BUS_DMA_COHERENT) == 0)) {
|
||||||
memattr = VM_MEMATTR_UNCACHEABLE;
|
memattr = VM_MEMATTR_UNCACHEABLE;
|
||||||
ba = coherent_allocator;
|
ba = coherent_allocator;
|
||||||
map->flags |= DMAMAP_COHERENT;
|
|
||||||
} else {
|
} else {
|
||||||
memattr = VM_MEMATTR_DEFAULT;
|
memattr = VM_MEMATTR_DEFAULT;
|
||||||
ba = standard_allocator;
|
ba = standard_allocator;
|
||||||
@ -829,7 +838,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
|
|||||||
struct busdma_bufzone *bufzone;
|
struct busdma_bufzone *bufzone;
|
||||||
busdma_bufalloc_t ba;
|
busdma_bufalloc_t ba;
|
||||||
|
|
||||||
if (map->flags & DMAMAP_COHERENT)
|
if ((map->flags & DMAMAP_COHERENT) &&
|
||||||
|
((dmat->flags & BUS_DMA_COHERENT) == 0))
|
||||||
ba = coherent_allocator;
|
ba = coherent_allocator;
|
||||||
else
|
else
|
||||||
ba = standard_allocator;
|
ba = standard_allocator;
|
||||||
@ -1030,7 +1040,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
|
|||||||
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
|
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
|
||||||
curaddr = add_bounce_page(dmat, map, 0, curaddr,
|
curaddr = add_bounce_page(dmat, map, 0, curaddr,
|
||||||
sgsize);
|
sgsize);
|
||||||
} else {
|
} else if ((dmat->flags & BUS_DMA_COHERENT) == 0) {
|
||||||
if (map->sync_count > 0)
|
if (map->sync_count > 0)
|
||||||
sl_end = sl->paddr + sl->datacount;
|
sl_end = sl->paddr + sl->datacount;
|
||||||
|
|
||||||
@ -1144,7 +1154,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
|
|||||||
sgsize)) {
|
sgsize)) {
|
||||||
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr,
|
curaddr = add_bounce_page(dmat, map, kvaddr, curaddr,
|
||||||
sgsize);
|
sgsize);
|
||||||
} else {
|
} else if ((dmat->flags & BUS_DMA_COHERENT) == 0) {
|
||||||
if (map->sync_count > 0) {
|
if (map->sync_count > 0) {
|
||||||
sl_pend = sl->paddr + sl->datacount;
|
sl_pend = sl->paddr + sl->datacount;
|
||||||
sl_vend = sl->vaddr + sl->datacount;
|
sl_vend = sl->vaddr + sl->datacount;
|
||||||
@ -1353,8 +1363,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
|
|||||||
bpage->datacount);
|
bpage->datacount);
|
||||||
if (tempvaddr != 0)
|
if (tempvaddr != 0)
|
||||||
pmap_quick_remove_page(tempvaddr);
|
pmap_quick_remove_page(tempvaddr);
|
||||||
dcache_wb_poc(bpage->vaddr, bpage->busaddr,
|
if ((dmat->flags & BUS_DMA_COHERENT) == 0)
|
||||||
bpage->datacount);
|
dcache_wb_poc(bpage->vaddr,
|
||||||
|
bpage->busaddr, bpage->datacount);
|
||||||
bpage = STAILQ_NEXT(bpage, links);
|
bpage = STAILQ_NEXT(bpage, links);
|
||||||
}
|
}
|
||||||
dmat->bounce_zone->total_bounced++;
|
dmat->bounce_zone->total_bounced++;
|
||||||
@ -1374,8 +1385,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
|
|||||||
if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) {
|
if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) {
|
||||||
bpage = STAILQ_FIRST(&map->bpages);
|
bpage = STAILQ_FIRST(&map->bpages);
|
||||||
while (bpage != NULL) {
|
while (bpage != NULL) {
|
||||||
dcache_inv_poc_dma(bpage->vaddr, bpage->busaddr,
|
if ((dmat->flags & BUS_DMA_COHERENT) == 0)
|
||||||
bpage->datacount);
|
dcache_inv_poc_dma(bpage->vaddr,
|
||||||
|
bpage->busaddr, bpage->datacount);
|
||||||
bpage = STAILQ_NEXT(bpage, links);
|
bpage = STAILQ_NEXT(bpage, links);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1391,8 +1403,9 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
|
|||||||
*/
|
*/
|
||||||
if (op & BUS_DMASYNC_POSTREAD) {
|
if (op & BUS_DMASYNC_POSTREAD) {
|
||||||
while (bpage != NULL) {
|
while (bpage != NULL) {
|
||||||
dcache_inv_poc(bpage->vaddr, bpage->busaddr,
|
if ((dmat->flags & BUS_DMA_COHERENT) == 0)
|
||||||
bpage->datacount);
|
dcache_inv_poc(bpage->vaddr,
|
||||||
|
bpage->busaddr, bpage->datacount);
|
||||||
tempvaddr = 0;
|
tempvaddr = 0;
|
||||||
datavaddr = bpage->datavaddr;
|
datavaddr = bpage->datavaddr;
|
||||||
if (datavaddr == 0) {
|
if (datavaddr == 0) {
|
||||||
@ -1421,7 +1434,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
|
|||||||
if (map->flags & DMAMAP_COHERENT) {
|
if (map->flags & DMAMAP_COHERENT) {
|
||||||
if (op & BUS_DMASYNC_PREWRITE) {
|
if (op & BUS_DMASYNC_PREWRITE) {
|
||||||
dsb();
|
dsb();
|
||||||
cpu_l2cache_drain_writebuf();
|
if ((dmat->flags & BUS_DMA_COHERENT) == 0)
|
||||||
|
cpu_l2cache_drain_writebuf();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
#include <sys/kernel.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
@ -77,6 +78,14 @@ void
|
|||||||
cpuinfo_init(void)
|
cpuinfo_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prematurely fetch CPU quirks. Standard fetch for tunable
|
||||||
|
* sysctls is handled using SYSINIT, thus too late for boot CPU.
|
||||||
|
* Keep names in sync with sysctls.
|
||||||
|
*/
|
||||||
|
TUNABLE_INT_FETCH("hw.cpu.quirks.actlr_mask", &cpu_quirks_actlr_mask);
|
||||||
|
TUNABLE_INT_FETCH("hw.cpu.quirks.actlr_set", &cpu_quirks_actlr_set);
|
||||||
|
|
||||||
cpuinfo.midr = cp15_midr_get();
|
cpuinfo.midr = cp15_midr_get();
|
||||||
/* Test old version id schemes first */
|
/* Test old version id schemes first */
|
||||||
if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) {
|
if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) {
|
||||||
|
@ -1445,11 +1445,11 @@ arm_gicv2m_alloc_msi(device_t dev, device_t child, int count, int maxcount,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
KASSERT((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI)!= 0,
|
KASSERT((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI)!= 0,
|
||||||
("%s: Non-MSI interrupt found", __func__));
|
("%s: Non-MSI interrupt found", __func__));
|
||||||
|
|
||||||
/* This is already used */
|
/* This is already used */
|
||||||
if ((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI_USED) ==
|
if ((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI_USED) ==
|
||||||
GI_FLAG_MSI_USED) {
|
GI_FLAG_MSI_USED) {
|
||||||
found = false;
|
found = false;
|
||||||
break;
|
break;
|
||||||
|
@ -365,7 +365,7 @@ svcstk:
|
|||||||
* Memory for the initial pagetable. We are unable to place this in
|
* Memory for the initial pagetable. We are unable to place this in
|
||||||
* the bss as this will be cleared after the table is loaded.
|
* the bss as this will be cleared after the table is loaded.
|
||||||
*/
|
*/
|
||||||
.section ".init_pagetable"
|
.section ".init_pagetable", "aw", %nobits
|
||||||
.align 14 /* 16KiB aligned */
|
.align 14 /* 16KiB aligned */
|
||||||
pagetable:
|
pagetable:
|
||||||
.space L1_TABLE_SIZE
|
.space L1_TABLE_SIZE
|
||||||
|
@ -436,7 +436,7 @@ svcstk:
|
|||||||
* Memory for the initial pagetable. We are unable to place this in
|
* Memory for the initial pagetable. We are unable to place this in
|
||||||
* the bss as this will be cleared after the table is loaded.
|
* the bss as this will be cleared after the table is loaded.
|
||||||
*/
|
*/
|
||||||
.section ".init_pagetable"
|
.section ".init_pagetable", "aw", %nobits
|
||||||
.align 14 /* 16KiB aligned */
|
.align 14 /* 16KiB aligned */
|
||||||
.globl boot_pt1
|
.globl boot_pt1
|
||||||
boot_pt1:
|
boot_pt1:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user