]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r257532 (by adrian):
dim [Mon, 30 Dec 2013 20:15:46 +0000 (20:15 +0000)]
MFC r257532 (by adrian):

Fix this build for clang.

MFC r259730:

To avoid having to explicitly test COMPILER_TYPE for setting
clang-specific or gcc-specific flags, introduce the following new
variables for use in Makefiles:

CFLAGS.clang
CFLAGS.gcc
CXXFLAGS.clang
CXXFLAGS.gcc

In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for
the right compiler.

MFC r259913:

For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.

MFC r259927:

Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's
Makefile.

Pointy hat to: dim

git-svn-id: svn://svn.freebsd.org/base/stable/9@260096 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259951:
kib [Mon, 30 Dec 2013 09:04:06 +0000 (09:04 +0000)]
MFC r259951:
Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and
MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack()

git-svn-id: svn://svn.freebsd.org/base/stable/9@260082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259005, r259092:
pfg [Mon, 30 Dec 2013 03:40:16 +0000 (03:40 +0000)]
MFC r259005, r259092:

gcc: Add -flax-vector-conversions
gcc: new fvisibility-ms-compat option

These are useful for compatibility with newwer gcc and clang.

Obtained from: gcc 4.3 (rev. 120572, 120688, 126088; GPLv2)

git-svn-id: svn://svn.freebsd.org/base/stable/9@260075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254293, r259868, r259881, 259955:
gjb [Mon, 30 Dec 2013 02:19:48 +0000 (02:19 +0000)]
MFC r254293, r259868, r259881, 259955:

r254293:
  - Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified,
    otherwise allow the toolchain to detect the correct values.

  - Remove {SRC,DOC,PORT}REVISION variables, and use
    'branch@rNNNNNN' as the {SRC,DOC,PORT}BRANCH variables.

  - Only set default KERNEL_FLAGS and WORLD_FLAGS make(1) jobs
    if the number of CPUs is greater than 1.

r259868 (jmmv):
  Delay copying of resolv.conf into the chroot until /etc
  exists.

r259881 (jmmv):
  Put the release objdir inside the chroot.

259955:
  Move build_doc_ports() to the if...fi block from which it is
  called.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@260072 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r255937
marius [Mon, 30 Dec 2013 00:43:24 +0000 (00:43 +0000)]
MFC: r255937

Implement GET_STACK_USAGE.
Discussed with: mav

git-svn-id: svn://svn.freebsd.org/base/stable/9@260065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of 258789:
mckusick [Sun, 29 Dec 2013 07:29:45 +0000 (07:29 +0000)]
MFC of 258789:

We needlessly panic when trying to flush MKDIR_PARENT dependencies.
We had previously tried to flush all MKDIR_PARENT dependencies (and
all the NEWBLOCK pagedeps) by calling ffs_update(). However this will
only resolve these dependencies in direct blocks. So very large
directories with MKDIR_PARENT dependencies in indirect blocks had
not yet gotten flushed. As the directory is in the midst of doing a
complete sync, we simply defer the checking of the MKDIR_PARENT
dependencies until the indirect blocks have been sync'ed.

Reported by: Shawn Wallbridge of imaginaryforces.com
Tested by:   John-Mark Gurney <jmg@funkthat.com>
PR:          183424

git-svn-id: svn://svn.freebsd.org/base/stable/9@260034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259666, r259696:
pfg [Sat, 28 Dec 2013 20:03:14 +0000 (20:03 +0000)]
MFC r259666, r259696:

gcc: warnings from -Wformat-security

Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)

git-svn-id: svn://svn.freebsd.org/base/stable/9@260012 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196:
trociny [Sat, 28 Dec 2013 19:22:23 +0000 (19:22 +0000)]
MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196:

r257155:

Make hastctl list command output current queue sizes.

Reviewed by: pjd

r257582 (pjd):

Correct alignment.

r259191:

For memsync replication, hio_countdown is used not only as an
indication when a request can be moved to done queue, but also for
detecting the current state of memsync request.

This approach has problems, e.g. leaking a request if memsynk ack from
the secondary failed, or racy usage of write_complete, which should be
called only once per write request, but for memsync can be entered by
local_send_thread and ggate_send_thread simultaneously.

So the following approach is implemented instead:

1) Use hio_countdown only for counting components we waiting to
   complete, i.e. initially it is always 2 for any replication mode.

2) To distinguish between "memsync ack" and "memsync fin" responses
   from the secondary, add and use hio_memsyncacked field.

3) write_complete() in component threads is called only before
   releasing hio_countdown (i.e. before the hio may be returned to the
   done queue).

4) Add and use hio_writecount refcounter to detect when
   write_complete() can be called in memsync case.

Reported by: Pete French petefrench ingresso.co.uk
Tested by: Pete French petefrench ingresso.co.uk

r259192:

Add some macros to make the code more readable (no functional chages).

r259193:

Fix compiler warnings.

