Skip to content

Commit

Permalink
NetBSD re-synchronization of the source tree
Browse files Browse the repository at this point in the history
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
  • Loading branch information
sambuc committed Jan 13, 2016
1 parent 8933525 commit 0a6a1f1
Show file tree
Hide file tree
Showing 32,425 changed files with 3,035,269 additions and 1,378,994 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
52 changes: 25 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.303 2013/07/16 09:52:21 joerg Exp $
# $NetBSD: Makefile,v 1.316 2015/07/23 08:03:25 mrg Exp $

#
# This is the top-level makefile for building NetBSD. For an outline of
Expand Down Expand Up @@ -64,11 +64,11 @@
# Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs
# from ${DESTDIR}
# iso-image:
# Create CD-ROM image in RELEASEDIR/iso.
# Create CD-ROM image in RELEASEDIR/images.
# RELEASEDIR must already have been populated by `make release'
# or equivalent.
# iso-image-source:
# Create CD-ROM image with source in RELEASEDIR/iso.
# Create CD-ROM image with source in RELEASEDIR/images.
# RELEASEDIR must already have been populated by
# `make release sourcesets' or equivalent.
# live-image:
Expand Down Expand Up @@ -98,8 +98,7 @@
# if ${MKCOMPAT} != "no".
# do-build: builds and installs the entire system.
# do-x11: builds and installs X11 if ${MKX11} != "no"; either
# X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg"
# or X11R6 from src/x11
# X11R7 from src/external/mit/xorg
# do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no".
# do-obsolete: installs the obsolete sets (for the postinstall-* targets).
#
Expand Down Expand Up @@ -178,46 +177,45 @@ afterinstall: .PHONY .MAKE
${MAKEDIRTARGET} . postinstall-check
.endif

_POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall
_POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall \
-m ${MACHINE} -a ${MACHINE_ARCH}
_POSTINSTALL_ENV= \
AWK=${TOOL_AWK:Q} \
DB=${TOOL_DB:Q} \
HOST_SH=${HOST_SH:Q} \
MAKE=${MAKE:Q} \
PWD_MKDB=${TOOL_PWD_MKDB:Q} \
SED=${TOOL_SED:Q} \
STAT=${TOOL_STAT:Q}

.if ${MKX11} != "no"
_POSTINSTALL_X11=-x ${X11SRCDIR:Q}
.endif

postinstall-check: .PHONY
@echo " === Post installation checks ==="
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
@echo " ================================"

postinstall-fix: .NOTMAIN .PHONY
@echo " === Post installation fixes ==="
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix
@echo " ==============================="

postinstall-fix-obsolete: .NOTMAIN .PHONY
@echo " === Removing obsolete files ==="
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete
@echo " ==============================="

postinstall-fix-obsolete_stand: .NOTMAIN .PHONY
@echo " === Removing obsolete files ==="
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand
@echo " ==============================="


#
# Targets (in order!) called by "make build".
#
.if defined(HAVE_GCC)
.if ${HAVE_GCC} == "4"
LIBGCC_EXT=4
BUILD_CC_LIB_BASEDIR= gnu/lib
BUILD_CC_LIB_BASETARGET= gnu-lib
.else
LIBGCC_EXT=
BUILD_CC_LIB_BASEDIR= external/gpl3/gcc/lib
BUILD_CC_LIB_BASETARGET= external-gpl3-gcc-lib
.endif
.endif

