svn commit: r217190 - in projects/binutils-2.17: . bin/sh contrib/top etc/defaults gnu/lib/libgcc gnu/lib/libgomp gnu/usr.bin/binutils gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/libbfd gnu/usr.bi...

Dimitry Andric dim at FreeBSD.org
Sun Jan 9 11:52:24 UTC 2011


Author: dim
Date: Sun Jan  9 11:52:23 2011
New Revision: 217190
URL: http://svn.freebsd.org/changeset/base/217190

Log:
  Sync: merge r217119 through r217189 from ^/head.

Added:
  projects/binutils-2.17/sys/x86/include/_inttypes.h
     - copied unchanged from r217189, head/sys/x86/include/_inttypes.h
  projects/binutils-2.17/tools/regression/bin/sh/builtins/exit2.8
     - copied unchanged from r217189, head/tools/regression/bin/sh/builtins/exit2.8
  projects/binutils-2.17/tools/regression/bin/sh/builtins/exit3.0
     - copied unchanged from r217189, head/tools/regression/bin/sh/builtins/exit3.0
  projects/binutils-2.17/tools/regression/usr.bin/sed/inplace_race.t
     - copied unchanged from r217189, head/tools/regression/usr.bin/sed/inplace_race.t
Modified:
  projects/binutils-2.17/Makefile
  projects/binutils-2.17/Makefile.inc1
  projects/binutils-2.17/Makefile.mips
  projects/binutils-2.17/bin/sh/main.c
  projects/binutils-2.17/bin/sh/trap.c
  projects/binutils-2.17/bin/sh/trap.h
  projects/binutils-2.17/etc/defaults/rc.conf
  projects/binutils-2.17/gnu/lib/libgcc/Makefile
  projects/binutils-2.17/gnu/lib/libgomp/Makefile
  projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0
  projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.mips
  projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.mips
  projects/binutils-2.17/gnu/usr.bin/cc/Makefile.inc
  projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt
  projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc
  projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile
  projects/binutils-2.17/lib/libc/Makefile
  projects/binutils-2.17/lib/libc/gen/Symbol.map
  projects/binutils-2.17/lib/libc/gen/dlfcn.c
  projects/binutils-2.17/lib/libc/gen/elf_utils.c
  projects/binutils-2.17/lib/libc/net/hesiod.c
  projects/binutils-2.17/lib/libc/stdlib/realpath.c
  projects/binutils-2.17/libexec/rtld-elf/Symbol.map
  projects/binutils-2.17/libexec/rtld-elf/map_object.c
  projects/binutils-2.17/libexec/rtld-elf/rtld.c
  projects/binutils-2.17/libexec/rtld-elf/rtld.h
  projects/binutils-2.17/share/man/man4/tcp.4
  projects/binutils-2.17/share/man/man5/rc.conf.5
  projects/binutils-2.17/share/mk/bsd.endian.mk
  projects/binutils-2.17/share/mk/sys.mk
  projects/binutils-2.17/sys/amd64/amd64/elf_machdep.c
  projects/binutils-2.17/sys/amd64/amd64/machdep.c
  projects/binutils-2.17/sys/amd64/ia32/ia32_signal.c
  projects/binutils-2.17/sys/amd64/include/_inttypes.h
  projects/binutils-2.17/sys/amd64/include/_limits.h
  projects/binutils-2.17/sys/amd64/include/_stdint.h
  projects/binutils-2.17/sys/amd64/include/vmparam.h
  projects/binutils-2.17/sys/arm/include/_limits.h
  projects/binutils-2.17/sys/arm/include/_stdint.h
  projects/binutils-2.17/sys/arm/include/_types.h
  projects/binutils-2.17/sys/compat/freebsd32/freebsd32_misc.c
  projects/binutils-2.17/sys/compat/ia32/ia32_sysvec.c
  projects/binutils-2.17/sys/compat/ia32/ia32_util.h
  projects/binutils-2.17/sys/dev/ixgbe/ixgbe.c
  projects/binutils-2.17/sys/dev/ixgbe/ixgbe.h
  projects/binutils-2.17/sys/dev/ixgbe/ixv.h
  projects/binutils-2.17/sys/fs/nfsserver/nfs_nfsdport.c
  projects/binutils-2.17/sys/i386/include/_inttypes.h
  projects/binutils-2.17/sys/i386/include/_limits.h
  projects/binutils-2.17/sys/i386/include/_stdint.h
  projects/binutils-2.17/sys/i386/include/_types.h
  projects/binutils-2.17/sys/ia64/include/_limits.h
  projects/binutils-2.17/sys/ia64/include/_stdint.h
  projects/binutils-2.17/sys/ia64/include/float.h
  projects/binutils-2.17/sys/kern/imgact_elf.c
  projects/binutils-2.17/sys/kern/kern_exec.c
  projects/binutils-2.17/sys/kern/kern_timeout.c
  projects/binutils-2.17/sys/kern/vfs_mountroot.c
  projects/binutils-2.17/sys/mips/atheros/ar91xxreg.h
  projects/binutils-2.17/sys/mips/include/_inttypes.h
  projects/binutils-2.17/sys/mips/include/_limits.h
  projects/binutils-2.17/sys/mips/include/_stdint.h
  projects/binutils-2.17/sys/mips/include/_types.h
  projects/binutils-2.17/sys/netinet/if_ether.c
  projects/binutils-2.17/sys/netinet/in_pcb.c
  projects/binutils-2.17/sys/netinet/tcp_input.c
  projects/binutils-2.17/sys/netinet/tcp_lro.c
  projects/binutils-2.17/sys/netinet/tcp_lro.h
  projects/binutils-2.17/sys/netinet/tcp_reass.c
  projects/binutils-2.17/sys/netinet/tcp_syncache.h
  projects/binutils-2.17/sys/netinet/tcp_timer.c
  projects/binutils-2.17/sys/netinet/tcp_usrreq.c
  projects/binutils-2.17/sys/netinet/tcp_var.h
  projects/binutils-2.17/sys/netinet/udp.h
  projects/binutils-2.17/sys/netinet/udp_var.h
  projects/binutils-2.17/sys/netsmb/smb_dev.h
  projects/binutils-2.17/sys/netsmb/smb_subr.c
  projects/binutils-2.17/sys/netsmb/smb_subr.h
  projects/binutils-2.17/sys/pc98/include/_inttypes.h
  projects/binutils-2.17/sys/powerpc/include/_inttypes.h
  projects/binutils-2.17/sys/powerpc/include/_limits.h
  projects/binutils-2.17/sys/powerpc/include/_stdint.h
  projects/binutils-2.17/sys/powerpc/include/_types.h
  projects/binutils-2.17/sys/powerpc/include/float.h
  projects/binutils-2.17/sys/sparc64/include/_limits.h
  projects/binutils-2.17/sys/sparc64/include/_stdint.h
  projects/binutils-2.17/sys/sparc64/include/float.h
  projects/binutils-2.17/sys/sun4v/include/_limits.h
  projects/binutils-2.17/sys/sun4v/include/_stdint.h
  projects/binutils-2.17/sys/sun4v/include/float.h
  projects/binutils-2.17/sys/sys/cdefs.h
  projects/binutils-2.17/sys/sys/imgact.h
  projects/binutils-2.17/sys/sys/link_elf.h
  projects/binutils-2.17/sys/sys/sysent.h
  projects/binutils-2.17/sys/vm/vm_page.c
  projects/binutils-2.17/tools/regression/usr.bin/sed/Makefile
  projects/binutils-2.17/usr.bin/sed/main.c
  projects/binutils-2.17/usr.bin/xlint/Makefile.inc
  projects/binutils-2.17/usr.sbin/Makefile.mips
  projects/binutils-2.17/usr.sbin/cpucontrol/cpucontrol.c
  projects/binutils-2.17/usr.sbin/ndp/ndp.c
  projects/binutils-2.17/usr.sbin/pc-sysinstall/backend-query/disk-part.sh
  projects/binutils-2.17/usr.sbin/pc-sysinstall/backend-query/send-logs.sh
  projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
  projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/functions-disk.sh
  projects/binutils-2.17/usr.sbin/pc-sysinstall/backend/functions-networking.sh