r259194:

In remote_send_thread, if sending a request fails don't take the
request back from the receive queue -- it might already be processed
by remote_recv_thread, which lead to crashes like below:

  (primary) Unable to receive reply header: Connection reset by peer.
  (primary) Unable to send request (Connection reset by peer):
      WRITE(954662912, 131072).
  (primary) Disconnected from kopusha:7772.
  (primary) Increasing localcnt to 1.
  (primary) Assertion failed: (old > 0), function refcnt_release,
      file refcnt.h, line 62.

Taking the request back was not necessary (it would properly be
processed by the remote_recv_thread) and only complicated things.

r259195:

Send wakeup to threads waiting on empty queue before releasing the
lock to decrease spurious wakeups.

Submitted by: davidxu

r259196:

Check remote protocol version only for the first connection (when it
is actually sent by the remote node).

Otherwise it generated confusing "Negotiated protocol version 1" debug
messages when processing the second connection.

git-svn-id: svn://svn.freebsd.org/base/stable/9@260007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259897:
dim [Sat, 28 Dec 2013 02:15:30 +0000 (02:15 +0000)]
MFC r259897:

In sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c, remove static functions
mk_cpl_barrier_ulp(), mk_get_tcb_ulp() and mk_set_tcb_field_ulp(), which
are all unused since r237263.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259993 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259896:
dim [Sat, 28 Dec 2013 02:11:17 +0000 (02:11 +0000)]
MFC r259896:

In sys/dev/cxgb/common/cxgb_mc5.c, remove static function
dbgi_wr_addr3(), which is unused since r167514.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259892:
dim [Sat, 28 Dec 2013 02:00:33 +0000 (02:00 +0000)]
MFC r259892:

In sys/kern/vfs_mountroot.c, remove static function parse_isspace(),
which is unused since r214006.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259888:
dim [Sat, 28 Dec 2013 01:56:04 +0000 (01:56 +0000)]
MFC r259888:

Pull in r183971 from upstream llvm trunk:

  X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX
  equivalent.

  Give it the right register format so we can also emit it when AVX is enabled.

This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error
in clang while building the gnuradio port for amd64.

Reported by: db

git-svn-id: svn://svn.freebsd.org/base/stable/9@259989 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259876:
dim [Sat, 28 Dec 2013 01:52:52 +0000 (01:52 +0000)]
MFC r259876:

In sys/kern/subr_witness.c, remove static function
witness_lock_order_key_empty(), which is unused since r181695.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259988 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259880:
dim [Sat, 28 Dec 2013 01:47:19 +0000 (01:47 +0000)]
MFC r259880:

In sys/dev/sym/sym_hipd.c, remove static functions sym_que_first(),
sym_que_last() and sym_remque_tail(), which are all unused since r53790.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259987 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259875:
dim [Sat, 28 Dec 2013 01:42:20 +0000 (01:42 +0000)]
MFC r259875:

In sys/kern/sched_ule.c, remove static function sched_both(), which is
unused since r232207.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259869:
dim [Sat, 28 Dec 2013 01:33:42 +0000 (01:33 +0000)]
MFC r259869:

In sys/dev/mwl/if_mwl.c, put the static RD4() function under #ifdef
MWL_DEBUG guards, since it only used in DPRINTF statements.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259985 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259842:
dim [Sat, 28 Dec 2013 01:26:26 +0000 (01:26 +0000)]
MFC r259842:

Remove some unused static const strings under sys/rpc, which have never
been used since the initial commit (r177633).

MFC r259843:

Move a static const variable to the #if 0 part where it is only used.
(Note the #if 0 part has been inactive since the initial commit,
r177633, so maybe it should be removed altogether).

git-svn-id: svn://svn.freebsd.org/base/stable/9@259984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259840:
dim [Sat, 28 Dec 2013 01:19:48 +0000 (01:19 +0000)]
MFC r259840:

In sys/netinet6/in6_mcast.c, in6m_is_ifp_detached() is only used
whenever KTR is defined, so put it between #ifdef KTR guards.  This
avoids a warning about a unused function if KTR is not enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259839:
dim [Sat, 28 Dec 2013 01:15:34 +0000 (01:15 +0000)]
MFC r259839:

In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever
KTR is defined, so put it between #ifdef KTR guards.  This avoids a
warning about a unused function if KTR is not enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259982 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259833:
dim [Sat, 28 Dec 2013 01:08:40 +0000 (01:08 +0000)]
MFC r259833:

Remove another unused static const variable num_chip_names, from
aic7xxx.c this time.

Noticed by: pluknet

git-svn-id: svn://svn.freebsd.org/base/stable/9@259981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259827:
dim [Sat, 28 Dec 2013 00:53:20 +0000 (00:53 +0000)]
MFC r259827:

Remove unused static const variable num_chip_names from aic79xx.c.

Reviewed by: gibbs