BUILDTARGETS+= check-tools
.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
BUILDTARGETS+= cleandir
Expand Down Expand Up @@ -247,10 +245,10 @@ BUILDTARGETS+= do-lib
# LSC Not used in MINIX3
BUILDTARGETS+= do-compat-lib
.endif # !defined(__MINIX)
BUILDTARGETS+= do-build
.if ${MKX11} != "no"
BUILDTARGETS+= do-x11
.endif
BUILDTARGETS+= do-build
.if ${MKEXTSRC} != "no"
BUILDTARGETS+= do-extsrc
.endif
Expand Down Expand Up @@ -348,6 +346,7 @@ distribution buildworld: .PHONY .MAKE
${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
${MAKEDIRTARGET} . postinstall-fix-obsolete
${MAKEDIRTARGET} . postinstall-fix-obsolete_stand
${MAKEDIRTARGET} distrib/sets checkflist
.endif
@echo "make ${.TARGET} started at: ${START_TIME}"
Expand Down Expand Up @@ -521,10 +520,10 @@ do-build: .PHONY .MAKE

do-x11: .PHONY .MAKE
.if ${MKX11} != "no"
.if ${X11FLAVOUR} == "Xorg"
${MAKEDIRTARGET} external/mit/xorg build
.else
${MAKEDIRTARGET} x11 build
${MAKEDIRTARGET} external/mit/xorg/tools all
${MAKEDIRTARGET} external/mit/xorg/lib build_install
.if ${MKCOMPATX11} != "no"
${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../external/mit/xorg/lib"
.endif
.else
@echo "MKX11 is not enabled"
Expand Down Expand Up @@ -570,7 +569,6 @@ do-installsrc:
dependall-distrib depend-distrib all-distrib: .PHONY
@true

.include <bsd.sys.mk>
.include <bsd.obj.mk>
.include <bsd.kernobj.mk>
.include <bsd.subdir.mk>
2 changes: 2 additions & 0 deletions bin/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.22 2007/12/31 15:31:24 ad Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93

#__MINIX: chio mt ps

SUBDIR= cat chmod cp csh date dd df domainname echo ed expr hostname \
kill ksh ln ls mkdir mv pax pwd rcp rcmd rm rmdir sh \
sleep stty sync test
Expand Down
6 changes: 3 additions & 3 deletions bin/cat/cat.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" $NetBSD: cat.1,v 1.36 2012/11/10 18:41:10 wiz Exp $
.\" $NetBSD: cat.1,v 1.38 2014/06/15 07:27:22 wiz Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
Expand Down Expand Up @@ -32,7 +32,7 @@
.\"
.\" @(#)cat.1 8.3 (Berkeley) 5/2/95
.\"
.Dd November 10, 2012
.Dd June 15, 2014
.Dt CAT 1
.Os
.Sh NAME
Expand Down Expand Up @@ -198,7 +198,7 @@ utility is expected to conform to the
specification.
.Pp
The flags
.Op Fl belnstv
.Op Fl Bbeflnstv
are extensions to the specification.
.Sh HISTORY
A
Expand Down
15 changes: 10 additions & 5 deletions bin/cat/cat.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: cat.c,v 1.52 2012/11/19 19:41:31 christos Exp $ */
/* $NetBSD: cat.c,v 1.55 2015/07/25 16:17:01 sevan Exp $ */

/*
* Copyright (c) 1989, 1993
Expand Down Expand Up @@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#else
__RCSID("$NetBSD: cat.c,v 1.52 2012/11/19 19:41:31 christos Exp $");
__RCSID("$NetBSD: cat.c,v 1.55 2015/07/25 16:17:01 sevan Exp $");
#endif
#endif /* not lint */

Expand Down Expand Up @@ -113,7 +113,6 @@ main(int argc, char *argv[])
vflag = 1;
break;
default:
case '?':
(void)fprintf(stderr,
"Usage: %s [-beflnstuv] [-B bsize] [-] "
"[file ...]\n", getprogname());
Expand Down Expand Up @@ -250,9 +249,11 @@ raw_args(char **argv)
filename = "stdin";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
if (!strcmp(*argv, "-")) {
fd = fileno(stdin);
else if (fflag) {
if (fd < 0)
goto skip;
} else if (fflag) {
struct stat st;
fd = open(*argv, O_RDONLY|O_NONBLOCK, 0);
if (fd < 0)
Expand All @@ -277,6 +278,8 @@ raw_args(char **argv)
continue;
}
filename = *argv++;
} else if (fd < 0) {
err(EXIT_FAILURE, "stdin");
}
raw_cat(fd);
if (fd != fileno(stdin))
Expand All @@ -294,6 +297,8 @@ raw_cat(int rfd)
int wfd;

wfd = fileno(stdout);
if (wfd < 0)
err(EXIT_FAILURE, "stdout");
if (buf == NULL) {
struct stat sbuf;

Expand Down
5 changes: 4 additions & 1 deletion bin/chmod/chmod.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" $NetBSD: chmod.1,v 1.24 2012/10/22 17:47:06 christos Exp $
.\" $NetBSD: chmod.1,v 1.25 2013/12/17 09:54:08 apb Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
Expand Down Expand Up @@ -106,6 +106,9 @@ options are ignored unless the
option is specified.
In addition, these options override each other and the
command's actions are determined by the last one specified.
The default is as if the
.Fl P
option had been specified.
.Pp
Only the owner of a file or the super-user is permitted to change
the mode of a file.
Expand Down
9 changes: 6 additions & 3 deletions bin/cp/cp.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" $NetBSD: cp.1,v 1.42 2012/03/25 22:37:08 wiz Exp $
.\" $NetBSD: cp.1,v 1.44 2015/06/28 16:22:54 wiz Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
Expand Down Expand Up @@ -213,6 +213,9 @@ options are ignored unless the
option is specified.
In addition, these options override each other and the
command's actions are determined by the last one specified.
The default is as if the
.Fl P
option had been specified.
.Sh EXIT STATUS
.Ex -std cp
.Sh COMPATIBILITY
Expand All @@ -222,8 +225,8 @@ utility had a
.Fl r
option.
This implementation supports that option, however, its use is strongly
discouraged, as it does not correctly copy special files, symbolic links
or fifo's.
discouraged, as it does not correctly copy special files, symbolic links,
or FIFOs.
.Sh SEE ALSO
.Xr mv 1 ,
.Xr pax 1 ,
Expand Down
18 changes: 10 additions & 8 deletions bin/cp/utils.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: utils.c,v 1.41 2012/01/04 15:58:37 christos Exp $ */
/* $NetBSD: utils.c,v 1.44 2015/03/03 00:20:38 enami Exp $ */

/*-
* Copyright (c) 1991, 1993, 1994
Expand Down Expand Up @@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#else
__RCSID("$NetBSD: utils.c,v 1.41 2012/01/04 15:58:37 christos Exp $");
__RCSID("$NetBSD: utils.c,v 1.44 2015/03/03 00:20:38 enami Exp $");
#endif
#endif /* not lint */

Expand Down Expand Up @@ -62,13 +62,13 @@ __RCSID("$NetBSD: utils.c,v 1.41 2012/01/04 15:58:37 christos Exp $");
int
set_utimes(const char *file, struct stat *fs)
{
static struct timeval tv[2];
struct timespec ts[2];

TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
ts[0] = fs->st_atimespec;
ts[1] = fs->st_mtimespec;

if (lutimes(file, tv)) {
warn("lutimes: %s", file);
if (lutimens(file, ts)) {
warn("lutimens: %s", file);
return (1);
}
return (0);
Expand Down Expand Up @@ -364,10 +364,12 @@ copy_special(struct stat *from_stat, int exists)
int
setfile(struct stat *fs, int fd)
{
int rval, islink;
int rval/* MINIX:, islink*/;

rval = 0;
#if !defined(__minix)
islink = S_ISLNK(fs->st_mode);
#endif /* !defined(__minix) */
fs->st_mode &= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;

/*
Expand Down
10 changes: 3 additions & 7 deletions bin/csh/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.39 2013/07/16 17:47:43 christos Exp $
# $NetBSD: Makefile,v 1.41 2014/07/05 23:12:33 dholland Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
#
# C Shell with process control; VM/UNIX VAX Makefile
Expand Down Expand Up @@ -52,14 +52,10 @@ const.h: const.c
${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
sort >> ${.TARGET}

.if make(install)
.if !defined(__MINIX)
SUBDIR+=USD.doc
.endif
.endif # !defined(__MINIX)

# XXX Only GCC 4.1 problem
.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax"
COPTS.parse.c+= -O0
.endif
COPTS.err.c = -Wno-format-nonliteral
COPTS.printf.c = -Wno-format-nonliteral
COPTS.proc.c = -Wno-format-nonliteral
Expand Down
12 changes: 6 additions & 6 deletions bin/csh/USD.doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# $NetBSD: Makefile,v 1.7 2007/10/18 18:26:31 tls Exp $
# $NetBSD: Makefile,v 1.9 2014/07/05 19:22:41 dholland Exp $
# @(#)Makefile 8.1 (Berkeley) 8/14/93

DIR= usd/04.csh
SECTION=reference/ref1
ARTICLE=csh
SRCS= tabs csh.1 csh.2 csh.3 csh.4 csh.ap csh.g
MACROS= -ms

paper.ps: ${SRCS}
${TOOL_SOELIM} -I${.CURDIR} ${.ALLSRC} | \
${TOOL_ROFF_PS} ${MACROS} > ${.TARGET}
EXTRAHTMLFILES=\
csh1.png csh2.png csh3.png csh4.png csh5.png csh6.png csh7.png \
csh8.png csh9.png

.include <bsd.doc.mk>
Loading

0 comments on commit 0a6a1f1

Please sign in to comment.