Directory Properties:
  projects/binutils-2.17/   (props changed)
  projects/binutils-2.17/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/contrib/bind9/   (props changed)
  projects/binutils-2.17/contrib/binutils/   (props changed)
  projects/binutils-2.17/contrib/bzip2/   (props changed)
  projects/binutils-2.17/contrib/ee/   (props changed)
  projects/binutils-2.17/contrib/expat/   (props changed)
  projects/binutils-2.17/contrib/file/   (props changed)
  projects/binutils-2.17/contrib/gdb/   (props changed)
  projects/binutils-2.17/contrib/gdtoa/   (props changed)
  projects/binutils-2.17/contrib/gnu-sort/   (props changed)
  projects/binutils-2.17/contrib/groff/   (props changed)
  projects/binutils-2.17/contrib/less/   (props changed)
  projects/binutils-2.17/contrib/libpcap/   (props changed)
  projects/binutils-2.17/contrib/llvm/   (props changed)
  projects/binutils-2.17/contrib/llvm/tools/clang/   (props changed)
  projects/binutils-2.17/contrib/ncurses/   (props changed)
  projects/binutils-2.17/contrib/netcat/   (props changed)
  projects/binutils-2.17/contrib/ntp/   (props changed)
  projects/binutils-2.17/contrib/one-true-awk/   (props changed)
  projects/binutils-2.17/contrib/openbsm/   (props changed)
  projects/binutils-2.17/contrib/openpam/   (props changed)
  projects/binutils-2.17/contrib/pf/   (props changed)
  projects/binutils-2.17/contrib/sendmail/   (props changed)
  projects/binutils-2.17/contrib/tcpdump/   (props changed)
  projects/binutils-2.17/contrib/tcsh/   (props changed)
  projects/binutils-2.17/contrib/top/   (props changed)
  projects/binutils-2.17/contrib/top/install-sh   (props changed)
  projects/binutils-2.17/contrib/tzcode/stdtime/   (props changed)
  projects/binutils-2.17/contrib/tzcode/zic/   (props changed)
  projects/binutils-2.17/contrib/tzdata/   (props changed)
  projects/binutils-2.17/contrib/wpa/   (props changed)
  projects/binutils-2.17/contrib/xz/   (props changed)
  projects/binutils-2.17/crypto/openssh/   (props changed)
  projects/binutils-2.17/crypto/openssl/   (props changed)
  projects/binutils-2.17/lib/libc/   (props changed)
  projects/binutils-2.17/lib/libc/stdtime/   (props changed)
  projects/binutils-2.17/lib/libutil/   (props changed)
  projects/binutils-2.17/lib/libz/   (props changed)
  projects/binutils-2.17/sbin/   (props changed)
  projects/binutils-2.17/sbin/ipfw/   (props changed)
  projects/binutils-2.17/share/mk/bsd.arch.inc.mk   (props changed)
  projects/binutils-2.17/share/zoneinfo/   (props changed)
  projects/binutils-2.17/sys/   (props changed)
  projects/binutils-2.17/sys/amd64/include/xen/   (props changed)
  projects/binutils-2.17/sys/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/sys/contrib/dev/acpica/   (props changed)
  projects/binutils-2.17/sys/contrib/octeon-sdk/   (props changed)
  projects/binutils-2.17/sys/contrib/pf/   (props changed)
  projects/binutils-2.17/sys/contrib/x86emu/   (props changed)
  projects/binutils-2.17/usr.bin/calendar/   (props changed)
  projects/binutils-2.17/usr.bin/csup/   (props changed)
  projects/binutils-2.17/usr.bin/procstat/   (props changed)
  projects/binutils-2.17/usr.sbin/zic/   (props changed)

Modified: projects/binutils-2.17/Makefile
==============================================================================
--- projects/binutils-2.17/Makefile	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/Makefile	Sun Jan  9 11:52:23 2011	(r217190)
@@ -26,6 +26,7 @@
 # delete-old-dirs     - Delete obsolete directories.
 # delete-old-files    - Delete obsolete files.
 # delete-old-libs     - Delete obsolete libraries.
+# targets             - Print a list of supported TARGET/TARGET_ARCH pairs.
 #
 # This makefile is simple by design. The FreeBSD make automatically reads
 # the /usr/share/mk/sys.mk unless the -m argument is specified on the
@@ -280,10 +281,10 @@ tinderbox:
 # with a reasonable chance of success, regardless of how old your
 # existing system is.
 #
-.if make(universe) || make(universe_kernels) || make(tinderbox)
+.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
 TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
 TARGET_ARCHES_arm?=	arm armeb
-TARGET_ARCHES_mips?=	mipsel mipseb
+TARGET_ARCHES_mips?=	mipsel mipseb mips64el mips64eb
 TARGET_ARCHES_powerpc?=	powerpc powerpc64
 TARGET_ARCHES_pc98?=	i386
 TARGET_ARCHES_sun4v?=	sparc64
@@ -291,6 +292,14 @@ TARGET_ARCHES_sun4v?=	sparc64
 TARGET_ARCHES_${target}?= ${target}
 .endfor
 