git-svn-id: svn://svn.freebsd.org/base/stable/9@259979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259825:
dim [Sat, 28 Dec 2013 00:16:58 +0000 (00:16 +0000)]
MFC r259825:

Remove unused static function adwccbstatus() from adw(4).

Reviewed by: gibbs

git-svn-id: svn://svn.freebsd.org/base/stable/9@259977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259756:
dim [Sat, 28 Dec 2013 00:03:15 +0000 (00:03 +0000)]
MFC r259756:

Get rid of register keyword usage in gperf, it is totally obsolete for
C++, and this allows gperf to be compiled for C++11 without a warning
about it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259976 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259973:
delphij [Fri, 27 Dec 2013 23:09:40 +0000 (23:09 +0000)]
MFC r259973:

Tighten default restrictions for ntpd(8) server and provide a link
to NTP access restriction documentation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258000:
markj [Fri, 27 Dec 2013 22:59:16 +0000 (22:59 +0000)]
MFC r258000:
Consistently add the relocation offset only when the ELF type is not
ET_EXEC. This fixes several problems with the DTrace pid provider not
being able to match probes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240040 (rpaulo):
markj [Fri, 27 Dec 2013 22:54:38 +0000 (22:54 +0000)]
MFC r240040 (rpaulo):
Make sure we visit both symbol sections even if one of them doesn't
exist. This makes it possible to dtrace some C++ programs like devd.

MFC r254177 (rpaulo):
Fix the return value when we found a symbol in .dynstr. This nasty bug was
preventing a lot of symbol lookups in dtruss -s, for example.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257670:
markj [Fri, 27 Dec 2013 22:29:20 +0000 (22:29 +0000)]
MFC r257670:
Modify the libproc breakpoint add/remove functions to stop the target
process if it has not already been stopped, since this is required for
ptrace(2) to work.

libdtrace does not seem to stop target processes before trying to remove
their breakpoints, so we were previously failing to remove the breakpoint
on r_debug_state() in rtld. This was causing processes to die with SIGTRAP
if they called dlopen(3) after dtrace(1) had detached.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257300:
markj [Fri, 27 Dec 2013 22:14:03 +0000 (22:14 +0000)]
MFC r257300:
Fix an off-by-one error when checking whether a given address is within
the extent of a symbol.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254298:
gjb [Fri, 27 Dec 2013 17:32:48 +0000 (17:32 +0000)]
MFC r254298:
  Remove get_rev_branch(), functionality exists in the release/Makefile.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@259954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agogcc: Merge upstream changes.
pfg [Fri, 27 Dec 2013 16:08:34 +0000 (16:08 +0000)]
gcc: Merge upstream changes.

Include types in error message for build_binary_op.

Mostly cosmetic changes, to reduce differences with Apple's gcc.

Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoBack out r259912 - it shouldn't have been committed to this branch.
dfr [Fri, 27 Dec 2013 11:10:32 +0000 (11:10 +0000)]
Back out r259912 - it shouldn't have been committed to this branch.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }.
jhb [Thu, 26 Dec 2013 16:58:30 +0000 (16:58 +0000)]
MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoGenerate client sample code which compiles without warnings.
dfr [Thu, 26 Dec 2013 10:45:17 +0000 (10:45 +0000)]
Generate client sample code which compiles without warnings.
For 'rpcgen -a', generate a makefile where 'make clean all' works.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259912 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252397, r258904, r259780:
pfg [Thu, 26 Dec 2013 01:11:51 +0000 (01:11 +0000)]
MFC r252397, r258904, r259780:
Small ext2fs updates.

Use the unsigned random() range in i_gen.
Add two new reserved inodes.
Make the hashing algorithm match the linux code.

PR: kern/183230

git-svn-id: svn://svn.freebsd.org/base/stable/9@259903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254571:
bz [Thu, 26 Dec 2013 00:05:31 +0000 (00:05 +0000)]
MFC r254571:

  Correct a typo in the event mask mnemonic.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255792:
bz [Thu, 26 Dec 2013 00:02:16 +0000 (00:02 +0000)]
MFC r255792:

  Update comment from draft to RFC number.

  Submitted by: Loganaden Velvindron (logan elandsys.com)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259900 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256661 r257222 r257235 r257248 r257298.
markj [Wed, 25 Dec 2013 22:32:52 +0000 (22:32 +0000)]
MFC r256661 r257222 r257235 r257248 r257298.

MFC r256661:
Fix the libproc build when DEBUG is defined.

MFC r257222:
Clean up the debug printing in libproc a bit. In particular:

* Don't print any error messages to stderr unless DEBUG is defined.
* Add a DPRINTFX macro for use when errno isn't set.
* Print the error string from libelf when appropriate.

MFC r257235:
Remove an incorrect debug printf.

MFC r257248:
Fix the build with gcc.

MFC r257298:
Revert r257248 and fix the problem in a way that doesn't violate style(9).

