Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2016-04-04 23:55:32 +00:00
commit d60840138f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/release-pkg/; revision=297567
912 changed files with 38378 additions and 8675 deletions

View File

@ -124,7 +124,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
installworld kernel-toolchain libraries lint maninstall \
obj objlink rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
_build-tools _cross-tools _includes _libraries \
build32 distribute32 install32 build32 distribute32 install32 \
builddtb xdev xdev-build xdev-install \
xdev-links native-xtools stageworld stagekernel stage-packages \

View File

@ -7,10 +7,9 @@
# -DDB_FROM_SRC use the user/group databases in src/etc instead of
# the system database when installing.
# -DNO_SHARE do not go into share subdir
# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ}
# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ}
# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
# -DNO_ROOT install without using root privilege
@ -145,16 +144,6 @@ CLEANDIR= clean cleandepend
CLEANDIR= cleandir
.endif
# FAST_DEPEND can skip depend tree-walks.
.if ${MK_FAST_DEPEND} == "yes"
NO_DEPEND= t
NO_KERNELDEPEND=t
.endif
# Ensure shell checks later have a value.
.if defined(NO_DEPEND)
NO_DEPEND= t
.endif
LOCAL_TOOL_DIRS?=
PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
@ -380,7 +369,6 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \
# world stage
WMAKEENV= ${CROSSENV} \
_LDSCRIPTROOT= \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH}
@ -427,22 +415,22 @@ X${BINUTIL}?= ${${BINUTIL}}
.endif
.endfor
CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
DEPFLAGS="${DEPFLAGS}" \
CPP="${XCPP} ${XCFLAGS}" \
AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \
OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \
RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \
SIZE="${XSIZE}"
.if ${XCC:N${CCACHE_BIN}:M/*}
.if defined(CROSS_BINUTILS_PREFIX)
.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX})
# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
# directory, but the compiler will look in the right place for it's
# directory, but the compiler will look in the right place for its
# tools so we don't need to tell it where to look.
.if exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif
.else
# External compiler needs sysroot and target flags.
.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no"
.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${WORLDTMP}/usr/bin
.endif
.if ${TARGET} == "arm"
@ -453,26 +441,23 @@ TARGET_ABI= gnueabi
.endif
.endif
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
# GCC requires -isystem and -L when using a cross-compiler.
XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
XCXXFLAGS+= -I${WORLDTMP}/usr/include/c++/v1 -std=gnu++11 -L${WORLDTMP}/../lib/libc++
# XXX: DEPFLAGS is a workaround for not properly passing CXXFLAGS to sub-makes
# due to CXX="${XCXX} ${XCXXFLAGS}". bsd.dep.mk does use CXXFLAGS when
# building C++ files so this can come out if passing CXXFLAGS down is fixed.
DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1
# Force using libc++ for external GCC.
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
-nostdinc++ -L${WORLDTMP}/../lib/libc++
.else
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+= -target ${TARGET_TRIPLE}
.endif
XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS}
XCFLAGS+= --sysroot=${WORLDTMP}
.else
.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no"
.if !empty(BFLAGS)
XCFLAGS+= ${BFLAGS}
XCXXFLAGS+= ${BFLAGS}
.endif
.endif # ${XCC:M/*}
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
${TARGET_ARCH} == "powerpc64")
@ -645,9 +630,9 @@ _includes:
# Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need
# headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last.
${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \
includes
MK_INCLUDES=yes includes
.if !empty(SUBDIR_OVERRIDE) && make(buildworld)
${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
${_+_}cd ${.CURDIR}; ${WMAKE} MK_INCLUDES=yes SHARED=symlinks includes
.endif
_libraries:
@echo
@ -657,16 +642,10 @@ _libraries:
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \
MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries
_depend:
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 4.3: make dependencies"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} depend
everything:
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 4.4: building everything"
@echo ">>> stage 4.3: building everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all
@ -677,9 +656,6 @@ WMAKE_TGTS+= _bootstrap-tools
.endif
WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools
WMAKE_TGTS+= _includes _libraries
.if !defined(NO_DEPEND)
WMAKE_TGTS+= _depend
.endif
WMAKE_TGTS+= everything
.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
WMAKE_TGTS+= build${libcompat}
@ -722,7 +698,7 @@ buildenv: .PHONY
@cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \
|| true
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild${libcompat}}
TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
toolchain: ${TOOLCHAIN_TGTS}
kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
@ -1034,7 +1010,6 @@ distrib-dirs distribution: .MAKE .PHONY
.if defined(KERNFAST)
NO_KERNELCLEAN= t
NO_KERNELCONFIG= t
NO_KERNELDEPEND= t
NO_KERNELOBJ= t
# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
.if !defined(KERNCONF) && ${KERNFAST} != "1"
@ -1116,16 +1091,9 @@ buildkernel: .MAKE .PHONY
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools
.if !defined(NO_KERNELDEPEND)
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 3.1: making dependencies"
@echo "--------------------------------------------------------------"
${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
.endif
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 3.2: building everything"
@echo ">>> stage 3.1: building everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
@echo "--------------------------------------------------------------"
@ -1459,11 +1427,10 @@ legacy:
false
.endif
.for _tool in tools/build ${_elftoolchain_libs}
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
.endfor
@ -1533,6 +1500,11 @@ _crunch= usr.sbin/crunch
_awk= usr.bin/awk
.endif
# r296926 -P keymap search path
.if ${BOOTSTRAPPING} < 1100103
_kbdcontrol= usr.sbin/kbdcontrol
.endif
_yacc= lib/liby \
usr.bin/yacc
@ -1597,6 +1569,7 @@ bootstrap-tools: .PHONY
${_awk} \
${_cat} \
${_dd} \
${_kbdcontrol} \
usr.bin/lorder \
${_libopenbsd} \
${_makewhatis} \
@ -1613,10 +1586,9 @@ bootstrap-tools: .PHONY
${_vtfontcvt} \
usr.bin/localedef
${_bt}-${_tool}: .PHONY .MAKE
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
@ -1662,10 +1634,9 @@ build-tools: build-tools_${_tool}
.for _tool in \
${_gcc_tools}
build-tools_${_tool}: .PHONY
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all
build-tools: build-tools_${_tool}
.endfor
@ -1746,10 +1717,9 @@ cross-tools: .MAKE .PHONY
${_btxld} \
${_crunchide} \
${_usb_tools}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
.endfor
@ -1778,10 +1748,9 @@ NXBMAKE= ${NXBENV} ${MAKE} \
native-xtools: .PHONY
.if ${MK_GCC_BOOTSTRAP} != "no"
mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
cd ${.CURDIR}/${_gperf}; \
${NXBMAKE} DIRPRFX=${_gperf}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ depend; fi; \
${NXBMAKE} DIRPRFX=${_gperf}/ all; \
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
.endif
@ -1853,10 +1822,9 @@ native-xtools: .PHONY
usr.bin/xz \
usr.bin/yacc \
usr.sbin/chown
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${NXBMAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ depend; fi; \
${NXBMAKE} DIRPRFX=${_tool}/ all; \
${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
.endfor
@ -2092,10 +2060,9 @@ gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L
.for _lib in ${_prereq_libs}
${_lib}__PL: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
@ -2106,10 +2073,9 @@ ${_lib}__PL: .PHONY .MAKE
.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
.endif
@ -2119,10 +2085,9 @@ ${_lib}__L: .PHONY .MAKE
# static PAM library, and dynamic PAM library before dynamic PAM
# modules.
lib/libpam__L: .PHONY .MAKE
${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> lib/libpam (obj,all,install)"; \
cd ${.CURDIR}/lib/libpam; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend; fi; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET all; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
@ -2417,10 +2382,9 @@ _xb-bootstrap-tools: .PHONY
.for _tool in \
${_clang_tblgen} \
${_gperf}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all; \
${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install
.endfor
@ -2437,10 +2401,9 @@ _xb-cross-tools: .PHONY
${_clang_libs} \
${_clang} \
${_cc}
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ obj; \
if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all
.endfor

View File

@ -52,7 +52,8 @@ LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP
# Generic code for each type.
# Set defaults based on type.
libcompat= ${LIBCOMPAT:tl}
_LIBCOMPAT_MAKEVARS= _OBJTREE TMP CPUFLAGS CFLAGS WMAKEENV WMAKEFLAGS WMAKE
_LIBCOMPAT_MAKEVARS= _OBJTREE TMP CPUFLAGS CFLAGS CXXFLAGS WMAKEENV \
WMAKEFLAGS WMAKE
.for _var in ${_LIBCOMPAT_MAKEVARS}
.if !empty(LIB${LIBCOMPAT}${_var})
LIBCOMPAT${_var}?= ${LIB${LIBCOMPAT}${_var}}
@ -64,22 +65,32 @@ LIBCOMPAT_OBJTREE?= ${OBJTREE}${.CURDIR}/world${libcompat}
LIBCOMPATTMP?= ${OBJTREE}${.CURDIR}/lib${libcompat}
LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \
-isystem ${LIBCOMPATTMP}/usr/include/ \
-L${LIBCOMPATTMP}/usr/lib${libcompat} \
-B${LIBCOMPATTMP}/usr/lib${libcompat}
--sysroot=${LIBCOMPATTMP} \
${BFLAGS}
# -B is needed to find /usr/lib32/crti.o for GCC and /usr/libsoft/crti.o for
# Clang/GCC.
LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
# GCC requires -isystem when using a cross-compiler.
LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include
.if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
# Force using libc++ for external GCC.
LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \
-nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++
.endif
# Yes, the flags are redundant.
LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
_LDSCRIPTROOT=${LIBCOMPATTMP} \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
LIBDIR=/usr/lib${libcompat} \
SHLIBDIR=/usr/lib${libcompat} \
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
CXX="${XCXX} ${LIBCOMPATCFLAGS}" \
CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \
DESTDIR=${LIBCOMPATTMP} \
-DLIBRARIES_ONLY \
-DNO_CPU_CFLAGS \
MK_CTF=no \
-DNO_LINT \
@ -87,17 +98,19 @@ LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
LIBCOMPATWMAKE+= ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \
MK_MAN=no MK_HTML=no
LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} \
MK_TOOLCHAIN=no ${IMAKE_INSTALL}
.if ${XCC:N${CCACHE_BIN}:M/*}
LIBCOMPATCFLAGS+= --sysroot=${WORLDTMP}
.endif
MK_TOOLCHAIN=no ${IMAKE_INSTALL} \
-DLIBRARIES_ONLY
_LC_LIBDIRS.yes= lib gnu/lib
_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib
_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib
_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib
_LC_INCDIRS= \
include \
lib/ncurses/ncursesw \
${_LC_LIBDIRS.yes}
# Shared logic
build${libcompat}: .PHONY
@echo
@ -120,14 +133,11 @@ build${libcompat}: .PHONY
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.for _t in obj includes
${_+_}cd ${.CURDIR}/include; ${LIBCOMPATWMAKE} DIRPRFX=include/ ${_t}
.for _dir in ${_LC_LIBDIRS.yes}
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} DIRPRFX=${_dir}/ ${_t}
.for _dir in ${_LC_INCDIRS}
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} MK_INCLUDES=yes \
DIRPRFX=${_dir}/ ${_t}
.endfor
.endfor
.for _dir in usr.bin/lex/lib
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATWMAKE} DIRPRFX=${_dir}/ obj
.endfor
.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
${_+_}cd ${.CURDIR}/${_dir}; \
WORLDTMP=${WORLDTMP} \
@ -139,7 +149,7 @@ build${libcompat}: .PHONY
${_+_}cd ${.CURDIR}; \
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
.if ${libcompat} == "32"
.for _t in obj depend all
.for _t in obj all
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \

View File

@ -38,6 +38,9 @@
# xargs -n1 | sort | uniq -d;
# done
# 20160317: rman_res_t size bump to uintmax_t
OLD_LIBS+=usr/lib/libdevinfo.so.5
OLD_LIBS+=usr/lib32/libdevinfo.so.5
# 20160305: new clang import which bumps version from 3.7.1 to 3.8.0.
OLD_FILES+=usr/bin/macho-dump
OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h

View File

@ -31,6 +31,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20160330:
The FAST_DEPEND build option has been removed and its functionality is
now the one true way. The old mkdep(1) style of 'make depend' has
been removed. See 20160311 for further details.
20160317:
Resource range types have grown from unsigned long to uintmax_t. All
drivers, and anything using libdevinfo, need to be recompiled.
20160311:
WITH_FAST_DEPEND is now enabled by default for in-tree and out-of-tree
builds. It no longer runs mkdep(1) during 'make depend', and the

View File

@ -141,7 +141,7 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
@echo '#ifndef _h_tc_const' >> ${.TARGET}
@echo '#define _h_tc_const' >> ${.TARGET}
${CC} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \
${CC:N${CCACHE_BIN}} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \
grep 'Char STR' | \
sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
sort >> ${.TARGET}

View File

@ -110,8 +110,7 @@ env ROOT=/mnt /mnt/bin/freebsd-version -ku
.Ed
.Sh SEE ALSO
.Xr uname 1 ,
.Xr loader.conf 5 ,
.Xr freebsd-version 8
.Xr loader.conf 5
.Sh HISTORY
The
.Nm

View File

@ -152,6 +152,7 @@ FILES+= trap13.0
FILES+= trap14.0
FILES+= trap15.0
FILES+= trap16.0
FILES+= trap17.0
FILES+= trap2.0
FILES+= trap3.0
FILES+= trap4.0

View File

@ -0,0 +1,10 @@
# $FreeBSD$
# This use-after-free bug probably needs non-default settings to show up.
v1=nothing v2=nothing
trap 'trap "echo bad" USR1
v1=trap_received
v2=trap_invoked
:' USR1
kill -USR1 "$$"
[ "$v1.$v2" = trap_received.trap_invoked ]

View File

@ -412,6 +412,7 @@ onsig(int signo)
void
dotrap(void)
{
struct stackmark smark;
int i;
int savestatus, prev_evalskip, prev_skipcount;
@ -445,7 +446,9 @@ dotrap(void)
last_trapsig = i;
savestatus = exitstatus;
evalstring(trap[i], 0);
setstackmark(&smark);
evalstring(stsavestr(trap[i]), 0);
popstackmark(&smark);
/*
* If such a command was not

View File

@ -1633,8 +1633,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
* its canmount property to 'on' or 'noauto'. We only use
* the changelist logic to unmount when setting canmount=off.
*/
if (!(prop == ZFS_PROP_CANMOUNT &&
fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) {
if (prop != ZFS_PROP_CANMOUNT ||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
zfs_is_mounted(zhp, NULL))) {
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
if (cls[cl_idx] == NULL)
goto error;

View File

@ -3479,7 +3479,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
}
if (clp) {
err |= changelist_postfix(clp);
if (!flags->nomount)
err |= changelist_postfix(clp);
changelist_free(clp);
}

View File

@ -366,10 +366,13 @@ cv_timedwait_hires(kcondvar_t *cv, kmutex_t *mp, hrtime_t tim, hrtime_t res,
timestruc_t ts;
hrtime_t delta;
ASSERT(flag == 0);
ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE);
top:
delta = tim - gethrtime();
delta = tim;
if (flag & CALLOUT_FLAG_ABSOLUTE)
delta -= gethrtime();
if (delta <= 0)
return (-1);

View File

@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
@ -324,6 +324,7 @@ extern gid_t *crgetgroups(cred_t *cr);
typedef cond_t kcondvar_t;
#define CV_DEFAULT USYNC_THREAD
#define CALLOUT_FLAG_ABSOLUTE 0x2
extern void cv_init(kcondvar_t *cv, char *name, int type, void *arg);
extern void cv_destroy(kcondvar_t *cv);

View File

@ -1,3 +1,20 @@
2016-03-15 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (_MAKE_VERSION): 20160315
Merge with NetBSD make, pick up
o fix handling of archive members
2016-03-13 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (_MAKE_VERSION): rename variable to avoid interference
with checks for ${MAKE_VERSION}
2016-03-10 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (MAKE_VERSION): 20160310
Merge with NetBSD make, pick up
o meta.c: treat missing Read file same as Write, incase we Delete it.
2016-03-07 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (MAKE_VERSION): 20160307

View File

@ -1,7 +1,7 @@
# $Id: Makefile,v 1.55 2016/03/07 22:02:47 sjg Exp $
# $Id: Makefile,v 1.58 2016/03/15 23:39:12 sjg Exp $
# Base version on src date
MAKE_VERSION= 20160307
_MAKE_VERSION= 20160315
PROG= bmake
@ -76,7 +76,7 @@ CFLAGS+= ${CPPFLAGS}
CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
# meta mode can be useful even without filemon
FILEMON_H ?= /usr/include/dev/filemon/filemon.h

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.254 2016/02/20 01:43:28 wiz Exp $
.\" $NetBSD: make.1,v 1.255 2016/03/14 07:42:15 matthias Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -685,6 +685,9 @@ or it will not be recognized.
.It Va .TARGET
The name of the target; also known as
.Ql Va @ .
For compatibility with other makes this is an alias for
.Ic .ARCHIVE
in archive member rules.
.El
.Pp
The shorter forms

View File

@ -438,7 +438,9 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog-
nized.
_._T_A_R_G_E_T The name of the target; also known as `_@'.
_._T_A_R_G_E_T The name of the target; also known as `_@'. For compati-
bility with other makes this is an alias for ..AARRCCHHIIVVEE in
archive member rules.
The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted
for backward compatibility with historical makefiles and legacy POSIX

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.254 2016/02/20 01:43:28 wiz Exp $
.\" $NetBSD: make.1,v 1.255 2016/03/14 07:42:15 matthias Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -685,6 +685,9 @@ or it will not be recognized.
.It Va .TARGET
The name of the target; also known as
.Ql Va @ .
For compatibility with other makes this is an alias for
.Ic .ARCHIVE
in archive member rules.
.El
.Pp
The shorter forms

View File

@ -1,4 +1,4 @@
/* $NetBSD: meta.c,v 1.53 2016/03/07 21:45:43 christos Exp $ */
/* $NetBSD: meta.c,v 1.54 2016/03/11 07:01:21 sjg Exp $ */
/*
* Implement 'meta' mode.
@ -1190,7 +1190,8 @@ meta_oodate(GNode *gn, Boolean oodate)
if ((link_src != NULL && lstat(p, &fs) < 0) ||
(link_src == NULL && stat(p, &fs) < 0)) {
Lst_AtEnd(missingFiles, bmake_strdup(p));
if (Lst_Find(missingFiles, p, string_match) == NULL)
Lst_AtEnd(missingFiles, bmake_strdup(p));
}
break;
check_link_src:
@ -1281,9 +1282,8 @@ meta_oodate(GNode *gn, Boolean oodate)
* A referenced file outside of CWD is missing.
* We cannot catch every eventuality here...
*/
if (DEBUG(META))
fprintf(debug_file, "%s: %d: file '%s' may have moved?...\n", fname, lineno, p);
oodate = TRUE;
if (Lst_Find(missingFiles, p, string_match) == NULL)
Lst_AtEnd(missingFiles, bmake_strdup(p));
}
}
if (buf[0] == 'E') {

View File

@ -1,3 +1,26 @@
2016-03-15 Simon J. Gerraty <sjg@bad.crufty.net>
* install-mk (MK_VERSION): 20160315
* meta.stage.mk (LN_CP_SCRIPT): do not ln(1) if we have to chmod(1)
normally only applies to scripts.
* dirdeps.mk: NO_DIRDEPS_BELOW to supress DIRDEPS below RELDIR as
well as outside it.
2016-03-10 Simon J. Gerraty <sjg@bad.crufty.net>
* install-mk (MK_VERSION): 20160310
* dirdeps.mk: use targets rather than a list to track DIRDEPS that
we have processed; the list gets very inefficient as number of
DIRDEPS gets large.
* sys.dependfile.mk: fix comment wrt MACHINE
* meta.autodep.mk: ignore staged DPADDs when bootstrapping.
patch from Bryan Drewery
2016-03-02 Simon J. Gerraty <sjg@bad.crufty.net>
* meta2deps.sh: don't ignore subdirs.

View File

@ -1,4 +1,4 @@
# $Id: dirdeps.mk,v 1.59 2016/02/26 23:32:29 sjg Exp $
# $Id: dirdeps.mk,v 1.62 2016/03/16 00:11:53 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@ -135,7 +135,6 @@ start_utc := ${now_utc}
# make sure these are empty to start with
_DEP_TARGET_SPEC =
_DIRDEP_CHECKED =
# If TARGET_SPEC_VARS is other than just MACHINE
# it should be set by sys.mk or similar by now.
@ -225,7 +224,7 @@ _DEP_TARGET_SPEC = ${_last_dependfile:${M_dep_qual_fixes:ts:}:E}
.endif
.if !empty(_last_dependfile)
# record that we've read dependfile for this
_DIRDEP_CHECKED += ${_CURDIR}.${TARGET_SPEC}
_dirdeps_checked.${_CURDIR}.${TARGET_SPEC}:
.endif
.endif
@ -306,8 +305,10 @@ DEP_SKIP_DIR = ${SKIP_DIR} \
NSkipDir = ${DEP_SKIP_DIR:${M_ListToSkip}}
.if defined(NO_DIRDEPS) || defined(NODIRDEPS) || defined(WITHOUT_DIRDEPS)
# confine ourselves to the original dir
# confine ourselves to the original dir and below.
DIRDEPS_FILTER += M${_DEP_RELDIR}*
.elif defined(NO_DIRDEPS_BELOW)
DIRDEPS_FILTER += M${_DEP_RELDIR}
.endif
# this is what we run below
@ -597,9 +598,9 @@ ${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m}
# Now find more dependencies - and recurse.
.for d in ${_build_all_dirs}
.if ${_DIRDEP_CHECKED:M$d} == ""
.if !target(_dirdeps_checked.$d)
# once only
_DIRDEP_CHECKED += $d
_dirdeps_checked.$d:
.if ${_debug_search}
.info checking $d
.endif

View File

@ -55,7 +55,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
# $Id: install-mk,v 1.121 2016/02/27 00:23:02 sjg Exp $
# $Id: install-mk,v 1.123 2016/03/16 00:13:16 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@ -70,7 +70,7 @@
# sjg@crufty.net
#
MK_VERSION=20160226
MK_VERSION=20160315
OWNER=
GROUP=
MODE=444

View File

@ -1,4 +1,4 @@
# $Id: meta.autodep.mk,v 1.40 2016/02/22 22:44:58 sjg Exp $
# $Id: meta.autodep.mk,v 1.41 2016/03/11 01:29:38 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@ -195,7 +195,7 @@ gendirdeps: ${_DEPENDFILE}
# The pseudo machine "host" is used for HOST_TARGET
DIRDEPS += \
${DPADD:M${_OBJTOP}*:H:C,${_OBJTOP}[^/]*/,,:N.:O:u} \
${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u}
${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:N${STAGE_ROOT:U${_OBJTOP}}/*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u}
.endif
.endif

View File

@ -1,4 +1,4 @@
# $Id: meta.stage.mk,v 1.43 2016/02/24 18:46:32 sjg Exp $
# $Id: meta.stage.mk,v 1.44 2016/03/16 18:21:23 sjg Exp $
#
# @(#) Copyright (c) 2011, Simon J. Gerraty
#
@ -58,7 +58,7 @@ GENDIRDEPS_FILTER += Nnot-empty-is-important \
LN_CP_SCRIPT = LnCp() { \
rm -f $$2 2> /dev/null; \
ln $$1 $$2 2> /dev/null || \
{ [ -z "$$mode" ] && ln $$1 $$2 2> /dev/null; } || \
cp -p $$1 $$2; }
# a staging conflict should cause an error

View File

@ -1,4 +1,4 @@
# $Id: sys.dependfile.mk,v 1.7 2016/02/20 01:57:39 sjg Exp $
# $Id: sys.dependfile.mk,v 1.8 2016/03/11 01:34:13 sjg Exp $
#
# @(#) Copyright (c) 2012, Simon J. Gerraty
#
@ -48,7 +48,7 @@ _e := ${.MAKE.DEPENDFILE_PREFERENCE:@m@${exists($m):?$m:}@}
# MACHINE specific depend files are supported, but *not* default.
# If any already exist, we should follow suit.
_aml = ${ALL_MACHINE_LIST:Uarm amd64 i386 powerpc:N${MACHINE}} ${MACHINE}
# MACHINE must be the last entry in _aml ;-)
# make sure we restore MACHINE
_m := ${MACHINE}
_e := ${_aml:@MACHINE@${.MAKE.DEPENDFILE_PREFERENCE:@m@${exists($m):?$m:}@}@}
MACHINE := ${_m}

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.c,v 1.212 2016/02/19 06:19:06 sjg Exp $ */
/* $NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: parse.c,v 1.212 2016/02/19 06:19:06 sjg Exp $";
static char rcsid[] = "$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: parse.c,v 1.212 2016/02/19 06:19:06 sjg Exp $");
__RCSID("$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $");
#endif
#endif /* not lint */
#endif
@ -1261,6 +1261,7 @@ ParseDoDependency(char *line)
goto out;
} else {
/* Done with this word; on to the next. */
cp = line;
continue;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: suff.c,v 1.78 2016/02/18 18:29:14 christos Exp $ */
/* $NetBSD: suff.c,v 1.81 2016/03/15 18:30:14 matthias Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: suff.c,v 1.78 2016/02/18 18:29:14 christos Exp $";
static char rcsid[] = "$NetBSD: suff.c,v 1.81 2016/03/15 18:30:14 matthias Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
__RCSID("$NetBSD: suff.c,v 1.78 2016/02/18 18:29:14 christos Exp $");
__RCSID("$NetBSD: suff.c,v 1.81 2016/03/15 18:30:14 matthias Exp $");
#endif
#endif /* not lint */
#endif
@ -1894,6 +1894,7 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
TARGET, /* Must be first */
PREFIX, /* Must be second */
};
LstNode ln, nln; /* Next suffix node to check */
int i; /* Index into copy and vals */
Suff *ms; /* Suffix descriptor for member */
char *name; /* Start of member's name */
@ -1955,6 +1956,20 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
Var_Set(MEMBER, name, gn, 0);
Var_Set(ARCHIVE, gn->name, gn, 0);
/*
* Set $@ for compatibility with other makes
*/
Var_Set(TARGET, gn->name, gn, 0);
/*
* Now we've got the important local variables set, expand any sources
* that still contain variables or wildcards in their names.
*/
for (ln = Lst_First(gn->children); ln != NULL; ln = nln) {
nln = Lst_Succ(ln);
SuffExpandChildren(ln, gn);
}
if (ms != NULL) {
/*
* Member has a known suffix, so look for a transformation rule from
@ -1962,7 +1977,6 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
* through the entire list, we just look at suffixes to which the
* member's suffix may be transformed...
*/
LstNode ln;
SuffixCmpData sd; /* Search string data */
/*
@ -2002,9 +2016,10 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
/*
* Flag the member as such so we remember to look in the archive for
* its modification time.
* its modification time. The OP_JOIN | OP_MADE is needed because this
* target should never get made.
*/
mem->type |= OP_MEMBER;
mem->type |= OP_MEMBER | OP_JOIN | OP_MADE;
}
/*-

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.206 2016/03/07 20:20:35 sjg Exp $ */
/* $NetBSD: var.c,v 1.207 2016/03/11 15:12:39 matthias Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: var.c,v 1.206 2016/03/07 20:20:35 sjg Exp $";
static char rcsid[] = "$NetBSD: var.c,v 1.207 2016/03/11 15:12:39 matthias Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: var.c,v 1.206 2016/03/07 20:20:35 sjg Exp $");
__RCSID("$NetBSD: var.c,v 1.207 2016/03/11 15:12:39 matthias Exp $");
#endif
#endif /* not lint */
#endif
@ -3699,11 +3699,11 @@ Var_Parse(const char *str, GNode *ctxt, int flags,
case '@':
return UNCONST("$(.TARGET)");
case '%':
return UNCONST("$(.ARCHIVE)");
return UNCONST("$(.MEMBER)");
case '*':
return UNCONST("$(.PREFIX)");
case '!':
return UNCONST("$(.MEMBER)");
return UNCONST("$(.ARCHIVE)");
}
}
/*

View File

@ -47,6 +47,7 @@ struct tcp_index {
static uint64_t tcp_tick;
static uint64_t tcp_stats_tick;
static struct tcpstat tcpstat;
static uint64_t tcps_states[TCP_NSTATES];
static struct xinpgen *xinpgen;
static size_t xinpgen_len;
static u_int tcp_total;
@ -78,6 +79,17 @@ fetch_tcp_stats(void)
return (-1);
}
len = sizeof(tcps_states);
if (sysctlbyname("net.inet.tcp.states", &tcps_states, &len, NULL,
0) == -1) {
syslog(LOG_ERR, "net.inet.tcp.states: %m");
return (-1);
}
if (len != sizeof(tcps_states)) {
syslog(LOG_ERR, "net.inet.tcp.states: wrong size");
return (-1);
}
tcp_stats_tick = get_ticks();
return (0);
@ -231,8 +243,8 @@ op_tcp(struct snmp_context *ctx __unused, struct snmp_value *value,
break;
case LEAF_tcpCurrEstab:
value->v.uint32 = tcpstat.tcps_states[TCPS_ESTABLISHED] +
tcpstat.tcps_states[TCPS_CLOSE_WAIT];
value->v.uint32 = tcps_states[TCPS_ESTABLISHED] +
tcps_states[TCPS_CLOSE_WAIT];
break;
case LEAF_tcpInSegs:

View File

@ -1,3 +1,28 @@
2016-03-24 Thomas E. Dickey <tom@invisible-island.net>
* reader.c: unused variable
* package/pkgsrc/Makefile, package/debian/copyright: bump
2016-03-24 Jung-uk.Kim
* main.c:
correct logic for finding output suffix in the "-o" option, which matched
the first occurrence of ".c" in the name in 2005-08-13 changes rather than
at the end of the filename (patch by Jung-uk Kim)
2016-03-24 Thomas E. Dickey <tom@invisible-island.net>
* aclocal.m4:
update CF_WITH_MAN2HTML to use configured shell rather than /bin/sh
* VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump
2016-01-25 Thomas E. Dickey <tom@invisible-island.net>
* config.guess, config.sub: 2016-01-01
2015-07-10 Thomas E. Dickey <tom@invisible-island.net>
* lr0.c: fix a duplicate-free in the leak-checking
@ -2275,7 +2300,7 @@
* vmsbuild.com: original version
2000-02-23 Thomas E. Dickey <dickey@invisible-island.net>
2000-02-23 dickey
* test/RCS, RCS: PERMIT FILE

View File

@ -1,4 +1,4 @@
MANIFEST for byacc-20150711, version t20150711
MANIFEST for byacc-20160324, version t20160324
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20150711
20160324

View File

@ -1,7 +1,7 @@
dnl $Id: aclocal.m4,v 1.38 2015/07/05 22:16:23 tom Exp $
dnl $Id: aclocal.m4,v 1.39 2016/03/25 00:06:44 tom Exp $
dnl Macros for byacc configure script (Thomas E. Dickey)
dnl ---------------------------------------------------------------------------
dnl Copyright 2004-2014,2015 Thomas E. Dickey
dnl Copyright 2004-2015,2016 Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@ -1121,7 +1121,7 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_MAN2HTML version: 4 updated: 2015/05/03 19:10:48
dnl CF_WITH_MAN2HTML version: 5 updated: 2015/08/20 04:51:36
dnl ----------------
dnl Check for man2html and groff. Optionally prefer man2html over groff.
dnl Generate a shell script which hides the differences between the two.
@ -1157,7 +1157,7 @@ esac
MAN2HTML_TEMP="man2html.tmp"
cat >$MAN2HTML_TEMP <<CF_EOF
#!/bin/sh
#!$SHELL
# Temporary script generated by CF_WITH_MAN2HTML
# Convert inputs to html, sending result to standard output.
#
@ -1184,7 +1184,7 @@ then
MAN2HTML_NOTE="$GROFF_NOTE"
MAN2HTML_PATH="$GROFF_PATH"
cat >>$MAN2HTML_TEMP <<CF_EOF
/bin/sh -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
$SHELL -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
CF_EOF
else
MAN2HTML_NOTE=""
@ -1287,7 +1287,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -1357,6 +1357,9 @@ case $host_os in
(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
(os2*)
cf_XOPEN_SOURCE=
;;
(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;

View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-03-04'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -27,7 +27,7 @@ timestamp='2015-03-04'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -221,7 +221,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@ -962,6 +965,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
@ -1038,7 +1044,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@ -1117,7 +1123,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@ -1387,6 +1393,9 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
@ -1396,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

View File

@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-03-08'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -33,7 +33,7 @@ timestamp='2015-03-08'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@ -53,8 +53,7 @@ timestamp='2015-03-08'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -255,6 +254,7 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
@ -305,7 +305,7 @@ case $basic_machine in
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@ -376,6 +376,7 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
@ -428,12 +429,13 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@ -518,7 +520,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
asmjs)
basic_machine=asmjs-unknown
;;
aux)
@ -1376,7 +1378,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1396,7 +1398,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)

View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.55 2015/07/11 00:34:19 tom Exp $ */
/* $Id: main.c,v 1.56 2016/03/25 00:16:28 Jung-uk.Kim Exp $ */
#include <signal.h>
#ifndef _WIN32
@ -410,32 +410,46 @@ alloc_file_name(size_t len, const char *suffix)
return result;
}
static char *
find_suffix(char *name, const char *suffix)
{
size_t len = strlen(name);
size_t slen = strlen(suffix);
if (len >= slen)
{
name += len - slen;
if (strcmp(name, suffix) == 0)
return name;
}
return NULL;
}
static void
create_file_names(void)
{
size_t len;
const char *defines_suffix;
const char *externs_suffix;
char *prefix;
char *suffix;
prefix = NULL;
suffix = NULL;
defines_suffix = DEFINES_SUFFIX;
externs_suffix = EXTERNS_SUFFIX;
/* compute the file_prefix from the user provided output_file_name */
if (output_file_name != 0)
{
if (!(prefix = strstr(output_file_name, OUTPUT_SUFFIX))
&& (prefix = strstr(output_file_name, ".c")))
if (!(suffix = find_suffix(output_file_name, OUTPUT_SUFFIX))
&& (suffix = find_suffix(output_file_name, ".c")))
{
defines_suffix = ".h";
externs_suffix = ".i";
}
}
if (prefix != NULL)
if (suffix != NULL)
{
len = (size_t) (prefix - output_file_name);
len = (size_t) (suffix - output_file_name);
file_prefix = TMALLOC(char, len + 1);
NO_SPACE(file_prefix);
strncpy(file_prefix, output_file_name, len)[len] = 0;
@ -477,7 +491,7 @@ create_file_names(void)
CREATE_FILE_NAME(graph_file_name, GRAPH_SUFFIX);
}
if (prefix != NULL)
if (suffix != NULL)
{
FREE(file_prefix);
}

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20150711
%define AppVersion 20160324
%define UseProgram yacc
# $XTermId: byacc.spec,v 1.28 2015/07/11 00:53:15 tom Exp $
# $XTermId: byacc.spec,v 1.29 2016/03/24 23:55:52 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,3 +1,9 @@
byacc (20160324) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 24 Mar 2016 19:55:52 -0400
byacc (20150711) unstable; urgency=low
* maintenance updates

View File

@ -1,4 +1,4 @@
Upstream source http://dickey.his.com/byacc/byacc.html
Upstream source http://invisible-island.net/byacc/byacc.html
Berkeley Yacc is in the public domain; changes made to it by the current
maintainer are likewise unrestricted. That applies to most of the files.
@ -36,7 +36,7 @@ skeleton.c with the bug report. Do not expect rapid responses.
Files: aclocal.m4
Licence: other-BSD
Copyright: 2004-2014,2015 by Thomas E. Dickey
Copyright: 2004-2015,2016 by Thomas E. Dickey
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20150711
%define AppVersion 20160324
%define UseProgram yacc
# $XTermId: mingw-byacc.spec,v 1.10 2015/07/11 00:53:15 tom Exp $
# $XTermId: mingw-byacc.spec,v 1.11 2016/03/24 23:55:52 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,14 +1,14 @@
# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
#
DISTNAME= byacc-20150711
DISTNAME= byacc-20160324
PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/byacc/
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://dickey.his.com/byacc/byacc.html
HOMEPAGE= http://invisible-island.net/byacc/byacc.html
COMMENT= Berkeley Yacc
PKG_DESTDIR_SUPPORT= user-destdir

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.59 2015/07/11 00:39:03 tom Exp $ */
/* $Id: reader.c,v 1.60 2016/03/25 00:51:07 tom Exp $ */
#include "defs.h"
@ -895,7 +895,7 @@ copy_param(int k)
}
buf[i--] = '\0';
i = trim_blanks(buf);
(void)trim_blanks(buf);
comma = buf - 1;
do