+targets:
+	@echo "Supported TARGET/TARGET_ARCH pairs"
+.for target in ${TARGETS}
+.for target_arch in ${TARGET_ARCHES_${target}}
+	@echo "    ${target}/${target_arch}"
+.endfor
+.endfor
+
 .if defined(DOING_TINDERBOX)
 FAILFILE=tinderbox.failed
 MAKEFAIL=tee -a ${FAILFILE}

Modified: projects/binutils-2.17/Makefile.inc1
==============================================================================
--- projects/binutils-2.17/Makefile.inc1	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/Makefile.inc1	Sun Jan  9 11:52:23 2011	(r217190)
@@ -121,7 +121,7 @@ VERSION+=	${OSRELDATE}
 TARGET_ARCH=	${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 .elif !defined(TARGET) && defined(TARGET_ARCH) && \
     ${TARGET_ARCH} != ${MACHINE_ARCH}
-TARGET=		${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/}
+TARGET=		${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 .endif
 # Legacy names, for a transition period mips:mips -> mipsel:mips
 .if defined(TARGET) && defined(TARGET_ARCH) && \
@@ -142,7 +142,7 @@ TARGET_ARCH=armeb
 TARGET?=	${MACHINE}
 TARGET_ARCH?=	${MACHINE_ARCH}
 
-KNOWN_ARCHES?=	amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
+KNOWN_ARCHES?=	amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
 .if ${TARGET} == ${TARGET_ARCH}
 _t=		${TARGET}
 .else

Modified: projects/binutils-2.17/Makefile.mips
==============================================================================
--- projects/binutils-2.17/Makefile.mips	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/Makefile.mips	Sun Jan  9 11:52:23 2011	(r217190)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} == "n64"
+.if ${MACHINE_ARCH} != "mipsel" && ${MACHINE_ARCH} != "mipseb"
 MK_RESCUE=no
 .endif

Modified: projects/binutils-2.17/bin/sh/main.c
==============================================================================
--- projects/binutils-2.17/bin/sh/main.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/bin/sh/main.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -341,10 +341,7 @@ exitcmd(int argc, char **argv)
 	if (stoppedjobs())
 		return 0;
 	if (argc > 1)
-		exitstatus = number(argv[1]);
+		exitshell(number(argv[1]));
 	else
-		exitstatus = oexitstatus;
-	exitshell(exitstatus);
-	/*NOTREACHED*/
-	return 0;
+		exitshell_savedstatus();
 }