git-svn-id: svn://svn.freebsd.org/base/stable/9@259894 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258826, r259555, r 259558:
pfg [Wed, 25 Dec 2013 22:00:25 +0000 (22:00 +0000)]
MFC r258826, r259555, r 259558:

libcpp: Merge fixes from upstream
Fixes:
GCC preprocessor/29966:
GCC preprocessor/28709:
GCC c/31924
GCC preprocessor/14331

gcc: add Apple-compatible -Wnewline-eof

Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
  125212, 125255 ; GPLv2)
Apple Inc. (Apple GCC 4.2 - 5531)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259729:
gjb [Wed, 25 Dec 2013 06:09:31 +0000 (06:09 +0000)]
MFC r259729:
  Bootstrap etcupdate(8) as part of the release build, similar
  to what is done for mergemaster(8).  This allows etcupdate(8)
  to work out-of-box after the first upgrade of a system.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@259862 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259724:
dim [Wed, 25 Dec 2013 00:48:08 +0000 (00:48 +0000)]
MFC r259724:

Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by
zoulasc) to contrib/file:

  don't write a char to a pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259852 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259720:
dim [Wed, 25 Dec 2013 00:40:42 +0000 (00:40 +0000)]
MFC r259720:

For gnu/lib/csu, only use gcc-specific flags when compiling with gcc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259520:
ae [Tue, 24 Dec 2013 23:26:59 +0000 (23:26 +0000)]
MFC r259520:
  Fix copy/paste typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 258869:
jhb [Tue, 24 Dec 2013 19:02:04 +0000 (19:02 +0000)]
MFC 258869:
Fix an off-by-one error in r228960.  The maximum priority delta provided
by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting
priority value (before nice adjustment) is between SCHED_PRI_MIN and
SCHED_PRI_MAX, inclusive.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259835 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 258177:
jhb [Tue, 24 Dec 2013 18:49:24 +0000 (18:49 +0000)]
MFC 258177:
Remove an incorrectly copied and pasted clause from these license
statements.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259832 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 255493:
jhb [Tue, 24 Dec 2013 18:41:17 +0000 (18:41 +0000)]
MFC 255493:
- Decode the idtype argument passed to wait6() in kdump and truss.
- Don't treat an options argument of 0 to wait4() as an error in
  kdump.
- Decode the wait options passed to wait4() and wait6() in truss
  and decode the returned rusage and exit status.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259829 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259473:
dim [Tue, 24 Dec 2013 14:26:31 +0000 (14:26 +0000)]
MFC r259473:

Enable llvm's integrated assembler for PowerPC, since it should now be
good enough for typical usage.

Requested by: rdivacky

git-svn-id: svn://svn.freebsd.org/base/stable/9@259822 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259521:
kib [Tue, 24 Dec 2013 07:26:43 +0000 (07:26 +0000)]
MFC r259521:
Do not allow O_EXEC opens for fifo, return EINVAL.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259815 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256060,r256650: kldxref: Do not depend on the directory order.
jilles [Mon, 23 Dec 2013 22:38:41 +0000 (22:38 +0000)]
MFC r256060,r256650: kldxref: Do not depend on the directory order.

Sort the filenames to get a consistent result between machines of the same
architecture.

Also, sort FTS_D entries after other entries so kldxref -R works properly in
the uncommon case that a directory contains both subdirectories and modules.
Previously, this may have happened to work, depending on the order of files
in the directory.

PR: bin/182098
Submitted by: Derek Schrock (original version)
Tested by: Derek Schrock

git-svn-id: svn://svn.freebsd.org/base/stable/9@259799 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDirect Commit of mountroot> prompt fix r259748 (since there's no sane
imp [Sun, 22 Dec 2013 23:33:27 +0000 (23:33 +0000)]
Direct Commit of mountroot> prompt fix r259748 (since there's no sane
branching relationship between that branch and this one and since the
more general fix in head may be too risky for a stbale branch this
mature):

 Fix mountroot> prompt eating most of the characters by not enabling
 RXRDY interrupts in the attach routine. Instead, defer this until the
 first interrupt we see after the device is opened. Given the console
 use case, we're guaranteed to get a TXRDY interrupt before any reads
 are posted due to boot messages, which makes this work.

 The real fix is to use cngrab/cnungrab function pointers to disable
 RXRDY interrupts while grabbed. However, that touches the MI uart
 code, so was disallowed for 10.0 due to the lateness of the hour this
 fix was proposed. It works for mountroot, the most common atmel kernel
 prompt use cases, but wouldn't work for GELI since it prompts later in
 the boot process.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259108:
mav [Sun, 22 Dec 2013 13:03:33 +0000 (13:03 +0000)]
MFC r259108:
When comparing device IDs, make sure that they have the same type
(like NAA assigned) and identify the same entity (like device or port).
Otherwise there can be false positives since at least some models of
Seagate disks use same IDs for the whole device and one of its ports.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259722 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258651, r258943:
pfg [Sun, 22 Dec 2013 01:00:00 +0000 (01:00 +0000)]
MFC r258651, r258943:
gcc: Altivec register adjustments from Apple.
gcc: On rs6000 update sp_offset depending only on size.

