Skip to content

Commit

Permalink
MFH
Browse files Browse the repository at this point in the history
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
gjb authored and gjb committed Apr 16, 2016
2 parents ae096a5 + 35691f7 commit 6549ef7
Show file tree
Hide file tree
Showing 451 changed files with 9,397 additions and 2,748 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -125,7 +125,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
obj objlink rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries \
build32 distribute32 install32 build32 distribute32 install32 \
build32 distribute32 install32 buildsoft distributesoft installsoft \
builddtb xdev xdev-build xdev-install \
xdev-links native-xtools stageworld stagekernel stage-packages \
create-world-packages create-kernel-packages create-packages \
Expand Down Expand Up @@ -408,7 +408,7 @@ MAKEFAIL=cat

universe_prologue: upgrade_checks
universe: universe_prologue
universe_prologue:
universe_prologue: .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> make universe started on ${STARTTIME}"
@echo "--------------------------------------------------------------"
Expand Down Expand Up @@ -494,7 +494,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
.endfor
universe: universe_epilogue
universe_epilogue:
universe_epilogue: .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> make universe completed on `LC_ALL=C date`"
@echo " (started ${STARTTIME})"
Expand Down
35 changes: 19 additions & 16 deletions Makefile.inc1
Expand Up @@ -144,6 +144,15 @@ CLEANDIR= clean cleandepend
CLEANDIR= cleandir
.endif

.if ${MK_META_MODE} == "yes"
# If filemon is used then we can rely on the build being incremental-safe.
# The .meta files will also track the build command and rebuild should
# it change.
.if empty(.MAKE.MODE:Mnofilemon)
NO_CLEAN= t
.endif
.endif

LOCAL_TOOL_DIRS?=
PACKAGEDIR?= ${DESTDIR}/${DISTDIR}

Expand Down Expand Up @@ -316,6 +325,10 @@ CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \
MACHINE_ARCH=${TARGET_ARCH} \
MACHINE=${TARGET} \
CPUTYPE=${TARGET_CPUTYPE}
.if ${MK_META_MODE} != "no"
# Don't rebuild build-tools targets during normal build.
CROSSENV+= BUILD_TOOLS_META=.NOMETA_CMP
.endif
.if ${MK_GROFF} != "no"
CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
Expand All @@ -327,6 +340,7 @@ CROSSENV+= ${TARGET_CFLAGS}

# bootstrap-tools stage
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
TOOLS_PREFIX=${WORLDTMP} \
PATH=${BPATH}:${PATH} \
WORLDTMP=${WORLDTMP} \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
Expand Down Expand Up @@ -672,12 +686,12 @@ WMAKE_TGTS+= build${libcompat}
buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
.ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue

buildworld_prologue:
buildworld_prologue: .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> World build started on `LC_ALL=C date`"
@echo "--------------------------------------------------------------"