Modified: projects/binutils-2.17/bin/sh/trap.c
==============================================================================
--- projects/binutils-2.17/bin/sh/trap.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/bin/sh/trap.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -80,6 +80,9 @@ static volatile sig_atomic_t gotsig[NSIG
 static int ignore_sigchld;	/* Used while handling SIGCHLD traps. */
 volatile sig_atomic_t gotwinch;
 
+static int exiting;		/* exitshell() has been called */
+static int exiting_exitstatus;	/* value passed to exitshell() */
+
 static int getsigaction(int, sig_t *);
 
 
@@ -478,10 +481,21 @@ setinteractive(int on)
 void
 exitshell(int status)
 {
+	TRACE(("exitshell(%d) pid=%d\n", status, getpid()));
+	exiting = 1;
+	exiting_exitstatus = status;
+	exitshell_savedstatus();
+}
+
+void
+exitshell_savedstatus(void)
+{
 	struct jmploc loc1, loc2;
 	char *p;
 
-	TRACE(("exitshell(%d) pid=%d\n", status, getpid()));
+	if (!exiting)
+		exiting_exitstatus = oexitstatus;
+	exitstatus = oexitstatus = exiting_exitstatus;
 	if (setjmp(loc1.loc)) {
 		goto l1;
 	}
@@ -498,5 +512,5 @@ l1:   handler = &loc2;			/* probably unn
 #if JOBS
 	setjobctl(0);
 #endif
-l2:   _exit(status);
+l2:   _exit(exiting_exitstatus);
 }

Modified: projects/binutils-2.17/bin/sh/trap.h
==============================================================================
--- projects/binutils-2.17/bin/sh/trap.h	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/bin/sh/trap.h	Sun Jan  9 11:52:23 2011	(r217190)
@@ -46,3 +46,4 @@ void onsig(int);
 void dotrap(void);
 void setinteractive(int);
 void exitshell(int) __dead2;
+void exitshell_savedstatus(void) __dead2;

Modified: projects/binutils-2.17/etc/defaults/rc.conf
==============================================================================
--- projects/binutils-2.17/etc/defaults/rc.conf	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/etc/defaults/rc.conf	Sun Jan  9 11:52:23 2011	(r217190)
@@ -89,7 +89,7 @@ fsck_y_enable="NO"	# Set to YES to do fs
 fsck_y_flags=""		# Additional flags for fsck -y
 background_fsck="YES"	# Attempt to run fsck in the background where possible.
 background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.
-netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.
+netfs_types="nfs:NFS newnfs:NEWNFS smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.
 extra_netfs_types="NO"	# List of network extra filesystem types for delayed
 			# mount at startup (or NO).
 

Modified: projects/binutils-2.17/gnu/lib/libgcc/Makefile
==============================================================================
--- projects/binutils-2.17/gnu/lib/libgcc/Makefile	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/lib/libgcc/Makefile	Sun Jan  9 11:52:23 2011	(r217190)
@@ -119,9 +119,10 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatuns
 #	_fixsfsi _fixunssfsi _floatdidf _floatdisf
 .endif
 
-.if ${TARGET_CPUARCH} == "mips"
+.if ${TARGET_CPUARCH} == mips
 LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
+# XXX do we need n32 here?
+.if ${TARGET_ARCH:Mmips64*} != ""
 LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c
 LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c
 LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c

Modified: projects/binutils-2.17/gnu/lib/libgomp/Makefile
==============================================================================
--- projects/binutils-2.17/gnu/lib/libgomp/Makefile	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/lib/libgomp/Makefile	Sun Jan  9 11:52:23 2011	(r217190)
@@ -25,8 +25,7 @@ VERSION_MAP=	${SRCDIR}/libgomp.map
 # Target-specific OpenMP configuration
 .if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \
     ${MACHINE_ARCH} == powerpc || \
-    (${MACHINE_CPUARCH} == mips && \
-	(!defined(TARGET_ABI) || ${TARGET_ABI} != "n64"))
+    ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb
 OMP_LOCK_ALIGN	=	4
 OMP_LOCK_KIND=		4
 OMP_LOCK_SIZE=		4

Modified: projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0	Sun Jan  9 11:52:23 2011	(r217190)
@@ -7,7 +7,7 @@
 VERSION=	"2.17.50 [FreeBSD] 2007-07-03"
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif
@@ -16,7 +16,7 @@ TARGET_VENDOR?=	unknown
 TARGET_OS?=	freebsd
 BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
 TARGET_TUPLE?=	${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
-.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb"
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
 TARGET_BIG_ENDIAN=t
 .endif
 
@@ -30,8 +30,7 @@ SRCDIR=	${.CURDIR}/${RELSRC}
 
 .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
 	${TARGET_ARCH} == "powerpc" || \
-	(${TARGET_CPUARCH} == "mips" && \
-		(!defined(TARGET_ABI) || ${TARGET_ABI} != "n64"))
+	${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
 .else
 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64

Modified: projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.mips
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.mips	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.mips	Sun Jan  9 11:52:23 2011	(r217190)
@@ -1,19 +1,18 @@
 # $FreeBSD$
 
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 _EMULATION_ENDIAN=l
 .else
 _EMULATION_ENDIAN=b
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
-.endif
-.endif
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
+.else
 NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
+.endif
 
 MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \
     elf32btsmipn32_fbsd elf32ltsmipn32_fbsd

Modified: projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.mips
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.mips	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.mips	Sun Jan  9 11:52:23 2011	(r217190)
@@ -1,19 +1,18 @@
 # $FreeBSD$
 
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 _EMULATION_ENDIAN=little
 .else
 _EMULATION_ENDIAN=big
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-DEFAULT_VECTOR=	bfd_elf32_ntrad${_EMULATION_ENDIAN}mips_vec
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 DEFAULT_VECTOR=	bfd_elf64_trad${_EMULATION_ENDIAN}mips_vec
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+DEFAULT_VECTOR=	bfd_elf32_ntrad${_EMULATION_ENDIAN}mips_vec
+.else
+DEFAULT_VECTOR=bfd_elf32_trad${_EMULATION_ENDIAN}mips_vec
 .endif
-.endif
-DEFAULT_VECTOR?=bfd_elf32_trad${_EMULATION_ENDIAN}mips_vec
 
 SRCS+=	coff-mips.c \
 	cpu-mips.c \

Modified: projects/binutils-2.17/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/cc/Makefile.inc	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/cc/Makefile.inc	Sun Jan  9 11:52:23 2011	(r217190)
@@ -22,12 +22,6 @@ CFLAGS+=	-DPREFIX=\"${TOOLS_PREFIX}/usr\
 #CFLAGS+=	-DWANT_COMPILER_INVARIANTS
 CSTD?=	gnu89
 
-# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
-# to get the proper sizes in limits.h
-.if defined(LONG_TYPE_SIZE)
-CFLAGS+=	-DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
-.endif
-
 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
 CFLAGS+=	-DCROSS_COMPILE
 .endif
@@ -36,21 +30,18 @@ CFLAGS+=	-DCROSS_COMPILE
 CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
 .endif
 
-
 .if ${TARGET_CPUARCH} == "mips"
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 CFLAGS += -DTARGET_ENDIAN_DEFAULT=0
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-MIPS_ABI_DEFAULT=ABI_N32
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 MIPS_ABI_DEFAULT=ABI_64
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+MIPS_ABI_DEFAULT=ABI_N32
+.else
+MIPS_ABI_DEFAULT=ABI_32
 .endif
-.endif
-
-MIPS_ABI_DEFAULT?=ABI_32
 CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT}
 
 # If we are compiling for the O32 ABI, we need to default to MIPS-III rather

Modified: projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt	Sun Jan  9 11:52:23 2011	(r217190)
@@ -4,7 +4,7 @@
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif
@@ -17,7 +17,7 @@ TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU
 .if ${TARGET_ARCH} == "sparc64"
 TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
 .endif
-.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" || ${TARGET_ARCH} == "mips64eb"
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
 TARGET_BIG_ENDIAN=t
 .endif
 .if ${TARGET_ARCH} == "powerpc64"

Modified: projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc	Sun Jan  9 11:52:23 2011	(r217190)
@@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif

Modified: projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile	Sun Jan  9 11:52:23 2011	(r217190)
@@ -4,7 +4,7 @@
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif

Modified: projects/binutils-2.17/lib/libc/Makefile
==============================================================================
--- projects/binutils-2.17/lib/libc/Makefile	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/Makefile	Sun Jan  9 11:52:23 2011	(r217190)
@@ -68,11 +68,7 @@ NOASM=
     ${LIBC_ARCH} != "ia64" && \
     ${LIBC_ARCH} != "powerpc64" && \
     ${LIBC_ARCH} != "sparc64" && \
-    ${LIBC_ARCH} != "mips"
-.include "${.CURDIR}/quad/Makefile.inc"
-.endif
-.if ${LIBC_ARCH} == "mips" && \
-    (!defined(TARGET_ABI) || ${TARGET_ABI} == "o32")
+    ${MACHINE_ARCH:Mmips64*} == ""
 .include "${.CURDIR}/quad/Makefile.inc"
 .endif
 .include "${.CURDIR}/regex/Makefile.inc"

Modified: projects/binutils-2.17/lib/libc/gen/Symbol.map
==============================================================================
--- projects/binutils-2.17/lib/libc/gen/Symbol.map	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/gen/Symbol.map	Sun Jan  9 11:52:23 2011	(r217190)
@@ -453,6 +453,7 @@ FBSDprivate_1.0 {
 	_rtld_atfork_pre;
 	_rtld_atfork_post;
 	_rtld_error;		/* for private use */
+	_rtld_get_stack_prot;
 	_rtld_thread_init;	/* for private use */
 	__elf_phdr_match_addr;
 	_err;
@@ -499,4 +500,5 @@ FBSDprivate_1.0 {
 	_libc_sem_getvalue_compat;
 
 	__elf_aux_vector;
+	__pthread_map_stacks_exec;
 };

Modified: projects/binutils-2.17/lib/libc/gen/dlfcn.c
==============================================================================
--- projects/binutils-2.17/lib/libc/gen/dlfcn.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/gen/dlfcn.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
 /*
  * Linkage to services provided by the dynamic linker.
  */
+#include <sys/mman.h>
 #include <dlfcn.h>
 #include <link.h>
 #include <stddef.h>
@@ -165,3 +166,12 @@ _rtld_addr_phdr(const void *addr, struct
 
 	return (0);
 }
+
+#pragma weak _rtld_get_stack_prot
+int
+_rtld_get_stack_prot(void)
+{
+
+	return (PROT_EXEC | PROT_READ | PROT_WRITE);
+}
+

Modified: projects/binutils-2.17/lib/libc/gen/elf_utils.c
==============================================================================
--- projects/binutils-2.17/lib/libc/gen/elf_utils.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/gen/elf_utils.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -26,7 +26,12 @@
  * $FreeBSD$
  */
 
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/resource.h>
+#include <sys/sysctl.h>
 #include <link.h>
+#include <stddef.h>
 
 int
 __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, void *addr)
@@ -45,3 +50,25 @@ __elf_phdr_match_addr(struct dl_phdr_inf
 	}
 	return (i != phdr_info->dlpi_phnum);
 }