Tested by: Justin Hibbits
Obtained from: gcc pre-4.3 (rev. 124763, 125116; GPLv2)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258017, r258429, r258748, r258817:
pfg [Sun, 22 Dec 2013 00:45:08 +0000 (00:45 +0000)]
MFC r258017, r258429, r258748, r258817:

Merge updates from FSF pre4.3 GCC inspired on Apple's gcc:

  Updates to libiberty and mangling.
  New align attribute.
  Merge Apple updates to libstdc++.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259705 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoHonor WITHOUT_SYSINSTALL=1.
gjb [Sat, 21 Dec 2013 00:20:06 +0000 (00:20 +0000)]
Honor WITHOUT_SYSINSTALL=1.

This is a direct commit to stable/9.

PR: 176263
Submitted by: Sayetsky Anton  (vsjcfm gmail com)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@259673 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259498:
dim [Fri, 20 Dec 2013 20:14:54 +0000 (20:14 +0000)]
MFC r259498:

Pull in r197399 from upstream clang trunk:

  Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of 259626, tzdata2013i:
edwin [Thu, 19 Dec 2013 20:26:06 +0000 (20:26 +0000)]
MFC of 259626, tzdata2013i:

Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba

git-svn-id: svn://svn.freebsd.org/base/stable/9@259630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoImprove compatibility with earlier parts of the 9 branch by defaulting
imp [Thu, 19 Dec 2013 18:06:52 +0000 (18:06 +0000)]
Improve compatibility with earlier parts of the 9 branch by defaulting
to MK_CLANG_IS_CC is no when it isn't otherwise defined. Also,
bsd.compiler.mk wasn't present in 9.0, so don't require it. With these
changes, you can compile a tip of 9.x kernel and modules old-school on
a 9.0 system.

# Direct commit since this isn't relevant to 10 or current.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259618 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255194 and prerequisites r229494,229496:
pluknet [Thu, 19 Dec 2013 17:29:56 +0000 (17:29 +0000)]
MFC r255194 and prerequisites r229494,229496:

  Introduce internal macros for __U/INT64_C to define the U/INT64_MAX/MIN
  values properly. The previous definition only worked if __STDC_LIMIT_MACROS
  and __STDC_CONSTANT_MACROS were defined at the same time.

  Newer versions of gcc define __INT64_C and __UINT64_C, so avoid
  redefining them if gcc provides them.

Applying r255194 fixes stable/9 host to allow source upgrading to the newer
versions with usr.bin/dtc included in bootstrap tools.

Approved by: imp (MFC to stable/9)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259617 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259248 and r259462:
hselasky [Thu, 19 Dec 2013 07:18:31 +0000 (07:18 +0000)]
MFC r259248 and r259462:
Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more
information.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258629, 258662:
truckman [Thu, 19 Dec 2013 07:17:07 +0000 (07:17 +0000)]
MFC r258629, 258662:

r258629:
  Mention that devd will kldload the driver when the device is connected.

  Mention that the automatic mode switch from umass to u3g needed by some
  devices does not work unless the driver is loaded before the device is
  connected.

r258662 (by joel):
  mdoc: sort sections.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259023 and r259095:
hselasky [Thu, 19 Dec 2013 07:12:40 +0000 (07:12 +0000)]
MFC r259023 and r259095:
Improve the XHCI command timeout recovery handling code.
Fix some typos while at it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRegenerate after
truckman [Thu, 19 Dec 2013 07:02:11 +0000 (07:02 +0000)]
Regenerate after
r248085 (if_ipheth)
r247474, r250288 (uftdi)
r250842 (if_rum)
r244956, r255345 (ng_ubt)
r248085, r250847, r257042, r259457 (if_run)
r245727, r250845, r253292, r259593 (u3g)
r252444 (if_axe)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258363:
truckman [Thu, 19 Dec 2013 05:36:41 +0000 (05:36 +0000)]
MFC r258363:

Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258731:
pfg [Thu, 19 Dec 2013 02:45:29 +0000 (02:45 +0000)]
MFC r258731:

gcc: Make use of TREE_OVERFLOW_P.

While it was brought in r258179 only to fix a build issue,
bringing the rest of the change has the advantage of fixing
GCC/19978.

Obtained from: gcc 4.3 (rev. 120505; GPLv2)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259585 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254224, r254294, r254328, r258307, r258309, r258310, r258314,
gjb [Wed, 18 Dec 2013 00:07:52 +0000 (00:07 +0000)]
MFC r254224, r254294, r254328, r258307, r258309, r258310, r258314,
    r258317, r258319, r258320, r258669, r258786, r258853, r258949,
    r259079, r259246:

r254224:
  Update the wrapper script to 'release.sh', as used by the
  FreeBSD Release Engineering Team as of 9.2-RELEASE.

  Document that a cross-build release is possible by setting
  the TARGET and TARGET_ARCH variables.

  Include an example of using release.sh with and without the
  optional configuration file.

  Document the supported release.sh configuration file variables.

  Update the 'cdrom' target output file to disc1.iso.

  Update the 'memstick' target output file to memstick.img.

  Add attributions for the last major updates to this manual page.

  Fix some mdoc(7) style nits.

r254294:
  Remove the defaults for TARGET/TARGET_ARCH.

  Note that WORLD_FLAGS and KERNEL_FLAGS set the number of
  make(1) jobs only on SMP-capable systems.

r254328:
  Remove the {SRC,DOC,PORT}REVISION variables from release(7), and
  update the default {SRC,DOC,PORT}BRANCH defaults.

r258307:
  Add a script and configuration files to fetch pre-built packages
  from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).

  The script sources ${.CURDIR}/${TARGET}/pkg-stage.conf, which sets
  several environment variables, such as the pkg(8) ABI, PACKAGESITE,
  PKG_DBDIR, and PKG_CACHEDIR.  PKG_CACHEDIR is set to the directory
  on the release medium used by bsdconfig(8) (/packages/${ABI}).  ABI
  is determined by output of 'make -C /usr/src/release -V REVISION'.
  See pkg.conf(5) for descripton on other variables set here.

  The list of packages to include are set within the configuration
  file.

  The script and configuration files are intended to be run by the
  'make dvd' target within the release directory, and assume the
  release is built within a chroot environment (such as by using
  release.sh).

r258309:
  Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
  in preparation of adding a 'dvd1.iso' target.

r258310:
  Add the 'dvd1.iso' target.  This mimics the 'release.iso' target,
  with the additional step of fetching packages for inclusion on the
  dvd image.

  The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
  the '${TARGET}/pkg-stage.conf' configuration file exists (currently
  only amd64 and i386).

  Allow dvd1.iso to be skipped if NODVD=1.

r258314:
  Fix how ABI is evaluated so it matches more than a dot-zero
  case.

r258317:
  Document the 'dvdrom' target.

r258319:
  Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.

r258320:
  Simplify PKG_ABI for pkg-stage.sh.

r258669:
  Document the dvdrom target and NODVD variable.

r258786:
  Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise
  the textproc/docproj port build fails.

r258853:
  Turn off the dvdrom target by default.  dvd1.iso is now built by
  specifying 'WITH_DVD=1' during 'make release'.

r258949:
  Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating
  to true.

r259079:
  Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
  passed to 'make release'.

r259246:
  Prevent release build errors found during snapshot builds where if
  NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if
  WITH_DVD=1.

Tested against: stable/9@r259512
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@259530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258311
asomers [Tue, 17 Dec 2013 16:10:59 +0000 (16:10 +0000)]
MFC r258311

  opensolaris/uts/common/dtrace/fasttrap.c
          Fix several problems that can cause panics on kldload and kldunload.

          * kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before
            fasttrap_provs.fth_table gets allocated.  This can lead to a panic
            on module load, because fasttrap_pid_cleanup_cb references
            fasttrap_provs.fth_table.  Move kproc_create down after the point
            that fasttrap_provs.fth_table gets allocated, and modify the error
            handling accordingly.

          * dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until
            after fasttrap_provs.fth_table got freed.  That caused panics on
            module unload because fasttrap_exec_exit calls
            fasttrap_provider_retire, which references
            fasttrap_provs.fth_table.  NULL those function pointers earlier.

          * There wasn't any code to destroy the
            fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload,
            leading to a resource leak when WITNESS is enabled.  Destroy those
            mutexes during fasttrap_unload().

Sponsored by: Spectra Logic Corporation

git-svn-id: svn://svn.freebsd.org/base/stable/9@259519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258088:
kib [Tue, 17 Dec 2013 13:13:02 +0000 (13:13 +0000)]
MFC r258088:
Add check for buflen overflow by comparing the buflen with both offset
and resid.

MFC r258397:
Redo r258088 to avoid relying on signed arithmetic overflow.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258039:
kib [Tue, 17 Dec 2013 09:22:25 +0000 (09:22 +0000)]
MFC r258039:
Avoid overflow for the page counts.

MFC r258365:
Revert back to use int for the page counts.
Rearrange the checks to correctly handle overflowing address arithmetic.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix the outstanding mergeinfo part of r249374.
andreast [Mon, 16 Dec 2013 22:07:49 +0000 (22:07 +0000)]
Fix the outstanding mergeinfo part of r249374.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258819,258928:
nwhitehorn [Mon, 16 Dec 2013 15:02:10 +0000 (15:02 +0000)]
MFC r258819,258928:

Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by: imp