buildworld_epilogue:
buildworld_epilogue: .PHONY
@echo
@echo "--------------------------------------------------------------"
@echo ">>> World build completed on `LC_ALL=C date`"
Expand Down Expand Up @@ -1897,7 +1911,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \
lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \
${_lib_casper} \
lib/ncurses/ncurses lib/ncurses/ncursesw \
lib/libopie lib/libpam ${_lib_libthr} \
lib/libopie lib/libpam/libpam ${_lib_libthr} \
${_lib_libradius} lib/libsbuf lib/libtacplus \
lib/libgeom \
${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
Expand All @@ -1909,6 +1923,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \
${_secure_lib_libcrypto} ${_lib_libldns} \
${_secure_lib_libssh} ${_secure_lib_libssl} \
gnu/lib/libdialog

.if ${MK_GNUCXX} != "no"
_prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++
gnu/lib/libstdc++__L: lib/msun__L
Expand Down Expand Up @@ -2076,7 +2091,7 @@ ${_lib}__PL: .PHONY .MAKE
.endif
.endfor

.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
Expand All @@ -2087,18 +2102,6 @@ ${_lib}__L: .PHONY .MAKE
.endif
.endfor

# libpam is special: we need to build static PAM modules before
# static PAM library, and dynamic PAM library before dynamic PAM
# modules.
lib/libpam__L: .PHONY .MAKE
${_+_}@${ECHODIR} "===> lib/libpam (obj,all,install)"; \
cd ${.CURDIR}/lib/libpam; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET all; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET install

_prereq_libs: ${_prereq_libs:S/$/__PL/}
_startup_libs: ${_startup_libs:S/$/__L/}
_prebuild_libs: ${_prebuild_libs:S/$/__L/}
Expand Down
5 changes: 5 additions & 0 deletions Makefile.libcompat
Expand Up @@ -88,8 +88,13 @@ LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
LIBDIR=/usr/lib${libcompat} \
SHLIBDIR=/usr/lib${libcompat} \
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
.if ${MK_META_MODE} != "no"
# Don't rebuild build-tools targets during normal build.
LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NOMETA_CMP
.endif
LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \
CPP="${XCPP} ${LIBCOMPATCFLAGS}" \
DESTDIR=${LIBCOMPATTMP} \
-DNO_CPU_CFLAGS \
MK_CTF=no \
Expand Down
1 change: 0 additions & 1 deletion ObsoleteFiles.inc
Expand Up @@ -1732,7 +1732,6 @@ OLD_FILES+=usr/share/man/man4/lindev.4.gz
# 20140425
OLD_FILES+=usr/lib/libssp_p.a
OLD_FILES+=usr/lib/libstand_p.a
OLD_FILES+=usr/lib32/libc_pic.a
OLD_FILES+=usr/lib32/libssp_p.a
OLD_FILES+=usr/lib32/libstand_p.a
# 20140314: AppleTalk
Expand Down
27 changes: 27 additions & 0 deletions UPDATING
Expand Up @@ -31,6 +31,33 @@ 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".)

20160414:
The CAM I/O scheduler has been committed to the kernel. There should be
no user visible impact. This does enable NCQ Trim on ada SSDs. While the
list of known rogues that claim support for this but actually corrupt
data is believed to be complete, be on the lookout for data
corruption. The known rogue list is believed to be complete:

o Crucial MX100, M550 drives with MU01 firmware.
o Micron M510 and M550 drives with MU01 firmware.
o Micron M500 prior to MU07 firmware
o Samsung 830, 840, and 850 all firmwares
o FCCT M500 all firmwares

Crucial has firmware http://www.crucial.com/usa/en/support-ssd-firmware
with working NCQ TRIM. For Micron branded drives, see your sales rep for
updated firmware. Black listed drives will work correctly because these
drives work correctly so long as no NCQ TRIMs are sent to them. Given
this list is the same as found in Linux, it's believed there are no
other rogues in the market place. All other models from the above
vendors work.

To be safe, if you are at all concerned, you can quirk each of your
drives to prevent NCQ from being sent by setting:
kern.cam.ada.X.quirks="0x2"
in loader.conf. If the drive requires the 4k sector quirk, set the
quirks entry to 0x3.

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
Expand Down
2 changes: 1 addition & 1 deletion bin/csh/Makefile
Expand Up @@ -110,7 +110,7 @@ csh.1: tcsh.man

build-tools: gethost

gethost: gethost.c sh.err.h tc.const.h sh.h
gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
${TCSHDIR}/gethost.c
Expand Down
6 changes: 3 additions & 3 deletions bin/sh/Makefile
Expand Up @@ -45,10 +45,10 @@ builtins.c builtins.h: mkbuiltins builtins.def
# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
.o:
mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
mknodes: mknodes.o
mksyntax: mksyntax.o
mknodes: mknodes.o ${BUILD_TOOLS_META}
mksyntax: mksyntax.o ${BUILD_TOOLS_META}

.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
Expand Down
4 changes: 1 addition & 3 deletions bin/sh/parser.c
Expand Up @@ -1616,7 +1616,6 @@ parsesub: {
int flags;
char *p;
static const char types[] = "}-+?=";
int bracketed_name = 0; /* used to handle ${[0-9]*} variables */
int linno;
int length;
int c1;
Expand All @@ -1640,7 +1639,6 @@ parsesub: {
subtype = VSNORMAL;
flags = 0;
if (c == '{') {
bracketed_name = 1;
c = pgetc_linecont();
subtype = 0;
}
Expand All @@ -1665,7 +1663,7 @@ parsesub: {
flags |= VSLINENO;
}
} else if (is_digit(c)) {
if (bracketed_name) {
if (subtype != VSNORMAL) {
do {
STPUTC(c, out);
c = pgetc_linecont();
Expand Down
8 changes: 4 additions & 4 deletions cddl/lib/libdtrace/tcp.d
Expand Up @@ -108,16 +108,16 @@ typedef struct tcpsinfo {
uint32_t tcps_snxt; /* next sequence # to send */
uint32_t tcps_rack; /* sequence # we have acked */
uint32_t tcps_rnxt; /* next sequence # expected */
uint32_t tcps_swnd; /* send window size */
u_long tcps_swnd; /* send window size */
int32_t tcps_snd_ws; /* send window scaling */
uint32_t tcps_swl1; /* window update seg seq number */
uint32_t tcps_swl2; /* window update seg ack number */
uint32_t tcps_rup; /* receive urgent pointer */
uint32_t tcps_radv; /* advertised window */
uint32_t tcps_rwnd; /* receive window size */
u_long tcps_rwnd; /* receive window size */
int32_t tcps_rcv_ws; /* receive window scaling */
uint32_t tcps_cwnd; /* congestion window */
uint32_t tcps_cwnd_ssthresh; /* threshold for congestion avoidance */
u_long tcps_cwnd; /* congestion window */
u_long tcps_cwnd_ssthresh; /* threshold for congestion avoidance */
uint32_t tcps_srecover; /* for use in NewReno Fast Recovery */
uint32_t tcps_sack_fack; /* SACK sequence # we have acked */
uint32_t tcps_sack_snxt; /* next SACK seq # for retransmission */
Expand Down
17 changes: 15 additions & 2 deletions contrib/elftoolchain/elfcopy/sections.c
Expand Up @@ -343,7 +343,7 @@ create_scn(struct elfcopy *ecp)
GElf_Shdr ish;
size_t indx;
uint64_t oldndx, newndx;
int elferr, sec_flags;
int elferr, sec_flags, reorder;

/*
* Insert a pseudo section that contains the ELF header
Expand All @@ -367,6 +367,7 @@ create_scn(struct elfcopy *ecp)
errx(EXIT_FAILURE, "elf_getshstrndx failed: %s",
elf_errmsg(-1));

reorder = 0;
is = NULL;
while ((is = elf_nextscn(ecp->ein, is)) != NULL) {
if (gelf_getshdr(is, &ish) == NULL)
Expand Down Expand Up @@ -482,8 +483,20 @@ create_scn(struct elfcopy *ecp)
/* create section header based on input object. */
if (strcmp(name, ".symtab") != 0 &&
strcmp(name, ".strtab") != 0 &&
strcmp(name, ".shstrtab") != 0)
strcmp(name, ".shstrtab") != 0) {
copy_shdr(ecp, s, NULL, 0, sec_flags);
/*
* elfcopy puts .symtab, .strtab and .shstrtab
* sections in the end of the output object.
* If the input objects have more sections
* after any of these 3 sections, the section
* table will be reordered. section symbols
* should be regenerated for relocations.
*/
if (reorder)
ecp->flags &= ~SYMTAB_INTACT;
} else
reorder = 1;

if (strcmp(name, ".symtab") == 0) {
ecp->flags |= SYMTAB_EXIST;
Expand Down
6 changes: 3 additions & 3 deletions contrib/ipfilter/bpf_filter.c
Expand Up @@ -132,7 +132,7 @@ m_xword(m, k, err)
return EXTRACT_LONG(cp);
}
m0 = m->m_next;
if (m0 == 0 || M_LEN(m0) + len - k < 4)
if (m0 == NULL || M_LEN(m0) + len - k < 4)
goto bad;
*err = 0;
np = MTOD(m0, u_char *);
Expand Down Expand Up @@ -168,7 +168,7 @@ m_xhalf(m, k, err)
return EXTRACT_SHORT(cp);
}
m0 = m->m_next;
if (m0 == 0)
if (m0 == NULL)
goto bad;
*err = 0;
return (cp[0] << 8) | MTOD(m0, u_char *)[0];
Expand Down Expand Up @@ -205,7 +205,7 @@ bpf_filter(pc, p, wirelen, buflen)
} else
m = NULL;

if (pc == 0)
if (pc == NULL)
/*
* No filter means accept all.
*/
Expand Down
6 changes: 3 additions & 3 deletions contrib/ipfilter/mli_ipl.c
Expand Up @@ -64,9 +64,9 @@ ipfrwlock_t ipf_global, ipf_mutex, ipf_ipidfrag, ipf_frcache, ipf_tokens;
int (*ipf_checkp) __P((struct ip *, int, void *, int, mb_t **));

#ifdef IPFILTER_LKM
static int *ipff_addr = 0;
static int *ipff_addr;
static int ipff_value;
static __psunsigned_t *ipfk_addr = 0;
static __psunsigned_t *ipfk_addr;
static __psunsigned_t ipfk_code[4];
#endif
static void nifattach();
Expand All @@ -85,7 +85,7 @@ typedef struct nif {
int nf_unit;
} nif_t;

static nif_t *nif_head = 0;
static nif_t *nif_head;
static int nif_interfaces = 0;
extern int in_interfaces;
#if IRIX >= 60500
Expand Down
3 changes: 2 additions & 1 deletion contrib/libpcap/pcap-snf.c
Expand Up @@ -57,10 +57,11 @@ snf_pcap_stats(pcap_t *p, struct pcap_stat *ps)
static void
snf_platform_cleanup(pcap_t *p)
{
struct pcap_snf *ps = p->priv;
struct pcap_snf *ps;

if (p == NULL)
return;
ps = p->priv;

snf_ring_close(ps->snf_ring);
snf_close(ps->snf_handle);
Expand Down
1 change: 1 addition & 0 deletions contrib/libxo/Makefile.am
Expand Up @@ -77,6 +77,7 @@ GH_PAGES_PACKAGE_DIR = ${GH_PAGES_DIR}/${GH_PACKAGING_DIR}
packages:
@-[ -d ${GH_PAGES_DIR} ] && set -x \
&& echo "Updating packages on gh-pages ..." \
&& mkdir -p ${GH_PAGES_DIR}/${GH_PACKAGING_DIR} \
&& SHA1="`openssl sha1 ${PACKAGE_FILE} | awk '{print $$2}'`" \
&& SHA256="`openssl sha256 ${PACKAGE_FILE} | awk '{print $$2}'`" \
&& SIZE="`ls -l ${PACKAGE_FILE} | awk '{print $$5}'`" \
Expand Down

0 comments on commit 6549ef7

Please sign in to comment.