View File

@ -139,7 +139,8 @@ struct section {
/* Internal data structure for segments. */
struct segment {
uint64_t addr; /* load addr */
uint64_t vaddr; /* virtual addr (VMA) */
uint64_t paddr; /* physical addr (LMA) */
uint64_t off; /* file offset */
uint64_t fsz; /* file size */
uint64_t msz; /* memory size */

View File

@ -72,12 +72,12 @@ add_to_inseg_list(struct elfcopy *ecp, struct section *s)
*/
loadable = 0;
STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) {
if (s->off < seg->off || (s->vma < seg->addr && !s->pseudo))
if (s->off < seg->off || (s->vma < seg->vaddr && !s->pseudo))
continue;
if (s->off + s->sz > seg->off + seg->fsz &&
s->type != SHT_NOBITS)
continue;
if (s->vma + s->sz > seg->addr + seg->msz)
if (s->vma + s->sz > seg->vaddr + seg->msz)
continue;
insert_to_inseg_list(seg, s);
@ -85,7 +85,12 @@ add_to_inseg_list(struct elfcopy *ecp, struct section *s)
s->seg = seg;
else if (seg->type == PT_TLS)
s->seg_tls = seg;
s->lma = seg->addr + (s->off - seg->off);
if (s->pseudo)
s->vma = seg->vaddr + (s->off - seg->off);
if (seg->paddr > 0)
s->lma = seg->paddr + (s->off - seg->off);
else
s->lma = 0;
loadable = 1;
}
@ -98,7 +103,7 @@ adjust_addr(struct elfcopy *ecp)
struct section *s, *s0;
struct segment *seg;
struct sec_action *sac;
uint64_t dl, lma, start, end;
uint64_t dl, vma, lma, start, end;
int found, i;
/*
@ -110,59 +115,52 @@ adjust_addr(struct elfcopy *ecp)
if (!s->loadable)
continue;
/* Apply global VMA adjustment. */
if (ecp->change_addr != 0)
s->vma += ecp->change_addr;
/* Apply global LMA adjustment. */
if (ecp->change_addr != 0 && s->seg != NULL)
if (ecp->change_addr != 0 && s->seg != NULL &&
s->seg->paddr > 0)
s->lma += ecp->change_addr;
if (!s->pseudo) {
/* Apply global VMA adjustment. */
if (ecp->change_addr != 0)
s->vma += ecp->change_addr;
/* Apply section VMA adjustment. */
sac = lookup_sec_act(ecp, s->name, 0);
if (sac == NULL)
continue;
if (sac->setvma)
s->vma = sac->vma;
if (sac->vma_adjust != 0)
s->vma += sac->vma_adjust;
}
}
/*
* Apply sections LMA change in the second iteration.
* Apply sections VMA change in the second iteration.
*/
TAILQ_FOREACH(s, &ecp->v_sec, sec_list) {
/*
* Only loadable section that's inside a segment can have
* LMA adjusted.
*/
if (!s->loadable || s->seg == NULL)
if (!s->loadable)
continue;
/*
* Check if there is a LMA change request for this
* Check if there is a VMA change request for this
* section.
*/
sac = lookup_sec_act(ecp, s->name, 0);
if (sac == NULL)
continue;
if (!sac->setlma && sac->lma_adjust == 0)
continue;
lma = s->lma;
if (sac->setlma)
lma = sac->lma;
if (sac->lma_adjust != 0)
lma += sac->lma_adjust;
if (lma == s->lma)
vma = s->vma;
if (sac->setvma)
vma = sac->vma;
if (sac->vma_adjust != 0)
vma += sac->vma_adjust;
if (vma == s->vma)
continue;
/*
* Check if the LMA change is viable.
* No need to make segment adjustment if the section doesn't
* belong to any segment.
*/
if (s->seg == NULL) {
s->vma = vma;
continue;
}
/*
* Check if the VMA change is viable.
*
* 1. Check if the new LMA is properly aligned accroding to
* 1. Check if the new VMA is properly aligned accroding to
* section alignment.
*
* 2. Compute the new extent of segment that contains this
@ -170,37 +168,36 @@ adjust_addr(struct elfcopy *ecp)
* segments.
*/
#ifdef DEBUG
printf("LMA for section %s: %#jx\n", s->name, lma);
printf("VMA for section %s: %#jx\n", s->name, vma);
#endif
if (lma % s->align != 0)
errx(EXIT_FAILURE, "The load address %#jx for "
if (vma % s->align != 0)
errx(EXIT_FAILURE, "The VMA %#jx for "
"section %s is not aligned to %ju",
(uintmax_t) lma, s->name, (uintmax_t) s->align);
(uintmax_t) vma, s->name, (uintmax_t) s->align);
if (lma < s->lma) {
if (vma < s->vma) {
/* Move section to lower address. */
if (lma < s->lma - s->seg->addr)
if (vma < s->vma - s->seg->vaddr)
errx(EXIT_FAILURE, "Not enough space to move "
"section %s load address to %#jx", s->name,
(uintmax_t) lma);
start = lma - (s->lma - s->seg->addr);
"section %s VMA to %#jx", s->name,
(uintmax_t) vma);
start = vma - (s->vma - s->seg->vaddr);
if (s == s->seg->v_sec[s->seg->nsec - 1])
end = start + s->seg->msz;
else
end = s->seg->addr + s->seg->msz;
end = s->seg->vaddr + s->seg->msz;
} else {
/* Move section to upper address. */
if (s == s->seg->v_sec[0])
start = lma;
start = vma;
else
start = s->seg->addr;
end = lma + (s->seg->addr + s->seg->msz - s->lma);
start = s->seg->vaddr;
end = vma + (s->seg->vaddr + s->seg->msz - s->vma);
if (end < start)
errx(EXIT_FAILURE, "Not enough space to move "
"section %s load address to %#jx", s->name,
(uintmax_t) lma);
"section %s VMA to %#jx", s->name,
(uintmax_t) vma);
}
#ifdef DEBUG
@ -211,34 +208,34 @@ adjust_addr(struct elfcopy *ecp)
STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) {
if (seg == s->seg || seg->type != PT_LOAD)
continue;
if (start > seg->addr + seg->msz)
if (start > seg->vaddr + seg->msz)
continue;
if (end < seg->addr)
if (end < seg->vaddr)
continue;
errx(EXIT_FAILURE, "The extent of segment containing "
"section %s overlaps with segment(%#jx,%#jx)",
s->name, (uintmax_t) seg->addr,
(uintmax_t) (seg->addr + seg->msz));
s->name, (uintmax_t) seg->vaddr,
(uintmax_t) (seg->vaddr + seg->msz));
}
/*
* Update section LMA and file offset.
* Update section VMA and file offset.
*/
if (lma < s->lma) {
if (vma < s->vma) {
/*
* To move a section to lower load address, we decrease
* the load addresses of the section and all the
* sections that are before it, and we increase the
* file offsets of all the sections that are after it.
* To move a section to lower VMA, we decrease
* the VMA of the section and all the sections that
* are before it, and we increase the file offsets
* of all the sections that are after it.
*/
dl = s->lma - lma;
dl = s->vma - vma;
for (i = 0; i < s->seg->nsec; i++) {
s0 = s->seg->v_sec[i];
s0->lma -= dl;
s0->vma -= dl;
#ifdef DEBUG
printf("section %s LMA set to %#jx\n",
s0->name, (uintmax_t) s0->lma);
printf("section %s VMA set to %#jx\n",
s0->name, (uintmax_t) s0->vma);
#endif
if (s0 == s)
break;
@ -253,13 +250,13 @@ adjust_addr(struct elfcopy *ecp)
}
} else {
/*
* To move a section to upper load address, we increase
* the load addresses of the section and all the
* sections that are after it, and we increase the
* their file offsets too unless the section in question
* To move a section to upper VMA, we increase
* the VMA of the section and all the sections that
* are after it, and we increase the their file
* offsets too unless the section in question
* is the first in its containing segment.
*/
dl = lma - s->lma;
dl = vma - s->vma;
for (i = 0; i < s->seg->nsec; i++)
if (s->seg->v_sec[i] == s)
break;
@ -269,9 +266,9 @@ adjust_addr(struct elfcopy *ecp)
s->name);
for (; i < s->seg->nsec; i++) {
s0 = s->seg->v_sec[i];
s0->lma += dl;
s0->vma += dl;
#ifdef DEBUG
printf("section %s LMA set to %#jx\n",
printf("section %s VMA set to %#jx\n",
s0->name, (uintmax_t) s0->lma);
#endif
if (s != s->seg->v_sec[0]) {
@ -292,9 +289,8 @@ adjust_addr(struct elfcopy *ecp)
if (ecp->pad_to != 0) {
/*
* Find the section with highest load address.
* Find the section with highest VMA.
*/
s = NULL;
STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) {
if (seg->type != PT_LOAD)
@ -308,26 +304,113 @@ adjust_addr(struct elfcopy *ecp)
s = seg->v_sec[i];
else {
s0 = seg->v_sec[i];
if (s0->lma > s->lma)
if (s0->vma > s->vma)
s = s0;
}
}
if (s == NULL)
goto issue_warn;
goto adjust_lma;
/* No need to pad if the pad_to address is lower. */
if (ecp->pad_to <= s->lma + s->sz)
goto issue_warn;
if (ecp->pad_to <= s->vma + s->sz)
goto adjust_lma;
s->pad_sz = ecp->pad_to - (s->lma + s->sz);
s->pad_sz = ecp->pad_to - (s->vma + s->sz);
#ifdef DEBUG
printf("pad section %s load to address %#jx by %#jx\n", s->name,
printf("pad section %s VMA to address %#jx by %#jx\n", s->name,
(uintmax_t) ecp->pad_to, (uintmax_t) s->pad_sz);
#endif
}
issue_warn:
adjust_lma:
/*
* Apply sections LMA change in the third iteration.
*/
TAILQ_FOREACH(s, &ecp->v_sec, sec_list) {
/*
* Only loadable section that's inside a segment can have
* LMA adjusted. Also, if LMA of the containing segment is
* set to 0, it probably means we should ignore the LMA.
*/
if (!s->loadable || s->seg == NULL || s->seg->paddr == 0)
continue;
/*
* Check if there is a LMA change request for this
* section.
*/
sac = lookup_sec_act(ecp, s->name, 0);
if (sac == NULL)
continue;
if (!sac->setlma && sac->lma_adjust == 0)
continue;
lma = s->lma;
if (sac->setlma)
lma = sac->lma;
if (sac->lma_adjust != 0)
lma += sac->lma_adjust;
if (lma == s->lma)
continue;
#ifdef DEBUG
printf("LMA for section %s: %#jx\n", s->name, lma);
#endif
/* Check alignment. */
if (lma % s->align != 0)
errx(EXIT_FAILURE, "The LMA %#jx for "
"section %s is not aligned to %ju",
(uintmax_t) lma, s->name, (uintmax_t) s->align);
/*
* Update section LMA.
*/
if (lma < s->lma) {
/*
* To move a section to lower LMA, we decrease
* the LMA of the section and all the sections that
* are before it.
*/
dl = s->lma - lma;
for (i = 0; i < s->seg->nsec; i++) {
s0 = s->seg->v_sec[i];
s0->lma -= dl;
#ifdef DEBUG
printf("section %s LMA set to %#jx\n",
s0->name, (uintmax_t) s0->lma);
#endif
if (s0 == s)
break;
}
} else {
/*
* To move a section to upper LMA, we increase
* the LMA of the section and all the sections that
* are after it.
*/
dl = lma - s->lma;
for (i = 0; i < s->seg->nsec; i++)
if (s->seg->v_sec[i] == s)
break;
if (i >= s->seg->nsec)
errx(EXIT_FAILURE, "Internal: section `%s' not"
" found in its containing segement",
s->name);
for (; i < s->seg->nsec; i++) {
s0 = s->seg->v_sec[i];
s0->lma += dl;
#ifdef DEBUG
printf("section %s LMA set to %#jx\n",
s0->name, (uintmax_t) s0->lma);
#endif
}
}
}
/*
* Issue a warning if there are VMA/LMA adjust requests for
@ -408,7 +491,8 @@ setup_phdr(struct elfcopy *ecp)
elf_errmsg(-1));
if ((seg = calloc(1, sizeof(*seg))) == NULL)
err(EXIT_FAILURE, "calloc failed");
seg->addr = iphdr.p_vaddr;
seg->vaddr = iphdr.p_vaddr;
seg->paddr = iphdr.p_paddr;
seg->off = iphdr.p_offset;
seg->fsz = iphdr.p_filesz;
seg->msz = iphdr.p_memsz;
@ -429,20 +513,30 @@ copy_phdr(struct elfcopy *ecp)
if (seg->type == PT_PHDR) {
if (!TAILQ_EMPTY(&ecp->v_sec)) {
s = TAILQ_FIRST(&ecp->v_sec);
if (s->pseudo)
seg->addr = s->lma +
if (s->pseudo) {
seg->vaddr = s->vma +
gelf_fsize(ecp->eout, ELF_T_EHDR,
1, EV_CURRENT);
seg->paddr = s->lma +
gelf_fsize(ecp->eout, ELF_T_EHDR,
1, EV_CURRENT);
}
}
seg->fsz = seg->msz = gelf_fsize(ecp->eout, ELF_T_PHDR,
ecp->ophnum, EV_CURRENT);
continue;
}
if (seg->nsec > 0) {
s = seg->v_sec[0];
seg->vaddr = s->vma;
seg->paddr = s->lma;
}
seg->fsz = seg->msz = 0;
for (i = 0; i < seg->nsec; i++) {
s = seg->v_sec[i];
seg->msz = s->vma + s->sz - seg->addr;
seg->msz = s->vma + s->sz - seg->vaddr;
if (s->type != SHT_NOBITS)
seg->fsz = s->off + s->sz - seg->off;
}
@ -481,8 +575,8 @@ copy_phdr(struct elfcopy *ecp)
elf_errmsg(-1));
ophdr.p_type = iphdr.p_type;
ophdr.p_vaddr = seg->addr;
ophdr.p_paddr = seg->addr;
ophdr.p_vaddr = seg->vaddr;
ophdr.p_paddr = seg->paddr;
ophdr.p_flags = iphdr.p_flags;
ophdr.p_align = iphdr.p_align;
ophdr.p_offset = seg->off;

View File

@ -364,14 +364,8 @@ typedef __char32_t char32_t;
#endif
#endif
#if (__has_feature(cxx_noexcept))
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
# define _NOEXCEPT_OR_FALSE(x) noexcept(x)
#else
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
# define _NOEXCEPT_OR_FALSE(x) false
#if !(__has_feature(cxx_noexcept))
#define _LIBCPP_HAS_NO_NOEXCEPT
#endif
#if __has_feature(underlying_type)
@ -439,10 +433,6 @@ namespace std {
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
#endif
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
#define _NOEXCEPT_OR_FALSE(x) false
#ifndef __GXX_EXPERIMENTAL_CXX0X__
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
@ -456,6 +446,7 @@ namespace std {
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
#define _LIBCPP_HAS_NO_STRONG_ENUMS
#define _LIBCPP_HAS_NO_NOEXCEPT
#else // __GXX_EXPERIMENTAL_CXX0X__
@ -479,6 +470,7 @@ namespace std {
#endif // _GNUC_VER < 404
#if _GNUC_VER < 406
#define _LIBCPP_HAS_NO_NOEXCEPT
#define _LIBCPP_HAS_NO_NULLPTR
#endif
@ -513,15 +505,14 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
#define _LIBCPP_HAS_NO_NOEXCEPT
#define __alignof__ __alignof
#define _LIBCPP_NORETURN __declspec(noreturn)
#define _LIBCPP_UNUSED
#define _ALIGNAS(x) __declspec(align(x))
#define _LIBCPP_HAS_NO_VARIADICS
#define _NOEXCEPT throw ()
#define _NOEXCEPT_(x)
#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
#define _LIBCPP_END_NAMESPACE_STD }
@ -541,14 +532,11 @@ namespace std {
#define _LIBCPP_NORETURN __attribute__((noreturn))
#define _LIBCPP_UNUSED
#define _NOEXCEPT throw()
#define _NOEXCEPT_(x)
#define _NOEXCEPT_OR_FALSE(x) false
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#define _LIBCPP_HAS_NO_NOEXCEPT
#define _LIBCPP_HAS_NO_NULLPTR
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_IS_BASE_OF
@ -572,6 +560,14 @@ namespace std {
#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
#ifndef _LIBCPP_HAS_NO_NOEXCEPT
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
#else
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
#endif
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
typedef unsigned short char16_t;
typedef unsigned int char32_t;

View File

@ -101,7 +101,7 @@ typedef struct {
uint32_t init_half;
uint32_t lock_half;
} guard_t;
_Static_assert(sizeof(guard_t) == sizeof(uint64_t), "");
static_assert(sizeof(guard_t) == sizeof(uint64_t), "");
static const uint32_t LOCKED = 1;
static const uint32_t INITIALISED = static_cast<guard_lock_t>(1) << 24;
# endif

View File

@ -1,29 +0,0 @@
#
# Copyright 2013, Juniper Networks, Inc.
# All rights reserved.
# This SOFTWARE is licensed under the LICENSE provided in the
# ../Copyright file. By downloading, installing, copying, or otherwise
# using the SOFTWARE, you agree to be bound by the terms of that
# LICENSE.
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = gt setup.sh
GT_INSTALL_DIR = ${prefix}/bin
GT_INSTALL_FILES = gt
install-data-hook:
@echo "Installing gt ... "
@-mkdir -p ${GT_INSTALL_DIR}
@for file in ${GT_INSTALL_FILES} ; do \
if [ -f $$file ]; then \
rfile=$$file ; \
else \
rfile=${srcdir}/$$file ; \
fi ; \
mdir=${GT_INSTALL_DIR}/ ; \
mkdir -p $$mdir ; \
cp $$rfile $$mdir/ ; \
done
@${CHMOD} a+x ${GT_INSTALL_DIR}/gt

View File

@ -1,29 +0,0 @@
set top_src=`pwd`
alias Zautoreconf "(cd $top_src ; autoreconf)"
set opts=' \
--with-libslax-prefix=/Users/phil/work/root \
--enable-debug \
--enable-warnings \
--enable-printflike \
--with-gettext=/opt/local \
--prefix ${HOME}/work/root \
'
set opts=`echo $opts`
setenv CONFIGURE_OPTS "$opts"
setenv ADB_PATH $top_src/build/libxo/.libs
alias Zconfigure "(cd $top_src/build; ../configure $opts)"
alias Zbuild "(cd $top_src/build; make \!* )"
alias mi "(cd $top_src/build; make && make install); ."
mkdir -p build
cd build
alias xx 'cc -I.. -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Werror -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wformat -Wimplicit -Wmissing-declarations -Wnested-externs -Wparentheses -Wreturn-type -Wshadow -Wswitch -Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings -fno-inline-functions-called-once -g -O2 -o xtest -DUNIT_TEST libxo.c'
alias mm "make CFLAGS='-O0 -g'"
alias mmi 'mm && mi'

View File

@ -1,33 +0,0 @@
#
# Copyright 2013, Juniper Networks, Inc.
# All rights reserved.
# This SOFTWARE is licensed under the LICENSE provided in the
# ../Copyright file. By downloading, installing, copying, or otherwise
# using the SOFTWARE, you agree to be bound by the terms of that
# LICENSE.
if [ ! -f configure ]; then
vers=`autoreconf --version | head -1`
echo "Using" $vers
mkdir -p m4
autoreconf --install
if [ ! -f configure ]; then
echo "Failed to create configure script"
exit 1
fi
fi
echo "Creating build directory ..."
mkdir build
echo "Setup is complete. To build libslax:"
echo " 1) Type 'cd build ; ../configure' to configure libslax"
echo " 2) Type 'make' to build libslax"
echo " 3) Type 'make install' to install libslax"
exit 0

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" "" $nl"
IFS=" $tab$nl"
# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -137,46 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@ -207,6 +203,15 @@ if test $# -eq 0; then
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw='% 200'
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw=,u+rw
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@ -269,41 +274,15 @@ do
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@ -314,74 +293,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@ -391,53 +370,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set -f
set fnord $dstdir
shift
$posix_glob set +f
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
@ -472,15 +449,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@ -493,24 +467,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1

View File

@ -0,0 +1,246 @@
/* libxo/xo_config.h.in. Generated from configure.ac by autoheader. */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
/* Define to 1 if you have the `ctime' function. */
#undef HAVE_CTIME
/* Define to 1 if you have the <ctype.h> header file. */
#undef HAVE_CTYPE_H
/* Define to 1 if you have the declaration of `__isthreaded', and to 0 if you
don't. */
#undef HAVE_DECL___ISTHREADED
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `dlfunc' function. */
#undef HAVE_DLFUNC
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the `fdopen' function. */
#undef HAVE_FDOPEN
/* Define to 1 if you have the `flock' function. */
#undef HAVE_FLOCK
/* Define to 1 if you have the `getpass' function. */
#undef HAVE_GETPASS
/* Define to 1 if you have the `getprogname' function. */
#undef HAVE_GETPROGNAME
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
/* gettext(3) */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* humanize_number(3) */
#undef HAVE_HUMANIZE_NUMBER
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Support printflike */
#undef HAVE_PRINTFLIKE
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
/* Define to 1 if you have the `srand' function. */
#undef HAVE_SRAND
/* Define to 1 if you have the `sranddev' function. */
#undef HAVE_SRANDDEV
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio_ext.h> header file. */
#undef HAVE_STDIO_EXT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <stdtime/tzfile.h> header file. */
#undef HAVE_STDTIME_TZFILE_H
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strcspn' function. */
#undef HAVE_STRCSPN
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
/* Have struct sockaddr_un.sun_len */
#undef HAVE_SUN_LEN
/* Define to 1 if you have the `sysctlbyname' function. */
#undef HAVE_SYSCTLBYNAME
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#undef HAVE_SYS_SYSCTL_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <threads.h> header file. */
#undef HAVE_THREADS_H
/* thread-local setting */
#undef HAVE_THREAD_LOCAL
/* Define to 1 if you have the <tzfile.h> header file. */
#undef HAVE_TZFILE_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `__flbf' function. */
#undef HAVE___FLBF
/* Enable debugging */
#undef LIBXO_DEBUG
/* Enable text-only rendering */
#undef LIBXO_TEXT_ONLY
/* Version number as dotted value */
#undef LIBXO_VERSION
/* Version number extra information */
#undef LIBXO_VERSION_EXTRA
/* Version number as a number */
#undef LIBXO_VERSION_NUMBER
/* Version number as string */
#undef LIBXO_VERSION_STRING
/* Enable local wcwidth implementation */
#undef LIBXO_WCWIDTH
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to rpl_realloc if the replacement function should be used. */
#undef realloc
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

View File

@ -33,6 +33,7 @@
#pragma warning(pop)
#endif
#include <atomic>
#include <condition_variable>
#include <functional>
#include <memory>

View File

@ -22242,7 +22242,7 @@ X86TargetLowering::EmitLoweredTLSAddr(MachineInstr *MI,
// Emit CALLSEQ_START right before the instruction.
unsigned AdjStackDown = TII.getCallFrameSetupOpcode();
MachineInstrBuilder CallseqStart =
BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0);
BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0).addImm(0);
BB->insert(MachineBasicBlock::iterator(MI), CallseqStart);
// Emit CALLSEQ_END right after the instruction.

View File

@ -697,7 +697,7 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ibv_wc *wc)
default:
PDBG("Unexpected cqe_status 0x%x for QPID=0x%0x\n",
CQE_STATUS(&cqe), CQE_QPID(&cqe));
ret = -EINVAL;
wc->status = IBV_WC_FATAL_ERR;
}
}
if (wc->status && wc->status != IBV_WC_WR_FLUSH_ERR)