git-svn-id: svn://svn.freebsd.org/base/stable/9@259466 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253757:
hselasky [Mon, 16 Dec 2013 09:34:01 +0000 (09:34 +0000)]
MFC r253757:
Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters
work on ARM, MIPS and similar platforms, where alignment matters.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259460 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256718, r257410 and r257411:
hselasky [Mon, 16 Dec 2013 09:31:15 +0000 (09:31 +0000)]
MFC r256718, r257410 and r257411:
- Fix RF registers for RT3070.
- Initialize BBP68 to improve RX sensitivity.
- Add RT2860_BCN_OFFSET1 and RT2860_MAX_LEN_CFG register initialization to
match with the vendor driver. While here, remove unused RT2860_DEF_MAC
definition.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258083:
hselasky [Mon, 16 Dec 2013 09:23:21 +0000 (09:23 +0000)]
MFC r258083:
Remove a couple of unused macros.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259458 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r238274, r246752, r256720, r256721, r256722, r256955, r257409
hselasky [Mon, 16 Dec 2013 09:07:09 +0000 (09:07 +0000)]
MFC r238274, r246752, r256720, r256721, r256722, r256955, r257409
 r257429, r257435, r257712, r257732, r257743, r257748, r257955
 r257957, r257958, r258082, r258641, r258643, r258732, r258733,
 r258840, r258919, r258921, r259029, r259030, r259031, r259032 and r259046:

- Add support for the MediaTek/Ralink RT5370/RT5372 chipset.
- Various minor USB WLAN fixes and improvements.

PR:     usb/182936

git-svn-id: svn://svn.freebsd.org/base/stable/9@259457 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246614:
hselasky [Mon, 16 Dec 2013 08:56:45 +0000 (08:56 +0000)]
MFC r246614:
- Streamline detach logic in wlan drivers, so that
  freed memory cannot be used during detach.
- Remove all panic() calls from the urtw driver because
  panic() is not appropriate here.
- Remove redundant checks for device detached in
  device detach callbacks.
- Use DEVMETHOD_END to mark end of device methods.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246765:
hselasky [Mon, 16 Dec 2013 08:54:24 +0000 (08:54 +0000)]
MFC r246765:

Remove unused variable.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244503 and r246565:
hselasky [Mon, 16 Dec 2013 08:51:58 +0000 (08:51 +0000)]
MFC r244503 and r246565:

Make sure all USB drivers allocate buffer memory
through the USB API and/or busdma.

The following assumptions have been made:
umass - buffers passed from CAM/SCSI layer are OK
network - mbufs are OK.

Some other nits while at it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix build breakage after r259448
bjk [Mon, 16 Dec 2013 06:52:30 +0000 (06:52 +0000)]
Fix build breakage after r259448

Approved by: hrs (mentor, src committer)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259286,259424,259425:
bjk [Mon, 16 Dec 2013 02:25:28 +0000 (02:25 +0000)]
MFC r259286,259424,259425:
  Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by: hrs (mentor, src committer)

git-svn-id: svn://svn.freebsd.org/base/stable/9@259448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259132,r259133:
eadler [Mon, 16 Dec 2013 01:22:57 +0000 (01:22 +0000)]
MFC r259132,r259133:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
as a case insensitive flag.

Add regression test for recently added 'i' flag in r259132.

PR: standards/184641

git-svn-id: svn://svn.freebsd.org/base/stable/9@259444 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258530;
pfg [Sun, 15 Dec 2013 04:28:20 +0000 (04:28 +0000)]
MFC r258530;

libcpp: Keep a record of changes from upstream GCC (pre-43).

git-svn-id: svn://svn.freebsd.org/base/stable/9@259409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC rr258501, r258507;
pfg [Sun, 15 Dec 2013 03:48:54 +0000 (03:48 +0000)]
MFC rr258501, r258507;
gcc: Bring updates from Google's enhanced gcc-4.2.1.

Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD, in other words,
changes specific to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from: Google Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257987:
ae [Sat, 14 Dec 2013 04:27:28 +0000 (04:27 +0000)]
MFC r257987:
  Initialize prot variable.

  PR: 177417

git-svn-id: svn://svn.freebsd.org/base/stable/9@259387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257965:
ae [Sat, 14 Dec 2013 04:16:47 +0000 (04:16 +0000)]
MFC r257965:
  Add missing line breaks.

  PR: 181900

git-svn-id: svn://svn.freebsd.org/base/stable/9@259384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFV r258571:
pfg [Fri, 13 Dec 2013 19:38:05 +0000 (19:38 +0000)]
MFV r258571:

Removes strict-aliasing warnings from newer GCC in tcpdump.

Corresponds to MFC r258573, but for some reason our new pre-commit
hooks will not let us merge it from there.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259327 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258115 (partial);
pfg [Fri, 13 Dec 2013 18:24:36 +0000 (18:24 +0000)]
MFC r258115 (partial);

gperf: bring a small update from Apple Developers tools 4.4

From [1]

offset.patch
Makes use the C offsetof() macro.