+
+#pragma weak __pthread_map_stacks_exec
+void
+__pthread_map_stacks_exec(void)
+{
+	int mib[2];
+	struct rlimit rlim;
+	u_long usrstack;
+	size_t len;
+	
+	mib[0] = CTL_KERN;
+	mib[1] = KERN_USRSTACK;
+	len = sizeof(usrstack);
+	if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &usrstack, &len, NULL, 0)
+	    == -1)
+		return;
+	if (getrlimit(RLIMIT_STACK, &rlim) == -1)
+		return;
+	mprotect((void *)(uintptr_t)(usrstack - rlim.rlim_cur),
+	    rlim.rlim_cur, _rtld_get_stack_prot());
+}
+

Modified: projects/binutils-2.17/lib/libc/net/hesiod.c
==============================================================================
--- projects/binutils-2.17/lib/libc/net/hesiod.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/net/hesiod.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -324,6 +324,7 @@ read_config_file(ctx, filename)
 			    ? &ctx->lhs : &ctx->rhs;
 			*which = strdup(data);
 			if (!*which) {
+				fclose(fp);
 				errno = ENOMEM;
 				return -1;
 			}

Modified: projects/binutils-2.17/lib/libc/stdlib/realpath.c
==============================================================================
--- projects/binutils-2.17/lib/libc/stdlib/realpath.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/lib/libc/stdlib/realpath.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -54,7 +54,7 @@ realpath(const char * __restrict path, c
 	char *p, *q, *s;
 	size_t left_len, resolved_len;
 	unsigned symlinks;
-	int serrno, slen, m;
+	int m, serrno, slen;
 	char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX];
 
 	if (path == NULL) {
@@ -73,7 +73,6 @@ realpath(const char * __restrict path, c
 		m = 1;
 	} else
 		m = 0;
-
 	symlinks = 0;
 	if (path[0] == '/') {
 		resolved[0] = '/';
@@ -86,8 +85,10 @@ realpath(const char * __restrict path, c
 		if (getcwd(resolved, PATH_MAX) == NULL) {
 			if (m)
 				free(resolved);
-			else
-				strlcpy(resolved, ".", PATH_MAX);
+			else {
+				resolved[0] = '.';
+				resolved[1] = '\0';
+			}
 			return (NULL);
 		}
 		resolved_len = strlen(resolved);

Modified: projects/binutils-2.17/libexec/rtld-elf/Symbol.map
==============================================================================
--- projects/binutils-2.17/libexec/rtld-elf/Symbol.map	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/libexec/rtld-elf/Symbol.map	Sun Jan  9 11:52:23 2011	(r217190)
@@ -28,4 +28,5 @@ FBSDprivate_1.0 {
     _rtld_atfork_pre;
     _rtld_atfork_post;
     _rtld_addr_phdr;
+    _rtld_get_stack_prot;
 };

Modified: projects/binutils-2.17/libexec/rtld-elf/map_object.c
==============================================================================
--- projects/binutils-2.17/libexec/rtld-elf/map_object.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/libexec/rtld-elf/map_object.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -83,6 +83,7 @@ map_object(int fd, const char *path, con
     Elf_Addr bss_vaddr;
     Elf_Addr bss_vlimit;
     caddr_t bss_addr;
+    Elf_Word stack_flags;
 
     hdr = get_elf_header(fd, path);
     if (hdr == NULL)
@@ -100,6 +101,7 @@ map_object(int fd, const char *path, con
     phdyn = phinterp = phtls = NULL;
     phdr_vaddr = 0;
     segs = alloca(sizeof(segs[0]) * hdr->e_phnum);
+    stack_flags = PF_X | PF_R | PF_W;
     while (phdr < phlimit) {
 	switch (phdr->p_type) {
 
@@ -128,6 +130,10 @@ map_object(int fd, const char *path, con
 	case PT_TLS:
 	    phtls = phdr;
 	    break;
+
+	case PT_GNU_STACK:
+	    stack_flags = phdr->p_flags;
+	    break;
 	}
 
 	++phdr;
@@ -261,6 +267,7 @@ map_object(int fd, const char *path, con
 	obj->tlsinitsize = phtls->p_filesz;
 	obj->tlsinit = mapbase + phtls->p_vaddr;
     }
+    obj->stack_flags = stack_flags;
     return obj;
 }
 

Modified: projects/binutils-2.17/libexec/rtld-elf/rtld.c
==============================================================================
--- projects/binutils-2.17/libexec/rtld-elf/rtld.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/libexec/rtld-elf/rtld.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -103,6 +103,7 @@ static void unload_filtees(Obj_Entry *);
 static int load_needed_objects(Obj_Entry *, int);
 static int load_preload_objects(void);
 static Obj_Entry *load_object(const char *, const Obj_Entry *, int);
+static void map_stacks_exec(void);
 static Obj_Entry *obj_from_addr(const void *);
 static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *);
 static void objlist_call_init(Objlist *, RtldLockState *);
@@ -188,6 +189,9 @@ extern Elf_Dyn _DYNAMIC;
 
 int osreldate, pagesize;
 
+static int stack_prot = PROT_READ | PROT_WRITE | PROT_EXEC;
+static int max_stack_flags;
+
 /*
  * Global declarations normally provided by crt1.  The dynamic linker is
  * not built with crt1, so we have to provide them ourselves.
@@ -382,6 +386,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 	close(fd);
 	if (obj_main == NULL)
 	    die();
+	max_stack_flags = obj->stack_flags;
     } else {				/* Main program already loaded. */
 	const Elf_Phdr *phdr;
 	int phnum;
@@ -421,6 +426,10 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
     dbg("obj_main path %s", obj_main->path);
     obj_main->mainprog = true;
 
+    if (aux_info[AT_STACKPROT] != NULL &&
+      aux_info[AT_STACKPROT]->a_un.a_val != 0)
+	    stack_prot = aux_info[AT_STACKPROT]->a_un.a_val;
+
     /*
      * Get the actual dynamic linker pathname from the executable if
      * possible.  (It should always be possible.)  That ensures that
@@ -519,6 +528,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
     r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */
 
+    map_stacks_exec();
+
     wlock_acquire(rtld_bind_lock, &lockstate);
     objlist_call_init(&initlist, &lockstate);
     objlist_clear(&initlist);
@@ -1031,6 +1042,8 @@ digest_phdr(const Elf_Phdr *phdr, int ph
 	break;
     }
 
+    obj->stack_flags = PF_X | PF_R | PF_W;
+
     for (ph = phdr;  ph < phlimit;  ph++) {
 	switch (ph->p_type) {
 
@@ -1062,6 +1075,10 @@ digest_phdr(const Elf_Phdr *phdr, int ph
 	    obj->tlsinitsize = ph->p_filesz;
 	    obj->tlsinit = (void*)(ph->p_vaddr + obj->relocbase);
 	    break;
+
+	case PT_GNU_STACK:
+	    obj->stack_flags = ph->p_flags;
+	    break;
 	}
     }
     if (nsegs < 1) {
@@ -1679,6 +1696,7 @@ do_load_object(int fd, const char *name,
     obj_count++;
     obj_loads++;
     linkmap_add(obj);	/* for GDB & dlinfo() */
+    max_stack_flags |= obj->stack_flags;
 
     dbg("  %p .. %p: %s", obj->mapbase,
          obj->mapbase + obj->mapsize - 1, obj->path);
@@ -2202,6 +2220,8 @@ dlopen_object(const char *name, Obj_Entr
 	name);
     GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL);
 
+    map_stacks_exec();
+
     /* Call the init functions. */
     objlist_call_init(&initlist, &lockstate);
     objlist_clear(&initlist);
@@ -3872,6 +3892,28 @@ fetch_ventry(const Obj_Entry *obj, unsig
     return NULL;
 }
 
+int
+_rtld_get_stack_prot(void)
+{
+
+	return (stack_prot);
+}
+
+static void
+map_stacks_exec(void)
+{
+	void (*thr_map_stacks_exec)(void);
+
+	if ((max_stack_flags & PF_X) == 0 || (stack_prot & PROT_EXEC) != 0)
+		return;
+	thr_map_stacks_exec = (void (*)(void))(uintptr_t)
+	    get_program_var_addr("__pthread_map_stacks_exec");
+	if (thr_map_stacks_exec != NULL) {
+		stack_prot |= PROT_EXEC;
+		thr_map_stacks_exec();
+	}
+}
+
 void
 symlook_init(SymLook *dst, const char *name)
 {

Modified: projects/binutils-2.17/libexec/rtld-elf/rtld.h
==============================================================================
--- projects/binutils-2.17/libexec/rtld-elf/rtld.h	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/libexec/rtld-elf/rtld.h	Sun Jan  9 11:52:23 2011	(r217190)
@@ -157,6 +157,7 @@ typedef struct Struct_Obj_Entry {
     const Elf_Phdr *phdr;	/* Program header if it is mapped, else NULL */
     size_t phsize;		/* Size of program header in bytes */
     const char *interp;		/* Pathname of the interpreter, if any */
+    Elf_Word stack_flags;
 
     /* TLS information */
     int tlsindex;		/* Index in DTV for this module */

Modified: projects/binutils-2.17/share/man/man4/tcp.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/tcp.4	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/share/man/man4/tcp.4	Sun Jan  9 11:52:23 2011	(r217190)
@@ -32,7 +32,7 @@
 .\"     From: @(#)tcp.4	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd September 16, 2010
+.Dd January 8, 2011
 .Dt TCP 4
 .Os
 .Sh NAME
@@ -289,7 +289,9 @@ Amount of time, in milliseconds, that th
 before keepalive probes (if enabled) are sent.
 .It Va keepintvl
 The interval, in milliseconds, between keepalive probes sent to remote
-machines.
+machines, when no response is received on a
+.Va keepidle
+probe.
 After
 .Dv TCPTV_KEEPCNT
 (default 8) probes are sent, with no response, the connection is dropped.

Modified: projects/binutils-2.17/share/man/man5/rc.conf.5
==============================================================================
--- projects/binutils-2.17/share/man/man5/rc.conf.5	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/share/man/man5/rc.conf.5	Sun Jan  9 11:52:23 2011	(r217190)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 24, 2010
+.Dd January 7, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -64,7 +64,19 @@ The file
 is used to override settings in
 .Pa /etc/rc.conf
 for historical reasons.
-See the
+In addition to
+.Pa /etc/rc.conf.local
+you can also place smaller configuration files for each
+.Xr rc
+script in the
+.Pa /etc/rc.conf.d
+directory, which will be included by the
+.Va load_rc_config
+function.
+For jail configurations you could use the file
+.Pa /etc/rc.conf.d/jail
+to store jail specific configuration options.
+Also see the
 .Va rc_conf_files
 variable below.
 .Pp

Modified: projects/binutils-2.17/share/mk/bsd.endian.mk
==============================================================================
--- projects/binutils-2.17/share/mk/bsd.endian.mk	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/share/mk/bsd.endian.mk	Sun Jan  9 11:52:23 2011	(r217190)
@@ -4,12 +4,12 @@
     ${MACHINE_ARCH} == "i386" || \
     ${MACHINE_ARCH} == "ia64" || \
     ${MACHINE_ARCH} == "arm"  || \
-    ${MACHINE_ARCH} == "mipsel"
+    ${MACHINE_ARCH:Mmips*el} != ""
 TARGET_ENDIANNESS= 1234
 .elif ${MACHINE_ARCH} == "powerpc" || \
     ${MACHINE_ARCH} == "powerpc64" || \
     ${MACHINE_ARCH} == "sparc64" || \
     ${MACHINE_ARCH} == "armeb" || \
-    ${MACHINE_ARCH} == "mipseb"
+    ${MACHINE_ARCH:Mmips*eb} != ""
 TARGET_ENDIANNESS= 4321
 .endif

Modified: projects/binutils-2.17/share/mk/sys.mk
==============================================================================
--- projects/binutils-2.17/share/mk/sys.mk	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/share/mk/sys.mk	Sun Jan  9 11:52:23 2011	(r217190)
@@ -13,7 +13,7 @@ unix		?=	We run FreeBSD, not UNIX.
 # and/or endian.  This is called MACHINE_CPU in NetBSD, but that's used
 # for something different in FreeBSD.
 #
-MACHINE_CPUARCH=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+MACHINE_CPUARCH=${MACHINE_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .endif
 
 # If the special target .POSIX appears (without prerequisites or

Modified: projects/binutils-2.17/sys/amd64/amd64/elf_machdep.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/amd64/elf_machdep.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/sys/amd64/amd64/elf_machdep.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -75,11 +75,14 @@ struct sysentvec elf64_freebsd_sysvec = 
 	.sv_setregs	= exec_setregs,
 	.sv_fixlimit	= NULL,
 	.sv_maxssiz	= NULL,
-	.sv_flags	= SV_ABI_FREEBSD | SV_LP64,
+	.sv_flags	= SV_ABI_FREEBSD | SV_LP64 | SV_SHP,
 	.sv_set_syscall_retval = cpu_set_syscall_retval,
 	.sv_fetch_syscall_args = cpu_fetch_syscall_args,
 	.sv_syscallnames = syscallnames,
+	.sv_shared_page_base = SHAREDPAGE,
+	.sv_shared_page_len = PAGE_SIZE,
 };
+INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec);
 
 static Elf64_Brandinfo freebsd_brand_info = {
 	.brand		= ELFOSABI_FREEBSD,
@@ -129,7 +132,6 @@ SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_AN
 	(sysinit_cfunc_t) elf64_insert_brand_entry,
 	&kfreebsd_brand_info);
 
-
 void
 elf64_dump_thread(struct thread *td __unused, void *dst __unused,
     size_t *off __unused)

Modified: projects/binutils-2.17/sys/amd64/amd64/machdep.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/amd64/machdep.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/sys/amd64/amd64/machdep.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -386,7 +386,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	}
 
 	regs->tf_rsp = (long)sfp;
-	regs->tf_rip = PS_STRINGS - *(p->p_sysent->sv_szsigcode);
+	regs->tf_rip = p->p_sysent->sv_sigcode_base;
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucodesel;
 	regs->tf_ds = _udatasel;

Modified: projects/binutils-2.17/sys/amd64/ia32/ia32_signal.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/ia32/ia32_signal.c	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/sys/amd64/ia32/ia32_signal.c	Sun Jan  9 11:52:23 2011	(r217190)
@@ -393,7 +393,8 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi
 	}
 
 	regs->tf_rsp = (uintptr_t)sfp;
-	regs->tf_rip = p->p_sysent->sv_psstrings - sz_freebsd4_ia32_sigcode;
+	regs->tf_rip = p->p_sysent->sv_sigcode_base + sz_ia32_sigcode -
+	    sz_freebsd4_ia32_sigcode;
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucode32sel;
 	regs->tf_ss = _udatasel;
@@ -514,7 +515,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *
 	}
 
 	regs->tf_rsp = (uintptr_t)sfp;
-	regs->tf_rip = p->p_sysent->sv_psstrings - *(p->p_sysent->sv_szsigcode);
+	regs->tf_rip = p->p_sysent->sv_sigcode_base;
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucode32sel;
 	regs->tf_ss = _udatasel;

Modified: projects/binutils-2.17/sys/amd64/include/_inttypes.h
==============================================================================
--- projects/binutils-2.17/sys/amd64/include/_inttypes.h	Sun Jan  9 11:27:06 2011	(r217189)
+++ projects/binutils-2.17/sys/amd64/include/_inttypes.h	Sun Jan  9 11:52:23 2011	(r217190)
@@ -1,213 +1,6 @@
 /*-
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Klaus Klein.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- *	From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_INTTYPES_H_
-#define _MACHINE_INTTYPES_H_
-
-/*
- * Macros for format specifiers.
- */
-
-/* fprintf(3) macros for signed integers. */
-
-#define	PRId8		"d"	/* int8_t */
-#define	PRId16		"d"	/* int16_t */
-#define	PRId32		"d"	/* int32_t */
-#define	PRId64		"ld"	/* int64_t */
-#define	PRIdLEAST8	"d"	/* int_least8_t */
-#define	PRIdLEAST16	"d"	/* int_least16_t */
-#define	PRIdLEAST32	"d"	/* int_least32_t */
-#define	PRIdLEAST64	"ld"	/* int_least64_t */
-#define	PRIdFAST8	"d"	/* int_fast8_t */
-#define	PRIdFAST16	"d"	/* int_fast16_t */
-#define	PRIdFAST32	"d"	/* int_fast32_t */
-#define	PRIdFAST64	"ld"	/* int_fast64_t */
-#define	PRIdMAX		"jd"	/* intmax_t */
-#define	PRIdPTR		"ld"	/* intptr_t */
-
-#define	PRIi8		"i"	/* int8_t */
-#define	PRIi16		"i"	/* int16_t */
-#define	PRIi32		"i"	/* int32_t */
-#define	PRIi64		"li"	/* int64_t */
-#define	PRIiLEAST8	"i"	/* int_least8_t  */
-#define	PRIiLEAST16	"i"	/* int_least16_t */
-#define	PRIiLEAST32	"i"	/* int_least32_t */
-#define	PRIiLEAST64	"li"	/* int_least64_t */
-#define	PRIiFAST8	"i"	/* int_fast8_t */
-#define	PRIiFAST16	"i"	/* int_fast16_t */
-#define	PRIiFAST32	"i"	/* int_fast32_t */
-#define	PRIiFAST64	"li"	/* int_fast64_t */
-#define	PRIiMAX		"ji"	/* intmax_t */
-#define	PRIiPTR		"li"	/* intptr_t */
-
-/* fprintf(3) macros for unsigned integers. */
-
-#define	PRIo8		"o"	/* uint8_t */
-#define	PRIo16		"o"	/* uint16_t */
-#define	PRIo32		"o"	/* uint32_t */
-#define	PRIo64		"lo"	/* uint64_t */
-#define	PRIoLEAST8	"o"	/* uint_least8_t */
-#define	PRIoLEAST16	"o"	/* uint_least16_t */
-#define	PRIoLEAST32	"o"	/* uint_least32_t */
-#define	PRIoLEAST64	"lo"	/* uint_least64_t */
-#define	PRIoFAST8	"o"	/* uint_fast8_t */
-#define	PRIoFAST16	"o"	/* uint_fast16_t */
-#define	PRIoFAST32	"o"	/* uint_fast32_t */
-#define	PRIoFAST64	"lo"	/* uint_fast64_t */
-#define	PRIoMAX		"jo"	/* uintmax_t */
-#define	PRIoPTR		"lo"	/* uintptr_t */
-
-#define	PRIu8		"u"	/* uint8_t */
-#define	PRIu16		"u"	/* uint16_t */
-#define	PRIu32		"u"	/* uint32_t */
-#define	PRIu64		"lu"	/* uint64_t */
-#define	PRIuLEAST8	"u"	/* uint_least8_t */
-#define	PRIuLEAST16	"u"	/* uint_least16_t */
-#define	PRIuLEAST32	"u"	/* uint_least32_t */
-#define	PRIuLEAST64	"lu"	/* uint_least64_t */
-#define	PRIuFAST8	"u"	/* uint_fast8_t */
-#define	PRIuFAST16	"u"	/* uint_fast16_t */
-#define	PRIuFAST32	"u"	/* uint_fast32_t */
-#define	PRIuFAST64	"lu"	/* uint_fast64_t */
-#define	PRIuMAX		"ju"	/* uintmax_t */
-#define	PRIuPTR		"lu"	/* uintptr_t */
-
-#define	PRIx8		"x"	/* uint8_t */
-#define	PRIx16		"x"	/* uint16_t */
-#define	PRIx32		"x"	/* uint32_t */
-#define	PRIx64		"lx"	/* uint64_t */
-#define	PRIxLEAST8	"x"	/* uint_least8_t */
-#define	PRIxLEAST16	"x"	/* uint_least16_t */
-#define	PRIxLEAST32	"x"	/* uint_least32_t */
-#define	PRIxLEAST64	"lx"	/* uint_least64_t */
-#define	PRIxFAST8	"x"	/* uint_fast8_t */
-#define	PRIxFAST16	"x"	/* uint_fast16_t */
-#define	PRIxFAST32	"x"	/* uint_fast32_t */
-#define	PRIxFAST64	"lx"	/* uint_fast64_t */
-#define	PRIxMAX		"jx"	/* uintmax_t */
-#define	PRIxPTR		"lx"	/* uintptr_t */
-
-#define	PRIX8		"X"	/* uint8_t */
-#define	PRIX16		"X"	/* uint16_t */
-#define	PRIX32		"X"	/* uint32_t */
-#define	PRIX64		"lX"	/* uint64_t */
-#define	PRIXLEAST8	"X"	/* uint_least8_t */
-#define	PRIXLEAST16	"X"	/* uint_least16_t */
-#define	PRIXLEAST32	"X"	/* uint_least32_t */
-#define	PRIXLEAST64	"lX"	/* uint_least64_t */
-#define	PRIXFAST8	"X"	/* uint_fast8_t */
-#define	PRIXFAST16	"X"	/* uint_fast16_t */
-#define	PRIXFAST32	"X"	/* uint_fast32_t */
-#define	PRIXFAST64	"lX"	/* uint_fast64_t */
-#define	PRIXMAX		"jX"	/* uintmax_t */
-#define	PRIXPTR		"lX"	/* uintptr_t */
-
-/* fscanf(3) macros for signed integers. */
-
-#define	SCNd8		"hhd"	/* int8_t */
-#define	SCNd16		"hd"	/* int16_t */
-#define	SCNd32		"d"	/* int32_t */
-#define	SCNd64		"ld"	/* int64_t */
-#define	SCNdLEAST8	"hhd"	/* int_least8_t */
-#define	SCNdLEAST16	"hd"	/* int_least16_t */
-#define	SCNdLEAST32	"d"	/* int_least32_t */
-#define	SCNdLEAST64	"ld"	/* int_least64_t */
-#define	SCNdFAST8	"d"	/* int_fast8_t */
-#define	SCNdFAST16	"d"	/* int_fast16_t */
-#define	SCNdFAST32	"d"	/* int_fast32_t */
-#define	SCNdFAST64	"ld"	/* int_fast64_t */
-#define	SCNdMAX		"jd"	/* intmax_t */
-#define	SCNdPTR		"ld"	/* intptr_t */
-
-#define	SCNi8		"hhi"	/* int8_t */
-#define	SCNi16		"hi"	/* int16_t */
-#define	SCNi32		"i"	/* int32_t */
-#define	SCNi64		"li"	/* int64_t */
-#define	SCNiLEAST8	"hhi"	/* int_least8_t */
-#define	SCNiLEAST16	"hi"	/* int_least16_t */
-#define	SCNiLEAST32	"i"	/* int_least32_t */
-#define	SCNiLEAST64	"li"	/* int_least64_t */
-#define	SCNiFAST8	"i"	/* int_fast8_t */
-#define	SCNiFAST16	"i"	/* int_fast16_t */
-#define	SCNiFAST32	"i"	/* int_fast32_t */
-#define	SCNiFAST64	"li"	/* int_fast64_t */
-#define	SCNiMAX		"ji"	/* intmax_t */
-#define	SCNiPTR		"li"	/* intptr_t */
-
-/* fscanf(3) macros for unsigned integers. */
-
-#define	SCNo8		"hho"	/* uint8_t */
-#define	SCNo16		"ho"	/* uint16_t */
-#define	SCNo32		"o"	/* uint32_t */
-#define	SCNo64		"lo"	/* uint64_t */
-#define	SCNoLEAST8	"hho"	/* uint_least8_t */
-#define	SCNoLEAST16	"ho"	/* uint_least16_t */
-#define	SCNoLEAST32	"o"	/* uint_least32_t */
-#define	SCNoLEAST64	"lo"	/* uint_least64_t */
-#define	SCNoFAST8	"o"	/* uint_fast8_t */
-#define	SCNoFAST16	"o"	/* uint_fast16_t */
-#define	SCNoFAST32	"o"	/* uint_fast32_t */
-#define	SCNoFAST64	"lo"	/* uint_fast64_t */
-#define	SCNoMAX		"jo"	/* uintmax_t */
-#define	SCNoPTR		"lo"	/* uintptr_t */
-
-#define	SCNu8		"hhu"	/* uint8_t */
-#define	SCNu16		"hu"	/* uint16_t */
-#define	SCNu32		"u"	/* uint32_t */
-#define	SCNu64		"lu"	/* uint64_t */
-#define	SCNuLEAST8	"hhu"	/* uint_least8_t */
-#define	SCNuLEAST16	"hu"	/* uint_least16_t */
-#define	SCNuLEAST32	"u"	/* uint_least32_t */
-#define	SCNuLEAST64	"lu"	/* uint_least64_t */
-#define	SCNuFAST8	"u"	/* uint_fast8_t */
-#define	SCNuFAST16	"u"	/* uint_fast16_t */
-#define	SCNuFAST32	"u"	/* uint_fast32_t */
-#define	SCNuFAST64	"lu"	/* uint_fast64_t */
-#define	SCNuMAX		"ju"	/* uintmax_t */
-#define	SCNuPTR		"lu"	/* uintptr_t */
-
-#define	SCNx8		"hhx"	/* uint8_t */
-#define	SCNx16		"hx"	/* uint16_t */
-#define	SCNx32		"x"	/* uint32_t */
-#define	SCNx64		"lx"	/* uint64_t */
-#define	SCNxLEAST8	"hhx"	/* uint_least8_t */
-#define	SCNxLEAST16	"hx"	/* uint_least16_t */
-#define	SCNxLEAST32	"x"	/* uint_least32_t */
-#define	SCNxLEAST64	"lx"	/* uint_least64_t */
-#define	SCNxFAST8	"x"	/* uint_fast8_t */
-#define	SCNxFAST16	"x"	/* uint_fast16_t */
-#define	SCNxFAST32	"x"	/* uint_fast32_t */
-#define	SCNxFAST64	"lx"	/* uint_fast64_t */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list