View File

@ -54,7 +54,6 @@
struct { \
unsigned vendor; \
unsigned device; \
unsigned chip_version; \
} hca_table[] = {
#define CH_PCI_DEVICE_ID_FUNCTION \
@ -64,7 +63,6 @@
{ \
.vendor = PCI_VENDOR_ID_CHELSIO, \
.device = (__DeviceID), \
.chip_version = CHELSIO_PCI_ID_CHIP_VERSION(__DeviceID), \
}
#define CH_PCI_DEVICE_ID_TABLE_DEFINE_END \
@ -493,7 +491,8 @@ static struct ibv_device *cxgb4_driver_init(const char *uverbs_sys_path,
}
PDBG("%s found vendor %d device %d type %d\n",
__FUNCTION__, vendor, device, hca_table[i].chip_version);
__FUNCTION__, vendor, device,
CHELSIO_PCI_ID_CHIP_VERSION(hca_table[i].device));
dev = calloc(1, sizeof *dev);
if (!dev) {
@ -502,7 +501,7 @@ static struct ibv_device *cxgb4_driver_init(const char *uverbs_sys_path,
pthread_spin_init(&dev->lock, PTHREAD_PROCESS_PRIVATE);
dev->ibv_dev.ops = c4iw_dev_ops;
dev->chip_version = hca_table[i].chip_version;
dev->chip_version = CHELSIO_PCI_ID_CHIP_VERSION(hca_table[i].device);
dev->abi_version = abi_version;
PDBG("%s device claimed\n", __FUNCTION__);

View File

@ -69,6 +69,11 @@ static inline int dev_is_t5(struct c4iw_dev *dev)
return dev->chip_version == CHELSIO_T5;
}
static inline int dev_is_t4(struct c4iw_dev *dev)
{
return dev->chip_version == CHELSIO_T4;
}
struct c4iw_context {
struct ibv_context ibv_ctx;
struct t4_dev_status_page *status_page;

View File

@ -362,7 +362,7 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
err = build_rdma_read(wqe, wr, &len16);
if (err)
break;
swsqe->read_len = wr->sg_list[0].length;
swsqe->read_len = wr->sg_list ? wr->sg_list[0].length : 0;
if (!qhp->wq.sq.oldest_read)
qhp->wq.sq.oldest_read = swsqe;
break;

View File

@ -328,6 +328,7 @@ struct t4_sq {
volatile u32 *udb;
size_t memsize;
u32 qid;
u32 bar2_qid;
void *ma_sync;
u16 in_use;
u16 size;
@ -336,6 +337,7 @@ struct t4_sq {
u16 wq_pidx;
u16 flags;
short flush_cidx;
int wc_reg_available;
};
struct t4_swrqe {
@ -348,6 +350,7 @@ struct t4_rq {
volatile u32 *udb;
size_t memsize;
u32 qid;
u32 bar2_qid;
u32 msn;
u32 rqt_hwaddr;
u16 rqt_size;
@ -356,6 +359,7 @@ struct t4_rq {
u16 cidx;
u16 pidx;
u16 wq_pidx;
int wc_reg_available;
};
struct t4_wq {
@ -485,14 +489,14 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16,
{
wc_wmb();
if (t5) {
if (t5_en_wc && inc == 1) {
if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) {
PDBG("%s: WC wq->sq.pidx = %d; len16=%d\n",
__func__, wq->sq.pidx, len16);
copy_wqe_to_udb(wq->sq.udb + 14, wqe);
} else {
PDBG("%s: DB wq->sq.pidx = %d; len16=%d\n",
__func__, wq->sq.pidx, len16);
writel(V_PIDX_T5(inc), wq->sq.udb);
writel(V_QID(wq->sq.bar2_qid) | V_PIDX_T5(inc), wq->sq.udb);
}
wc_wmb();
return;
@ -518,14 +522,14 @@ static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16,
{
wc_wmb();
if (t5) {
if (t5_en_wc && inc == 1) {
if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) {
PDBG("%s: WC wq->rq.pidx = %d; len16=%d\n",
__func__, wq->rq.pidx, len16);
copy_wqe_to_udb(wq->rq.udb + 14, wqe);
} else {
PDBG("%s: DB wq->rq.pidx = %d; len16=%d\n",
__func__, wq->rq.pidx, len16);
writel(V_PIDX_T5(inc), wq->rq.udb);
writel(V_QID(wq->rq.bar2_qid) | V_PIDX_T5(inc), wq->rq.udb);
}
wc_wmb();
return;

View File

@ -213,7 +213,7 @@ struct ibv_cq *c4iw_create_cq(struct ibv_context *context, int cqe,
goto err3;
if (dev_is_t5(chp->rhp))
chp->cq.ugts += 3;
chp->cq.ugts += 5;
else
chp->cq.ugts += 1;
chp->cq.sw_queue = calloc(chp->cq.size, sizeof *chp->cq.queue);
@ -460,8 +460,14 @@ static struct ibv_qp *create_qp(struct ibv_pd *pd,
goto err3;
}
qhp->wq.sq.udb = dbva;
if (dev_is_t5(qhp->rhp)) {
qhp->wq.sq.udb += (128*(qhp->wq.sq.qid & qhp->wq.qid_mask))/4;
if (!dev_is_t4(qhp->rhp)) {
unsigned long segment_offset = 128 * (qhp->wq.sq.qid & qhp->wq.qid_mask);
if (segment_offset < c4iw_page_size) {
qhp->wq.sq.udb += segment_offset / 4;
qhp->wq.sq.wc_reg_available = 1;
} else
qhp->wq.sq.bar2_qid = qhp->wq.sq.qid & qhp->wq.qid_mask;
qhp->wq.sq.udb += 2;
}
@ -479,8 +485,14 @@ static struct ibv_qp *create_qp(struct ibv_pd *pd,
if (dbva == MAP_FAILED)
goto err5;
qhp->wq.rq.udb = dbva;
if (dev_is_t5(qhp->rhp)) {
qhp->wq.rq.udb += (128*(qhp->wq.rq.qid & qhp->wq.qid_mask))/4;
if (!dev_is_t4(qhp->rhp)) {
unsigned long segment_offset = 128 * (qhp->wq.rq.qid & qhp->wq.qid_mask);
if (segment_offset < c4iw_page_size) {
qhp->wq.rq.udb += segment_offset / 4;
qhp->wq.rq.wc_reg_available = 1;
} else
qhp->wq.rq.bar2_qid = qhp->wq.rq.qid & qhp->wq.qid_mask;
qhp->wq.rq.udb += 2;
}
qhp->wq.rq.queue = mmap(NULL, qhp->wq.rq.memsize,

View File

@ -731,7 +731,7 @@ dump_topology(int listtype, int group)
}
fprintf(f, "\n# Spine Nodes");
for (n = 1; n <= (SPINES_MAX_NUM+1); n++) {
for (n = 1; n <= (SPINES_MAX_NUM); n++) {
if (ch->spinenode[n]) {
out_switch(ch->spinenode[n], group, chname);
for (port = ch->spinenode[n]->ports; port; port = port->next, i++)
@ -740,7 +740,7 @@ dump_topology(int listtype, int group)
}
}
fprintf(f, "\n# Line Nodes");
for (n = 1; n <= (LINES_MAX_NUM+1); n++) {
for (n = 1; n <= (LINES_MAX_NUM); n++) {
if (ch->linenode[n]) {
out_switch(ch->linenode[n], group, chname);
for (port = ch->linenode[n]->ports; port; port = port->next, i++)

View File

@ -65,7 +65,7 @@
#include <vendor/osm_vendor_ibumad.h>
#elif defined( OSM_VENDOR_INTF_AL )
#include <vendor/osm_vendor_al.h>
#elif
#else
#error No MAD Interface selected!
#error Choose an interface in osm_config.h
#endif

View File

@ -10,8 +10,8 @@ if [ $# -eq 0 ]; then
exit 0
fi
out=`showmount -e "$1"`
out=`showmount -E "$1"`
[ $? -eq 0 ] || exit 1
echo "$out" | awk -v host="$1" \
'NR > 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }'
'{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }'

View File

@ -21,6 +21,7 @@ print_available() {
_label="${_fstype_and_label#* }"
# Replace plus signs and slashes with minuses;
# leading plus signs have special meaning in maps,
# and multi-component keys are just not supported.
_label="$(echo ${_label} | sed 's,[+/],-,g')"
echo "${_label}"
continue
@ -31,6 +32,26 @@ print_available() {
}
# Print a single map entry.
print_map_entry() {
local _fstype _p
_fstype="$1"
_p="$2"
if [ "${_fstype}" = "ntfs" ]; then
if [ -f "/usr/local/bin/ntfs-3g" ]; then
echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}"
else
/usr/bin/logger -p info -t "special_media[$$]" \
"Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-ntfs first"
exit 1
fi
else
echo "-fstype=${_fstype},nosuid :/dev/${_p}"
fi
}
# Determine map entry contents for the given key and print out the entry.
print_one() {
local _fstype _fstype_and_label _label _key _p
@ -38,7 +59,7 @@ print_one() {
_fstype="$(fstyp "/dev/${_key}" 2> /dev/null)"
if [ $? -eq 0 ]; then
echo "-fstype=${_fstype},nosuid :/dev/${_key}"
print_map_entry "${_fstype}" "${_key}"
return
fi
@ -66,7 +87,7 @@ print_one() {
continue
fi
echo "-fstype=${_fstype},nosuid :/dev/${_p}"
print_map_entry "${_fstype}" "${_p}"
done
# No matching device - don't print anything, autofs will handle it.

View File

@ -428,6 +428,8 @@
uefisign
..
..
firmware
..
games
fortune
..

View File

@ -6,8 +6,20 @@
# PROVIDE: msgs
# REQUIRE: LOGIN
# Make a bounds file for msgs(1) if there isn't one already
#
if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then
echo 0 > /var/msgs/bounds
fi
. /etc/rc.subr
name="msgs"
start_cmd="msgs_start"
stop_cmd=":"
msgs_start()
{
# Make a bounds file for msgs(1) if there isn't one already
#
if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then
echo 0 > /var/msgs/bounds
fi
}
load_rc_config $name
run_rc_command "$1"

View File

@ -66,7 +66,11 @@ pf_resync()
pf_status()
{
$pf_program -s info
if ! [ -c /dev/pf ] ; then
echo "pf.ko is not loaded"
else
$pf_program -s info
fi
}
run_rc_command "$1"

View File

@ -22,7 +22,6 @@ CFLAGS+= -fno-inline-functions -fno-exceptions \
CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
.if ${TARGET_CPUARCH} == "arm"
CFLAGS+= -DTARGET_ARM_EABI

View File

@ -56,6 +56,7 @@
#define _PATH_DRUM "/dev/drum"
#define _PATH_ESDB "/usr/share/i18n/esdb"
#define _PATH_ETC "/etc"
#define _PATH_FIRMWARE "/usr/share/firmware"
#define _PATH_FTPUSERS "/etc/ftpusers"
#define _PATH_FWMEM "/dev/fwmem"
#define _PATH_GBDE "/sbin/gbde"

View File

@ -125,7 +125,7 @@ size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
*
* (The only other extension made by C99 in thie header is _Exit().)
*/
#if __ISO_C_VISIBLE >= 1999
#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus)
#ifdef __LONG_LONG_SUPPORTED
/* LONGLONG */
typedef struct {

View File

@ -14,7 +14,6 @@ kerberize:
cd ${.CURDIR}/../${entry}; \
${MAKE} cleandir; \
${MAKE} obj; \
${MAKE} depend; \
${MAKE} all; \
${MAKE} install
.endfor
@ -25,7 +24,6 @@ dekerberize:
cd ${.CURDIR}/../${entry}; \
${MAKE} MK_KERBEROS=no cleandir; \
${MAKE} MK_KERBEROS=no obj; \
${MAKE} MK_KERBEROS=no depend; \
${MAKE} MK_KERBEROS=no all; \
${MAKE} MK_KERBEROS=no install
.endfor

View File

@ -76,7 +76,6 @@ SRCS= base64.c \
write_pid.c \
xfree.c
CPPFLAGS+= -DBUILD_ROKEN_LIB
CFLAGS+=-I${KRB5DIR}/lib/roken -I.
CLEANFILES= roken.h

View File

@ -113,4 +113,3 @@ SRCS+= StringPool.cpp
# Ugly hack to work around CLOCK_PROCESS_CPUTIME_ID not being properly defined
# between r239347 and r245428.
CXXFLAGS.Process.cpp= -DCLOCK_PROCESS_CPUTIME_ID=15
CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}}

View File

@ -13,8 +13,11 @@ CFLAGS+= -I${.CURDIR}/../common \
# clang doesn't support -mlongcall, and testing shows a clang linked with a
# clang-built csu segfaults, this must currently be compiled with gcc. Once
# clang supports -mlongcall, or we get a fixed ld, this can be revisited.
.include <bsd.compiler.mk>
.if ${COMPILER_TYPE} != "gcc"
CC:= gcc
COMPILER_TYPE:= gcc
.endif
FILES= ${OBJS}
FILESMODE= ${LIBMODE}

View File

@ -6,6 +6,9 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
# Force building of libc_pic.a
MK_TOOLCHAIN= yes
LIBC_SRCTOP?= ${.CURDIR}
# Pick the current architecture directory for libc. In general, this is

View File

@ -36,7 +36,5 @@ FBSD_1.0 {
FBSDprivate_1.0 {
_set_tp;
_end;
curbrk;
minbrk;
__makecontext;
};

View File

@ -63,8 +63,6 @@ FBSDprivate_1.0 {
__signalcontext;
signalcontext;
__siglongjmp;
.curbrk;
.minbrk;
_brk;
_end;
__sys_vfork;

View File

@ -29,7 +29,6 @@ FBSD_1.0 {
ntohs;
vfork;
brk;
cerror; /* XXX - Should this be .cerror (see sys/cerror.S)? */
sbrk;
};
@ -60,8 +59,6 @@ FBSDprivate_1.0 {
_vfork;
_brk;
_end;
curbrk;
minbrk;
_sbrk;
/* softfloat */

View File

@ -3,4 +3,7 @@
.PATH: ${LIBC_SRCTOP}/db/mpool
SRCS+= mpool.c mpool-compat.c
SRCS+= mpool.c
.if ${MK_SYMVER} == yes
SRCS+= mpool-compat.c
.endif

View File

@ -49,7 +49,6 @@ SRCS+= __getosreldate.c \
fstab.c \
ftok.c \
fts.c \
fts-compat.c \
ftw.c \
getbootfile.c \
getbsize.c \
@ -137,7 +136,6 @@ SRCS+= __getosreldate.c \
ualarm.c \
ulimit.c \
uname.c \
unvis-compat.c \
usleep.c \
utime.c \
utxdb.c \
@ -147,6 +145,10 @@ SRCS+= __getosreldate.c \
waitpid.c \
waitid.c \
wordexp.c
.if ${MK_SYMVER} == yes
SRCS+= fts-compat.c \
unvis-compat.c
.endif
.PATH: ${LIBC_SRCTOP}/../../contrib/libc-pwcache
SRCS+= pwcache.c pwcache.h

View File

@ -64,6 +64,4 @@ FBSDprivate_1.0 {
_vfork;
_end;
_brk;
.curbrk;
.minbrk;
};

View File

@ -14,7 +14,11 @@ SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_bcs_strtoul.c \
citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \
citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \
citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \
citrus_prop.c citrus_stdenc.c bsd_iconv.c iconv_compat.c
citrus_prop.c citrus_stdenc.c bsd_iconv.c
.if ${MK_SYMVER} == yes
SRCS+= iconv_compat.c
.endif
SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map
.if ${MK_ICONV} == yes

View File

@ -132,7 +132,7 @@ _EUC_CN_init(struct xlocale_ctype *l, _RuneLocale *rl)
l->runes = rl;
l->__mb_cur_max = 4;
l->__mb_sb_limit = 256;
l->__mb_sb_limit = 128;
return (0);
}
@ -226,7 +226,7 @@ _EUC_JP_init(struct xlocale_ctype *l, _RuneLocale *rl)
l->runes = rl;
l->__mb_cur_max = 3;
l->__mb_sb_limit = 196;
l->__mb_sb_limit = 128;
return (0);
}
@ -273,7 +273,7 @@ _EUC_TW_init(struct xlocale_ctype *l, _RuneLocale *rl)
l->runes = rl;
l->__mb_cur_max = 4;
l->__mb_sb_limit = 256;
l->__mb_sb_limit = 128;
return (0);
}

View File

@ -83,7 +83,7 @@ _MSKanji_init(struct xlocale_ctype *l, _RuneLocale *rl)
l->__mbsinit = _MSKanji_mbsinit;
l->runes = rl;
l->__mb_cur_max = 2;
l->__mb_sb_limit = 256;
l->__mb_sb_limit = 224;
return (0);
}

View File

@ -28,7 +28,6 @@ FBSD_1.0 {
ntohs;
vfork;
brk;
cerror; /* XXX - Should this be .cerror (see sys/cerror.S)? */
sbrk;
};
@ -52,8 +51,6 @@ FBSDprivate_1.0 {
__sys_vfork;
_vfork;
_end;
__curbrk;
minbrk;
_brk;
_sbrk;

View File

@ -35,7 +35,6 @@ YFLAGS+=-p_nsyy
LFLAGS+=-P_nsyy
CFLAGS.nslexer.c= -DYY_BUF_SIZE=1024
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
MAN+= byteorder.3 ethers.3 eui64.3 \
getaddrinfo.3 gai_strerror.3 gethostbyname.3 \

View File

@ -11,7 +11,6 @@ subr_acl_nfs4.c: ${LIBC_SRCTOP}/../../sys/kern/subr_acl_nfs4.c
SRCS+= acl_branding.c \
acl_calc_mask.c \
acl_copy.c \
acl_compat.c \
acl_delete.c \
acl_delete_entry.c \
acl_entry.c \
@ -36,6 +35,9 @@ SRCS+= acl_branding.c \
mac_get.c \
mac_set.c \
subr_acl_nfs4.c
.if ${MK_SYMVER} == yes
SRCS+= acl_compat.c
.endif
SYM_MAPS+=${LIBC_SRCTOP}/posix1e/Symbol.map

View File

@ -56,7 +56,4 @@ FBSDprivate_1.0 {
__signalcontext;
__syncicache;
_end;
.curbrk;
.minbrk;
.cerror;
};

View File

@ -52,7 +52,4 @@ FBSDprivate_1.0 {
__signalcontext;
__syncicache;
_end;
_curbrk;
_minbrk;
_cerror;
};

View File

@ -36,7 +36,5 @@ FBSD_1.0 {
FBSDprivate_1.0 {
_set_tp;
_end;
curbrk;
minbrk;
__makecontext;
};

View File

@ -5,8 +5,9 @@
.PATH: ${LIBC_SRCTOP}/secure
# Sources common to both syscall interfaces:
SRCS+= \
stack_protector.c \
stack_protector_compat.c
SRCS+= stack_protector.c
.if ${MK_SYMVER} == yes
SRCS+= stack_protector_compat.c
.endif
SYM_MAPS+= ${LIBC_SRCTOP}/secure/Symbol.map

View File

@ -80,11 +80,8 @@ FBSDprivate_1.0 {
signalcontext;
__signalcontext;
__siglongjmp;
.curbrk;
.minbrk;
__sys_brk;
_brk;
.cerror;
__sys_exect;
_exect;
_end;

View File

@ -144,8 +144,8 @@ Memory for the stream or buffer could not be allocated.
.Xr fopen 3 ,
.Xr free 3 ,
.Xr fseek 3 ,
.Xr sbuf 3 ,
.Xr stdio 3
.Xr stdio 3 ,
.Xr sbuf 9
.Sh STANDARDS
The
.Fn open_memstream

View File

@ -12,7 +12,6 @@ SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map
CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime
CFLAGS.localtime.c= -fwrapv
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
MAN+= ctime.3 strftime.3 strptime.3 time2posix.3
MAN+= tzfile.5

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd October 7, 2006
.Dd March 21, 2016
.Dt AIO_RETURN 2
.Os
.Sh NAME
@ -34,7 +34,7 @@
.Lb libc
.Sh SYNOPSIS
.In aio.h
.Ft int
.Ft ssize_t
.Fn aio_return "struct aiocb *iocb"
.Sh DESCRIPTION
The

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd January 19, 2000
.Dd March 21, 2016
.Dt AIO_WAITCOMPLETE 2
.Os
.Sh NAME
@ -34,7 +34,7 @@
.Lb libc
.Sh SYNOPSIS
.In aio.h
.Ft int
.Ft ssize_t
.Fn aio_waitcomplete "struct aiocb **iocbp" "struct timespec *timeout"
.Sh DESCRIPTION
The

View File

@ -28,7 +28,7 @@
.\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
.Dd October 10, 2011
.Dd March 31, 2016
.Dt KTRACE 2
.Os
.Sh NAME
@ -94,6 +94,8 @@ generate much output).
.It KTRFAC_PROCCTOR Ta "Trace process construction."
.It KTRFAC_PROCDTOR Ta "Trace process destruction."
.It KTRFAC_CAPFAIL Ta "Trace capability failures."
.It KTRFAC_FAULT Ta "Trace page faults."
.It KTRFAC_FAULTEND Ta "Trace the end of page faults."
.It KTRFAC_INHERIT Ta "Inherit tracing to future children."
.El
.Pp

View File

@ -49,7 +49,7 @@ The
.Fn modfind
system call
returns the modid of the kernel module referenced by
.Fa file .
.Fa modname .
Upon error,
.Fn modfind
returns -1 and sets

View File

@ -103,7 +103,7 @@ be ignored.
If the child was created by
.Xr vfork 2
system call or
.Xr rfork(2)
.Xr rfork 2
call with the
.Dv RFMEM
flag specified, the debugging events are reported to the parent

Some files were not shown because too many files have changed in this diff Show More