We are not merging the size_type.patch as it raises some
(apparently) bogus warnings and is not really used.

[1] http://opensource.apple.com/source/gperf/gperf-9/patches/

git-svn-id: svn://svn.freebsd.org/base/stable/9@259321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258367:
kib [Fri, 13 Dec 2013 06:29:02 +0000 (06:29 +0000)]
MFC r258367:
Verify for zero-length requests and act as if it is always successfull
without performing any action on the address space.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258366:
kib [Fri, 13 Dec 2013 06:25:43 +0000 (06:25 +0000)]
MFC r258366:
Add assertions to cover all places in the wiring and unwiring code
where MAP_ENTRY_IN_TRANSITION is set or cleared.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259044:
kib [Fri, 13 Dec 2013 06:06:25 +0000 (06:06 +0000)]
MFC r259044:
For variant II static TLS, properly align tls segments.

MFC r259072:
Cast Elf_Addr to void * to match the free_aligned() argument type.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259043:
kib [Fri, 13 Dec 2013 06:01:21 +0000 (06:01 +0000)]
MFC r259043:
Build an allocator for the aligned memory on top of the rtld-private
malloc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259042:
kib [Fri, 13 Dec 2013 05:54:58 +0000 (05:54 +0000)]
MFC r259042:
Do not force to run atexit handlers, which text comes from a dso owning
the handle passed to __cxa_finalize() but which are registered by other
dso, when the process is inside exit(3).

git-svn-id: svn://svn.freebsd.org/base/stable/9@259289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244673:
pfg [Fri, 13 Dec 2013 02:21:32 +0000 (02:21 +0000)]
MFC r244673:

Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.

This seems to be needed by newer compilers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agomtest(8): use correct macro in mdoc
eadler [Fri, 13 Dec 2013 01:35:31 +0000 (01:35 +0000)]
mtest(8): use correct macro in mdoc

The An macros is used for authors while the Ar macro is used for arguments.
AFAIK mcast-addr and ifname are not authors.

PR: docs/184649

git-svn-id: svn://svn.freebsd.org/base/stable/9@259282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258712;
pfg [Thu, 12 Dec 2013 19:02:18 +0000 (19:02 +0000)]
MFC r258712;

libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from: OpenBSD (Rev 1.2)
MFC after: 2 weeks

git-svn-id: svn://svn.freebsd.org/base/stable/9@259272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
pfg [Thu, 12 Dec 2013 18:16:46 +0000 (18:16 +0000)]
MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321

This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.

gcc: Backport fixes for -W parentheses in C++
This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r226422, r227241, r228063, r228697, r228698, r228701, r234310, r234850,
tijl [Thu, 12 Dec 2013 15:04:59 +0000 (15:04 +0000)]
MFC r226422, r227241, r228063, r228697, r228698, r228701, r234310, r234850,
r250226, r250926.

This brings m4 up to date with the version in head and fixes the eval
command when called with a 2nd and 3rd argument.  The only differences
remaining are related to the updated flex and byacc in head.

PR: bin/166994

git-svn-id: svn://svn.freebsd.org/base/stable/9@259262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258658:
mdf [Thu, 12 Dec 2013 02:04:59 +0000 (02:04 +0000)]
MFC r258658:

Fix a segfault / internal compiler error.

Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.

Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256448, r257029;
pfg [Wed, 11 Dec 2013 19:25:38 +0000 (19:25 +0000)]
MFC r256448, r257029;

Make di_blocks unsigned in UFS1 as is the case already for UFS2.
 Most of the code between UFS1 and UFS2 is shared so this change
 is pretty safe. Not only this makes UFS1 and 2 consistent but it
 also matches what NetBSD and MacOS X have for some years now.

UFS2: make di_extsize unsigned.
 di_extsize is the EA size and as such it should be unsigned.
 Adjust related types for consistency.

Reviewed by: mckusick

git-svn-id: svn://svn.freebsd.org/base/stable/9@259224 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259111:
dim [Wed, 11 Dec 2013 07:43:30 +0000 (07:43 +0000)]
MFC r259111:

Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'

git-svn-id: svn://svn.freebsd.org/base/stable/9@259216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259100:
dim [Wed, 11 Dec 2013 07:34:34 +0000 (07:34 +0000)]
MFC r259100:

Pull in r196658 from upstream clang trunk:

  CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by: se

git-svn-id: svn://svn.freebsd.org/base/stable/9@259214 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r257598
rmacklem [Tue, 10 Dec 2013 22:03:59 +0000 (22:03 +0000)]
MFC: r257598
During code inspection, I spotted that there was a code path where
CLNT_CONTROL() would be called on "client" after it was
released via CLNT_RELEASE(). It was unlikely that this
code path gets executed and I have not heard of any problem
report caused by this bug. This patch fixes the code so that
this cannot happen.

git-svn-id: svn://svn.freebsd.org/base/stable/9@259201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f