Re: svn commit: r368523 - head/sys/vm

2020-12-15 Thread Bryan Drewery
On 12/15/2020 7:04 AM, Mark Johnston wrote:
> On Tue, Dec 15, 2020 at 03:33:09PM +0100, Hans Petter Selasky wrote:
>> On 12/15/20 3:27 PM, Mark Johnston wrote:
>>>> I'm seeing the following panic:
>>>>
>>>> panic("vm_wait in early boot")
>>>> vm_wait_domain()
>>>> kmem_alloc_contig_pages()
>>>> kmem_alloc_contig_domainset()
>>>> kmem_alloc_contig()
>>>> contigmalloc()
>>>> x86bios_alloc()
>>>> vesa_configure()
>>>> vesa_mod_event()
>>>> vesa_module_register_init()
>>>> mi_startup()
>>> Is it on a NUMA system?  I see that the new logic won't work properly if
>>> there are empty domains, so this suggests that we really do need a
>>> special contig iterator as discussed in the review.
>>
>> Yes, this is a numa system.
>>
>> I just noticed, that before r368523 "flags" was updated by 
>> _vm_domainset_iter_policy_init() to always contain M_NOWAIT and that 
>> avoids the wait logic, but I think x86bios_alloc() doesn't get its 
>> memory then.
> 
> Yes, but note that vm_domainset_iter_policy() will also call
> vm_wait_doms() if a M_NOWAIT allocation from each domain fails.
> x86bios_alloc() requests memory from the first 1MB of physical memory,
> but because contigmalloc() uses a round-robin iterator initialized from
> per-thread state it may try from the "wrong" domain first.  So really a
> different solution to the original problem is needed.
> 
>> I'm not sure if x86bios_alloc() needs to be attached a bit later anyway?
>>
>> --HPS

I have reverted the change in r368673 until we come up with a more
comprehensive fix.

-- 
Regards,
Bryan Drewery



OpenPGP_signature
Description: OpenPGP digital signature


svn commit: r368673 - head/sys/vm

2020-12-15 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 15 19:38:16 2020
New Revision: 368673
URL: https://svnweb.freebsd.org/changeset/base/368673

Log:
  Revert r368523 which fixed contig allocs waiting forever.
  
  This needs to account for empty NUMA domains or domains which do not
  satisfy the requested range.
  
  Discussed with:   markj

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==
--- head/sys/vm/vm_kern.c   Tue Dec 15 18:51:11 2020(r368672)
+++ head/sys/vm/vm_kern.c   Tue Dec 15 19:38:16 2020(r368673)
@@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz
 {
struct vm_domainset_iter di;
vm_offset_t addr;
-   int domain, iflags;
+   int domain;
 
-   /*
-* Do not allow the domainset iterator to override wait flags.  The
-* contiguous memory allocator defines special semantics for M_WAITOK
-* that do not match the iterator's implementation.
-*/
-   iflags = (flags & ~M_WAITOK) | M_NOWAIT;
-   vm_domainset_iter_policy_init(, ds, , );
+   vm_domainset_iter_policy_init(, ds, , );
do {
addr = kmem_alloc_attr_domain(domain, size, flags, low, high,
memattr);
@@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s
 {
struct vm_domainset_iter di;
vm_offset_t addr;
-   int domain, iflags;
+   int domain;
 
-   /*
-* Do not allow the domainset iterator to override wait flags.  The
-* contiguous memory allocator defines special semantics for M_WAITOK
-* that do not match the iterator's implementation.
-*/
-   iflags = (flags & ~M_WAITOK) | M_NOWAIT;
-   vm_domainset_iter_policy_init(, ds, , );
+   vm_domainset_iter_policy_init(, ds, , );
do {
addr = kmem_alloc_contig_domain(domain, size, flags, low, high,
alignment, boundary, memattr);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368524 - head/sys/compat/linuxkpi/common/src

2020-12-10 Thread Bryan Drewery
Author: bdrewery
Date: Thu Dec 10 20:45:08 2020
New Revision: 368524
URL: https://svnweb.freebsd.org/changeset/base/368524

Log:
  linux_dma: Ensure proper flags pass to allocators.
  
  Possibly fixes the wrong flags being passed to the kernel
  allocators in linux_dma_alloc_coherent() and linux_dma_pool_alloc().
  
  Reviewed by:  hps
  MFC after:2 weeks
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D27508

Modified:
  head/sys/compat/linuxkpi/common/src/linux_pci.c

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:44:29 
2020(r368523)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:45:08 
2020(r368524)
@@ -625,8 +625,8 @@ linux_dma_alloc_coherent(struct device *dev, size_t si
else
high = BUS_SPACE_MAXADDR;
align = PAGE_SIZE << get_order(size);
-   mem = (void *)kmem_alloc_contig(size, flag, 0, high, align, 0,
-   VM_MEMATTR_DEFAULT);
+   mem = (void *)kmem_alloc_contig(size, flag & GFP_NATIVE_MASK, 0, high,
+   align, 0, VM_MEMATTR_DEFAULT);
if (mem != NULL) {
*dma_handle = linux_dma_map_phys(dev, vtophys(mem), size);
if (*dma_handle == 0) {
@@ -932,7 +932,7 @@ linux_dma_pool_alloc(struct dma_pool *pool, gfp_t mem_
 {
struct linux_dma_obj *obj;
 
-   obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags);
+   obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags & 
GFP_NATIVE_MASK);
if (obj == NULL)
return (NULL);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368523 - head/sys/vm

2020-12-10 Thread Bryan Drewery
Author: bdrewery
Date: Thu Dec 10 20:44:29 2020
New Revision: 368523
URL: https://svnweb.freebsd.org/changeset/base/368523

Log:
  contig allocs: Don't retry forever on M_WAITOK.
  
  This restores behavior from before domain iterators were added in
  r327895 and r327896.
  
  The vm_domainset_iter_policy() will do a vm_wait_doms() and then
  restart its iterator when M_WAITOK is set.  It will also force
  the containing loop to have M_NOWAIT.  So we get an unbounded
  retry loop rather than the intended bounded retries that
  kmem_alloc_contig_pages() already handles.
  
  This also restores M_WAITOK to the vmem_alloc() call in
  kmem_alloc_attr_domain() and kmem_alloc_contig_domain().
  
  Reviewed by:  markj, kib
  MFC after:2 weeks
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D27507

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==
--- head/sys/vm/vm_kern.c   Thu Dec 10 20:44:05 2020(r368522)
+++ head/sys/vm/vm_kern.c   Thu Dec 10 20:44:29 2020(r368523)
@@ -264,9 +264,15 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz
 {
struct vm_domainset_iter di;
vm_offset_t addr;
-   int domain;
+   int domain, iflags;
 
-   vm_domainset_iter_policy_init(, ds, , );
+   /*
+* Do not allow the domainset iterator to override wait flags.  The
+* contiguous memory allocator defines special semantics for M_WAITOK
+* that do not match the iterator's implementation.
+*/
+   iflags = (flags & ~M_WAITOK) | M_NOWAIT;
+   vm_domainset_iter_policy_init(, ds, , );
do {
addr = kmem_alloc_attr_domain(domain, size, flags, low, high,
memattr);
@@ -346,9 +352,15 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s
 {
struct vm_domainset_iter di;
vm_offset_t addr;
-   int domain;
+   int domain, iflags;
 
-   vm_domainset_iter_policy_init(, ds, , );
+   /*
+* Do not allow the domainset iterator to override wait flags.  The
+* contiguous memory allocator defines special semantics for M_WAITOK
+* that do not match the iterator's implementation.
+*/
+   iflags = (flags & ~M_WAITOK) | M_NOWAIT;
+   vm_domainset_iter_policy_init(, ds, , );
do {
addr = kmem_alloc_contig_domain(domain, size, flags, low, high,
alignment, boundary, memattr);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368467 - in head: bin/chflags bin/chmod bin/cp bin/ls bin/rm bin/setfacl contrib/mtree usr.bin/du usr.bin/grep usr.bin/gzip usr.sbin/chown usr.sbin/ckdist usr.sbin/fmtree usr.sbin/setfmac

2020-12-08 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec  8 23:38:26 2020
New Revision: 368467
URL: https://svnweb.freebsd.org/changeset/base/368467

Log:
  fts_read: Handle error from a NULL return better.
  
  This is addressing cases such as fts_read(3) encountering an [EIO]
  from fchdir(2) when FTS_NOCHDIR is not set.  That would otherwise be
  seen as a successful traversal in some of these cases while silently
  discarding expected work.
  
  As noted in r264201, fts_read() does not set errno to 0 on a successful
  EOF so it needs to be set before calling it.  Otherwise we might see
  a random error from one of the iterations.
  
  gzip is ignoring most errors and could be improved separately.
  
  Reviewed by:  vangyzen
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D27184

Modified:
  head/bin/chflags/chflags.c
  head/bin/chmod/chmod.c
  head/bin/cp/cp.c
  head/bin/ls/ls.c
  head/bin/rm/rm.c
  head/bin/setfacl/setfacl.c
  head/contrib/mtree/create.c
  head/contrib/mtree/verify.c
  head/usr.bin/du/du.c
  head/usr.bin/grep/util.c
  head/usr.bin/gzip/gzip.c
  head/usr.sbin/chown/chown.c
  head/usr.sbin/ckdist/ckdist.c
  head/usr.sbin/fmtree/create.c
  head/usr.sbin/fmtree/verify.c
  head/usr.sbin/setfmac/setfmac.c

Modified: head/bin/chflags/chflags.c
==
--- head/bin/chflags/chflags.c  Tue Dec  8 22:37:30 2020(r368466)
+++ head/bin/chflags/chflags.c  Tue Dec  8 23:38:26 2020(r368467)
@@ -163,7 +163,7 @@ main(int argc, char *argv[])
if ((ftsp = fts_open(++argv, fts_options , 0)) == NULL)
err(1, NULL);
 
-   for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
+   for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) {
int atflag;
 
if ((fts_options & FTS_LOGICAL) ||

Modified: head/bin/chmod/chmod.c
==
--- head/bin/chmod/chmod.c  Tue Dec  8 22:37:30 2020(r368466)
+++ head/bin/chmod/chmod.c  Tue Dec  8 23:38:26 2020(r368467)
@@ -164,7 +164,7 @@ done:   argv += optind;
 
if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL)
err(1, "fts_open");
-   for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
+   for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) {
int atflag;
 
if ((fts_options & FTS_LOGICAL) ||

Modified: head/bin/cp/cp.c
==
--- head/bin/cp/cp.cTue Dec  8 22:37:30 2020(r368466)
+++ head/bin/cp/cp.cTue Dec  8 23:38:26 2020(r368467)
@@ -282,7 +282,8 @@ copy(char *argv[], enum op type, int fts_options)
 
if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL)
err(1, "fts_open");
-   for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) {
+   for (badcp = rval = 0; errno = 0, (curr = fts_read(ftsp)) != NULL;
+badcp = 0) {
switch (curr->fts_info) {
case FTS_NS:
case FTS_DNR:

Modified: head/bin/ls/ls.c
==
--- head/bin/ls/ls.cTue Dec  8 22:37:30 2020(r368466)
+++ head/bin/ls/ls.cTue Dec  8 23:38:26 2020(r368467)
@@ -645,7 +645,7 @@ traverse(int argc, char *argv[], int options)
ch_options = !f_recursive && !f_label &&
options & FTS_NOSTAT ? FTS_NAMEONLY : 0;
 
-   while ((p = fts_read(ftsp)) != NULL)
+   while (errno = 0, (p = fts_read(ftsp)) != NULL)
switch (p->fts_info) {
case FTS_DC:
warnx("%s: directory causes a cycle", p->fts_name);

Modified: head/bin/rm/rm.c
==
--- head/bin/rm/rm.cTue Dec  8 22:37:30 2020(r368466)
+++ head/bin/rm/rm.cTue Dec  8 23:38:26 2020(r368467)
@@ -207,7 +207,7 @@ rm_tree(char **argv)
return;
err(1, "fts_open");
}
-   while ((p = fts_read(fts)) != NULL) {
+   while (errno = 0, (p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_DNR:
if (!fflag || p->fts_errno != ENOENT) {

Modified: head/bin/setfacl/setfacl.c
==
--- head/bin/setfacl/setfacl.c  Tue Dec  8 22:37:30 2020(r368466)
+++ head/bin/setfacl/setfacl.c  Tue Dec  8 23:38:26 2020(r368467)
@@ -498,8 +498,10 @@ main(int argc, char *argv[])
/* Open all files. */
if ((ftsp = fts_open(files_list, fts_options | FTS_NOSTAT, 0)) == NULL)
err(1, "fts_open");
-   while ((file = fts_read(ftsp)) != NULL)
+   while (errno = 0, (file = fts_read(ftsp)) != NULL)
 

svn commit: r367910 - in head: . share/man/man7

2020-11-20 Thread Bryan Drewery
Author: bdrewery
Date: Fri Nov 20 20:11:59 2020
New Revision: 367910
URL: https://svnweb.freebsd.org/changeset/base/367910

Log:
  Add lists for customizing legacy and bootstrap-tools.
  
  Reviewed by:  arichardson
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D27200

Modified:
  head/Makefile.inc1
  head/share/man/man7/build.7

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Nov 20 19:36:34 2020(r367909)
+++ head/Makefile.inc1  Fri Nov 20 20:11:59 2020(r367910)
@@ -20,8 +20,12 @@
 #  LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target
 #  LOCAL_MTREE="list of mtree files" to process to allow local directories
 #  to be created before files are installed
+#  LOCAL_LEGACY_DIRS="list of dirs" to add additional dirs to the legacy
+#  target
+#  LOCAL_BSTOOL_DIRS="list of dirs" to add additional dirs to the
+#  bootstrap-tools target
 #  LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools
-#  list
+#  target
 #  LOCAL_XTOOL_DIRS="list of dirs" to add additional dirs to the
 #  cross-tools target
 #  METALOG="path to metadata log" to write permission and ownership
@@ -2127,7 +2131,9 @@ legacy: .PHONY
false
 .endif
 
-.for _tool in tools/build
+.for _tool in \
+  tools/build \
+  ${LOCAL_LEGACY_DIRS}
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
@@ -2458,7 +2464,8 @@ bootstrap-tools: ${_bt}-links .PHONY
 ${_crunchgen} \
 ${_nmtree} \
 ${_vtfontcvt} \
-${_localedef}
+${_localedef} \
+${LOCAL_BSTOOL_DIRS}
 ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE
${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \

Modified: head/share/man/man7/build.7
==
--- head/share/man/man7/build.7 Fri Nov 20 19:36:34 2020(r367909)
+++ head/share/man/man7/build.7 Fri Nov 20 20:11:59 2020(r367910)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 3, 2020
+.Dd November 12, 2020
 .Dt BUILD 7
 .Os
 .Sh NAME
@@ -571,6 +571,16 @@ may also be used as needed elsewhere within the list.
 If set, this variable supplies a list of additional mtrees relative to the
 root of the source tree to use as part of the
 .Cm hierarchy
+target.
+.It Va LOCAL_LEGACY_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm legacy
+target.
+.It Va LOCAL_BSTOOL_DIRS
+If set, this variable supplies a list of additional directories relative to
+the root of the source tree to build as part of the
+.Cm bootstrap-tools
 target.
 .It Va LOCAL_TOOL_DIRS
 If set, this variable supplies a list of additional directories relative to
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367570 - head/share/mk

2020-11-10 Thread Bryan Drewery
Author: bdrewery
Date: Tue Nov 10 18:05:17 2020
New Revision: 367570
URL: https://svnweb.freebsd.org/changeset/base/367570

Log:
  makeman: Don't require filemon with MK_DIRDEPS_BUILD.
  
  MFC after:2 weeks
  Reviewed by:  sjg, dim (tested earlier version)
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D27134

Modified:
  head/share/mk/local.meta.sys.mk

Modified: head/share/mk/local.meta.sys.mk
==
--- head/share/mk/local.meta.sys.mk Tue Nov 10 14:23:46 2020
(r367569)
+++ head/share/mk/local.meta.sys.mk Tue Nov 10 18:05:17 2020
(r367570)
@@ -178,6 +178,10 @@ LDFLAGS_LAST+= -L${STAGE_LIBDIR}
 # we can use this but should not update it.
 UPDATE_DEPENDFILE= NO
 .endif
+# Don't require filemon for makeman.
+.if make(showconfig)
+UPDATE_DEPENDFILE= NO
+.endif
 
 # define the list of places that contain files we are responsible for
 .MAKE.META.BAILIWICK = ${SB} ${OBJROOT} ${STAGE_ROOT}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367459 - head/usr.sbin/syslogd

2020-11-09 Thread Bryan Drewery
Thanks. I had the commit in a branch that had a debug commit after. The
brace was rebased wrong.

On 11/7/2020 11:17 AM, Cy Schubert wrote:
> Author: cy
> Date: Sat Nov  7 19:17:37 2020
> New Revision: 367459
> URL: https://svnweb.freebsd.org/changeset/base/367459
> 
> Log:
>   Fix build post-r367455.
>   
>   MFC after:  2 weeks
>   X-MFC with: r367455
> 
> Modified:
>   head/usr.sbin/syslogd/syslogd.c
> 
> Modified: head/usr.sbin/syslogd/syslogd.c
> ==
> --- head/usr.sbin/syslogd/syslogd.c   Sat Nov  7 18:15:29 2020
> (r367458)
> +++ head/usr.sbin/syslogd/syslogd.c   Sat Nov  7 19:17:37 2020
> (r367459)
> @@ -1873,7 +1873,7 @@ fprintlog_write(struct filed *f, struct iovlist *il, i
>   continue;
>   if (sl->sl_sa == NULL ||
>   sl->sl_family == AF_UNSPEC ||
> - sl->sl_family == AF_LOCAL) {
> + sl->sl_family == AF_LOCAL)
>   continue;
>   lsent = sendmsg(sl->sl_socket, , 0);
>   if (lsent == (ssize_t)il->totalsize)
> 


-- 
Regards,
Bryan Drewery


OpenPGP_signature
Description: OpenPGP digital signature


svn commit: r367455 - head/usr.sbin/syslogd

2020-11-07 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov  7 17:18:44 2020
New Revision: 367455
URL: https://svnweb.freebsd.org/changeset/base/367455

Log:
  syslogd: Stop trying to send remote messages through special sockets
  
  Specifically this was causing the /dev/klog fd and the signal pipe
  handling fd to get a sendmsg(2) called on them and always returned
  [ENOTSOCK].
  
  r310350 combined these sockets into the main socket list and properly
  skipped AF_UNSPEC at the sendmsg(2) call but later in r344739 it was
  broken such that these special sockets were no longer excluded since
  the AF_UNSPEC check specifically excluded these special sockets. Only
  these special sockets have sl_sa = NULL. The sl_family checks should
  be redundant now but are left in case of future changes so the intent
  is clearer.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Sat Nov  7 16:58:38 2020
(r367454)
+++ head/usr.sbin/syslogd/syslogd.c Sat Nov  7 17:18:44 2020
(r367455)
@@ -1871,9 +1871,9 @@ fprintlog_write(struct filed *f, struct iovlist *il, i
STAILQ_FOREACH(sl, , next) {
if (sl->sl_socket < 0)
continue;
-   if (sl->sl_sa != NULL &&
-   (sl->sl_family == AF_LOCAL ||
-sl->sl_family == AF_UNSPEC))
+   if (sl->sl_sa == NULL ||
+   sl->sl_family == AF_UNSPEC ||
+   sl->sl_family == AF_LOCAL) {
continue;
lsent = sendmsg(sl->sl_socket, , 0);
if (lsent == (ssize_t)il->totalsize)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366594 - in head/sys: kern sys vm

2020-10-09 Thread Bryan Drewery
Author: bdrewery
Date: Fri Oct  9 23:49:42 2020
New Revision: 366594
URL: https://svnweb.freebsd.org/changeset/base/366594

Log:
  Use unlocked page lookup for inmem() to avoid object lock contention
  
  Reviewed By:  kib, markj
  Submitted by: mlaier
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D26653

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/sys/buf.h
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Fri Oct  9 23:02:09 2020(r366593)
+++ head/sys/kern/vfs_bio.c Fri Oct  9 23:49:42 2020(r366594)
@@ -154,7 +154,6 @@ caddr_t __read_mostly unmapped_buf;
 /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */
 struct proc *bufdaemonproc;
 
-static int inmem(struct vnode *vp, daddr_t blkno);
 static void vm_hold_free_pages(struct buf *bp, int newbsize);
 static void vm_hold_load_pages(struct buf *bp, vm_offset_t from,
vm_offset_t to);
@@ -3585,48 +3584,54 @@ incore(struct bufobj *bo, daddr_t blkno)
  * associated VM object.  This is like incore except
  * it also hunts around in the VM system for the data.
  */
-
-static int
+bool
 inmem(struct vnode * vp, daddr_t blkno)
 {
vm_object_t obj;
vm_offset_t toff, tinc, size;
-   vm_page_t m;
+   vm_page_t m, n;
vm_ooffset_t off;
+   int valid;
 
ASSERT_VOP_LOCKED(vp, "inmem");
 
if (incore(>v_bufobj, blkno))
-   return 1;
+   return (true);
if (vp->v_mount == NULL)
-   return 0;
+   return (false);
obj = vp->v_object;
if (obj == NULL)
-   return (0);
+   return (false);
 
size = PAGE_SIZE;
if (size > vp->v_mount->mnt_stat.f_iosize)
size = vp->v_mount->mnt_stat.f_iosize;
off = (vm_ooffset_t)blkno * 
(vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize;
 
-   VM_OBJECT_RLOCK(obj);
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
-   m = vm_page_lookup(obj, OFF_TO_IDX(off + toff));
-   if (!m)
-   goto notinmem;
+   m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
+recheck:
+   if (m == NULL)
+   return (false);
+
tinc = size;
if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK))
tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK);
-   if (vm_page_is_valid(m,
-   (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0)
-   goto notinmem;
+   /*
+* Consider page validity only if page mapping didn't change
+* during the check.
+*/
+   valid = vm_page_is_valid(m,
+   (vm_offset_t)((toff + off) & PAGE_MASK), tinc);
+   n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
+   if (m != n) {
+   m = n;
+   goto recheck;
+   }
+   if (!valid)
+   return (false);
}
-   VM_OBJECT_RUNLOCK(obj);
-   return 1;
-
-notinmem:
-   VM_OBJECT_RUNLOCK(obj);
-   return (0);
+   return (true);
 }
 
 /*

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Fri Oct  9 23:02:09 2020(r366593)
+++ head/sys/sys/buf.h  Fri Oct  9 23:49:42 2020(r366594)
@@ -549,6 +549,7 @@ int vfs_bio_awrite(struct buf *);
 void   vfs_busy_pages_acquire(struct buf *bp);
 void   vfs_busy_pages_release(struct buf *bp);
 struct buf *incore(struct bufobj *, daddr_t);
+bool   inmem(struct vnode *, daddr_t);
 struct buf *gbincore(struct bufobj *, daddr_t);
 struct buf *gbincore_unlocked(struct bufobj *, daddr_t);
 struct buf *getblk(struct vnode *, daddr_t, int, int, int, int);

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Fri Oct  9 23:02:09 2020(r366593)
+++ head/sys/vm/vm_page.c   Fri Oct  9 23:49:42 2020(r366594)
@@ -1698,6 +1698,21 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex)
 }
 
 /*
+ * vm_page_lookup_unlocked:
+ *
+ * Returns the page associated with the object/offset pair specified;
+ * if none is found, NULL is returned.  The page may be no longer be
+ * present in the object at the time that this function returns.  Only
+ * useful for opportunistic checks such as inmem().
+ */
+vm_page_t
+vm_page_lookup_unlocked(vm_object_t object, vm_pindex_t pindex)
+{
+
+   return (vm_radix_lookup_unlocked(>rtree, pindex));
+}
+
+/*
  * vm_page_relookup:
  *
  * Returns a page that must already have been 

svn commit: r366343 - head/sys/kern

2020-10-01 Thread Bryan Drewery
Author: bdrewery
Date: Thu Oct  1 20:08:27 2020
New Revision: 366343
URL: https://svnweb.freebsd.org/changeset/base/366343

Log:
  Revert r366340.
  
  CR wasn't finished and it breaks the build.

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Thu Oct  1 19:56:38 2020(r366342)
+++ head/sys/kern/vfs_bio.c Thu Oct  1 20:08:27 2020(r366343)
@@ -154,7 +154,7 @@ caddr_t __read_mostly unmapped_buf;
 /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */
 struct proc *bufdaemonproc;
 
-static bool inmem(struct vnode *vp, daddr_t blkno);
+static int inmem(struct vnode *vp, daddr_t blkno);
 static void vm_hold_free_pages(struct buf *bp, int newbsize);
 static void vm_hold_load_pages(struct buf *bp, vm_offset_t from,
vm_offset_t to);
@@ -3586,21 +3586,20 @@ incore(struct bufobj *bo, daddr_t blkno)
  * it also hunts around in the VM system for the data.
  */
 
-static bool
+static int
 inmem(struct vnode * vp, daddr_t blkno)
 {
vm_object_t obj;
vm_offset_t toff, tinc, size;
-   vm_page_t m, n;
+   vm_page_t m;
vm_ooffset_t off;
-   int valid;
 
ASSERT_VOP_LOCKED(vp, "inmem");
 
if (incore(>v_bufobj, blkno))
-   return (1);
+   return 1;
if (vp->v_mount == NULL)
-   return (0);
+   return 0;
obj = vp->v_object;
if (obj == NULL)
return (0);
@@ -3610,30 +3609,24 @@ inmem(struct vnode * vp, daddr_t blkno)
size = vp->v_mount->mnt_stat.f_iosize;
off = (vm_ooffset_t)blkno * 
(vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize;
 
+   VM_OBJECT_RLOCK(obj);
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
-   m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
-recheck:
-   if (m == NULL)
-   return (0);
-   /*
-* Consider page validity only if page mapping didn't change
-* during the check.
-*/
-   valid = vm_page_is_valid(m,
-   (vm_offset_t)((toff + off) & PAGE_MASK), tinc);
-   n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
-   if (m != n) {
-   m = n;
-   goto recheck;
-   }
-   if (!valid)
-   return (0);
-
+   m = vm_page_lookup(obj, OFF_TO_IDX(off + toff));
+   if (!m)
+   goto notinmem;
tinc = size;
if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK))
tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK);
+   if (vm_page_is_valid(m,
+   (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0)
+   goto notinmem;
}
-   return (1);
+   VM_OBJECT_RUNLOCK(obj);
+   return 1;
+
+notinmem:
+   VM_OBJECT_RUNLOCK(obj);
+   return (0);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366340 - head/sys/kern

2020-10-01 Thread Bryan Drewery
Author: bdrewery
Date: Thu Oct  1 19:17:03 2020
New Revision: 366340
URL: https://svnweb.freebsd.org/changeset/base/366340

Log:
  Use unlocked page lookup for inmem() to avoid object lock contention
  
  Reviewed By:  kib, markj
  Sponsored by: Dell EMC Isilon
  Submitted by: mlaier
  Differential Revision:https://reviews.freebsd.org/D26597

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Thu Oct  1 19:06:07 2020(r366339)
+++ head/sys/kern/vfs_bio.c Thu Oct  1 19:17:03 2020(r366340)
@@ -154,7 +154,7 @@ caddr_t __read_mostly unmapped_buf;
 /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */
 struct proc *bufdaemonproc;
 
-static int inmem(struct vnode *vp, daddr_t blkno);
+static bool inmem(struct vnode *vp, daddr_t blkno);
 static void vm_hold_free_pages(struct buf *bp, int newbsize);
 static void vm_hold_load_pages(struct buf *bp, vm_offset_t from,
vm_offset_t to);
@@ -3586,20 +3586,21 @@ incore(struct bufobj *bo, daddr_t blkno)
  * it also hunts around in the VM system for the data.
  */
 
-static int
+static bool
 inmem(struct vnode * vp, daddr_t blkno)
 {
vm_object_t obj;
vm_offset_t toff, tinc, size;
-   vm_page_t m;
+   vm_page_t m, n;
vm_ooffset_t off;
+   int valid;
 
ASSERT_VOP_LOCKED(vp, "inmem");
 
if (incore(>v_bufobj, blkno))
-   return 1;
+   return (1);
if (vp->v_mount == NULL)
-   return 0;
+   return (0);
obj = vp->v_object;
if (obj == NULL)
return (0);
@@ -3609,24 +3610,30 @@ inmem(struct vnode * vp, daddr_t blkno)
size = vp->v_mount->mnt_stat.f_iosize;
off = (vm_ooffset_t)blkno * 
(vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize;
 
-   VM_OBJECT_RLOCK(obj);
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
-   m = vm_page_lookup(obj, OFF_TO_IDX(off + toff));
-   if (!m)
-   goto notinmem;
+   m = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
+recheck:
+   if (m == NULL)
+   return (0);
+   /*
+* Consider page validity only if page mapping didn't change
+* during the check.
+*/
+   valid = vm_page_is_valid(m,
+   (vm_offset_t)((toff + off) & PAGE_MASK), tinc);
+   n = vm_page_lookup_unlocked(obj, OFF_TO_IDX(off + toff));
+   if (m != n) {
+   m = n;
+   goto recheck;
+   }
+   if (!valid)
+   return (0);
+
tinc = size;
if (tinc > PAGE_SIZE - ((toff + off) & PAGE_MASK))
tinc = PAGE_SIZE - ((toff + off) & PAGE_MASK);
-   if (vm_page_is_valid(m,
-   (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0)
-   goto notinmem;
}
-   VM_OBJECT_RUNLOCK(obj);
-   return 1;
-
-notinmem:
-   VM_OBJECT_RUNLOCK(obj);
-   return (0);
+   return (1);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364223 - head/lib/libc/gen

2020-08-13 Thread Bryan Drewery
Author: bdrewery
Date: Fri Aug 14 00:18:18 2020
New Revision: 364223
URL: https://svnweb.freebsd.org/changeset/base/364223

Log:
  syslog(3): Send proper NILVALUE if gethostname(3) fails.
  
  RFC5424 defines NILVALUE as '-'. Replace its usage with a macro and
  separate out the fields to be more clear. fputs(3) is used in some
  places to avoid hiding possible format string problems in a macro.
  
  Reviewed by:  cem, vangyzen (earlier version)
  Sponsored by: Dell EMC

Modified:
  head/lib/libc/gen/syslog.c

Modified: head/lib/libc/gen/syslog.c
==
--- head/lib/libc/gen/syslog.c  Thu Aug 13 23:13:05 2020(r364222)
+++ head/lib/libc/gen/syslog.c  Fri Aug 14 00:18:18 2020(r364223)
@@ -75,6 +75,9 @@ static pthread_mutex_tsyslog_mutex = PTHREAD_MUTEX_IN
if (__isthreaded) _pthread_mutex_unlock(_mutex); \
} while(0)
 
+/* RFC5424 defined value. */
+#define NILVALUE "-"
+
 static voiddisconnectlog(void); /* disconnect from syslogd */
 static voidconnectlog(void);   /* (re)connect to syslogd */
 static voidopenlog_unlocked(const char *, int, int);
@@ -190,25 +193,30 @@ vsyslog1(int pri, const char *fmt, va_list ap)
tm.tm_hour, tm.tm_min, tm.tm_sec, now.tv_usec,
tz_sign, tz_offset / 3600, (tz_offset % 3600) / 60);
} else
-   (void)fprintf(fp, "- ");
+   (void)fputs(NILVALUE " ", fp);
/* Hostname. */
(void)gethostname(hostname, sizeof(hostname));
-   (void)fprintf(fp, "%s ", hostname);
+   (void)fprintf(fp, "%s ",
+   hostname[0] == '\0' ? NILVALUE : hostname);
if (LogStat & LOG_PERROR) {
/* Transfer to string buffer */
(void)fflush(fp);
stdp = tbuf + (sizeof(tbuf) - tbuf_cookie.left);
}
+   /* Application name. */
+   if (LogTag == NULL)
+   LogTag = _getprogname();
+   (void)fprintf(fp, "%s ", LogTag == NULL ? NILVALUE : LogTag);
/*
-* Application name, process ID, message ID and structured data.
 * Provide the process ID regardless of whether LOG_PID has been
 * specified, as it provides valuable information. Many
 * applications tend not to use this, even though they should.
 */
-   if (LogTag == NULL)
-   LogTag = _getprogname();
-   (void)fprintf(fp, "%s %d - - ",
-   LogTag == NULL ? "-" : LogTag, getpid());
+   (void)fprintf(fp, "%d ", getpid());
+   /* Message ID. */
+   (void)fputs(NILVALUE " ", fp);
+   /* Structured data. */
+   (void)fputs(NILVALUE " ", fp);
 
/* Check to see if we can skip expanding the %m */
if (strstr(fmt, "%m")) {
@@ -251,6 +259,7 @@ vsyslog1(int pri, const char *fmt, va_list ap)
fmt = fmt_cpy;
}
 
+   /* Message. */
(void)vfprintf(fp, fmt, ap);
(void)fclose(fp);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364221 - in head/lib/libbsnmp: . tests

2020-08-13 Thread Bryan Drewery
Author: bdrewery
Date: Thu Aug 13 22:42:24 2020
New Revision: 364221
URL: https://svnweb.freebsd.org/changeset/base/364221

Log:
  Add test to for FreeBSD-SA-19:20.bsnmp
  
  Submitted by: Darrick Lew 
  Reviewed by:  cem
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D26037

Added:
  head/lib/libbsnmp/tests/
  head/lib/libbsnmp/tests/Makefile   (contents, props changed)
  head/lib/libbsnmp/tests/bsnmpd_test.c   (contents, props changed)
Modified:
  head/lib/libbsnmp/Makefile

Modified: head/lib/libbsnmp/Makefile
==
--- head/lib/libbsnmp/Makefile  Thu Aug 13 22:06:27 2020(r364220)
+++ head/lib/libbsnmp/Makefile  Thu Aug 13 22:42:24 2020(r364221)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR=libbsnmp
+SUBDIR.${MK_TESTS}+= tests
 
 .include 

Added: head/lib/libbsnmp/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libbsnmp/tests/MakefileThu Aug 13 22:42:24 2020
(r364221)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+.include 
+
+ATF_TESTS_C+=  bsnmpd_test
+
+SRCS.bsmpd_test=   bsnmpd_test.c
+
+LIBADD+=   bsnmp
+
+.include 

Added: head/lib/libbsnmp/tests/bsnmpd_test.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libbsnmp/tests/bsnmpd_test.c   Thu Aug 13 22:42:24 2020
(r364221)
@@ -0,0 +1,53 @@
+/*-
+ * Copyright (c) 2020 Dell EMC
+ * All rights reserved.
+ *
+ * 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 AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+
+#include 
+
+ATF_TC_WITHOUT_HEAD(sa_19_20_bsnmp_test);
+ATF_TC_BODY(sa_19_20_bsnmp_test, tc)
+{
+   struct asn_buf b = {};
+   char test_buf[] = { 0x25, 0x7f };
+   enum asn_err err;
+   asn_len_t len;
+   u_char type;
+
+   b.asn_cptr = test_buf;
+   b.asn_len = sizeof(test_buf);
+
+   err = asn_get_header(, , );
+   ATF_CHECK_EQ(ASN_ERR_EOBUF, err);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+   ATF_TP_ADD_TC(tp, sa_19_20_bsnmp_test);
+   return (atf_no_error());
+}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364220 - head/sys/net

2020-08-13 Thread Bryan Drewery
Author: bdrewery
Date: Thu Aug 13 22:06:27 2020
New Revision: 364220
URL: https://svnweb.freebsd.org/changeset/base/364220

Log:
  lagg: Avoid adding a port to a lagg device being destroyed.
  
  The lagg_clone_destroy() handles detach and waiting for ifconfig callers
  to drain already.
  
  This narrows the race for 2 panics that the tests triggered. Both were a
  consequence of adding a port to the lagg device after it had already detached
  from all of its ports. The link state task would run after 
lagg_clone_destroy()
  free'd the lagg softc.
  
  kernel:trap_fatal+0xa4
  kernel:trap_pfault+0x61
  kernel:trap+0x316
  kernel:witness_checkorder+0x6d
  kernel:_sx_xlock+0x72
  if_lagg.ko:lagg_port_state+0x3b
  kernel:if_down+0x144
  kernel:if_detach+0x659
  if_tap.ko:tap_destroy+0x46
  kernel:if_clone_destroyif+0x1b7
  kernel:if_clone_destroy+0x8d
  kernel:ifioctl+0x29c
  kernel:kern_ioctl+0x2bd
  kernel:sys_ioctl+0x16d
  kernel:amd64_syscall+0x337
  
  kernel:trap_fatal+0xa4
  kernel:trap_pfault+0x61
  kernel:trap+0x316
  kernel:witness_checkorder+0x6d
  kernel:_sx_xlock+0x72
  if_lagg.ko:lagg_port_state+0x3b
  kernel:do_link_state_change+0x9b
  kernel:taskqueue_run_locked+0x10b
  kernel:taskqueue_run+0x49
  kernel:ithread_loop+0x19c
  kernel:fork_exit+0x83
  
  PR:   244168
  Reviewed by:  markj
  MFC after:2 weeks
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D25284

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Thu Aug 13 20:48:14 2020(r364219)
+++ head/sys/net/if_lagg.c  Thu Aug 13 22:06:27 2020(r364220)
@@ -679,6 +679,9 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *
return (EINVAL);
}
 
+   if (sc->sc_destroying == 1)
+   return (ENXIO);
+
/* Limit the maximal number of lagg ports */
if (sc->sc_count >= LAGG_MAX_PORTS)
return (ENOSPC);
@@ -1190,6 +1193,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data
int count, buflen, len, error = 0, oldmtu;
 
bzero(, sizeof(rpbuf));
+
+   /* XXX: This can race with lagg_clone_destroy. */
 
switch (cmd) {
case SIOCGLAGG:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r363463 - head/tests/sys/geom/class/mirror

2020-07-23 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jul 23 23:29:50 2020
New Revision: 363463
URL: https://svnweb.freebsd.org/changeset/base/363463

Log:
  Limit gmirror failpoint tests to the test worker
  
  This avoids injecting errors into the test system's mirrors.
  
  gnop seems like a good solution here but it injects errors at the wrong
  place vs where these tests expect and does not support a 'max global count'
  like the failpoints do with 'n*' syntax.
  
  Reviewed by:  cem, vangyzen
  Sponsored by: Dell EMC Isilon

Modified:
  head/tests/sys/geom/class/mirror/10_test.sh
  head/tests/sys/geom/class/mirror/11_test.sh
  head/tests/sys/geom/class/mirror/12_test.sh
  head/tests/sys/geom/class/mirror/13_test.sh
  head/tests/sys/geom/class/mirror/9_test.sh
  head/tests/sys/geom/class/mirror/conf.sh
  head/tests/sys/geom/class/mirror/sync_error.sh

Modified: head/tests/sys/geom/class/mirror/10_test.sh
==
--- head/tests/sys/geom/class/mirror/10_test.sh Thu Jul 23 22:28:35 2020
(r363462)
+++ head/tests/sys/geom/class/mirror/10_test.sh Thu Jul 23 23:29:50 2020
(r363463)
@@ -30,7 +30,7 @@ tmp2=$(mktemp $base.XX)
 
 EIO=5
 # gmirror should retry a failed read from the other mirror.
-sysctl ${regreadfp}="1*return(${EIO})"
+sysctl ${regreadfp}="1*return(${EIO})[pid $(gmirror_worker_pid)]"
 dd if=/dev/mirror/$name of=$tmp1 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1
 dd if=/dev/$us1 of=$tmp2 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1
 sysctl ${regreadfp}='off'

Modified: head/tests/sys/geom/class/mirror/11_test.sh
==
--- head/tests/sys/geom/class/mirror/11_test.sh Thu Jul 23 22:28:35 2020
(r363462)
+++ head/tests/sys/geom/class/mirror/11_test.sh Thu Jul 23 23:29:50 2020
(r363463)
@@ -31,7 +31,7 @@ tmp2=$(mktemp $base.XX)
 ENXIO=6
 # gmirror has special handling for ENXIO. It does not mark the failed component
 # as broken, allowing it to rejoin the mirror automatically when it appears.
-sysctl ${regreadfp}="1*return(${ENXIO})"
+sysctl ${regreadfp}="1*return(${ENXIO})[pid $(gmirror_worker_pid)]"
 dd if=/dev/mirror/$name of=$tmp1 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1
 dd if=/dev/$us1 of=$tmp2 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1
 sysctl ${regreadfp}='off'

Modified: head/tests/sys/geom/class/mirror/12_test.sh
==
--- head/tests/sys/geom/class/mirror/12_test.sh Thu Jul 23 22:28:35 2020
(r363462)
+++ head/tests/sys/geom/class/mirror/12_test.sh Thu Jul 23 23:29:50 2020
(r363463)
@@ -29,7 +29,7 @@ dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null
 
 EIO=5
 # gmirror should kick one of the mirrors out after hitting EIO.
-sysctl ${regwritefp}="1*return(${EIO})"
+sysctl ${regwritefp}="1*return(${EIO})[pid $(gmirror_worker_pid)]"
 dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1
 dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1
 sysctl ${regwritefp}='off'

Modified: head/tests/sys/geom/class/mirror/13_test.sh
==
--- head/tests/sys/geom/class/mirror/13_test.sh Thu Jul 23 22:28:35 2020
(r363462)
+++ head/tests/sys/geom/class/mirror/13_test.sh Thu Jul 23 23:29:50 2020
(r363463)
@@ -31,7 +31,7 @@ dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null
 ENXIO=6
 # gmirror has special handling for ENXIO. It does not mark the failed component
 # as broken, allowing it to rejoin the mirror automatically when it appears.
-sysctl ${regwritefp}="1*return(${ENXIO})"
+sysctl ${regwritefp}="1*return(${ENXIO})[pid $(gmirror_worker_pid)]"
 dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1
 dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1
 sysctl ${regwritefp}='off'

Modified: head/tests/sys/geom/class/mirror/9_test.sh
==
--- head/tests/sys/geom/class/mirror/9_test.sh  Thu Jul 23 22:28:35 2020
(r363462)
+++ head/tests/sys/geom/class/mirror/9_test.sh  Thu Jul 23 23:29:50 2020
(r363463)
@@ -26,7 +26,7 @@ devwait
 # Break one of the mirrors by forcing a single metadata write error.
 # When dd closes the mirror provider, gmirror will attempt to mark the mirrors
 # clean, and will kick one of the mirrors out upon hitting the error.
-sysctl debug.fail_point.g_mirror_metadata_write='1*return(5)' || exit 1
+sysctl debug.fail_point.g_mirror_metadata_write="1*return(5)[pid 
$(gmirror_worker_pid)]" || exit 1
 dd if=/dev/random of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1
 sysctl debug.fail_point.g_mirror_metadata_write='off' || exit 1
 

Modified: head/tests/sys/geom/class/mirror/conf.sh
==
--- head/tests/sys/geom/class/mirror/conf.shThu Jul 23 

svn commit: r360476 - in head/cddl/usr.sbin/dtrace/tests: . tools

2020-04-29 Thread Bryan Drewery
Author: bdrewery
Date: Wed Apr 29 21:12:32 2020
New Revision: 360476
URL: https://svnweb.freebsd.org/changeset/base/360476

Log:
  dtrace tests: Support globbing for excludes
  
  Downstream this makes skipping tests like common/ip/tst.*sctp*.ksh simpler.
  
  Reviewed by:  vangyzen, cem, markj
  Sponsored by: Dell EMC
  Differential Revision:https://reviews.freebsd.org/D24608

Modified:
  head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk
  head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh

Modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk
==
--- head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk  Wed Apr 29 19:28:56 
2020(r360475)
+++ head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk  Wed Apr 29 21:12:32 
2020(r360476)
@@ -1,7 +1,8 @@
 # $FreeBSD$
 
 TESTGROUP= ${.CURDIR:H:T}/${.CURDIR:T}
-TESTSRC= ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/${TESTGROUP}
+TESTBASE= ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace/test/tst
+TESTSRC= ${TESTBASE}/${TESTGROUP}
 TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/${TESTGROUP}
 
 FILESGROUPS+=  ${TESTGROUP}EXE
@@ -18,7 +19,8 @@ TEST_METADATA.t_dtrace_contrib+= required_user="root"
 GENTEST?=  ${.CURDIR:H:H}/tools/gentest.sh
 EXCLUDE=   ${.CURDIR:H:H}/tools/exclude.sh
 ${TESTWRAPPER}.sh: ${GENTEST} ${EXCLUDE} ${${PACKAGE}FILES}
-   sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES:S/ */ /} > 
${.TARGET}
+   env TESTBASE=${TESTBASE:Q} \
+   sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES:S/ */ /} 
> ${.TARGET}
 
 CLEANFILES+=   ${TESTWRAPPER}.sh
 

Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
==
--- head/cddl/usr.sbin/dtrace/tests/tools/exclude.shWed Apr 29 19:28:56 
2020(r360475)
+++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.shWed Apr 29 21:12:32 
2020(r360476)
@@ -23,7 +23,22 @@
 
 exclude()
 {
-eval $1=\"\$$1\\n$2\"
+case $2 in
+# Handle globbing later
+*"*"*) ;;
+# No globbing needed
+*)
+eval $1=\"\$$1\\n$2\"
+return
+;;
+esac
+for file in ${TESTBASE}/${2}; do
+case ${file} in
+# Invalid glob
+"${TESTBASE}/${2}") echo "Invalid exclude for $2" >&2; exit 1; ;;
+esac
+exclude "$1" "${file##${TESTBASE}/}"
+done
 }
 
 exclude EXFAIL common/aggs/tst.subr.d
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360453 - head

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Wed Apr 29 02:18:39 2020
New Revision: 360453
URL: https://svnweb.freebsd.org/changeset/base/360453

Log:
  Use universe-toolchain config(8)
  
  This is a temporary hack to aid with config(8) changing in r360443.
  It will not work for all cases.
  
  env PATH is used because universe-toolchain is only built when worlds
  are built, and then only if clang is needed, so it may not exist.
  
  universe-toolchain needs to be expanded to always be built, inspected to
  remove non-cross-build-safe tools, used for buildworld/buildkernel,
  and potentially incremental build support.
  
  Sponsored by: Dell EMC

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Tue Apr 28 20:34:27 2020(r360452)
+++ head/Makefile   Wed Apr 29 02:18:39 2020(r360453)
@@ -711,6 +711,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
 universe_kernconfs: universe_kernels_prologue .PHONY
 .for kernel in ${KERNCONFS}
 TARGET_ARCH_${kernel}!=cd ${KERNSRCDIR}/${TARGET}/conf && \
+   env PATH=${HOST_OBJTOP}/tmp/legacy/bin:${PATH:Q} \
config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
grep -v WARNING: | cut -f 2
 .if empty(TARGET_ARCH_${kernel})
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r360444 - head/sys/conf

2020-04-28 Thread Bryan Drewery
On 4/28/2020 3:30 PM, John Baldwin wrote:
> On 4/28/20 9:09 AM, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Tue Apr 28 16:09:25 2020
>> New Revision: 360444
>> URL: https://svnweb.freebsd.org/changeset/base/360444
>>
>> Log:
>>   Don't try ctfconvert on file without debug info.
>>   
>>   This was currently an ignored error but will change to a hard error
>>   eventually.
>>   
>>   Differential Revision: https://reviews.freebsd.org/D24536
> 
> FYI, this just broke make tinderbox entirely for building head on
> older head or stable/12.  The issue is that 'make tinderbox' uses
> the host's config binary to run 'config -m' against each kernel
> config file to determine it's MACHINE_ARCH, and when it gets an error
> make tinderbox just dies, e.g.:
> 
>> make tinderbox NO_CLEAN=yes JFLAG=-j2
> --
>>>> make universe started on Tue Apr 28 09:27:36 PDT 2020
> --
> --
>> Toolchain bootstrap started on Tue Apr 28 09:27:36 PDT 2020
> --
> --
>> Toolchain bootstrap completed on Tue Apr 28 09:59:35 PDT 2020
> --
>>> amd64 started on Tue Apr 28 09:59:35 PDT 2020
>>> amd64.amd64 buildworld started on Tue Apr 28 09:59:35 PDT 2020
>>> amd64.amd64 buildworld completed on Tue Apr 28 15:28:31 PDT 2020
> make[2]: "/usr/home/john/work/freebsd/clean/Makefile" line 717: "Target 
> architecture for amd64/conf/GENERIC unknown.  config(8) likely too old."
> *** Error code 1
> 
> The real fix is we somehow need to build a config binary as a build
> tool and use that instead of the host config binary.  I'm not quite
> sure where to start on fixing that though.

It's already in bootstrap-tools. Ah I see the problem is Makefile. Why
isn't this already solved by now? The "universe-toolchain" target should
be building it already. Just need to get the PATH right. I'm working on
a fix.

> 
> Previously riscv broke this when it bumped the config version for
> GENERICSF, but I just reverted that bump yesterday, however riscv
> dying meant you still built most of tinderbox before it dies compared
> to now.
> 


-- 
Regards,
Bryan Drewery
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r360445 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2020-04-28 Thread Bryan Drewery
I did not mean to commit this yet. Likely broke non-x86. Reverting now.

On 4/28/2020 9:09 AM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Tue Apr 28 16:09:28 2020
> New Revision: 360445
> URL: https://svnweb.freebsd.org/changeset/base/360445
> 
> Log:
>   ctfmerge: Assert that there is enough room for types.
>   
>   Sponsord by:Dell EMC
>   Differential Revision:  https://reviews.freebsd.org/D24537
> 
> Modified:
>   head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
>   head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c
> 
> Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
> ==
> --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c   Tue Apr 28 
> 16:09:25 2020(r360444)
> +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c   Tue Apr 28 
> 16:09:28 2020(r360445)
> @@ -452,6 +452,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
>   if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) {
>   int id = mcd->md_tgt->td_nextid++;
>  
> +#ifdef __FreeBSD__
> + if (CTF_TYPE_ISCHILD(id))
> + terminate("No room for additional types\n");
> +#endif
>   debug(3, "Creating new defn type %d <%x>\n", id, id);
>   add_mapping(mcd->md_ta, ctdp->t_id, id);
>   alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt,
> @@ -473,6 +477,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
>   } else {
>   int id = mcd->md_tgt->td_nextid++;
>  
> +#ifdef __FreeBSD__
> + if (CTF_TYPE_ISCHILD(id))
> + terminate("No room for additional types\n");
> +#endif
>   debug(3, "Creating new type %d <%x>\n", id, id);
>   add_mapping(mcd->md_ta, ctdp->t_id, id);
>   hash_add(mcd->md_tdtba, ctdp);
> 
> Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c
> ==
> --- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.cTue Apr 28 
> 16:09:25 2020(r360444)
> +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.cTue Apr 28 
> 16:09:28 2020(r360445)
> @@ -148,17 +148,7 @@ terminate(const char *format, ...)
>  
>   if (getenv("CTF_ABORT_ON_TERMINATE") != NULL)
>   abort();
> -#if defined(__FreeBSD__)
> -/*
> - * For the time being just output the termination message, but don't
> - * return an exit status that would cause the build to fail. We need
> - * to get as much stuff built as possible before going back and
> - * figuring out what is wrong with certain files.
> - */
> - exit(0);
> -#else
>   exit(1);
> -#endif
>  }
>  
>  /*PRINTFLIKE1*/
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r360448 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 18:53:49 2020
New Revision: 360448
URL: https://svnweb.freebsd.org/changeset/base/360448

Log:
  Revert r360445
  
  I did not intend to commit this yet as more work is needed for
  non-amd64 kernels.

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 18:42:30 
2020(r360447)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 18:53:49 
2020(r360448)
@@ -452,10 +452,6 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) {
int id = mcd->md_tgt->td_nextid++;
 
-#ifdef __FreeBSD__
-   if (CTF_TYPE_ISCHILD(id))
-   terminate("No room for additional types\n");
-#endif
debug(3, "Creating new defn type %d <%x>\n", id, id);
add_mapping(mcd->md_ta, ctdp->t_id, id);
alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt,
@@ -477,10 +473,6 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
} else {
int id = mcd->md_tgt->td_nextid++;
 
-#ifdef __FreeBSD__
-   if (CTF_TYPE_ISCHILD(id))
-   terminate("No room for additional types\n");
-#endif
debug(3, "Creating new type %d <%x>\n", id, id);
add_mapping(mcd->md_ta, ctdp->t_id, id);
hash_add(mcd->md_tdtba, ctdp);

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c  Tue Apr 28 18:42:30 
2020(r360447)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c  Tue Apr 28 18:53:49 
2020(r360448)
@@ -148,7 +148,17 @@ terminate(const char *format, ...)
 
if (getenv("CTF_ABORT_ON_TERMINATE") != NULL)
abort();
+#if defined(__FreeBSD__)
+/*
+ * For the time being just output the termination message, but don't
+ * return an exit status that would cause the build to fail. We need
+ * to get as much stuff built as possible before going back and
+ * figuring out what is wrong with certain files.
+ */
+   exit(0);
+#else
exit(1);
+#endif
 }
 
 /*PRINTFLIKE1*/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360444 - head/sys/conf

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 16:09:25 2020
New Revision: 360444
URL: https://svnweb.freebsd.org/changeset/base/360444

Log:
  Don't try ctfconvert on file without debug info.
  
  This was currently an ignored error but will change to a hard error
  eventually.
  
  Differential Revision:https://reviews.freebsd.org/D24536

Modified:
  head/sys/conf/Makefile.amd64
  head/sys/conf/files.amd64

Modified: head/sys/conf/Makefile.amd64
==
--- head/sys/conf/Makefile.amd64Tue Apr 28 16:09:22 2020
(r360443)
+++ head/sys/conf/Makefile.amd64Tue Apr 28 16:09:25 2020
(r360444)
@@ -18,7 +18,7 @@
 #
 
 # Which version of config(8) is required.
-%VERSREQ=  600012
+%VERSREQ=  600018
 
 STD8X16FONT?=  iso
 

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Tue Apr 28 16:09:22 2020(r360443)
+++ head/sys/conf/files.amd64   Tue Apr 28 16:09:25 2020(r360444)
@@ -113,7 +113,8 @@ amd64/amd64/initcpu.c   standard
 amd64/amd64/io.c   optionalio
 amd64/amd64/locore.S   standardno-obj
 amd64/amd64/xen-locore.S   optionalxenhvm \
-   compile-with "${NORMAL_S} -g0"
+   compile-with "${NORMAL_S} -g0" \
+   no-ctfconvert
 amd64/amd64/machdep.c  standard
 amd64/amd64/mem.c  optionalmem
 amd64/amd64/minidump_machdep.c standard
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360445 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 16:09:28 2020
New Revision: 360445
URL: https://svnweb.freebsd.org/changeset/base/360445

Log:
  ctfmerge: Assert that there is enough room for types.
  
  Sponsord by:  Dell EMC
  Differential Revision:https://reviews.freebsd.org/D24537

Modified:
  head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
  head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 16:09:25 
2020(r360444)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Tue Apr 28 16:09:28 
2020(r360445)
@@ -452,6 +452,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
if (ed.ed_tgt->t_type == FORWARD && ctdp->t_type != FORWARD) {
int id = mcd->md_tgt->td_nextid++;
 
+#ifdef __FreeBSD__
+   if (CTF_TYPE_ISCHILD(id))
+   terminate("No room for additional types\n");
+#endif
debug(3, "Creating new defn type %d <%x>\n", id, id);
add_mapping(mcd->md_ta, ctdp->t_id, id);
alist_add(mcd->md_fdida, (void *)(ulong_t)ed.ed_tgt,
@@ -473,6 +477,10 @@ map_td_tree_post(tdesc_t *ctdp, tdesc_t **ctdpp __unus
} else {
int id = mcd->md_tgt->td_nextid++;
 
+#ifdef __FreeBSD__
+   if (CTF_TYPE_ISCHILD(id))
+   terminate("No room for additional types\n");
+#endif
debug(3, "Creating new type %d <%x>\n", id, id);
add_mapping(mcd->md_ta, ctdp->t_id, id);
hash_add(mcd->md_tdtba, ctdp);

Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c
==
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c  Tue Apr 28 16:09:25 
2020(r360444)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c  Tue Apr 28 16:09:28 
2020(r360445)
@@ -148,17 +148,7 @@ terminate(const char *format, ...)
 
if (getenv("CTF_ABORT_ON_TERMINATE") != NULL)
abort();
-#if defined(__FreeBSD__)
-/*
- * For the time being just output the termination message, but don't
- * return an exit status that would cause the build to fail. We need
- * to get as much stuff built as possible before going back and
- * figuring out what is wrong with certain files.
- */
-   exit(0);
-#else
exit(1);
-#endif
 }
 
 /*PRINTFLIKE1*/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360443 - head/usr.sbin/config

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 16:09:22 2020
New Revision: 360443
URL: https://svnweb.freebsd.org/changeset/base/360443

Log:
  config: Add no-ctfconvert support.
  
  Bump CONFIGVERS to 600018 for this support.
  
  Some files may purposely have debug info disabled or are *source files*
  that attempt to run ctfconvert on them. Currently ctfconvert ignores
  these errors but I have a change to make the errors real so we can
  catch real problems like exceeding type limits.
  
  Sponsored by: Dell EMC
  Reviewed by:  imp, cem, kevans
  Differential Revision:https://reviews.freebsd.org/D24535

Modified:
  head/usr.sbin/config/config.h
  head/usr.sbin/config/configvers.h
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/config.h
==
--- head/usr.sbin/config/config.h   Tue Apr 28 16:09:18 2020
(r360442)
+++ head/usr.sbin/config/config.h   Tue Apr 28 16:09:22 2020
(r360443)
@@ -82,6 +82,7 @@ struct files_name {
 #define NO_OBJ 2
 #define BEFORE_DEPEND  4
 #define NOWERROR   16
+#define NO_CTFCONVERT  32
 
 struct device {
int d_done; /* processed */

Modified: head/usr.sbin/config/configvers.h
==
--- head/usr.sbin/config/configvers.h   Tue Apr 28 16:09:18 2020
(r360442)
+++ head/usr.sbin/config/configvers.h   Tue Apr 28 16:09:22 2020
(r360443)
@@ -49,7 +49,7 @@
  *
  * $FreeBSD$
  */
-#defineCONFIGVERS  600017
+#defineCONFIGVERS  600018
 #defineMAJOR_VERS(x)   ((x) / 10)
 
 /* Last config(8) version to require envmode/hintmode */

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Tue Apr 28 16:09:18 2020
(r360442)
+++ head/usr.sbin/config/mkmakefile.c   Tue Apr 28 16:09:22 2020
(r360443)
@@ -397,7 +397,7 @@ read_file(char *fname)
char *wd, *this, *compilewith, *depends, *clean, *warning;
const char *objprefix;
int compile, match, nreqs, std, filetype, not,
-   imp_rule, no_obj, before_depend, nowerror;
+   imp_rule, no_ctfconvert, no_obj, before_depend, nowerror;
 
fp = fopen(fname, "r");
if (fp == NULL)
@@ -452,6 +452,7 @@ next:
warning = 0;
std = 0;
imp_rule = 0;
+   no_ctfconvert = 0;
no_obj = 0;
before_depend = 0;
nowerror = 0;
@@ -479,6 +480,10 @@ next:
nreqs = 0;
continue;
}
+   if (eq(wd, "no-ctfconvert")) {
+   no_ctfconvert++;
+   continue;
+   }
if (eq(wd, "no-obj")) {
no_obj++;
continue;
@@ -591,8 +596,10 @@ nextparam:;
tp->f_srcprefix = "$S/";
if (imp_rule)
tp->f_flags |= NO_IMPLCT_RULE;
+   if (no_ctfconvert)
+   tp->f_flags |= NO_CTFCONVERT;
if (no_obj)
-   tp->f_flags |= NO_OBJ;
+   tp->f_flags |= NO_OBJ | NO_CTFCONVERT;
if (before_depend)
tp->f_flags |= BEFORE_DEPEND;
if (nowerror)
@@ -805,7 +812,7 @@ do_rules(FILE *f)
else
fprintf(f, "\t%s\n", compilewith);
 
-   if (!(ftp->f_flags & NO_OBJ))
+   if (!(ftp->f_flags & NO_CTFCONVERT))
fprintf(f, "\t${NORMAL_CTFCONVERT}\n\n");
else
fprintf(f, "\n");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360442 - in head/sys/modules: cxgb/cxgb cxgbe/iw_cxgbe rdma/krping sfxge

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 16:09:18 2020
New Revision: 360442
URL: https://svnweb.freebsd.org/changeset/base/360442

Log:
  None of these use opt_sched.h

Modified:
  head/sys/modules/cxgb/cxgb/Makefile
  head/sys/modules/cxgbe/iw_cxgbe/Makefile
  head/sys/modules/rdma/krping/Makefile
  head/sys/modules/sfxge/Makefile

Modified: head/sys/modules/cxgb/cxgb/Makefile
==
--- head/sys/modules/cxgb/cxgb/Makefile Tue Apr 28 16:07:15 2020
(r360441)
+++ head/sys/modules/cxgb/cxgb/Makefile Tue Apr 28 16:09:18 2020
(r360442)
@@ -8,7 +8,7 @@ SRCS=   cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv
 SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c cxgb_aq100x.c
 SRCS+=  cxgb_sge.c cxgb_tn1010.c
 SRCS+= device_if.h bus_if.h pci_if.h
-SRCS+= opt_inet.h opt_inet6.h opt_sched.h
+SRCS+= opt_inet.h opt_inet6.h
 SRCS+= uipc_mvec.c
 
 CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB}

Modified: head/sys/modules/cxgbe/iw_cxgbe/Makefile
==
--- head/sys/modules/cxgbe/iw_cxgbe/MakefileTue Apr 28 16:07:15 2020
(r360441)
+++ head/sys/modules/cxgbe/iw_cxgbe/MakefileTue Apr 28 16:09:18 2020
(r360442)
@@ -14,7 +14,7 @@ SRCS+=provider.c
 SRCS+= qp.c
 SRCS+= resource.c
 SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+= opt_inet.h opt_inet6.h opt_ktr.h opt_ofed.h opt_sched.h
+SRCS+= opt_inet.h opt_inet6.h opt_ktr.h opt_ofed.h
 
 CFLAGS+= -I${CXGBE} -I${SRCTOP}/sys/ofed/include -DLINUX_TYPES_DEFINED
 CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi

Modified: head/sys/modules/rdma/krping/Makefile
==
--- head/sys/modules/rdma/krping/Makefile   Tue Apr 28 16:07:15 2020
(r360441)
+++ head/sys/modules/rdma/krping/Makefile   Tue Apr 28 16:09:18 2020
(r360442)
@@ -4,7 +4,7 @@
 KMOD= krping
 SRCS= krping.c krping_dev.c getopt.c
 SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+=  opt_sched.h opt_inet.h opt_inet6.h
+SRCS+=  opt_inet.h opt_inet6.h
 CFLAGS+= -I${SRCTOP}/sys/ofed/include
 CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi
 CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include

Modified: head/sys/modules/sfxge/Makefile
==
--- head/sys/modules/sfxge/Makefile Tue Apr 28 16:07:15 2020
(r360441)
+++ head/sys/modules/sfxge/Makefile Tue Apr 28 16:09:18 2020
(r360442)
@@ -5,7 +5,7 @@ KMOD=   sfxge
 SFXGE= ${SRCTOP}/sys/dev/sfxge
 
 SRCS=  device_if.h bus_if.h pci_if.h
-SRCS+= opt_inet.h opt_inet6.h opt_sched.h opt_rss.h
+SRCS+= opt_inet.h opt_inet6.h opt_rss.h
 
 .PATH: ${SRCTOP}/sys/dev/sfxge
 SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360441 - head/usr.sbin/syslogd

2020-04-28 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 28 16:07:15 2020
New Revision: 360441
URL: https://svnweb.freebsd.org/changeset/base/360441

Log:
  Restore local kernel "prog" filtering lost in r332099.
  
  This behavior is most relevant for ipfw(4) as documented in syslog.conf(5).
  The recent addition of property-based regex filters in r359327 is a
  fine workaround for this but the behavior was present since 1997 and
  documented.
  
  This only fixes local matching of the "kernel program". It does not
  change the forwarded format at all. On the remote side it will still
  be "kernel: ipfw:" and not be parsed as a kernel message. This matches
  old behavior.
  
  MFC after:2 weeks
  Reviewed by:  markj
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D24286

Modified:
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Tue Apr 28 16:00:34 2020
(r360440)
+++ head/usr.sbin/syslogd/syslogd.c Tue Apr 28 16:07:15 2020
(r360441)
@@ -137,6 +137,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -206,6 +207,7 @@ static STAILQ_HEAD(, socklist) shead = STAILQ_HEAD_INI
 #defineIGN_CONS0x001   /* don't print on console */
 #defineSYNC_FILE   0x002   /* do fsync on file after printing */
 #defineMARK0x008   /* this message is a mark */
+#defineISKERNEL0x010   /* kernel generated message */
 
 /* Timestamps of log entries. */
 struct logtime {
@@ -1151,19 +1153,19 @@ parsemsg_rfc5424(const char *from, int pri, char *msg)
 }
 
 /*
- * Trims the application name ("TAG" in RFC 3164 terminology) and
- * process ID from a message if present.
+ * Returns the length of the application name ("TAG" in RFC 3164
+ * terminology) and process ID from a message if present.
  */
 static void
-parsemsg_rfc3164_app_name_procid(char **msg, const char **app_name,
-const char **procid) {
-   char *m, *app_name_begin, *procid_begin;
+parsemsg_rfc3164_get_app_name_procid(const char *msg, size_t 
*app_name_length_p,
+ptrdiff_t *procid_begin_offset_p, size_t *procid_length_p)
+{
+   const char *m, *procid_begin;
size_t app_name_length, procid_length;
 
-   m = *msg;
+   m = msg;
 
/* Application name. */
-   app_name_begin = m;
app_name_length = strspn(m,
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -1191,12 +1193,52 @@ parsemsg_rfc3164_app_name_procid(char **msg, const cha
if (m[0] != ':' || m[1] != ' ')
goto bad;
 
+   *app_name_length_p = app_name_length;
+   if (procid_begin_offset_p != NULL)
+   *procid_begin_offset_p =
+   procid_begin == NULL ? 0 : procid_begin - msg;
+   if (procid_length_p != NULL)
+   *procid_length_p = procid_length;
+   return;
+bad:
+   *app_name_length_p = 0;
+   if (procid_begin_offset_p != NULL)
+   *procid_begin_offset_p = 0;
+   if (procid_length_p != NULL)
+   *procid_length_p = 0;
+}
+
+/*
+ * Trims the application name ("TAG" in RFC 3164 terminology) and
+ * process ID from a message if present.
+ */
+static void
+parsemsg_rfc3164_app_name_procid(char **msg, const char **app_name,
+const char **procid)
+{
+   char *m, *app_name_begin, *procid_begin;
+   size_t app_name_length, procid_length;
+   ptrdiff_t procid_begin_offset;
+
+   m = *msg;
+   app_name_begin = m;
+
+   parsemsg_rfc3164_get_app_name_procid(app_name_begin, _name_length,
+   _begin_offset, _length);
+   if (app_name_length == 0)
+   goto bad;
+   procid_begin = procid_begin_offset == 0 ? NULL :
+   app_name_begin + procid_begin_offset;
+
/* Split strings from input. */
app_name_begin[app_name_length] = '\0';
-   if (procid_begin != 0)
+   m += app_name_length + 1;
+   if (procid_begin != NULL) {
procid_begin[procid_length] = '\0';
+   m += procid_length + 2;
+   }
 
-   *msg = m + 2;
+   *msg = m + 1;
*app_name = app_name_begin;
*procid = procid_begin;
return;
@@ -1401,7 +1443,7 @@ printsys(char *msg)
long n;
int flags, isprintf, pri;
 
-   flags = SYNC_FILE;  /* fsync after write */
+   flags = ISKERNEL | SYNC_FILE;   /* fsync after write */
p = msg;
pri = DEFSPRI;
isprintf = 1;
@@ -1551,7 +1593,7 @@ logmsg(int pri, const struct logtime *timestamp, const
struct filed *f;
size_t savedlen;
int fac, prilev;
-   char saved[MAXSVLINE];
+   char saved[MAXSVLINE], kernel_app_name[100];
 
dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n",
pri, flags, hostname, msg);
@@ -1576,6 

svn commit: r360139 - head/bin/sh

2020-04-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 21 00:37:55 2020
New Revision: 360139
URL: https://svnweb.freebsd.org/changeset/base/360139

Log:
  Fix build with NO_HISTORY set
  
  Reviewed by:  jilles
  Differential Revision:https://reviews.freebsd.org/D24458

Modified:
  head/bin/sh/histedit.c

Modified: head/bin/sh/histedit.c
==
--- head/bin/sh/histedit.c  Mon Apr 20 23:32:49 2020(r360138)
+++ head/bin/sh/histedit.c  Tue Apr 21 00:37:55 2020(r360139)
@@ -54,12 +54,12 @@ __FBSDID("$FreeBSD$");
 #include "main.h"
 #include "output.h"
 #include "mystring.h"
+#include "builtins.h"
 #ifndef NO_HISTORY
 #include "myhistedit.h"
 #include "error.h"
 #include "eval.h"
 #include "memalloc.h"
-#include "builtins.h"
 
 #define MAXHISTLOOPS   4   /* max recursions through fc */
 #define DEFEDITOR  "ed"/* default editor *should* be $EDITOR */
@@ -503,7 +503,7 @@ bindcmd(int argc, char **argv)
 #include "error.h"
 
 int
-histcmd(int argc, char **argv)
+histcmd(int argc __unused, char **argv __unused)
 {
 
error("not compiled with history support");
@@ -512,7 +512,7 @@ histcmd(int argc, char **argv)
 }
 
 int
-bindcmd(int argc, char **argv)
+bindcmd(int argc __unused, char **argv __unused)
 {
 
error("not compiled with line editing support");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb

2020-04-10 Thread Bryan Drewery
On 4/7/2020 3:37 AM, Rodney W. Grimes wrote:
>> Author: sobomax
>> Date: Tue Apr  7 02:46:22 2020
>> New Revision: 359685
>> URL: https://svnweb.freebsd.org/changeset/base/359685
>>
>> Log:
>>   Normalize deployment tools usage and definitions by putting into one place
>>   instead of sprinkling them out over many disjoint files. This is a 
>> follow-up
>>   to achieve the same goal in an incomplete rev.348521.
> I have concerns that this factoring out of 5 values that have not changed
> in 25 years is a pessimization, it is one more file that make has to
> open on each invocation.
> 
> 

The truth is that this additional file read is on top of hundreds of new
reads per directory in the past few years. It can suck on NFS but
otherwise this 1 change is very minor compared to other additions. One
big example is foo.o.depend for each foo.o. Or bmake doing
realpath(getcwd()) on every invocation. Improving those, or the bmake
job queue, or bmake's overuse of /bin/sh, would go a lot further than
the hit from this commit.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r359714 - stable/12/share/mk

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:44:37 2020
New Revision: 359714
URL: https://svnweb.freebsd.org/changeset/base/359714

Log:
  MFC r349729:
  
Consider *clean targets as non-build targets as well.

Modified:
  stable/12/share/mk/bsd.init.mk
  stable/12/share/mk/bsd.sys.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.init.mk
==
--- stable/12/share/mk/bsd.init.mk  Tue Apr  7 19:40:14 2020
(r359713)
+++ stable/12/share/mk/bsd.init.mk  Tue Apr  7 19:44:37 2020
(r359714)
@@ -58,11 +58,12 @@ $xGRP=  ${_gid}
 #   things like 'make all install' or 'make foo install'.
 # - non-build targets are called
 .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \
-${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*)
+${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean)
 _SKIP_BUILD=   not building at level 0
 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \
 ${.TARGETS:M*install*} == ${.TARGETS} || \
 ${.TARGETS:Mclean*} == ${.TARGETS} || \
+${.TARGETS:M*clean} == ${.TARGETS} || \
 ${.TARGETS:Mdestroy*} == ${.TARGETS} || \
 ${.TARGETS:Mobj} == ${.TARGETS} || \
 make(analyze) || make(print-dir)

Modified: stable/12/share/mk/bsd.sys.mk
==
--- stable/12/share/mk/bsd.sys.mk   Tue Apr  7 19:40:14 2020
(r359713)
+++ stable/12/share/mk/bsd.sys.mk   Tue Apr  7 19:44:37 2020
(r359714)
@@ -284,7 +284,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b
 .NOTMAIN: ${PHONY_NOTMAIN:Nall}
 
 .if ${MK_STAGING} != "no"
-.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*))
+.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean))
 _SKIP_STAGING?= yes
 .endif
 .if ${_SKIP_STAGING:Uno} == "yes"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359715 - stable/11/share/mk

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:44:40 2020
New Revision: 359715
URL: https://svnweb.freebsd.org/changeset/base/359715

Log:
  MFC r349729:
  
Consider *clean targets as non-build targets as well.

Modified:
  stable/11/share/mk/bsd.init.mk
  stable/11/share/mk/bsd.sys.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/mk/bsd.init.mk
==
--- stable/11/share/mk/bsd.init.mk  Tue Apr  7 19:44:37 2020
(r359714)
+++ stable/11/share/mk/bsd.init.mk  Tue Apr  7 19:44:40 2020
(r359715)
@@ -46,11 +46,12 @@ $xGRP=  ${_gid}
 #   things like 'make all install' or 'make foo install'.
 # - non-build targets are called
 .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \
-${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*)
+${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean)
 _SKIP_BUILD=   not building at level 0
 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \
 ${.TARGETS:M*install*} == ${.TARGETS} || \
 ${.TARGETS:Mclean*} == ${.TARGETS} || \
+${.TARGETS:M*clean} == ${.TARGETS} || \
 ${.TARGETS:Mdestroy*} == ${.TARGETS} || \
 make(obj) || make(analyze) || make(print-dir)
 # Skip building, but don't show a warning.

Modified: stable/11/share/mk/bsd.sys.mk
==
--- stable/11/share/mk/bsd.sys.mk   Tue Apr  7 19:44:37 2020
(r359714)
+++ stable/11/share/mk/bsd.sys.mk   Tue Apr  7 19:44:40 2020
(r359715)
@@ -244,7 +244,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b
 .NOTMAIN: ${PHONY_NOTMAIN:Nall}
 
 .if ${MK_STAGING} != "no"
-.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*))
+.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean))
 _SKIP_STAGING?= yes
 .endif
 .if ${_SKIP_STAGING:Uno} == "yes"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359712 - stable/12/share/mk

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:40:11 2020
New Revision: 359712
URL: https://svnweb.freebsd.org/changeset/base/359712

Log:
  MFC r353771:
  
Fix spelling of DPSRCS.

Modified:
  stable/12/share/mk/bsd.dep.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.dep.mk
==
--- stable/12/share/mk/bsd.dep.mk   Tue Apr  7 19:39:41 2020
(r359711)
+++ stable/12/share/mk/bsd.dep.mk   Tue Apr  7 19:40:11 2020
(r359712)
@@ -182,7 +182,7 @@ DEPEND_MP?= -MP
 # avoid collisions.
 DEPEND_FILTER= C,/,_,g
 DEPENDSRCS+=   ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
-DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
+DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${DPSRCS:M*.cxx} ${DPSRCS:M*.cpp} 
${DPSRCS:M*.cc}
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359713 - stable/11/share/mk

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:40:14 2020
New Revision: 359713
URL: https://svnweb.freebsd.org/changeset/base/359713

Log:
  MFC r353771:
  
Fix spelling of DPSRCS.

Modified:
  stable/11/share/mk/bsd.dep.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/mk/bsd.dep.mk
==
--- stable/11/share/mk/bsd.dep.mk   Tue Apr  7 19:40:11 2020
(r359712)
+++ stable/11/share/mk/bsd.dep.mk   Tue Apr  7 19:40:14 2020
(r359713)
@@ -177,7 +177,7 @@ DEPEND_MP?= -MP
 # avoid collisions.
 DEPEND_FILTER= C,/,_,g
 DEPENDSRCS=${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
-DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
+DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${DPSRCS:M*.cxx} ${DPSRCS:M*.cpp} 
${DPSRCS:M*.cc}
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:R:S,$,.o,}
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359711 - stable/11/sys/conf

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:39:41 2020
New Revision: 359711
URL: https://svnweb.freebsd.org/changeset/base/359711

Log:
  MFC r357353:
  
make all is needed to generate .depend.*

Modified:
  stable/11/sys/conf/kern.post.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/kern.post.mk
==
--- stable/11/sys/conf/kern.post.mk Tue Apr  7 19:39:08 2020
(r359710)
+++ stable/11/sys/conf/kern.post.mk Tue Apr  7 19:39:41 2020
(r359711)
@@ -313,7 +313,7 @@ kernel-cleandepend: .PHONY
 
 kernel-tags:
@ls .depend.* > /dev/null 2>&1 || \
-   { echo "you must make depend first"; exit 1; }
+   { echo "you must make all first"; exit 1; }
sh $S/conf/systags.sh
 
 kernel-install: .PHONY
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r359710 - stable/12/sys/conf

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 19:39:08 2020
New Revision: 359710
URL: https://svnweb.freebsd.org/changeset/base/359710

Log:
  MFC r357353:
  
make all is needed to generate .depend.*

Modified:
  stable/12/sys/conf/kern.post.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/kern.post.mk
==
--- stable/12/sys/conf/kern.post.mk Tue Apr  7 18:41:52 2020
(r359709)
+++ stable/12/sys/conf/kern.post.mk Tue Apr  7 19:39:08 2020
(r359710)
@@ -356,7 +356,7 @@ kernel-cleandepend: .PHONY
 
 kernel-tags:
@ls .depend.* > /dev/null 2>&1 || \
-   { echo "you must make depend first"; exit 1; }
+   { echo "you must make all first"; exit 1; }
sh $S/conf/systags.sh
 
 kernel-install: .PHONY
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r359705 - head/share/mk

2020-04-07 Thread Bryan Drewery
On 4/7/2020 10:13 AM, Kyle Evans wrote:
> On Tue, Apr 7, 2020 at 12:07 PM Bryan Drewery  wrote:
>>
>> Author: bdrewery
>> Date: Tue Apr  7 17:07:04 2020
>> New Revision: 359705
>> URL: https://svnweb.freebsd.org/changeset/base/359705
>>
>> Log:
>>   NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ.
>>
>>   Sponsored by: Dell EMC
>>   MFC after:2 weeks
>>
>> Modified:
>>   head/share/mk/bsd.init.mk
>>   head/share/mk/bsd.obj.mk
>>
> 
> Unrelated, but something else that's kinda funky:
> 
> universe13a% make -C stand -V .OBJDIR
> /scratch/tmp/kevans/obj/home/kevans/head/amd64.amd64/stand
> 
> But in a buildenv:
> universe13a% make TARGET_ARCH=armv7 buildenv
> Entering world for armv7:arm
> For ZSH you must run: export CPUTYPE=
> universe13a% make -C stand -V .OBJDIR
> [Creating objdir /scratch/tmp/kevans/obj/home/kevans/head/stand...]
> /scratch/tmp/kevans/obj/home/kevans/head/stand
> 
> Using buildenv with BUILDENV_SHELL="make -C stand -V .OBDJIR"
> *doesn't* reproduce it (objdir has arm.armv7 in it again).
> 
> I tried with both zsh (and export CPUTYPE=) and /bin/sh, but it seems
> to reproduce both ways.
> 
> Thanks,
> 
> Kyle Evans
> 

Discussed with Kyle on IRC. Turned out to be an 'export
MAKEOBJDIRPREFIX=/something' in ~/.profile.

I suggest something like this in the profile:

if [ -n "${BUILDENV}" ]; then
PS1="(buildenv) ${PS1}"
unset CPUTYPE
else
export MAKEOBJDIRPREFIX=/whatever
fi


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r359705 - head/share/mk

2020-04-07 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr  7 17:07:04 2020
New Revision: 359705
URL: https://svnweb.freebsd.org/changeset/base/359705

Log:
  NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ.
  
  Sponsored by: Dell EMC
  MFC after:2 weeks

Modified:
  head/share/mk/bsd.init.mk
  head/share/mk/bsd.obj.mk

Modified: head/share/mk/bsd.init.mk
==
--- head/share/mk/bsd.init.mk   Tue Apr  7 17:06:33 2020(r359704)
+++ head/share/mk/bsd.init.mk   Tue Apr  7 17:07:04 2020(r359705)
@@ -11,11 +11,9 @@ :
 .include 
 .-include "local.init.mk"
 
-.if ${MK_AUTO_OBJ} == "yes"
 # This is also done in bsd.obj.mk
 .if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR}
 .OBJDIR: ${.CURDIR}
-.endif
 .endif
 
 .if exists(${.CURDIR}/../Makefile.inc)

Modified: head/share/mk/bsd.obj.mk
==
--- head/share/mk/bsd.obj.mkTue Apr  7 17:06:33 2020(r359704)
+++ head/share/mk/bsd.obj.mkTue Apr  7 17:07:04 2020(r359705)
@@ -42,16 +42,16 @@
 :
 .include 
 
-.if ${MK_AUTO_OBJ} == "yes"
-# it is done by now
-objwarn: .PHONY
-obj: .PHONY
-CANONICALOBJDIR= ${.OBJDIR}
 # This is also done in bsd.init.mk
 .if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR}
 # but this makefile does not want it!
 .OBJDIR: ${.CURDIR}
 .endif
+.if ${MK_AUTO_OBJ} == "yes"
+# it is done by now
+objwarn: .PHONY
+obj: .PHONY
+CANONICALOBJDIR= ${.OBJDIR}
 # Handle special case where SRCS is full-pathed and requires
 # nested objdirs.  This duplicates some auto.obj.mk logic.
 .if (!empty(SRCS:M*/*) || !empty(DPSRCS:M*/*)) && \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r359681 - in head: . share/mk

2020-04-06 Thread Bryan Drewery
 not going to be defined here
outside of the tree. Adding :Uno will fix it. Keep in mind this current
change and the next will affect ports. It looks like by default clang
will always get these flags added on.

> +CFLAGS+=-nobuiltininc -idirafter ${COMPILER_RESOURCE_DIR}/include
> +.endif
> +.endif
> +
>  CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>-mllvm -simplifycfg-dup-ret
>  .if ${COMPILER_VERSION} >= 30500 && ${COMPILER_VERSION} < 30700
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r359475 - head/sys/vm

2020-03-30 Thread Bryan Drewery
Author: bdrewery
Date: Tue Mar 31 01:12:53 2020
New Revision: 359475
URL: https://svnweb.freebsd.org/changeset/base/359475

Log:
  Remove dead code leftover from r331018.
  
  Sponsored by: Dell EMC

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Mon Mar 30 23:29:53 2020(r359474)
+++ head/sys/vm/vm_page.c   Tue Mar 31 01:12:53 2020(r359475)
@@ -2048,8 +2048,6 @@ again:
if (vm_object_reserv(object) &&
(m = vm_reserv_alloc_page(object, pindex, domain, req, mpred)) !=
NULL) {
-   domain = vm_phys_domain(m);
-   vmd = VM_DOMAIN(domain);
goto found;
}
 #endif
@@ -2248,8 +2246,6 @@ again:
if (vm_object_reserv(object) &&
(m_ret = vm_reserv_alloc_contig(object, pindex, domain, req,
mpred, npages, low, high, alignment, boundary)) != NULL) {
-   domain = vm_phys_domain(m_ret);
-   vmd = VM_DOMAIN(domain);
goto found;
}
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bi

2020-03-23 Thread Bryan Drewery
On 3/23/2020 6:54 PM, Conrad Meyer wrote:
> On Mon, Mar 23, 2020 at 6:25 PM Bryan Drewery  wrote:
>>
>> On 3/23/2020 12:01 PM, Brooks Davis wrote:
>>> Author: brooks
>>> Date: Mon Mar 23 19:01:23 2020
>>> New Revision: 359260
>>> URL: https://svnweb.freebsd.org/changeset/base/359260
>>>
>>> Log:
>>>   Import the kyua test framework.
>>
>> Dumb question but are we allowed to modify this code without a google
>> contributor agreement? I was under the impression that the license was
>> restrictive in some regard like that.
> 
> Not a dumb question.  Yes, we're allowed to modify the code.  The
> license is just a boring BSD 3-clause:
> https://svnweb.freebsd.org/base/head/contrib/kyua/LICENSE?view=markup
> 
> The restrictions around Google contributor CLA only applied to
> submissions to Github.com/jmmv/kyua.  FreeBSD no longer considers jmmv
> (and thus, Google) upstream for ATF and Kyua.  Instead the projects
> are forked into the github.com/freebsd/ organization.
> 

Great. I wasn't far off then. Infeasible to modify it pre-fork but now
it's not a problem. Thanks.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r359260 - in head: contrib/kyua etc/mtree lib lib/kyua lib/kyua/cli lib/kyua/drivers lib/kyua/engine lib/kyua/model lib/kyua/store lib/kyua/utils share/mk tools/build/mk usr.bin usr.bi

2020-03-23 Thread Bryan Drewery
On 3/23/2020 12:01 PM, Brooks Davis wrote:
> Author: brooks
> Date: Mon Mar 23 19:01:23 2020
> New Revision: 359260
> URL: https://svnweb.freebsd.org/changeset/base/359260
> 
> Log:
>   Import the kyua test framework.
>   
>   Having kyua in the base system will simplify automated testing in CI and
>   eliminates bootstrapping issues on new platforms.
>   
>   The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT.
>   
>   Reviewed by:emaste
>   Obtained from:  CheriBSD
>   Sponsored by:   DARPA
>   Differential Revision:  https://reviews.freebsd.org/D24103

Dumb question but are we allowed to modify this code without a google
contributor agreement? I was under the impression that the license was
restrictive in some regard like that.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r359267 - in head: . share/mk

2020-03-23 Thread Bryan Drewery
On 3/23/2020 6:09 PM, Emmanuel Vadot wrote:
> Author: manu
> Date: Tue Mar 24 01:09:04 2020
> New Revision: 359267
> URL: https://svnweb.freebsd.org/changeset/base/359267
> 
> Log:
>   bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB
>   
>   If we're building an internal lib do not bother including bsd.incs.mk so we
>   will not install the headers.
>   This also "solves" a problem with pkgbase where a libXXX-development package
>   is created and due to how packages are created we add a dependency to a
>   libXXX package that doesn't exists.
>   
>   Reported by:pizzamig
>   Reviewed by:pizzamig bapt emaste
>   Differential Revision:  https://reviews.freebsd.org/D24166
> 
> Modified:
>   head/ObsoleteFiles.inc
>   head/share/mk/bsd.lib.mk
> 
> Modified: head/ObsoleteFiles.inc
> ==
> --- head/ObsoleteFiles.incTue Mar 24 01:08:06 2020(r359266)
> +++ head/ObsoleteFiles.incTue Mar 24 01:09:04 2020(r359267)
> @@ -36,6 +36,11 @@
>  #   xargs -n1 | sort | uniq -d;
>  # done
>  
> +# 20200323: INTERNALLIB don't install headers anymore
> +OLD_FILES+=/usr/include/libelftc.h
> +OLD_FILES+=/usr/include/libifconfig.h
> +OLD_FILES+=/usr/include/libpmcstat.h
> +

lib/libelftc/Makefile:INCS= libelftc.h
lib/libifconfig/Makefile:INCSDIR=   ${INCLUDEDIR}
lib/libifconfig/Makefile:INCS=  libifconfig.h
lib/libpmcstat/Makefile:INCS=   libpmcstat.h

This commit seems incomplete or wrong due to the leftover logic.


>  # 20200320: cx and ctau drivers retired
>  OLD_FILES+=usr/share/man/man4/ctau.4.gz
>  OLD_FILES+=usr/share/man/man4/cx.4.gz
> 
> Modified: head/share/mk/bsd.lib.mk
> ==
> --- head/share/mk/bsd.lib.mk  Tue Mar 24 01:08:06 2020(r359266)
> +++ head/share/mk/bsd.lib.mk  Tue Mar 24 01:09:04 2020(r359267)
> @@ -489,7 +489,10 @@ _libinstall:
>  .include 
>  .include 
>  .include 
> +#No need to install header for INTERNALLIB
> +.if !defined(INTERNALLIB)
>  .include 
> +.endif
>  .endif
>  
>  LINKOWN?=${LIBOWN}
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r357353 - head/sys/conf

2020-01-31 Thread Bryan Drewery
Author: bdrewery
Date: Fri Jan 31 21:08:33 2020
New Revision: 357353
URL: https://svnweb.freebsd.org/changeset/base/357353

Log:
  make all is needed to generate .depend.*
  
  PR:   241746
  X-MFC-With:   r357043
  MFC after:1 week

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Fri Jan 31 20:30:50 2020(r357352)
+++ head/sys/conf/kern.post.mk  Fri Jan 31 21:08:33 2020(r357353)
@@ -389,7 +389,7 @@ kernel-cleandepend: .PHONY
 
 kernel-tags:
@ls .depend.* > /dev/null 2>&1 || \
-   { echo "you must make depend first"; exit 1; }
+   { echo "you must make all first"; exit 1; }
sh $S/conf/systags.sh
 
 kernel-install: .PHONY
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356827 - head/share/mk

2020-01-17 Thread Bryan Drewery
Author: bdrewery
Date: Fri Jan 17 14:29:27 2020
New Revision: 356827
URL: https://svnweb.freebsd.org/changeset/base/356827

Log:
  META_MODE: Allow 'make all install' to work with filemon.
  
  Filemon will add the ability to ignore the cookie if the installed file is
  missing. Without filemon that's not possible though so if the cookie is 
present
  an the command unchanged then the install wouldn't run.
  
  Sponsored by: DellEMC
  MFC after:2 weeks

Modified:
  head/share/mk/src.sys.env.mk

Modified: head/share/mk/src.sys.env.mk
==
--- head/share/mk/src.sys.env.mkFri Jan 17 06:10:24 2020
(r356826)
+++ head/share/mk/src.sys.env.mkFri Jan 17 14:29:27 2020
(r356827)
@@ -61,8 +61,9 @@ MAKEOBJDIRPREFIX:=${_saveMAKEOBJDIRPREFIX}
 .include 
 
 # Top-level installs should not use meta mode as it may prevent installing
-# based on cookies.
-.if make(*install*) && ${.MAKE.LEVEL} == 0
+# based on cookies. It's fine with filemon though.
+.if !empty(META_MODE:Mnofilemon) && \
+  make(*install*) && ${.MAKE.LEVEL} == 0
 META_MODE= normal
 MK_META_MODE=  no
 .export MK_META_MODE
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356699 - stable/12/share/man/man5

2020-01-13 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jan 13 19:34:15 2020
New Revision: 356699
URL: https://svnweb.freebsd.org/changeset/base/356699

Log:
  Regen src.conf.5

Modified:
  stable/12/share/man/man5/src.conf.5

Modified: stable/12/share/man/man5/src.conf.5
==
--- stable/12/share/man/man5/src.conf.5 Mon Jan 13 19:33:26 2020
(r356698)
+++ stable/12/share/man/man5/src.conf.5 Mon Jan 13 19:34:15 2020
(r356699)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd October 28, 2019
+.Dd January 13, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -368,39 +368,6 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_LLVM_COV
 .El
-.Pp
-When set, these options are also in effect:
-.Pp
-.Bl -inset -compact
-.It Va WITHOUT_LLVM_TARGET_AARCH64
-(unless
-.Va WITH_LLVM_TARGET_AARCH64
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_ALL
-(unless
-.Va WITH_LLVM_TARGET_ALL
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_ARM
-(unless
-.Va WITH_LLVM_TARGET_ARM
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_MIPS
-(unless
-.Va WITH_LLVM_TARGET_MIPS
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_POWERPC
-(unless
-.Va WITH_LLVM_TARGET_POWERPC
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_SPARC
-(unless
-.Va WITH_LLVM_TARGET_SPARC
-is set explicitly)
-.It Va WITHOUT_LLVM_TARGET_X86
-(unless
-.Va WITH_LLVM_TARGET_X86
-is set explicitly)
-.El
 .It Va WITH_CLANG
 Set to build the Clang C/C++ compiler during the normal phase of the build.
 .Pp
@@ -1108,7 +1075,7 @@ The
 option should be used rather than this in most cases.
 .Pp
 This is a default setting on
-arm/arm, arm/armv6, riscv/riscv64 and sparc64/sparc64.
+arm/arm and arm/armv6.
 .It Va WITH_LLVM_TARGET_AARCH64
 Set to build LLVM target support for AArch64.
 The
@@ -1116,13 +1083,10 @@ The
 option should be used rather than this in most cases.
 .Pp
 This is a default setting on
-amd64/amd64, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and 
powerpc/powerpcspe.
+amd64/amd64, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64.
 .It Va WITHOUT_LLVM_TARGET_ALL
 Set to only build the required LLVM target support.
 This option is preferred to specific target support options.
-.Pp
-This is a default setting on
-riscv/riscv64 and sparc64/sparc64.
 When set, these options are also in effect:
 .Pp
 .Bl -inset -compact
@@ -1147,29 +,11 @@ is set explicitly)
 .Va WITH_LLVM_TARGET_SPARC
 is set explicitly)
 .El
-.It Va WITH_LLVM_TARGET_ALL
-Set to build support for all LLVM targets.
-This option is always applied to the bootstrap compiler for buildworld when
-LLVM is used.
-.Pp
-This is a default setting on
-amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITHOUT_LLVM_TARGET_ARM
 Set to not build LLVM target support for ARM.
 The
 .Va LLVM_TARGET_ALL
 option should be used rather than this in most cases.
-.Pp
-This is a default setting on
-riscv/riscv64 and sparc64/sparc64.
-.It Va WITH_LLVM_TARGET_ARM
-Set to build LLVM target support for ARM.
-The
-.Va LLVM_TARGET_ALL
-option should be used rather than this in most cases.
-.Pp
-This is a default setting on
-amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64 and powerpc/powerpcspe.
 .It Va WITH_LLVM_TARGET_BPF
 Set to build LLVM target support for BPF.
 The
@@ -1182,7 +1128,7 @@ The
 option should be used rather than this in most cases.
 .Pp
 This is a default setting on
-arm/arm, arm/armv6, riscv/riscv64 and sparc64/sparc64.
+arm/arm and arm/armv6.
 .It Va WITH_LLVM_TARGET_MIPS
 Set to build LLVM target support for MIPS.
 The
@@ -1190,7 +1136,7 @@ The
 option should be used rather than this in most cases.
 .Pp
 This is a default setting on
-amd64/amd64, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and 
powerpc/powerpcspe.
+amd64/amd64, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64.
 .It Va 

svn commit: r356698 - stable/11/usr.sbin/mergemaster

2020-01-13 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jan 13 19:33:26 2020
New Revision: 356698
URL: https://svnweb.freebsd.org/changeset/base/356698

Log:
  MFC r355379,r355381:
  
r355379:
  Run make in parallel.
r355381:
  Use full path to sysctl(8) since /sbin is not in PATH.

Modified:
  stable/11/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/mergemaster/mergemaster.sh
==
--- stable/11/usr.sbin/mergemaster/mergemaster.sh   Mon Jan 13 19:30:18 
2020(r356697)
+++ stable/11/usr.sbin/mergemaster/mergemaster.sh   Mon Jan 13 19:33:26 
2020(r356698)
@@ -487,6 +487,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR")
 
 # Setup make to use system files from SOURCEDIR
 MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON"
+MM_MAKE="${MM_MAKE} -j$(/sbin/sysctl -n hw.ncpu)"
 
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356697 - stable/12/usr.sbin/mergemaster

2020-01-13 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jan 13 19:30:18 2020
New Revision: 356697
URL: https://svnweb.freebsd.org/changeset/base/356697

Log:
  MFC r355379,r355381:
  
r355379:
  Run make in parallel.
r355381:
  Use full path to sysctl(8) since /sbin is not in PATH.

Modified:
  stable/12/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/mergemaster/mergemaster.sh
==
--- stable/12/usr.sbin/mergemaster/mergemaster.sh   Mon Jan 13 19:22:52 
2020(r356696)
+++ stable/12/usr.sbin/mergemaster/mergemaster.sh   Mon Jan 13 19:30:18 
2020(r356697)
@@ -508,6 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR")
 
 # Setup make to use system files from SOURCEDIR
 MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON"
+MM_MAKE="${MM_MAKE} -j$(/sbin/sysctl -n hw.ncpu)"
 
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356696 - stable/12/share/mk

2020-01-13 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jan 13 19:22:52 2020
New Revision: 356696
URL: https://svnweb.freebsd.org/changeset/base/356696

Log:
  MFC r355588:
  
Fix WITHOUT_CLANG build.
  
  PR:   240507

Modified:
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/src.opts.mk
==
--- stable/12/share/mk/src.opts.mk  Mon Jan 13 18:29:47 2020
(r356695)
+++ stable/12/share/mk/src.opts.mk  Mon Jan 13 19:22:52 2020
(r356696)
@@ -129,6 +129,7 @@ __DEFAULT_YES_OPTIONS = \
 LIBPTHREAD \
 LIBTHR \
 LLVM_COV \
+LLVM_TARGET_ALL \
 LOADER_GELI \
 LOADER_LUA \
 LOADER_OFW \
@@ -217,7 +218,6 @@ __DEFAULT_NO_OPTIONS = \
 # RIGHT option is disabled.
 __DEFAULT_DEPENDENT_OPTIONS= \
CLANG_FULL/CLANG \
-   LLVM_TARGET_ALL/CLANG \
LOADER_VERIEXEC/BEARSSL \
LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \
VERIEXEC/BEARSSL \
@@ -269,9 +269,9 @@ __LLVM_TARGETS= \
x86
 __LLVM_TARGET_FILT=C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/
 .for __llt in ${__LLVM_TARGETS}
-# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG.
+# Default enable the given TARGET's LLVM_TARGET support
 .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+__DEFAULT_YES_OPTIONS+=LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}
 # Disable other targets for arm and armv6, to work around "relocation truncated
 # to fit" errors with BFD ld, since libllvm.a will get too large to link.
 .elif ${__T} == "arm" || ${__T} == "armv6"
@@ -279,8 +279,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu}
 # aarch64 needs arm for -m32 support.
 .elif ${__TT} == "arm64" && ${__llt} == "arm"
 __DEFAULT_DEPENDENT_OPTIONS+=  LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
-# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
-# which is based on MK_CLANG.
+# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL.
 .else
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r354606 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc

2020-01-08 Thread Bryan Drewery
Do you plan to get this back in soon? I hope to see it before 12.2 if
possible. Is there some way I can help?

I'm interested in these changes in 5.2.1 (I think)
  - Properly trigger decay on tcache destroy.  (@interwq, @amosbird)
  - Fix tcache.flush.  (@interwq)
  - Fix a side effect caused by extent_max_active_fit combined with
decay-based purging, where freed extents can accumulate and not be
reused for an extended period of time.  (@interwq, @mpghf)

I have a test case where virtual memory was peaking at 275M on 4.x, 1GB
on 5.0.0, around 750M on 5.1.0, and finally 275M again on 5.2.0. The
5.0/5.1 versions appeared to be a widespread leak to us.

On 11/10/2019 9:06 PM, Jason Evans wrote:
> Author: jasone
> Date: Mon Nov 11 05:06:49 2019
> New Revision: 354606
> URL: https://svnweb.freebsd.org/changeset/base/354606
> 
> Log:
>   Revert r354605: Update jemalloc to version 5.2.1.
>   
>   Compilation fails for non-llvm-based platforms.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r356533 - in stable/11: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree

2020-01-08 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  9 01:17:01 2020
New Revision: 356533
URL: https://svnweb.freebsd.org/changeset/base/356533

Log:
  MFC r352261,r352262,r352265:
  
r352261:
  mtree: Fix -f -f not considering type changes.
r352262:
  mtree -c: Fix username logic when getlogin(3) fails.
r352265:
  mtree -O: Fix not descending on hash collisions
  
  Relnotes: yes

Modified:
  stable/11/contrib/mtree/create.c
  stable/11/contrib/mtree/only.c
  stable/11/contrib/mtree/specspec.c
  stable/11/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
  stable/11/usr.sbin/fmtree/specspec.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/mtree/create.c
==
--- stable/11/contrib/mtree/create.cThu Jan  9 01:14:26 2020
(r356532)
+++ stable/11/contrib/mtree/create.cThu Jan  9 01:17:01 2020
(r356533)
@@ -117,7 +117,7 @@ cwalk(FILE *fp)
host[sizeof(host) - 1] = '\0';
if ((user = getlogin()) == NULL) {
struct passwd *pw;
-   user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name :
+   user = (pw = getpwuid(getuid())) != NULL ? pw->pw_name :
"";
}
 

Modified: stable/11/contrib/mtree/only.c
==
--- stable/11/contrib/mtree/only.c  Thu Jan  9 01:14:26 2020
(r356532)
+++ stable/11/contrib/mtree/only.c  Thu Jan  9 01:17:01 2020
(r356533)
@@ -1,4 +1,4 @@
-/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $*/
+/* $NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #include 
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $");
+__RCSID("$NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $");
 #endif
 
 #include 
@@ -89,11 +89,14 @@ static void
 hash_insert(char *str, uint32_t h)
 {
struct hentry *e;
+   char *x;
 
if ((e = malloc(sizeof(*e))) == NULL)
mtree_err("memory allocation error");
+   if ((x = strdup(str)) == NULL)
+   mtree_err("memory allocation error");
 
-   e->str = str;
+   e->str = x;
e->hash = h;
e->next = table[h];
table[h] = e;
@@ -110,10 +113,7 @@ fill(char *str)
 
*ptr = '\0';
if (!hash_find(str, )) {
-   char *x = strdup(str);
-   if (x == NULL)
-   mtree_err("memory allocation error");
-   hash_insert(x, h);
+   hash_insert(str, h);
fill(str);
}
*ptr = '/';
@@ -135,6 +135,7 @@ load_only(const char *fname)
err(1, "Duplicate entry %s", line);
hash_insert(line, h);
fill(line);
+   free(line);
}
 
fclose(fp);

Modified: stable/11/contrib/mtree/specspec.c
==
--- stable/11/contrib/mtree/specspec.c  Thu Jan  9 01:14:26 2020
(r356532)
+++ stable/11/contrib/mtree/specspec.c  Thu Jan  9 01:17:01 2020
(r356533)
@@ -145,7 +145,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path)
return (1);
}
if (n1->type != n2->type) {
-   differs = 0;
+   differs = F_TYPE;
mismatch(n1, n2, differs, path);
return (1);
}

Modified: stable/11/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
==
--- stable/11/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.shThu Jan  9 
01:14:26 2020(r356532)
+++ stable/11/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.shThu Jan  9 
01:17:01 2020(r356533)
@@ -411,7 +411,42 @@ netbsd6_nonemptydir_body() 
FLAVOR=netbsd6 nonemptydir_body
 }
 
+atf_test_case mtree_specspec_type
+mtree_specspec_type_head()
+{
+   atf_set "descr" "Test that spec comparisons detect type changes"
+}
 
+mtree_specspec_type_body()
+{
+   mkdir testdir
+
+   touch testdir/bar
+   mtree -c -p testdir > mtree1.spec
+
+   if [ ! -f mtree1.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   rm -f testdir/bar
+   ln -s foo testdir/bar
+   # uid change is expected to be ignored as done in -C
+   chown -h operator testdir/bar
+   mtree -c -p testdir > mtree2.spec
+
+   if [ ! -f mtree2.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   atf_check -s ignore -o save:output \
+   -x "mtree -f mtree1.spec -f mtree2.spec"
+
+   if ! cut -f 3 output | egrep -q "bar file" || \
+   ! cut -f 3 output | egrep -q "bar link"; then
+   atf_fail "mtree did not detect type 

svn commit: r356532 - in stable/12: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree

2020-01-08 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jan  9 01:14:26 2020
New Revision: 356532
URL: https://svnweb.freebsd.org/changeset/base/356532

Log:
  MFC r352261,r352262,r352265:
  
r352261:
  mtree: Fix -f -f not considering type changes.
r352262:
  mtree -c: Fix username logic when getlogin(3) fails.
r352265:
  mtree -O: Fix not descending on hash collisions
  
  Relnotes: yes

Modified:
  stable/12/contrib/mtree/create.c
  stable/12/contrib/mtree/only.c
  stable/12/contrib/mtree/specspec.c
  stable/12/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
  stable/12/usr.sbin/fmtree/specspec.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/mtree/create.c
==
--- stable/12/contrib/mtree/create.cThu Jan  9 00:39:35 2020
(r356531)
+++ stable/12/contrib/mtree/create.cThu Jan  9 01:14:26 2020
(r356532)
@@ -117,7 +117,7 @@ cwalk(FILE *fp)
host[sizeof(host) - 1] = '\0';
if ((user = getlogin()) == NULL) {
struct passwd *pw;
-   user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name :
+   user = (pw = getpwuid(getuid())) != NULL ? pw->pw_name :
"";
}
 

Modified: stable/12/contrib/mtree/only.c
==
--- stable/12/contrib/mtree/only.c  Thu Jan  9 00:39:35 2020
(r356531)
+++ stable/12/contrib/mtree/only.c  Thu Jan  9 01:14:26 2020
(r356532)
@@ -1,4 +1,4 @@
-/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $*/
+/* $NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #include 
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $");
+__RCSID("$NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $");
 #endif
 
 #include 
@@ -89,11 +89,14 @@ static void
 hash_insert(char *str, uint32_t h)
 {
struct hentry *e;
+   char *x;
 
if ((e = malloc(sizeof(*e))) == NULL)
mtree_err("memory allocation error");
+   if ((x = strdup(str)) == NULL)
+   mtree_err("memory allocation error");
 
-   e->str = str;
+   e->str = x;
e->hash = h;
e->next = table[h];
table[h] = e;
@@ -110,10 +113,7 @@ fill(char *str)
 
*ptr = '\0';
if (!hash_find(str, )) {
-   char *x = strdup(str);
-   if (x == NULL)
-   mtree_err("memory allocation error");
-   hash_insert(x, h);
+   hash_insert(str, h);
fill(str);
}
*ptr = '/';
@@ -135,6 +135,7 @@ load_only(const char *fname)
err(1, "Duplicate entry %s", line);
hash_insert(line, h);
fill(line);
+   free(line);
}
 
fclose(fp);

Modified: stable/12/contrib/mtree/specspec.c
==
--- stable/12/contrib/mtree/specspec.c  Thu Jan  9 00:39:35 2020
(r356531)
+++ stable/12/contrib/mtree/specspec.c  Thu Jan  9 01:14:26 2020
(r356532)
@@ -145,7 +145,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path)
return (1);
}
if (n1->type != n2->type) {
-   differs = 0;
+   differs = F_TYPE;
mismatch(n1, n2, differs, path);
return (1);
}

Modified: stable/12/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
==
--- stable/12/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.shThu Jan  9 
00:39:35 2020(r356531)
+++ stable/12/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.shThu Jan  9 
01:14:26 2020(r356532)
@@ -411,7 +411,42 @@ netbsd6_nonemptydir_body() 
FLAVOR=netbsd6 nonemptydir_body
 }
 
+atf_test_case mtree_specspec_type
+mtree_specspec_type_head()
+{
+   atf_set "descr" "Test that spec comparisons detect type changes"
+}
 
+mtree_specspec_type_body()
+{
+   mkdir testdir
+
+   touch testdir/bar
+   mtree -c -p testdir > mtree1.spec
+
+   if [ ! -f mtree1.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   rm -f testdir/bar
+   ln -s foo testdir/bar
+   # uid change is expected to be ignored as done in -C
+   chown -h operator testdir/bar
+   mtree -c -p testdir > mtree2.spec
+
+   if [ ! -f mtree2.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   atf_check -s ignore -o save:output \
+   -x "mtree -f mtree1.spec -f mtree2.spec"
+
+   if ! cut -f 3 output | egrep -q "bar file" || \
+   ! cut -f 3 output | egrep -q "bar link"; then
+   atf_fail "mtree did not detect type 

svn commit: r356352 - head/tests/sys/aio

2020-01-04 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jan  4 18:59:46 2020
New Revision: 356352
URL: https://svnweb.freebsd.org/changeset/base/356352

Log:
  lio_listio_empty_nowait_thread sometimes does *not* hang.
  
  The other tests consistently do hang though.
  
  Sponsored by: DellEMC

Modified:
  head/tests/sys/aio/lio_test.c

Modified: head/tests/sys/aio/lio_test.c
==
--- head/tests/sys/aio/lio_test.c   Sat Jan  4 18:48:13 2020
(r356351)
+++ head/tests/sys/aio/lio_test.c   Sat Jan  4 18:59:46 2020
(r356352)
@@ -189,6 +189,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc)
struct aiocb *list = NULL;
struct sigevent sev;
 
+   atf_tc_skip("Sometimes hangs and sometimes passes");
atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends"
" asynchronous notification if nent==0");
ATF_REQUIRE_EQ(0, sem_init(, false, 0));
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r355609 - head

2019-12-12 Thread Bryan Drewery
On 12/11/2019 6:54 AM, Ed Maste wrote:
> Author: emaste
> Date: Wed Dec 11 14:54:29 2019
> New Revision: 355609
> URL: https://svnweb.freebsd.org/changeset/base/355609
> 
> Log:
>   Make NOCLEAN an error instead of a warning
>   
>   The warning was added in r289728 (over four years ago) and at that time
>   NO_CLEAN was already the correct spelling for over a decade.
>   
>   Make NOCLEAN an error as the next step to removing these backward
>   compatibility shims.
> 
> Modified:
>   head/Makefile.inc1
> 
> Modified: head/Makefile.inc1
> ==
> --- head/Makefile.inc1Wed Dec 11 14:28:13 2019(r355608)
> +++ head/Makefile.inc1Wed Dec 11 14:54:29 2019(r355609)
> @@ -458,8 +458,7 @@ SUBDIR+=etc
>  .endif   # !empty(SUBDIR_OVERRIDE)
>  
>  .if defined(NOCLEAN)
> -.warning NOCLEAN option is deprecated. Use NO_CLEAN instead.
> -NO_CLEAN=${NOCLEAN}
> +.error NOCLEAN option is deprecated. Use NO_CLEAN instead.
>  .endif
>  .if defined(NO_CLEANDIR)
>  CLEANDIR=clean cleandepend
> 

What ever happened to POLA?

Name 1 good reason this should be an .error?! Or even a .warning for
that matter.

The argument I keep hearing is "we have to maintain these 3 lines of
code", ok, well now it's just an annoyance to maintain with no benefit
to the user.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r355588 - head/share/mk

2019-12-10 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 10 18:50:50 2019
New Revision: 355588
URL: https://svnweb.freebsd.org/changeset/base/355588

Log:
  Fix WITHOUT_CLANG build.
  
  This decouples MK_LLVM_TARGET_ALL from MK_CLANG. It is fine if
  LLVM_TARGET_* are set even if MK_CLANG is disabled. It never
  made sense to depend MK_LLVM_TARGET_* to MK_CLANG (which I did
  in r335706).
  
  PR:   240507
  Reported by:  kevans, swills
  MFC after:2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Tue Dec 10 18:15:20 2019(r355587)
+++ head/share/mk/src.opts.mk   Tue Dec 10 18:50:50 2019(r355588)
@@ -128,6 +128,7 @@ __DEFAULT_YES_OPTIONS = \
 LIBPTHREAD \
 LIBTHR \
 LLVM_COV \
+LLVM_TARGET_ALL \
 LOADER_GELI \
 LOADER_LUA \
 LOADER_OFW \
@@ -219,7 +220,6 @@ __DEFAULT_NO_OPTIONS = \
 # RIGHT option is disabled.
 __DEFAULT_DEPENDENT_OPTIONS= \
CLANG_FULL/CLANG \
-   LLVM_TARGET_ALL/CLANG \
LOADER_VERIEXEC/BEARSSL \
LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \
VERIEXEC/BEARSSL \
@@ -281,9 +281,9 @@ __LLVM_TARGETS= \
x86
 __LLVM_TARGET_FILT=
C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/
 .for __llt in ${__LLVM_TARGETS}
-# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG.
+# Default enable the given TARGET's LLVM_TARGET support
 .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+__DEFAULT_YES_OPTIONS+=LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}
 # Disable other targets for arm, to work around "relocation truncated
 # to fit" errors with BFD ld, since libllvm.a will get too large to link.
 .elif ${__T} == "arm"
@@ -291,8 +291,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu}
 # aarch64 needs arm for -m32 support.
 .elif ${__TT} == "arm64" && ${__llt} == "arm"
 __DEFAULT_DEPENDENT_OPTIONS+=  LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
-# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
-# which is based on MK_CLANG.
+# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL.
 .else
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r355379 - head/usr.sbin/mergemaster

2019-12-03 Thread Bryan Drewery
On 12/3/2019 7:55 PM, O. Hartmann wrote:
> Am Wed, 4 Dec 2019 03:44:50 + (UTC)
> Bryan Drewery  schrieb:
> 
>> Author: bdrewery
>> Date: Wed Dec  4 03:44:50 2019
>> New Revision: 355379
>> URL: https://svnweb.freebsd.org/changeset/base/355379
> 
>> Log:
>>   Run make in parallel.
> 
>>   This is mostly targetting the 'installconfig' phase of 'distribution'
>>   which does a full tree walk.
> 
>>   MFC after:  2 weeks
> 
>> Modified:
>>   head/usr.sbin/mergemaster/mergemaster.sh
> 
>> Modified: head/usr.sbin/mergemaster/mergemaster.sh
>> ==
>> --- head/usr.sbin/mergemaster/mergemaster.sh Wed Dec  4 03:41:55 2019
>> (r355378)
>> +++ head/usr.sbin/mergemaster/mergemaster.sh Wed Dec  4 03:44:50 2019
>> (r355379)
>> @@ -508,6 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR")
> 
>>  # Setup make to use system files from SOURCEDIR
>>  MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON"
>> +MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)"
> 
>>  # Check DESTDIR against the mergemaster mtree database to see what
>>  # files the user changed from the reference files.
>> ___
>> svn-src-h...@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 
> Whatever I do, mergemaster does not work anymore after this commit:
> 
> [...]
> # mergemaster
> 
> /usr/sbin/mergemaster: sysctl: not found
> *** The directory specified for the temporary root environment,
> /var/tmp/temproot, exists.  This can be a security risk if untrusted
> users have access to the system.
> 
>   Use 'd' to delete the old /var/tmp/temproot and continue
>   Use 't' to select a new temporary root directory
>   Use 'e' to exit mergemaster
> 
>   Default is to use /var/tmp/temproot as is
> 
> How should I deal with this? [Use the existing /var/tmp/temproot] d
> 
>*** Deleting the old /var/tmp/temproot
> 
> *** Creating the temporary root environment in /var/tmp/temproot
>  *** /var/tmp/temproot ready for use
>  *** Creating and populating directory structure in /var/tmp/temproot
> 
> make: illegal argument to -j -- must be positive integer!
> 
>   *** FATAL ERROR: Cannot 'cd' to /usr/src and install files to
>   the temproot environment
> 
> 
>

Should be fixed in r355381. Sorry about that and forgetting to mention
your report credit.

I admit I didn't test this as I was annoyed with my upgrade being stuck
in mergemaster and know that each of these invocations is -j safe. What
a silly script to not include /sbin in PATH.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r355381 - head/usr.sbin/mergemaster

2019-12-03 Thread Bryan Drewery
Author: bdrewery
Date: Wed Dec  4 04:01:53 2019
New Revision: 355381
URL: https://svnweb.freebsd.org/changeset/base/355381

Log:
  Use full path to sysctl(8) since /sbin is not in PATH.
  
  X-MFC-With:   r355379
  MFC after:2 weeks

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shWed Dec  4 03:51:30 2019
(r355380)
+++ head/usr.sbin/mergemaster/mergemaster.shWed Dec  4 04:01:53 2019
(r355381)
@@ -508,7 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR")
 
 # Setup make to use system files from SOURCEDIR
 MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON"
-MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)"
+MM_MAKE="${MM_MAKE} -j$(/sbin/sysctl -n hw.ncpu)"
 
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r355379 - head/usr.sbin/mergemaster

2019-12-03 Thread Bryan Drewery
Author: bdrewery
Date: Wed Dec  4 03:44:50 2019
New Revision: 355379
URL: https://svnweb.freebsd.org/changeset/base/355379

Log:
  Run make in parallel.
  
  This is mostly targetting the 'installconfig' phase of 'distribution'
  which does a full tree walk.
  
  MFC after: 2 weeks

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shWed Dec  4 03:41:55 2019
(r355378)
+++ head/usr.sbin/mergemaster/mergemaster.shWed Dec  4 03:44:50 2019
(r355379)
@@ -508,6 +508,7 @@ SOURCEDIR=$(realpath "$SOURCEDIR")
 
 # Setup make to use system files from SOURCEDIR
 MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON"
+MM_MAKE="${MM_MAKE} -j$(sysctl -n hw.ncpu)"
 
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r354859 - head

2019-11-19 Thread Bryan Drewery
Author: bdrewery
Date: Tue Nov 19 16:40:46 2019
New Revision: 354859
URL: https://svnweb.freebsd.org/changeset/base/354859

Log:
  WITH_SYSTEM_LINKER: Fix rebuilding lld every time.
  
  This is due to LLD_REVISION_STRING being renamed to LLD_REVISION in
  r351442 and the value being moved to another location in r351965.
  
  `make test-system-linker` can be used to see the values being used here.
  
  Reported by:  ler

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Nov 19 16:29:47 2019(r354858)
+++ head/Makefile.inc1  Tue Nov 19 16:40:46 2019(r354859)
@@ -289,9 +289,9 @@ WANT_LINKER_TYPE=
 .if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \
 !make(test-system-compiler)
 .if ${WANT_LINKER_TYPE} == "lld"
-WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
+WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc
 WANT_LINKER_FREEBSD_VERSION!= \
-   awk '$$2 == "LLD_REVISION_STRING" {gsub(/"/, "", $$3); print $$3}' \
+   awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \
${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown
 WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
 WANT_LINKER_VERSION!= \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r353771 - head/share/mk

2019-10-19 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 19 21:44:33 2019
New Revision: 353771
URL: https://svnweb.freebsd.org/changeset/base/353771

Log:
  Fix spelling of DPSRCS.
  
  Submitted by: vangyzen
  Sponsored by: DellEMC
  MFC after:2 weeks

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkSat Oct 19 20:48:53 2019(r353770)
+++ head/share/mk/bsd.dep.mkSat Oct 19 21:44:33 2019(r353771)
@@ -195,7 +195,7 @@ DEPEND_FILTER=  C,/,_,g
 DEPENDOBJS+=   ${OBJS}
 .else
 DEPENDSRCS+=   ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
-DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
+DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${DPSRCS:M*.cxx} ${DPSRCS:M*.cpp} 
${DPSRCS:M*.cc}
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r353639 - head/share/mk

2019-10-16 Thread Bryan Drewery
On 10/16/2019 10:18 AM, Brooks Davis wrote:
> On Wed, Oct 16, 2019 at 01:20:36PM +, Warner Losh wrote:
>> Author: imp
>> Date: Wed Oct 16 13:20:36 2019
>> New Revision: 353639
>> URL: https://svnweb.freebsd.org/changeset/base/353639
>>
>> Log:
>>   bsd.compat.mk isn't setup to be included outside of Makefile.inc so 
>> comment it
>>   out here until that's sorted out. Otherwise the build is broken. when
>>   TARGET_ARCH isn't defined.
> 
> Thanks for committing this workaround.  I forgot to test bare builds (not
> buildworld/buildenv/...) because I almost always cross build (either for a
> different arch or targeting CURRENT from STABLE).
> 
> I'm currently testing a switch from TARGET_ARCH to MACHINE_ARCH and
> TARGET_CPUTYPE to CPUTYPE.
> 
> -- Brooks
> 

As a hack you could do
.if defined(SRCTOP)
.include 
.endif

Or rename it src.compat.mk and remove from Makefile and do
.sinclude 

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r352265 - head/contrib/mtree

2019-09-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep 12 20:46:46 2019
New Revision: 352265
URL: https://svnweb.freebsd.org/changeset/base/352265

Log:
  mtree -O: Fix not descending on hash collisions
  
  MFC after:2 weeks
  Obtained from:NetBSD (nakayama)

Modified:
  head/contrib/mtree/only.c

Modified: head/contrib/mtree/only.c
==
--- head/contrib/mtree/only.c   Thu Sep 12 20:15:04 2019(r352264)
+++ head/contrib/mtree/only.c   Thu Sep 12 20:46:46 2019(r352265)
@@ -1,4 +1,4 @@
-/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $*/
+/* $NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 #include 
 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $");
+__RCSID("$NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $");
 #endif
 
 #include 
@@ -89,11 +89,14 @@ static void
 hash_insert(char *str, uint32_t h)
 {
struct hentry *e;
+   char *x;
 
if ((e = malloc(sizeof(*e))) == NULL)
mtree_err("memory allocation error");
+   if ((x = strdup(str)) == NULL)
+   mtree_err("memory allocation error");
 
-   e->str = str;
+   e->str = x;
e->hash = h;
e->next = table[h];
table[h] = e;
@@ -110,10 +113,7 @@ fill(char *str)
 
*ptr = '\0';
if (!hash_find(str, )) {
-   char *x = strdup(str);
-   if (x == NULL)
-   mtree_err("memory allocation error");
-   hash_insert(x, h);
+   hash_insert(str, h);
fill(str);
}
*ptr = '/';
@@ -135,6 +135,7 @@ load_only(const char *fname)
err(1, "Duplicate entry %s", line);
hash_insert(line, h);
fill(line);
+   free(line);
}
 
fclose(fp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r352262 - head/contrib/mtree

2019-09-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep 12 18:51:59 2019
New Revision: 352262
URL: https://svnweb.freebsd.org/changeset/base/352262

Log:
  mtree -c: Fix username logic when getlogin(3) fails.
  
  Obtained from:NetBSD (Credit to Sascha Wildner with DragonFlyBSD)
  MFC after:2 weeks

Modified:
  head/contrib/mtree/create.c

Modified: head/contrib/mtree/create.c
==
--- head/contrib/mtree/create.c Thu Sep 12 18:44:48 2019(r352261)
+++ head/contrib/mtree/create.c Thu Sep 12 18:51:59 2019(r352262)
@@ -117,7 +117,7 @@ cwalk(FILE *fp)
host[sizeof(host) - 1] = '\0';
if ((user = getlogin()) == NULL) {
struct passwd *pw;
-   user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name :
+   user = (pw = getpwuid(getuid())) != NULL ? pw->pw_name :
"";
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r352261 - in head: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree

2019-09-12 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep 12 18:44:48 2019
New Revision: 352261
URL: https://svnweb.freebsd.org/changeset/base/352261

Log:
  mtree: Fix -f -f not considering type changes.
  
  This only lists the changed type and not other attributes so that it
  matches the behavior of -C as done in r66747 for fmtree. The NetBSD
  -ff implementation was copied from fmtree.
  
  Reviewed by:  imp
  MFC after:2 weeks
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D21623

Modified:
  head/contrib/mtree/specspec.c
  head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
  head/usr.sbin/fmtree/specspec.c

Modified: head/contrib/mtree/specspec.c
==
--- head/contrib/mtree/specspec.c   Thu Sep 12 18:37:26 2019
(r352260)
+++ head/contrib/mtree/specspec.c   Thu Sep 12 18:44:48 2019
(r352261)
@@ -145,7 +145,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path)
return (1);
}
if (n1->type != n2->type) {
-   differs = 0;
+   differs = F_TYPE;
mismatch(n1, n2, differs, path);
return (1);
}

Modified: head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
==
--- head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:37:26 
2019(r352260)
+++ head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:44:48 
2019(r352261)
@@ -411,7 +411,42 @@ netbsd6_nonemptydir_body() 
FLAVOR=netbsd6 nonemptydir_body
 }
 
+atf_test_case mtree_specspec_type
+mtree_specspec_type_head()
+{
+   atf_set "descr" "Test that spec comparisons detect type changes"
+}
 
+mtree_specspec_type_body()
+{
+   mkdir testdir
+
+   touch testdir/bar
+   mtree -c -p testdir > mtree1.spec
+
+   if [ ! -f mtree1.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   rm -f testdir/bar
+   ln -s foo testdir/bar
+   # uid change is expected to be ignored as done in -C
+   chown -h operator testdir/bar
+   mtree -c -p testdir > mtree2.spec
+
+   if [ ! -f mtree2.spec ]; then
+   atf_fail "mtree failed"
+   fi
+
+   atf_check -s ignore -o save:output \
+   -x "mtree -f mtree1.spec -f mtree2.spec"
+
+   if ! cut -f 3 output | egrep -q "bar file" || \
+   ! cut -f 3 output | egrep -q "bar link"; then
+   atf_fail "mtree did not detect type change"
+   fi
+}
+
 atf_init_test_cases()
 {
atf_add_test_case mtree_create
@@ -423,6 +458,7 @@ atf_init_test_cases()
atf_add_test_case mtree_ignore
atf_add_test_case mtree_merge
atf_add_test_case mtree_nonemptydir
+   atf_add_test_case mtree_specspec_type
 
atf_add_test_case netbsd6_create
atf_add_test_case netbsd6_check

Modified: head/usr.sbin/fmtree/specspec.c
==
--- head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:37:26 2019
(r352260)
+++ head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:44:48 2019
(r352261)
@@ -132,7 +132,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path)
return (1);
}
if (n1->type != n2->type) {
-   differs = 0;
+   differs = F_TYPE;
mismatch(n1, n2, differs, path);
return (1);
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351895 - stable/11/sys/modules/ocs_fc

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:39:13 2019
New Revision: 351895
URL: https://svnweb.freebsd.org/changeset/base/351895

Log:
  MFC r349005:
  
Don't delete .depend files outside of cleandepend.

Modified:
  stable/11/sys/modules/ocs_fc/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/modules/ocs_fc/Makefile
==
--- stable/11/sys/modules/ocs_fc/Makefile   Thu Sep  5 20:39:05 2019
(r351894)
+++ stable/11/sys/modules/ocs_fc/Makefile   Thu Sep  5 20:39:13 2019
(r351895)
@@ -41,6 +41,6 @@ SRCS += ocs_cam.c
 
 CINCS = -I. 
 
-CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.*
+CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.*
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351894 - stable/12/sys/modules/ocs_fc

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:39:05 2019
New Revision: 351894
URL: https://svnweb.freebsd.org/changeset/base/351894

Log:
  MFC r349005:
  
Don't delete .depend files outside of cleandepend.

Modified:
  stable/12/sys/modules/ocs_fc/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/modules/ocs_fc/Makefile
==
--- stable/12/sys/modules/ocs_fc/Makefile   Thu Sep  5 20:38:33 2019
(r351893)
+++ stable/12/sys/modules/ocs_fc/Makefile   Thu Sep  5 20:39:05 2019
(r351894)
@@ -41,6 +41,6 @@ SRCS += ocs_cam.c
 
 CINCS = -I. 
 
-CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.*
+CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.*
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351893 - stable/11/sys/conf

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:38:33 2019
New Revision: 351893
URL: https://svnweb.freebsd.org/changeset/base/351893

Log:
  MFC r347458:
  
Fix build race with machine links and genoffset.o.

Modified:
  stable/11/sys/conf/kern.post.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/kern.post.mk
==
--- stable/11/sys/conf/kern.post.mk Thu Sep  5 20:31:25 2019
(r351892)
+++ stable/11/sys/conf/kern.post.mk Thu Sep  5 20:38:33 2019
(r351893)
@@ -293,7 +293,7 @@ _ILINKS+= x86
 # Ensure that the link exists without depending on it when it exists.
 .for _link in ${_ILINKS}
 .if !exists(${.OBJDIR}/${_link})
-${SRCS} ${CLEAN:M*.o}: ${_link}
+${SRCS} ${DEPENDOBJS}: ${_link}
 .endif
 .endfor
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351892 - in stable/12/sys: conf modules/efirt

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:31:25 2019
New Revision: 351892
URL: https://svnweb.freebsd.org/changeset/base/351892

Log:
  MFC r347458,r348975,r348976:
  
r347458:
  Fix build race with machine links and genoffset.o.
r348975:
  Restore genassym.o to CLEANFILES.
r348976:
  Add missing DPSRCS entry for assym.inc.

Modified:
  stable/12/sys/conf/kern.post.mk
  stable/12/sys/conf/kmod.mk
  stable/12/sys/modules/efirt/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/conf/kern.post.mk
==
--- stable/12/sys/conf/kern.post.mk Thu Sep  5 20:27:44 2019
(r351891)
+++ stable/12/sys/conf/kern.post.mk Thu Sep  5 20:31:25 2019
(r351892)
@@ -329,7 +329,7 @@ _ILINKS+= x86
 # Ensure that debug info references the path in the source tree.
 .for _link in ${_ILINKS}
 .if !exists(${.OBJDIR}/${_link})
-${SRCS} ${CLEAN:M*.o}: ${_link}
+${SRCS} ${DEPENDOBJS}: ${_link}
 .endif
 .if defined(_MAP_DEBUG_PREFIX)
 .if ${_link} == "machine"

Modified: stable/12/sys/conf/kmod.mk
==
--- stable/12/sys/conf/kmod.mk  Thu Sep  5 20:27:44 2019(r351891)
+++ stable/12/sys/conf/kmod.mk  Thu Sep  5 20:31:25 2019(r351892)
@@ -476,7 +476,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS
 .endif
 
 .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc)
-CLEANFILES+=   assym.inc
+CLEANFILES+=   assym.inc genassym.o
 DEPENDOBJS+=   genassym.o
 DPSRCS+=   offset.inc
 .endif

Modified: stable/12/sys/modules/efirt/Makefile
==
--- stable/12/sys/modules/efirt/MakefileThu Sep  5 20:27:44 2019
(r351891)
+++ stable/12/sys/modules/efirt/MakefileThu Sep  5 20:31:25 2019
(r351892)
@@ -11,6 +11,7 @@ SRCS+=  device_if.h bus_if.h clock_if.h
 .if ${MACHINE_CPUARCH} == "amd64"
 SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h
 SRCS+= efirt_support.S
+DPSRCS+= assym.inc
 efirt_support.o:   efirt_support.S assym.inc
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351891 - stable/11/lib/libsysdecode

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:27:44 2019
New Revision: 351891
URL: https://svnweb.freebsd.org/changeset/base/351891

Log:
  MFC r339635,r350301,r350327,r351151:
  
r339635:
  Fix regex for extracting SHM_* values for libsysdecode
r350301:
  libsysdecode: add explicit dependencies on recently changed headers
r350327:
  libsysdecode: use the proper include directory
r351151:
  Rework r339635 to fix .depend.tables.h handling.

Modified:
  stable/11/lib/libsysdecode/Makefile
  stable/11/lib/libsysdecode/mktables
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libsysdecode/Makefile
==
--- stable/11/lib/libsysdecode/Makefile Thu Sep  5 20:26:20 2019
(r351890)
+++ stable/11/lib/libsysdecode/Makefile Thu Sep  5 20:27:44 2019
(r351891)
@@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \
sysdecode_mask.3 sysdecode_wait4_options.3 \
sysdecode_mask.3 sysdecode_wait6_options.3
 
-CLEANFILES= ioctl.c tables.h
+CLEANFILES= ioctl.c ioctl.c.tmp tables.h
 
 .if defined(COMPAT_32BIT)
 CPP+=  -m32

Modified: stable/11/lib/libsysdecode/mktables
==
--- stable/11/lib/libsysdecode/mktables Thu Sep  5 20:26:20 2019
(r351890)
+++ stable/11/lib/libsysdecode/mktables Thu Sep  5 20:27:44 2019
(r351891)
@@ -43,7 +43,8 @@ fi
 include_dir=$1
 if [ -n "$2" ]; then
output_file="$2"
-   exec > "$output_file"
+   output_tmp=$(mktemp -u)
+   exec > "$output_tmp"
 fi
 
 all_headers=
@@ -123,7 +124,7 @@ gen_table "rlimit"  "RLIMIT_[A-Z]+[[:space:]]+
 gen_table "rusage"  "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" 
"sys/resource.h"
 gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+"   
"sched.h"
 gen_table "sendfileflags"   "SF_[A-Z]+[[:space:]]+[0-9]+"  
"sys/socket.h"
-gen_table "shmatflags"  "SHM_[A-Z]+[[:space:]]+[0-9]{6}+"  
"sys/shm.h"
+gen_table "shmatflags"  "SHM_[A-Z]+[[:space:]]+[0-9]{6}"   
"sys/shm.h"
 gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+"
"sys/socket.h"
 gen_table "sigbuscode"  "BUS_[A-Z]+[[:space:]]+[0-9]+" 
"sys/signal.h"
 gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" 
"sys/signal.h"
@@ -167,9 +168,17 @@ fi
 
 # Generate a .depend file for our output file
 if [ -n "$output_file" ]; then
-   echo "$output_file: \\" > ".depend.$output_file"
-   echo "$all_headers" | tr ' ' '\n' | sort -u |
-   sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \
-   ".depend.$output_file"
-   echo >> ".depend.$output_file"
+   depend_tmp=$(mktemp -u)
+   {
+   echo "$output_file: \\"
+   echo "$all_headers" | tr ' ' '\n' | sort -u |
+   sed -e "s,^,$include_dir/," -e 's,$, \\,'
+   echo
+   } > "$depend_tmp"
+   if cmp -s "$output_tmp" "$output_file"; then
+   rm -f "$output_tmp" "$depend_tmp"
+   else
+   mv -f "$depend_tmp" ".depend.${output_file}"
+   mv -f "$output_tmp" "$output_file"
+   fi
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351890 - stable/12/lib/libsysdecode

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 20:26:20 2019
New Revision: 351890
URL: https://svnweb.freebsd.org/changeset/base/351890

Log:
  MFC r339635,r350301,r350327,r351151:
  
r339635:
  Fix regex for extracting SHM_* values for libsysdecode
r350301:
  libsysdecode: add explicit dependencies on recently changed headers
r350327:
  libsysdecode: use the proper include directory
r351151:
  Rework r339635 to fix .depend.tables.h handling.

Modified:
  stable/12/lib/libsysdecode/Makefile
  stable/12/lib/libsysdecode/mktables
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libsysdecode/Makefile
==
--- stable/12/lib/libsysdecode/Makefile Thu Sep  5 19:35:30 2019
(r351889)
+++ stable/12/lib/libsysdecode/Makefile Thu Sep  5 20:26:20 2019
(r351890)
@@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \
sysdecode_mask.3 sysdecode_wait4_options.3 \
sysdecode_mask.3 sysdecode_wait6_options.3
 
-CLEANFILES= ioctl.c tables.h
+CLEANFILES= ioctl.c ioctl.c.tmp tables.h
 
 .if defined(COMPAT_32BIT)
 CPP+=  -m32

Modified: stable/12/lib/libsysdecode/mktables
==
--- stable/12/lib/libsysdecode/mktables Thu Sep  5 19:35:30 2019
(r351889)
+++ stable/12/lib/libsysdecode/mktables Thu Sep  5 20:26:20 2019
(r351890)
@@ -43,7 +43,8 @@ fi
 include_dir=$1
 if [ -n "$2" ]; then
output_file="$2"
-   exec > "$output_file"
+   output_tmp=$(mktemp -u)
+   exec > "$output_tmp"
 fi
 
 all_headers=
@@ -123,7 +124,7 @@ gen_table "rlimit"  "RLIMIT_[A-Z]+[[:space:]]+
 gen_table "rusage"  "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" 
"sys/resource.h"
 gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+"   
"sched.h"
 gen_table "sendfileflags"   "SF_[A-Z]+[[:space:]]+[0-9]+"  
"sys/socket.h"
-gen_table "shmatflags"  "SHM_[A-Z]+[[:space:]]+[0-9]{6}+"  
"sys/shm.h"
+gen_table "shmatflags"  "SHM_[A-Z]+[[:space:]]+[0-9]{6}"   
"sys/shm.h"
 gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+"
"sys/socket.h"
 gen_table "sigbuscode"  "BUS_[A-Z]+[[:space:]]+[0-9]+" 
"sys/signal.h"
 gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" 
"sys/signal.h"
@@ -167,9 +168,17 @@ fi
 
 # Generate a .depend file for our output file
 if [ -n "$output_file" ]; then
-   echo "$output_file: \\" > ".depend.$output_file"
-   echo "$all_headers" | tr ' ' '\n' | sort -u |
-   sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \
-   ".depend.$output_file"
-   echo >> ".depend.$output_file"
+   depend_tmp=$(mktemp -u)
+   {
+   echo "$output_file: \\"
+   echo "$all_headers" | tr ' ' '\n' | sort -u |
+   sed -e "s,^,$include_dir/," -e 's,$, \\,'
+   echo
+   } > "$depend_tmp"
+   if cmp -s "$output_tmp" "$output_file"; then
+   rm -f "$output_tmp" "$depend_tmp"
+   else
+   mv -f "$depend_tmp" ".depend.${output_file}"
+   mv -f "$output_tmp" "$output_file"
+   fi
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351875 - in stable/12/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 17:20:20 2019
New Revision: 351875
URL: https://svnweb.freebsd.org/changeset/base/351875

Log:
  MFC r348979:
  
Stop using .OODATE for extracting firmware.

Modified:
  stable/12/sys/modules/iwmfw/Makefile.inc
  stable/12/sys/modules/iwnfw/Makefile.inc
  stable/12/sys/modules/mwlfw/Makefile
  stable/12/sys/modules/ralfw/Makefile.inc
  stable/12/sys/modules/rtwnfw/Makefile.inc
  stable/12/sys/modules/usb/rsufw/Makefile.inc
  stable/12/sys/modules/usb/runfw/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/modules/iwmfw/Makefile.inc
==
--- stable/12/sys/modules/iwmfw/Makefile.incThu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/iwmfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/12/sys/modules/iwnfw/Makefile.inc
==
--- stable/12/sys/modules/iwnfw/Makefile.incThu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/iwnfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/12/sys/modules/mwlfw/Makefile
==
--- stable/12/sys/modules/mwlfw/MakefileThu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/mwlfw/MakefileThu Sep  5 17:20:20 2019
(r351875)
@@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot
 CLEANFILES+= mw88W8363.fw mwlboot.fw
 
 mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 

Modified: stable/12/sys/modules/ralfw/Makefile.inc
==
--- stable/12/sys/modules/ralfw/Makefile.incThu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/ralfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
@@ -12,4 +12,4 @@ CLEANFILES+=  ${_FIRM}
 FIRMWS=${_FIRM}:${KMOD}
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/12/sys/modules/rtwnfw/Makefile.inc
==
--- stable/12/sys/modules/rtwnfw/Makefile.inc   Thu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/rtwnfw/Makefile.inc   Thu Sep  5 17:20:20 2019
(r351875)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:111
 # FIRMWARE_LICENSE=realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/12/sys/modules/usb/rsufw/Makefile.inc
==
--- stable/12/sys/modules/usb/rsufw/Makefile.incThu Sep  5 16:53:55 
2019(r351874)
+++ stable/12/sys/modules/usb/rsufw/Makefile.incThu Sep  5 17:20:20 
2019(r351875)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:120
 # FIRMWARE_LICENSE=realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/12/sys/modules/usb/runfw/Makefile
==
--- stable/12/sys/modules/usb/runfw/MakefileThu Sep  5 16:53:55 2019
(r351874)
+++ stable/12/sys/modules/usb/runfw/MakefileThu Sep  5 17:20:20 2019
(r351875)
@@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1
 CLEANFILES=run.fw
 
 run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351876 - in stable/11/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 17:20:24 2019
New Revision: 351876
URL: https://svnweb.freebsd.org/changeset/base/351876

Log:
  MFC r348979:
  
Stop using .OODATE for extracting firmware.

Modified:
  stable/11/sys/modules/iwmfw/Makefile.inc
  stable/11/sys/modules/iwnfw/Makefile.inc
  stable/11/sys/modules/mwlfw/Makefile
  stable/11/sys/modules/ralfw/Makefile.inc
  stable/11/sys/modules/rtwnfw/Makefile.inc
  stable/11/sys/modules/usb/rsufw/Makefile.inc
  stable/11/sys/modules/usb/runfw/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/modules/iwmfw/Makefile.inc
==
--- stable/11/sys/modules/iwmfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/iwmfw/Makefile.incThu Sep  5 17:20:24 2019
(r351876)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/11/sys/modules/iwnfw/Makefile.inc
==
--- stable/11/sys/modules/iwnfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/iwnfw/Makefile.incThu Sep  5 17:20:24 2019
(r351876)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/11/sys/modules/mwlfw/Makefile
==
--- stable/11/sys/modules/mwlfw/MakefileThu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/mwlfw/MakefileThu Sep  5 17:20:24 2019
(r351876)
@@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot
 CLEANFILES+= mw88W8363.fw mwlboot.fw
 
 mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 

Modified: stable/11/sys/modules/ralfw/Makefile.inc
==
--- stable/11/sys/modules/ralfw/Makefile.incThu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/ralfw/Makefile.incThu Sep  5 17:20:24 2019
(r351876)
@@ -12,4 +12,4 @@ CLEANFILES+=  ${_FIRM}
 FIRMWS=${_FIRM}:${KMOD}
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/11/sys/modules/rtwnfw/Makefile.inc
==
--- stable/11/sys/modules/rtwnfw/Makefile.inc   Thu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/rtwnfw/Makefile.inc   Thu Sep  5 17:20:24 2019
(r351876)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:111
 FIRMWARE_LICENSE=  realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/11/sys/modules/usb/rsufw/Makefile.inc
==
--- stable/11/sys/modules/usb/rsufw/Makefile.incThu Sep  5 17:20:20 
2019(r351875)
+++ stable/11/sys/modules/usb/rsufw/Makefile.incThu Sep  5 17:20:24 
2019(r351876)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:120
 # FIRMWARE_LICENSE=realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: stable/11/sys/modules/usb/runfw/Makefile
==
--- stable/11/sys/modules/usb/runfw/MakefileThu Sep  5 17:20:20 2019
(r351875)
+++ stable/11/sys/modules/usb/runfw/MakefileThu Sep  5 17:20:24 2019
(r351876)
@@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1
 CLEANFILES=run.fw
 
 run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351873 - stable/11/usr.bin/jot

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 16:53:34 2019
New Revision: 351873
URL: https://svnweb.freebsd.org/changeset/base/351873

Log:
  MFC r346255:
  
Fix 'jot -r 0 start end' to work.
  
  Relnotes: yes

Modified:
  stable/11/usr.bin/jot/jot.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/jot/jot.c
==
--- stable/11/usr.bin/jot/jot.c Thu Sep  5 16:52:55 2019(r351872)
+++ stable/11/usr.bin/jot/jot.c Thu Sep  5 16:53:34 2019(r351873)
@@ -242,12 +242,15 @@ main(int argc, char **argv)
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER:
-   if (reps == 0)
-   errx(1, "infinite sequences cannot be bounded");
-   else if (reps == 1)
-   s = 0.0;
-   else
-   s = (ender - begin) / (reps - 1);
+   if (!randomize) {
+   if (reps == 0)
+   errx(1, "infinite sequences cannot "
+   "be bounded");
+   else if (reps == 1)
+   s = 0.0;
+   else
+   s = (ender - begin) / (reps - 1);
+   }
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351872 - stable/12/usr.bin/jot

2019-09-05 Thread Bryan Drewery
Author: bdrewery
Date: Thu Sep  5 16:52:55 2019
New Revision: 351872
URL: https://svnweb.freebsd.org/changeset/base/351872

Log:
  MFC r346255:
  
Fix 'jot -r 0 start end' to work.
  
  Relnotes: yes

Modified:
  stable/12/usr.bin/jot/jot.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/jot/jot.c
==
--- stable/12/usr.bin/jot/jot.c Thu Sep  5 16:48:43 2019(r351871)
+++ stable/12/usr.bin/jot/jot.c Thu Sep  5 16:52:55 2019(r351872)
@@ -263,12 +263,15 @@ main(int argc, char **argv)
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER:
-   if (reps == 0)
-   errx(1, "infinite sequences cannot be bounded");
-   else if (reps == 1)
-   s = 0.0;
-   else
-   s = (ender - begin) / (reps - 1);
+   if (!randomize) {
+   if (reps == 0)
+   errx(1, "infinite sequences cannot "
+   "be bounded");
+   else if (reps == 1)
+   s = 0.0;
+   else
+   s = (ender - begin) / (reps - 1);
+   }
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351823 - head/share/mk

2019-09-04 Thread Bryan Drewery
Author: bdrewery
Date: Wed Sep  4 18:32:11 2019
New Revision: 351823
URL: https://svnweb.freebsd.org/changeset/base/351823

Log:
  PROGS: Build common sources before recursed PROGS_TARGETS as well when 
building.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Wed Sep  4 18:00:54 2019(r351822)
+++ head/share/mk/bsd.progs.mk  Wed Sep  4 18:32:11 2019(r351823)
@@ -92,6 +92,7 @@ $v =
 # handle being called [bsd.]progs.mk
 .include 
 
+.if !defined(_SKIP_BUILD)
 # Find common sources among the PROGS to depend on them before building
 # anything.  This allows parallelization without them each fighting over
 # the same objects.
@@ -118,6 +119,7 @@ _PROGS_COMMON_OBJS+=
${_PROGS_COMMON_SRCS:N*.[dhly]:${
 !empty(.MAKE.MODE:Mmeta)
 ${_PROGS_COMMON_OBJS}: .NOMETA
 .endif
+.endif
 
 .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
 # tell progs.mk we might want to install things
@@ -132,11 +134,6 @@ _PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS=
 PROGS_TARGETS+=cleandir cleanobj
 .endif
 
-# Ensure common objects are built before recursing.
-.if !empty(_PROGS_COMMON_OBJS)
-${PROGS}: ${_PROGS_COMMON_OBJS}
-.endif
-
 .for p in ${PROGS}
 .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p)
 # bsd.prog.mk may need to know this
@@ -144,7 +141,7 @@ x.$p= PROG_CXX=$p
 .endif
 
 # Main PROG target
-$p ${p}_p: .PHONY .MAKE
+$p ${p}_p: .PHONY .MAKE ${_PROGS_COMMON_OBJS}
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \
@@ -152,7 +149,7 @@ $p ${p}_p: .PHONY .MAKE
 
 # Pseudo targets for PROG, such as 'install'.
 .for t in ${PROGS_TARGETS:O:u}
-$p.$t: .PHONY .MAKE
+$p.$t: .PHONY .MAKE ${_PROGS_COMMON_OBJS}
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346255 - head/usr.bin/jot

2019-09-03 Thread Bryan Drewery
Author: bdrewery
Date: Tue Apr 16 00:41:22 2019
New Revision: 346255
URL: https://svnweb.freebsd.org/changeset/base/346255

Log:
  Fix 'jot -r 0 start end' to work.
  
  This allows an endless stream of random data within the given bounds.
  It already worked if a seed was provided as the 4th argument but not
  if one was left out.
  
  In collaboration with:jhb
  MFC after:2 weeks
  Relnotes: yes

Modified:
  head/usr.bin/jot/jot.c

Modified: head/usr.bin/jot/jot.c
==
--- head/usr.bin/jot/jot.c  Mon Apr 15 21:20:06 2019(r346254)
+++ head/usr.bin/jot/jot.c  Tue Apr 16 00:41:22 2019(r346255)
@@ -263,12 +263,15 @@ main(int argc, char **argv)
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER:
-   if (reps == 0)
-   errx(1, "infinite sequences cannot be bounded");
-   else if (reps == 1)
-   s = 0.0;
-   else
-   s = (ender - begin) / (reps - 1);
+   if (!randomize) {
+   if (reps == 0)
+   errx(1, "infinite sequences cannot "
+   "be bounded");
+   else if (reps == 1)
+   s = 0.0;
+   else
+   s = (ender - begin) / (reps - 1);
+   }
mask = 0;
break;
case HAVE_REPS | HAVE_BEGIN | HAVE_ENDER | HAVE_STEP:


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r351151 - head/lib/libsysdecode

2019-08-16 Thread Bryan Drewery
Author: bdrewery
Date: Fri Aug 16 22:34:10 2019
New Revision: 351151
URL: https://svnweb.freebsd.org/changeset/base/351151

Log:
  Rework r339635 to fix .depend.tables.h handling.
  
  Avoid touching the tables.h file unless it has changed to avoid unneeded
  rebuilds.
  
  Also revert r350301's explicit dependencies.
  
  Reviewed by:  emaste
  MFC after:2 weeks
  X-MFC-With:   r339635 (kevans request)
  PR:   238828
  Sponsored by: DellEMC
  Differential Revision:https://reviews.freebsd.org/D21295

Modified:
  head/lib/libsysdecode/Makefile
  head/lib/libsysdecode/mktables

Modified: head/lib/libsysdecode/Makefile
==
--- head/lib/libsysdecode/Makefile  Fri Aug 16 21:54:12 2019
(r351150)
+++ head/lib/libsysdecode/Makefile  Fri Aug 16 22:34:10 2019
(r351151)
@@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \
sysdecode_mask.3 sysdecode_wait4_options.3 \
sysdecode_mask.3 sysdecode_wait6_options.3
 
-CLEANFILES= ioctl.c ioctl.c.tmp tables.h tables.h.tmp
+CLEANFILES= ioctl.c ioctl.c.tmp tables.h
 
 .if defined(COMPAT_32BIT)
 CPP+=  -m32
@@ -123,11 +123,8 @@ CFLAGS.gcc.ioctl.c+= -Wno-redundant-decls
 CFLAGS.gcc+=   ${CFLAGS.gcc.${.IMPSRC}}
 
 DEPENDOBJS+=   tables.h
-incdir=${SYSROOT:U${DESTDIR}}${INCLUDEDIR}
-tables.h: mktables ${incdir}/netinet/in.h ${incdir}/netinet/tcp.h \
-${incdir}/netinet6/in6.h
-   sh ${.CURDIR}/mktables ${incdir} ${.TARGET}.tmp && \
-   mv -f ${.TARGET}.tmp ${.TARGET}
+tables.h: mktables
+   sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET}
 
 # mkioctls runs find(1) for headers so needs to rebuild every time.  This used
 # to be a hack only done in buildworld.

Modified: head/lib/libsysdecode/mktables
==
--- head/lib/libsysdecode/mktables  Fri Aug 16 21:54:12 2019
(r351150)
+++ head/lib/libsysdecode/mktables  Fri Aug 16 22:34:10 2019
(r351151)
@@ -43,7 +43,8 @@ fi
 include_dir=$1
 if [ -n "$2" ]; then
output_file="$2"
-   exec > "$output_file"
+   output_tmp=$(mktemp -u)
+   exec > "$output_tmp"
 fi
 
 all_headers=
@@ -167,9 +168,17 @@ fi
 
 # Generate a .depend file for our output file
 if [ -n "$output_file" ]; then
-   echo "$output_file: \\" > ".depend.$output_file"
-   echo "$all_headers" | tr ' ' '\n' | sort -u |
-   sed -e "s,^,$include_dir/," -e 's,$, \\,' >> \
-   ".depend.$output_file"
-   echo >> ".depend.$output_file"
+   depend_tmp=$(mktemp -u)
+   {
+   echo "$output_file: \\"
+   echo "$all_headers" | tr ' ' '\n' | sort -u |
+   sed -e "s,^,$include_dir/," -e 's,$, \\,'
+   echo
+   } > "$depend_tmp"
+   if cmp -s "$output_tmp" "$output_file"; then
+   rm -f "$output_tmp" "$depend_tmp"
+   else
+   mv -f "$depend_tmp" ".depend.${output_file}"
+   mv -f "$output_tmp" "$output_file"
+   fi
 fi
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r350005 - head/sys/kern

2019-07-31 Thread Bryan Drewery
On 7/31/19 12:42 PM, Konstantin Belousov wrote:
> On Wed, Jul 31, 2019 at 10:08:39AM -0700, Bryan Drewery wrote:
>> On 7/30/19 10:14 PM, Konstantin Belousov wrote:
>>> No, you should create a situation where the python process ends the endless
>>> loop, as reported.  Then, it should become killable by 9 with the first
>>> chunk only applied.
>>>
>>
>> I don't have an easy way to test that. kill -9 inside the loop didn't
>> work. Once the loop ended the process was done; it is very short lived
>> and the calling code is buried in Python I think.
> With only the umtxq_check_susp() chunk applied, you would wait for
> python to start looping, then verify that kill -9 works.
> 
> Anyway, I believe that the change is correct, and put the review at
> https://reviews.freebsd.org/D21124.  I will commit after it get some
> sanity checking by mentioned people.
> 

Right. I did that earlier and it did not work. I can try again shortly.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r350005 - head/sys/kern

2019-07-31 Thread Bryan Drewery
On 7/30/19 10:14 PM, Konstantin Belousov wrote:
> On Tue, Jul 30, 2019 at 08:40:28PM -0700, Bryan Drewery wrote:
>> This 2nd change alone (&& count1 == 0) was sufficient to fix the endless
>> loop problem.
> Good, thank you.
> 
>>
>> I am not sure how to test the umtxq_check_susp() change. Do I just need
>> to ptrace the process?
> 
> No, you should create a situation where the python process ends the endless
> loop, as reported.  Then, it should become killable by 9 with the first
> chunk only applied.
> 

I don't have an easy way to test that. kill -9 inside the loop didn't
work. Once the loop ended the process was done; it is very short lived
and the calling code is buried in Python I think.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r350005 - head/sys/kern

2019-07-30 Thread Bryan Drewery
On 7/30/19 4:27 PM, Konstantin Belousov wrote:
> On Wed, Jul 31, 2019 at 02:13:02AM +0300, Konstantin Belousov wrote:
>> On Tue, Jul 30, 2019 at 03:04:57PM -0700, Bryan Drewery wrote:
>>> On 7/15/2019 12:18 PM, Konstantin Belousov wrote:
>>>> Author: kib
>>>> Date: Mon Jul 15 19:18:25 2019
>>>> New Revision: 350005
>>>> URL: https://svnweb.freebsd.org/changeset/base/350005
>>>>
>>>> Log:
>>>>   In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on 
>>>> retry.
>>>>   
>>>
>>> Is this also needed in do_sem_wait()? A similar pattern seems to be there.
>> No, I do not think do_sem_wait() has similar issue, because the again label
>> does not re-get the key.
>>
>>>
>>> I ask because of what I referenced on IRC. I have some processes stuck
>>> in here from a 10.4 jail.
>>>
>>>> ~/git/poudriere # procstat -kk 1498
>>>>   PIDTID COMMTDNAME  KSTACK
>>>>  1498 100710 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101575 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101657 python2.7   -   
>>> ...
>>>> ~/git/poudriere # procstat -kk 1498
>>>>   PIDTID COMMTDNAME  KSTACK
>>>>  1498 100710 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101575 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101657 python2.7   -   do_sem_wait+0x1b6 
>>>> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101
>>> ...
>>>> ~/git/poudriere # procstat -kk 94392
>>>>   PIDTID COMMTDNAME  KSTACK
>>>> 94392 101815 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>> 94392 101816 python2.7   -   
>>>> __mtx_lock_sleep+0x118 __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 
>>>> do_sem_wait+0x161 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb 
>>>> fast_syscall_common+0x101
>>>> 94392 102076 python2.7   -   __mtx_lock_flags+0x94 
>>>> do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb 
>>>> fast_syscall_common+0x101
>>
>> Try this.  We should only retry casueword if it failed spuriously.
>>
>> diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
>> index bb998457975..6c914ab6f3e 100644
>> --- a/sys/kern/kern_umtx.c
>> +++ b/sys/kern/kern_umtx.c
>> @@ -3229,7 +3229,8 @@ do_sem_wait(struct thread *td, struct _usem *sem, 
>> struct _umtx_time *timeout)
>>  rv = casueword32(>_has_waiters, 0, , 1);
>>  if (rv == 0)
>>  rv1 = fueword32(>_count, );
>> -if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || rv == 1) {
>> +if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) ||
>> +(rv == 1 && count1 == 0)) {
>>  umtxq_lock(>uq_key);
>>  umtxq_unbusy(>uq_key);
>>  umtxq_remove(uq);
> 
> I think there is another problem, since even despite our intent of looping
> just because of casueword returned 1, the umtxq_check_susp() should have
> terminated the loop.  I believe the following update would fix that.
> 
> If you have time, can you please apply only 

Re: svn commit: r350005 - head/sys/kern

2019-07-30 Thread Bryan Drewery
On 7/30/2019 4:27 PM, Konstantin Belousov wrote:
> On Wed, Jul 31, 2019 at 02:13:02AM +0300, Konstantin Belousov wrote:
>> On Tue, Jul 30, 2019 at 03:04:57PM -0700, Bryan Drewery wrote:
>>> On 7/15/2019 12:18 PM, Konstantin Belousov wrote:
>>>> Author: kib
>>>> Date: Mon Jul 15 19:18:25 2019
>>>> New Revision: 350005
>>>> URL: https://svnweb.freebsd.org/changeset/base/350005
>>>>
>>>> Log:
>>>>   In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on 
>>>> retry.
>>>>   
>>>
>>> Is this also needed in do_sem_wait()? A similar pattern seems to be there.
>> No, I do not think do_sem_wait() has similar issue, because the again label
>> does not re-get the key.
>>
>>>
>>> I ask because of what I referenced on IRC. I have some processes stuck
>>> in here from a 10.4 jail.
>>>
>>>> ~/git/poudriere # procstat -kk 1498
>>>>   PIDTID COMMTDNAME  KSTACK
>>>>  1498 100710 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101575 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101657 python2.7   -   
>>> ...
>>>> ~/git/poudriere # procstat -kk 1498
>>>>   PIDTID COMMTDNAME  KSTACK
>>>>  1498 100710 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101575 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>>  1498 101657 python2.7   -   do_sem_wait+0x1b6 
>>>> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101
>>> ...
>>>> ~/git/poudriere # procstat -kk 94392
>>>>   PIDTID COMMTDNAME  KSTACK
>>>> 94392 101815 python2.7   -   mi_switch+0x174 
>>>> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
>>>> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
>>>> amd64_syscall+0x2bb fast_syscall_common+0x101
>>>> 94392 101816 python2.7   -   
>>>> __mtx_lock_sleep+0x118 __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 
>>>> do_sem_wait+0x161 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb 
>>>> fast_syscall_common+0x101
>>>> 94392 102076 python2.7   -   __mtx_lock_flags+0x94 
>>>> do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb 
>>>> fast_syscall_common+0x101
>>
>> Try this.  We should only retry casueword if it failed spuriously.
>>
>> diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
>> index bb998457975..6c914ab6f3e 100644
>> --- a/sys/kern/kern_umtx.c
>> +++ b/sys/kern/kern_umtx.c
>> @@ -3229,7 +3229,8 @@ do_sem_wait(struct thread *td, struct _usem *sem, 
>> struct _umtx_time *timeout)
>>  rv = casueword32(>_has_waiters, 0, , 1);
>>  if (rv == 0)
>>  rv1 = fueword32(>_count, );
>> -if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) || rv == 1) {
>> +if (rv == -1 || (rv == 0 && (rv1 == -1 || count != 0)) ||
>> +(rv == 1 && count1 == 0)) {
>>  umtxq_lock(>uq_key);
>>  umtxq_unbusy(>uq_key);
>>  umtxq_remove(uq);
> 
> I think there is another problem, since even despite our intent of looping
> just because of casueword returned 1, the umtxq_check_susp() should have
> terminated the loop.  I believe the following update would fix that.
> 
> If you have time, can you please apply only the umtxq_c

Re: svn commit: r350005 - head/sys/kern

2019-07-30 Thread Bryan Drewery
On 7/15/2019 12:18 PM, Konstantin Belousov wrote:
> Author: kib
> Date: Mon Jul 15 19:18:25 2019
> New Revision: 350005
> URL: https://svnweb.freebsd.org/changeset/base/350005
> 
> Log:
>   In do_sem2_wait(), balance umtx_key_get() with umtx_key_release() on retry.
>   

Is this also needed in do_sem_wait()? A similar pattern seems to be there.

I ask because of what I referenced on IRC. I have some processes stuck
in here from a 10.4 jail.

> ~/git/poudriere # procstat -kk 1498
>   PIDTID COMMTDNAME  KSTACK
>  1498 100710 python2.7   -   mi_switch+0x174 
> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
> amd64_syscall+0x2bb fast_syscall_common+0x101
>  1498 101575 python2.7   -   mi_switch+0x174 
> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
> amd64_syscall+0x2bb fast_syscall_common+0x101
>  1498 101657 python2.7   -   
...
> ~/git/poudriere # procstat -kk 1498
>   PIDTID COMMTDNAME  KSTACK
>  1498 100710 python2.7   -   mi_switch+0x174 
> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
> amd64_syscall+0x2bb fast_syscall_common+0x101
>  1498 101575 python2.7   -   mi_switch+0x174 
> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
> amd64_syscall+0x2bb fast_syscall_common+0x101
>  1498 101657 python2.7   -   do_sem_wait+0x1b6 
> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101
...
> ~/git/poudriere # procstat -kk 94392
>   PIDTID COMMTDNAME  KSTACK
> 94392 101815 python2.7   -   mi_switch+0x174 
> sleepq_switch+0x110 sleepq_catch_signals+0x417 sleepq_wait_sig+0xf 
> _sleep+0x2d0 umtxq_sleep+0x153 do_sem_wait+0x42c __umtx_op_sem_wait+0x6e 
> amd64_syscall+0x2bb fast_syscall_common+0x101
> 94392 101816 python2.7   -   __mtx_lock_sleep+0x118 
> __mtx_lock_flags+0x102 _sleep+0x334 umtxq_busy+0xb7 do_sem_wait+0x161 
> __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb fast_syscall_common+0x101
> 94392 102076 python2.7   -   __mtx_lock_flags+0x94 
> do_sem_wait+0x228 __umtx_op_sem_wait+0x6e amd64_syscall+0x2bb 
> fast_syscall_common+0x101




>   Reported by:ler
>   Bisected and reviewed by:   markj
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  12 days
> 
> Modified:
>   head/sys/kern/kern_umtx.c
> 
> Modified: head/sys/kern/kern_umtx.c
> ==
> --- head/sys/kern/kern_umtx.c Mon Jul 15 17:13:32 2019(r350004)
> +++ head/sys/kern/kern_umtx.c Mon Jul 15 19:18:25 2019(r350005)
> @@ -3316,14 +3316,13 @@ do_sem2_wait(struct thread *td, struct _usem2 *sem, st
>  
>   uq = td->td_umtxq;
>   flags = fuword32(>_flags);
> - error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), >uq_key);
> - if (error != 0)
> - return (error);
> -
>   if (timeout != NULL)
>   abs_timeout_init2(, timeout);
>  
>  again:
> + error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), >uq_key);
> + if (error != 0)
> + return (error);
>   umtxq_lock(>uq_key);
>   umtxq_busy(>uq_key);
>   umtxq_insert(uq);
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r350119 - head/share/mk

2019-07-18 Thread Bryan Drewery
Author: bdrewery
Date: Fri Jul 19 00:15:25 2019
New Revision: 350119
URL: https://svnweb.freebsd.org/changeset/base/350119

Log:
  Rework some multi-output target dependency handling.
  
  This reworks my last commit in r301285 to more closely match what was in
  r241298 (but reverted in r294878).
  
  This is addressing "missing .meta file" rebuilds but also ensuring that
  files are always generated when needed in each case.
  
  Note that this is not a complete rework of the problem areas identified
  in r301285 as most are "good enough" right now as the new pattern
  is too verbose. It's only worth making this current change where headers
  may be generated in the INCS list; where missing .meta file rebuilds are
  spotted.
  
  --- Technical details follow ---
  
  Several attempts to deal with this problem of multi-output targets, with and
  without META MODE, were explained in r241298, r294878, and r301285.
  
  The general problem is with multi-output targets such as:
  foo.c foo.h:
  touch foo.c foo.h
  foo.c foo.h:
  touch foo.c
  touch foo.h
  foo.c foo.h: foo.in
  ./generator ${.ALLSRC}
  
  This pattern is problematic in jobs mode as both files end up being
  built concurrently and leads to races. With META MODE it is worse
  as both targets end up rebuilding if they lack a .meta file. So the
  generator is force built twice even though it is only needed once.
  There are also problems in that 'make foo.h' may be ran before 'make foo.c';
  The order of make generating the targets is not guaranteed.
  
  An older attempted workaround to this (discussed in r294878) was:
  foo.h: foo.c
  foo.c: foo.in
  ./generator ${.ALLSRC}
  This appears fine except that if foo.h is missing and foo.c exists then
  foo.h will never be regenerated. This pattern is close to the solution
  in this commit though:
  
  foo.h: foo.c .NOMETA
  .if !exists(foo.h)
  foo.c: .PHONY .META
  .endif
  foo.c: foo.in
  ./generator ${.ALLSRC}
  
  There's 2 differences here:
  1. foo.h will never expect to have a .meta file since the foo.c target
 will generate both and own the .meta file.
  2. If foo.h does not exist then it needs to force foo.c to be rebuilt
 with .PHONY. That normally disables META MODE though so .META is
 given to tell bmake we do really expect a .meta file.
  
  This pattern cannot work with implicit suffix rules since the .c and .h files
  may be generated at different times (buildincludes vs depend/all).
  
  Sponsored by: Dell EMC
  MFC after:2 weeks

Modified:
  head/share/mk/bsd.dep.mk
  head/share/mk/bsd.snmpmod.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkThu Jul 18 21:58:51 2019(r350118)
+++ head/share/mk/bsd.dep.mkFri Jul 19 00:15:25 2019(r350119)
@@ -121,17 +121,27 @@ CLEANFILES+= ${_LC}
 SRCS:= ${SRCS:S/${_YSRC}/${_YC}/}
 CLEANFILES+= ${_YC}
 .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h)
-.ORDER: ${_YC} y.tab.h
-y.tab.h: .NOMETA
-${_YC} y.tab.h: ${_YSRC}
+# Multi-output targets both expect a .meta file and will fight over it. Only
+# allow it on the .c file instead.
+y.tab.h: ${_YC} .NOMETA
+# Force rebuild the .c file if any of its other outputs are missing.
+.if !exists(y.tab.h)
+${_YC}: .PHONY .META
+.endif
+${_YC}: ${_YSRC}
${YACC} ${YFLAGS} ${.ALLSRC}
cp y.tab.c ${_YC}
 CLEANFILES+= y.tab.c y.tab.h
 .elif !empty(YFLAGS:M-d)
 .for _YH in ${_YC:R}.h
-.ORDER: ${_YC} ${_YH}
-${_YH}: .NOMETA
-${_YC} ${_YH}: ${_YSRC}
+# Multi-output targets both expect a .meta file and will fight over it. Only
+# allow it on the .c file instead.
+${_YH}: ${_YC} .NOMETA
+# Force rebuild the .c file if any of its other outputs are missing.
+.if !exists(${_YH})
+${_YC}: .PHONY .META
+.endif
+${_YC}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
 SRCS+= ${_YH}
 CLEANFILES+= ${_YH}

Modified: head/share/mk/bsd.snmpmod.mk
==
--- head/share/mk/bsd.snmpmod.mkThu Jul 18 21:58:51 2019
(r350118)
+++ head/share/mk/bsd.snmpmod.mkFri Jul 19 00:15:25 2019
(r350119)
@@ -12,9 +12,14 @@ GENSNMPTREEFLAGS+=   -I${SHAREDIR}/snmpdefs
 ${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS}
cat ${.ALLSRC} | gensnmptree ${GENSNMPTREEFLAGS} -e ${XSYM} > ${.TARGET}
 
-.ORDER: ${MOD}_tree.c ${MOD}_tree.h
-${MOD}_tree.h: .NOMETA
-${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
+# Multi-output targets both expect a .meta file and will fight over it. Only
+# allow it on the .c file instead.
+${MOD}_tree.h: ${MOD}_tree.c .NOMETA
+# Force rebuild the .c file if any of its other outputs are missing.
+.if !exists(${MOD}_tree.h)
+${MOD}_tree.c: .PHONY .META
+.endif

svn commit: r349729 - head/share/mk

2019-07-04 Thread Bryan Drewery
Author: bdrewery
Date: Thu Jul  4 14:51:44 2019
New Revision: 349729
URL: https://svnweb.freebsd.org/changeset/base/349729

Log:
  Consider *clean targets as non-build targets as well.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.init.mk
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.init.mk
==
--- head/share/mk/bsd.init.mk   Thu Jul  4 14:15:04 2019(r349728)
+++ head/share/mk/bsd.init.mk   Thu Jul  4 14:51:44 2019(r349729)
@@ -58,11 +58,12 @@ $xGRP=  ${_gid}
 #   things like 'make all install' or 'make foo install'.
 # - non-build targets are called
 .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \
-${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*)
+${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean)
 _SKIP_BUILD=   not building at level 0
 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \
 ${.TARGETS:M*install*} == ${.TARGETS} || \
 ${.TARGETS:Mclean*} == ${.TARGETS} || \
+${.TARGETS:M*clean} == ${.TARGETS} || \
 ${.TARGETS:Mdestroy*} == ${.TARGETS} || \
 ${.TARGETS:Mobj} == ${.TARGETS} || \
 make(analyze) || make(print-dir)

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkThu Jul  4 14:15:04 2019(r349728)
+++ head/share/mk/bsd.sys.mkThu Jul  4 14:51:44 2019(r349729)
@@ -284,7 +284,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b
 .NOTMAIN: ${PHONY_NOTMAIN:Nall}
 
 .if ${MK_STAGING} != "no"
-.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*))
+.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean))
 _SKIP_STAGING?= yes
 .endif
 .if ${_SKIP_STAGING:Uno} == "yes"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349202 - head/share/mk

2019-06-19 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 19 19:19:37 2019
New Revision: 349202
URL: https://svnweb.freebsd.org/changeset/base/349202

Log:
  Follow-up r349065: Fix .TARGET flag ambiguity with PROGS which broke MK_TESTS.
  
  X-MFC-With:   r349065
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkWed Jun 19 18:47:44 2019(r349201)
+++ head/share/mk/bsd.sys.mkWed Jun 19 19:19:37 2019(r349202)
@@ -234,7 +234,6 @@ DEBUG_FILES_CFLAGS?= -g
 .if ${MK_WARNS} != "no"
 CFLAGS+=   ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}}
 CFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}
-CFLAGS+=   ${CWARNFLAGS.${.TARGET:T}}
 .endif
 
 CFLAGS+=${CFLAGS.${COMPILER_TYPE}}
@@ -245,14 +244,23 @@ AFLAGS+=  ${AFLAGS.${.TARGET:T}}
 ACFLAGS+=  ${ACFLAGS.${.IMPSRC:T}}
 ACFLAGS+=  ${ACFLAGS.${.TARGET:T}}
 CFLAGS+=   ${CFLAGS.${.IMPSRC:T}}
-CFLAGS+=   ${CFLAGS.${.TARGET:T}}
 CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}}
-CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}}
 
 LDFLAGS+=  ${LDFLAGS.${LINKER_TYPE}}
+
+# Only allow .TARGET when not using PROGS as it has the same syntax
+# per PROG which is ambiguous with this syntax. This is only needed
+# for PROG_VARS vars.
+.if !defined(_RECURSING_PROGS)
+.if ${MK_WARNS} != "no"
+CFLAGS+=   ${CWARNFLAGS.${.TARGET:T}}
+.endif
+CFLAGS+=   ${CFLAGS.${.TARGET:T}}
+CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}}
 LDFLAGS+=  ${LDFLAGS.${.TARGET:T}}
 LDADD+=${LDADD.${.TARGET:T}}
 LIBADD+=   ${LIBADD.${.TARGET:T}}
+.endif
 
 .if defined(SRCTOP)
 # Prevent rebuilding during install to support read-only objdirs.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349179 - head/share/mk

2019-06-18 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jun 18 22:00:38 2019
New Revision: 349179
URL: https://svnweb.freebsd.org/changeset/base/349179

Log:
  Rework r349061: Don't apply guessed dependencies if there is a custom target.
  
  This is still targeting bin/sh cyclic dependency issues.  Only apply
  guessed dependencies that are explicitly set for an object (which
  gnu/lib/cc/cc_tools needs) and if no custom target exists with its
  own dependencies.
  
  This was manifesting as a missing yacc.h in usr.bin/mkesdb_static when
  built without -j (or -B). No actual yacc.h dependency ordering was
  defined but with -j it got lucky and built fine.
  
  Before r349061 the behavior was different for META_MODE but that logic
  difference isn't needed.
  
  X-MFC-With:   r349061
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkTue Jun 18 21:05:10 2019(r349178)
+++ head/share/mk/bsd.dep.mkTue Jun 18 22:00:38 2019(r349179)
@@ -264,7 +264,9 @@ _depfile=   ${.OBJDIR}/${_dep_obj}
 # - For meta mode we still need to know which file to depend on to avoid
 #   ambiguous suffix transformation rules from .PATH.  Meta mode does not
 #   use .depend files when filemon is in use.
-${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
+.if !target(${__obj})
+${__obj}: ${OBJS_DEPEND_GUESS}
+.endif
 ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
 .endif # !exists(${_depfile}) || defined(_meta_filemon)
 .endfor
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349099 - head/share/man/man4

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sun Jun 16 05:12:17 2019
New Revision: 349099
URL: https://svnweb.freebsd.org/changeset/base/349099

Log:
  symlinkat(2) is not covered.

Modified:
  head/share/man/man4/filemon.4

Modified: head/share/man/man4/filemon.4
==
--- head/share/man/man4/filemon.4   Sun Jun 16 03:06:05 2019
(r349098)
+++ head/share/man/man4/filemon.4   Sun Jun 16 05:12:17 2019
(r349099)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2016
+.Dd June 15, 2019
 .Dt FILEMON 4
 .Os
 .Sh NAME
@@ -79,8 +79,7 @@ The next log entry may be lacking an absolute path or 
 .It Ql L
 .Xr link 2 ,
 .Xr linkat 2 ,
-.Xr symlink 2 ,
-.Xr symlinkat 2
+.Xr symlink 2
 .It Ql M
 .Xr rename 2
 .It Ql R
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r349069 - head/gnu/lib/csu

2019-06-15 Thread Bryan Drewery
On 6/15/2019 10:08 AM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Sat Jun 15 17:08:39 2019
> New Revision: 349069
> URL: https://svnweb.freebsd.org/changeset/base/349069
> 
> Log:
>   csu: Add proper .depend tracking for each object.
>   
>   This doesn't appear to have ever worked. After a .depend is generated
>   there will be duplicate .c dependencies so only use the first one.
>   

Oops. This 2nd paragraph was really from r349067 before some rebasing.


-- 
Regards,
Bryan Drewery
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349068 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:35 2019
New Revision: 349068
URL: https://svnweb.freebsd.org/changeset/base/349068

Log:
  Allow DEPENDOBJS/DEPENDSRCS to work with only OBJS set and no SRCS.
  
  Default to tracking .depend.* for OBJS rather than SRCS.
  
  This helps cover some special case builds like gnu/lib/csu which
  do more of a PROGS-like thing with bsd.prog.mk.
  
  It is possible this causes out-of-tree Makefiles to have problems if they use
  this pattern:
foo.o: foo.c
${CC} -o ${.TARGET} ${.ALLSRC}
  This may cause multiple source files to be compiled due to finding the
  'foo.o: foo.c' dependency both in the Makefile at the .depend file. Or
  it may try compiling headers. This can be worked around by either of these:
foo.o: foo.c
${CC} -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
  Or
foo.o: foo.c
${CC} -o ${.TARGET} ${.CURDIR}/foo.c
  In the latter case the ${.CURDIR} may need to be a different path. The
  first case covers automatically using .PATH.
  
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkSat Jun 15 17:08:32 2019(r349067)
+++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:35 2019(r349068)
@@ -173,19 +173,23 @@ ${_D}.nossppico: ${_DSRC} ${SOBJS:S/^${_D}.nossppico$/
 .endif
 .endfor
 .endfor
+.endif # defined(SRCS)
 
-
 .if ${MAKE_VERSION} < 20160220
 DEPEND_MP?=-MP
 .endif
 # Handle OBJS=../somefile.o hacks.  Just replace '/' rather than use :T to
 # avoid collisions.
 DEPEND_FILTER= C,/,_,g
+.if !empty(OBJS)
+DEPENDOBJS+=   ${OBJS}
+.else
 DEPENDSRCS+=   ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
 DEPENDSRCS+=   ${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
+.endif # !empty(OBJS)
 .if !empty(DEPENDOBJS)
 DEPENDFILES+=  ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
 .endif
@@ -215,7 +219,6 @@ CFLAGS+=${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS
 .endif
 .endfor
 .endif # !defined(_meta_filemon)
-.endif # defined(SRCS)
 
 .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.DEPENDFILE} != "/dev/null"
 # Prevent meta.autodep.mk from tracking "local dependencies".
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349069 - head/gnu/lib/csu

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:39 2019
New Revision: 349069
URL: https://svnweb.freebsd.org/changeset/base/349069

Log:
  csu: Add proper .depend tracking for each object.
  
  This doesn't appear to have ever worked. After a .depend is generated
  there will be duplicate .c dependencies so only use the first one.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/gnu/lib/csu/Makefile

Modified: head/gnu/lib/csu/Makefile
==
--- head/gnu/lib/csu/Makefile   Sat Jun 15 17:08:35 2019(r349068)
+++ head/gnu/lib/csu/Makefile   Sat Jun 15 17:08:39 2019(r349069)
@@ -14,6 +14,7 @@ CCDIR=${SRCTOP}/gnu/usr.bin/cc
 SRCS=  crtstuff.c ${COMMONHDRS}
 OBJS=  crtbegin.o crtend.o crtbeginT.o
 SOBJS= crtbeginS.o crtendS.o
+DEPENDOBJS+=   ${OBJS} ${SOBJS}
 CSTD?= gnu89
 CFLAGS+=   -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3
 CFLAGS.gcc+=   -finhibit-size-directive -fno-toplevel-reorder
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349063 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:18 2019
New Revision: 349063
URL: https://svnweb.freebsd.org/changeset/base/349063

Log:
  Similar to r335710 avoid ccache when linking a .cc file directly.
  
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.suffixes.mk

Modified: head/share/mk/bsd.suffixes.mk
==
--- head/share/mk/bsd.suffixes.mk   Sat Jun 15 17:08:13 2019
(r349062)
+++ head/share/mk/bsd.suffixes.mk   Sat Jun 15 17:08:18 2019
(r349063)
@@ -19,7 +19,7 @@
${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET}
 
 .cc .cpp .cxx .C:
-   ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
+   ${CXX:N${CCACHE_BIN}} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o 
${.TARGET}
 
 .cc.o .cpp.o .cxx.o .C.o:
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349067 - in head: gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov lib/csu

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:32 2019
New Revision: 349067
URL: https://svnweb.freebsd.org/changeset/base/349067

Log:
  Support reading in .depend files.
  
  This is for an upcoming change that fixes .depend handling in here.
  It will cause some duplicate sources which need to be trimmed out.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/gnu/lib/csu/Makefile
  head/gnu/lib/libgcc/Makefile
  head/gnu/lib/libgcov/Makefile
  head/lib/csu/Makefile.inc

Modified: head/gnu/lib/csu/Makefile
==
--- head/gnu/lib/csu/Makefile   Sat Jun 15 17:08:28 2019(r349066)
+++ head/gnu/lib/csu/Makefile   Sat Jun 15 17:08:32 2019(r349067)
@@ -49,23 +49,23 @@ CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS}
 
 crtbegin.o:${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-   -c -o ${.TARGET} ${.ALLSRC:N*.h}
+   -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 crtbeginT.o:   ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \
-   -c -o ${.TARGET} ${.ALLSRC:N*.h}
+   -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 crtbeginS.o:   ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-   -c -o ${.TARGET} ${.ALLSRC:N*.h}
+   -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 crtend.o:  ${ENDSRC}
${CC} ${CFLAGS} -g0 -DCRT_END \
-   -c -o ${.TARGET} ${.ALLSRC:N*.h}
+   -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 crtendS.o: ${ENDSRC}
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-   -c -o ${.TARGET} ${.ALLSRC:N*.h}
+   -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 COMMONHDRS+=   tm.h tconfig.h options.h
 CLEANFILES+=   ${COMMONHDRS} optionlist cs-tconfig.h cs-tm.h

Modified: head/gnu/lib/libgcc/Makefile
==
--- head/gnu/lib/libgcc/MakefileSat Jun 15 17:08:28 2019
(r349066)
+++ head/gnu/lib/libgcc/MakefileSat Jun 15 17:08:32 2019
(r349067)
@@ -224,11 +224,11 @@ ${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/}
 SOBJS +=   ${${T}_FUNCS:S/$/.pico/}
 
 ${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS}
-   ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 ${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS}
-   ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 ${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS}
-   ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 .endfor
 
 #---
@@ -249,9 +249,9 @@ STAT_OBJS_P =   ${SYMS_ST:S/$/.po/}
 STATICOBJS  =  ${SYMS_ST:S/$/.o/}
 
 ${STAT_OBJS_T}:${STD_CFILE} ${COMMONHDRS}
-   ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 ${STAT_OBJS_P}:${STD_CFILE} ${COMMONHDRS}
-   ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 
 #---
 #

Modified: head/gnu/lib/libgcov/Makefile
==
--- head/gnu/lib/libgcov/Makefile   Sat Jun 15 17:08:28 2019
(r349066)
+++ head/gnu/lib/libgcov/Makefile   Sat Jun 15 17:08:32 2019
(r349067)
@@ -51,16 +51,16 @@ CLEANFILES+=${COMMONHDRS} cs-tm.h cs-tconfig.h 
option
 ${OBJS} beforedepend: ${COMMONHDRS}
 
 ${OBJS_T}: libgcov.c
-   ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 
 .if !defined(NO_PIC)
 ${OBJS_S}: libgcov.c
-   ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 .endif
 
 .if ${MK_PROFILE} != "no"
 ${OBJS_P}: libgcov.c
-   ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
+   ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
 .endif
 
 .include 

Modified: head/lib/csu/Makefile.inc
==
--- head/lib/csu/Makefile.inc   Sat Jun 15 17:08:28 2019(r349066)
+++ head/lib/csu/Makefile.inc   Sat Jun 15 17:08:32 2019(r349067)
@@ -22,10 +22,11 @@ crtend.o: crtend.c
 crtendS.o: crtend.c
 
 crtbegin.o crtend.o crtbeginT.o:
-   ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC}
+   ${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
 
 crtbeginS.o crtendS.o:
-   ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC}
+   ${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o 

svn commit: r349062 - in head: bin/csh bin/sh lib/libmagic lib/ncurses/ncurses share/syscons/scrnmaps usr.bin/awk usr.bin/vi/catalog

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:13 2019
New Revision: 349062
URL: https://svnweb.freebsd.org/changeset/base/349062

Log:
  Fix .depend files to work for build tools.
  
  This is somewhat of a follow-up to r335746.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/bin/csh/Makefile
  head/bin/sh/Makefile
  head/lib/libmagic/Makefile
  head/lib/ncurses/ncurses/Makefile
  head/share/syscons/scrnmaps/Makefile
  head/usr.bin/awk/Makefile
  head/usr.bin/vi/catalog/Makefile

Modified: head/bin/csh/Makefile
==
--- head/bin/csh/Makefile   Sat Jun 15 17:08:02 2019(r349061)
+++ head/bin/csh/Makefile   Sat Jun 15 17:08:13 2019(r349062)
@@ -117,6 +117,7 @@ csh.1: tcsh.man
 
 build-tools: gethost
 
+DEPENDOBJS+= gethost
 gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileSat Jun 15 17:08:02 2019(r349061)
+++ head/bin/sh/MakefileSat Jun 15 17:08:13 2019(r349062)
@@ -48,6 +48,7 @@ builtins.h: .NOMETA
 builtins.c builtins.h: mkbuiltins builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
 
+DEPENDOBJS+= mknodes mksyntax
 mknodes mksyntax: ${BUILD_TOOLS_META}
 
 .ORDER: nodes.c nodes.h

Modified: head/lib/libmagic/Makefile
==
--- head/lib/libmagic/Makefile  Sat Jun 15 17:08:02 2019(r349061)
+++ head/lib/libmagic/Makefile  Sat Jun 15 17:08:13 2019(r349062)
@@ -41,10 +41,11 @@ magic.mgc: mkmagic magic
${BTOOLSPATH:U.}/mkmagic magic
 
 CLEANFILES+=   mkmagic
+DEPENDOBJS+=   mkmagic
 build-tools: mkmagic
 mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} 
${BUILD_TOOLS_META}
-   ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} 
${.ALLSRC:N*.h} \
-   ${LDADD}
+   ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \
+   ${.ALLSRC:N*.h:O:u} ${LDADD}
 
 FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
${.CURDIR}/config.h

Modified: head/lib/ncurses/ncurses/Makefile
==
--- head/lib/ncurses/ncurses/Makefile   Sat Jun 15 17:08:02 2019
(r349061)
+++ head/lib/ncurses/ncurses/Makefile   Sat Jun 15 17:08:13 2019
(r349062)
@@ -389,6 +389,7 @@ keys.list: MKkeys_list.sh Caps
${NCURSES_DIR}/include/Caps | LC_ALL=C sort > keys.list
 
 # Build tools
+DEPENDOBJS+= make_hash make_keys
 build-tools: make_hash make_keys
 
 make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}

Modified: head/share/syscons/scrnmaps/Makefile
==
--- head/share/syscons/scrnmaps/MakefileSat Jun 15 17:08:02 2019
(r349061)
+++ head/share/syscons/scrnmaps/MakefileSat Jun 15 17:08:13 2019
(r349062)
@@ -12,6 +12,7 @@ CLEANFILES+= ${SCRMAPS_MK} ${SCRMAPS}
 FILES= ${SCRMAPS}
 FILESDIR= ${SHAREDIR}/syscons/scrnmaps
 
+DEPENDOBJS+= ${SCRMAPS_MK}
 build-tools: ${SCRMAPS_MK}
 
 ${SCRMAPS}: ${.TARGET:R}.mk

Modified: head/usr.bin/awk/Makefile
==
--- head/usr.bin/awk/Makefile   Sat Jun 15 17:08:02 2019(r349061)
+++ head/usr.bin/awk/Makefile   Sat Jun 15 17:08:13 2019(r349062)
@@ -27,6 +27,7 @@ ytab.h: awkgram.c awkgram.h .NOMETA
 proctab.c: maketab
${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c
 
+DEPENDOBJS+= maketab
 build-tools: maketab
 maketab: ytab.h maketab.c ${BUILD_TOOLS_META}
 

Modified: head/usr.bin/vi/catalog/Makefile
==
--- head/usr.bin/vi/catalog/MakefileSat Jun 15 17:08:02 2019
(r349061)
+++ head/usr.bin/vi/catalog/MakefileSat Jun 15 17:08:13 2019
(r349062)
@@ -105,8 +105,8 @@ english.base: dump ${SCAN} #Makefile
sort -nu > $@
 
 
-dump: dump.c ${BUILD_TOOLS_META}
-   ${CC:N${CCACHE_BIN}} -o ${.TARGET} ${.ALLSRC}
+DEPENDOBJS+=   dump
+dump: ${BUILD_TOOLS_META}
 
 CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349065 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:24 2019
New Revision: 349065
URL: https://svnweb.freebsd.org/changeset/base/349065

Log:
  Add various CFLAGS/LDADD overrides for the output target file.
  
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.README
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.README
==
--- head/share/mk/bsd.READMESat Jun 15 17:08:21 2019(r349064)
+++ head/share/mk/bsd.READMESat Jun 15 17:08:24 2019(r349065)
@@ -125,10 +125,16 @@ The following variables are common:
 
 AFLAGS.${SRC}
Flags dependent on source file name.
+AFLAGS.${TARGET}
+   Flags dependent on output file name.
 ACFLAGS.${SRC}
Flags dependent on source file name.
+ACFLAGS.${TARGET}
+   Flags dependent on output file name.
 CFLAGS.${SRC}
Flags dependent on source file name.
+CFLAGS.${TARGET}
+   Flags dependent on output file name.
 CFLAGS.${COMPILER_TYPE}
Flags dependent on compiler added to CFLAGS.
 CFLAGS.${MACHINE_ARCH}
@@ -142,6 +148,8 @@ CXXFLAGS.${MACHINE_ARCH}
Architectural flags added to CXXFLAGS.
 CXXFLAGS.${SRC}
Flags dependent on source file name.
+CXXFLAGS.${TARGET}
+   Flags dependent on output file name.
 COMPILER_FEATURES
A list of features that the compiler supports. Zero or
more of:
@@ -336,13 +344,22 @@ LDADD Additional loader objects.  Usually 
used for li
 
LDADD=-lutil -lcompat
 
+LDADD.${TAREGT}
+   Loader objects dependent on output file name.
+
 LDFLAGSAdditional loader flags. Passed to the loader via CC,
since that's used to link programs as well, so loader
specific flags need to be prefixed with -Wl, to work.
 
+LDFLAGS.${TARGET}
+   Flags dependent on output file name.
+
 LIBADD Additional libraries.  This is for base system libraries
and is only valid inside of the /usr/src tree.
Use LIBADD=name instead of LDADD=-lname.
+
+LIBADD.${TARGET}
+   Libraries dependent on output file name.
 
 LINKS  The list of binary links; should be full pathnames, the
linked-to file coming first, followed by the linked

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkSat Jun 15 17:08:21 2019(r349064)
+++ head/share/mk/bsd.sys.mkSat Jun 15 17:08:24 2019(r349065)
@@ -234,17 +234,25 @@ DEBUG_FILES_CFLAGS?= -g
 .if ${MK_WARNS} != "no"
 CFLAGS+=   ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}}
 CFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}
+CFLAGS+=   ${CWARNFLAGS.${.TARGET:T}}
 .endif
 
 CFLAGS+=${CFLAGS.${COMPILER_TYPE}}
 CXXFLAGS+=  ${CXXFLAGS.${COMPILER_TYPE}}
 
 AFLAGS+=   ${AFLAGS.${.IMPSRC:T}}
+AFLAGS+=   ${AFLAGS.${.TARGET:T}}
 ACFLAGS+=  ${ACFLAGS.${.IMPSRC:T}}
+ACFLAGS+=  ${ACFLAGS.${.TARGET:T}}
 CFLAGS+=   ${CFLAGS.${.IMPSRC:T}}
+CFLAGS+=   ${CFLAGS.${.TARGET:T}}
 CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}}
+CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}}
 
 LDFLAGS+=  ${LDFLAGS.${LINKER_TYPE}}
+LDFLAGS+=  ${LDFLAGS.${.TARGET:T}}
+LDADD+=${LDADD.${.TARGET:T}}
+LIBADD+=   ${LIBADD.${.TARGET:T}}
 
 .if defined(SRCTOP)
 # Prevent rebuilding during install to support read-only objdirs.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349066 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:28 2019
New Revision: 349066
URL: https://svnweb.freebsd.org/changeset/base/349066

Log:
  META_MODE: Delete build targets that fail.
  
  If a meta mode change is triggered but then the build fails then the
  next build will not retrigger meta mode. This only prevented by
  removing the target on rebuild or on the failure to rebuild.
  
  Sponsored by: DellEMC

Modified:
  head/share/mk/local.sys.mk

Modified: head/share/mk/local.sys.mk
==
--- head/share/mk/local.sys.mk  Sat Jun 15 17:08:24 2019(r349065)
+++ head/share/mk/local.sys.mk  Sat Jun 15 17:08:28 2019(r349066)
@@ -33,6 +33,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \
OBJTOP \
${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
 
+# Meta mode may rebuild targets that then fail. The next build won't detect
+# the meta mode change. Not all targets have a 'rm ${.TARGET}' in them
+# so force it.
+.DELETE_ON_ERROR:
+
 .if ${.MAKE.LEVEL} > 0
 MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349064 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:21 2019
New Revision: 349064
URL: https://svnweb.freebsd.org/changeset/base/349064

Log:
  Avoid generating DEPENDFILES='.depend.' when there's no DEPENDOBJS.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkSat Jun 15 17:08:18 2019(r349063)
+++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:21 2019(r349064)
@@ -186,7 +186,9 @@ DEPENDSRCS+=${DPSRCS:M*.[cSC]} ${SRCS:M*.cxx} 
${SRCS:
 .if !empty(DEPENDSRCS)
 DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
+.if !empty(DEPENDOBJS)
 DEPENDFILES+=  ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
+.endif
 .if defined(_SKIP_DEPEND)
 # Don't bother statting any .meta files for .depend*
 ${DEPENDOBJS}: .NOMETA
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349061 - head/share/mk

2019-06-15 Thread Bryan Drewery
Author: bdrewery
Date: Sat Jun 15 17:08:02 2019
New Revision: 349061
URL: https://svnweb.freebsd.org/changeset/base/349061

Log:
  Don't force OBJS_DEPEND_GUESS headers onto all objects.
  
  This is in the case of not having any .depend.foo.o yet.  Don't force add *.h
  as a dependency for those. They are built in beforebuild already when in
  SRCS/DPSRCS.
  
  This change allows custom rules, like in bin/sh/Makefile for mksyntax, to not
  have cyclic dependency problems when connected to the .depend.* handling.
  
  This is purposely not copied to sys/conf/kern.post.mk as it handles
  generating headers slightly differently.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkSat Jun 15 16:59:03 2019(r349060)
+++ head/share/mk/bsd.dep.mkSat Jun 15 17:08:02 2019(r349061)
@@ -251,18 +251,17 @@ _depfile= ${.OBJDIR}/${_meta_obj}
 .else
 _depfile=  ${.OBJDIR}/${_dep_obj}
 .endif
-.if !exists(${_depfile})
-${__obj}: ${OBJS_DEPEND_GUESS}
-${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
-.elif defined(_meta_filemon)
-# For meta mode we still need to know which file to depend on to avoid
-# ambiguous suffix transformation rules from .PATH.  Meta mode does not
-# use .depend files.  We really only need source files, not headers since
-# they are typically in SRCS/beforebuild already.  For target-specific
-# guesses do include headers though since they may not be in SRCS.
+.if !exists(${_depfile}) || defined(_meta_filemon)
+# - Headers are normally built in beforebuild when included in DPSRCS or SRCS.
+#   So we don't need it as a guessed dependency (it may lead to cyclic problems
+#   if custom rules are defined).  The only time this causes a problem is when
+#   'make foo.o' is ran.
+# - For meta mode we still need to know which file to depend on to avoid
+#   ambiguous suffix transformation rules from .PATH.  Meta mode does not
+#   use .depend files when filemon is in use.
 ${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
 ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
-.endif # !exists(${_depfile})
+.endif # !exists(${_depfile}) || defined(_meta_filemon)
 .endfor
 
 # Always run 'make depend' to generate dependencies early and to avoid the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r349005 - head/sys/modules/ocs_fc

2019-06-12 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 12 23:09:10 2019
New Revision: 349005
URL: https://svnweb.freebsd.org/changeset/base/349005

Log:
  Don't delete .depend files outside of cleandepend.
  
  Sponsored by: DellEMC

Modified:
  head/sys/modules/ocs_fc/Makefile

Modified: head/sys/modules/ocs_fc/Makefile
==
--- head/sys/modules/ocs_fc/MakefileWed Jun 12 21:10:37 2019
(r349004)
+++ head/sys/modules/ocs_fc/MakefileWed Jun 12 23:09:10 2019
(r349005)
@@ -41,6 +41,6 @@ SRCS += ocs_cam.c
 
 CINCS = -I. 
 
-CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.* .depend.*
+CLEANFILES += ${PROG}.debug ${PROG}.symbols cscope.*
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r348979 - in head/sys/modules: iwmfw iwnfw mwlfw ralfw rtwnfw usb/rsufw usb/runfw

2019-06-11 Thread Bryan Drewery
Author: bdrewery
Date: Wed Jun 12 00:03:00 2019
New Revision: 348979
URL: https://svnweb.freebsd.org/changeset/base/348979

Log:
  Stop using .OODATE for extracting firmware.
  
  This fixes META_MODE rebuilding since it assumes that it this is
  a non-consistent build command. These are always unencoded consistently
  though and do not need to use the .OODATE/$? mechanism.
  
  MFC after:2 weeks
  Reported by:  npn
  Sponsored by: DellEMC

Modified:
  head/sys/modules/iwmfw/Makefile.inc
  head/sys/modules/iwnfw/Makefile.inc
  head/sys/modules/mwlfw/Makefile
  head/sys/modules/ralfw/Makefile.inc
  head/sys/modules/rtwnfw/Makefile.inc
  head/sys/modules/usb/rsufw/Makefile.inc
  head/sys/modules/usb/runfw/Makefile

Modified: head/sys/modules/iwmfw/Makefile.inc
==
--- head/sys/modules/iwmfw/Makefile.inc Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/iwmfw/Makefile.inc Wed Jun 12 00:03:00 2019
(r348979)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwm/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: head/sys/modules/iwnfw/Makefile.inc
==
--- head/sys/modules/iwnfw/Makefile.inc Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/iwnfw/Makefile.inc Wed Jun 12 00:03:00 2019
(r348979)
@@ -15,4 +15,4 @@ FIRMWS=   ${_FIRM}:${KMOD}
 #FIRMWARE_LICENSE=
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/iwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: head/sys/modules/mwlfw/Makefile
==
--- head/sys/modules/mwlfw/Makefile Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/mwlfw/Makefile Wed Jun 12 00:03:00 2019
(r348979)
@@ -6,9 +6,9 @@ FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot
 CLEANFILES+= mw88W8363.fw mwlboot.fw
 
 mw88W8363.fw: ${SRCTOP}/sys/contrib/dev/mwl/mw88W8363.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 mwlboot.fw: ${SRCTOP}/sys/contrib/dev/mwl/mwlboot.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 

Modified: head/sys/modules/ralfw/Makefile.inc
==
--- head/sys/modules/ralfw/Makefile.inc Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/ralfw/Makefile.inc Wed Jun 12 00:03:00 2019
(r348979)
@@ -12,4 +12,4 @@ CLEANFILES+=  ${_FIRM}
 FIRMWS=${_FIRM}:${KMOD}
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/ral/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: head/sys/modules/rtwnfw/Makefile.inc
==
--- head/sys/modules/rtwnfw/Makefile.incTue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/rtwnfw/Makefile.incWed Jun 12 00:03:00 2019
(r348979)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:111
 # FIRMWARE_LICENSE=realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rtwn/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: head/sys/modules/usb/rsufw/Makefile.inc
==
--- head/sys/modules/usb/rsufw/Makefile.inc Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/usb/rsufw/Makefile.inc Wed Jun 12 00:03:00 2019
(r348979)
@@ -12,4 +12,4 @@ FIRMWS=   ${_FIRM}:${KMOD}:120
 # FIRMWARE_LICENSE=realtek
 
 ${_FIRM}: ${SRCTOP}/sys/contrib/dev/rsu/${_FIRM}.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}

Modified: head/sys/modules/usb/runfw/Makefile
==
--- head/sys/modules/usb/runfw/Makefile Tue Jun 11 23:46:31 2019
(r348978)
+++ head/sys/modules/usb/runfw/Makefile Wed Jun 12 00:03:00 2019
(r348979)
@@ -6,6 +6,6 @@ FIRMWS= run.fw:runfw:1
 CLEANFILES=run.fw
 
 run.fw: ${SRCTOP}/sys/contrib/dev/run/rt2870.fw.uu
-   uudecode -p $? > ${.TARGET}
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r348976 - head/sys/modules/efirt

2019-06-11 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jun 11 23:35:49 2019
New Revision: 348976
URL: https://svnweb.freebsd.org/changeset/base/348976

Log:
  Add missing DPSRCS entry for assym.inc.
  
  This brings in various CLEANFILES/DEPENDOBJS handling.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/sys/modules/efirt/Makefile

Modified: head/sys/modules/efirt/Makefile
==
--- head/sys/modules/efirt/Makefile Tue Jun 11 23:35:34 2019
(r348975)
+++ head/sys/modules/efirt/Makefile Tue Jun 11 23:35:49 2019
(r348976)
@@ -11,6 +11,7 @@ SRCS+=  device_if.h bus_if.h clock_if.h
 .if ${MACHINE_CPUARCH} == "amd64"
 SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h
 SRCS+= efirt_support.S
+DPSRCS+= assym.inc
 efirt_support.o:   efirt_support.S assym.inc
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r348975 - head/sys/conf

2019-06-11 Thread Bryan Drewery
Author: bdrewery
Date: Tue Jun 11 23:35:34 2019
New Revision: 348975
URL: https://svnweb.freebsd.org/changeset/base/348975

Log:
  Restore genassym.o to CLEANFILES.
  
  This was lost in r335910 for some reason.
  
  This also fixes a META_MODE rebuild issue in some modules [1].
  
  MFC after:2 weeks
  Reported by:  npn [1]
  Sponsored by: DellEMC

Modified:
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Tue Jun 11 23:28:07 2019(r348974)
+++ head/sys/conf/kmod.mk   Tue Jun 11 23:35:34 2019(r348975)
@@ -500,7 +500,7 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS
 .endif
 
 .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc)
-CLEANFILES+=   assym.inc
+CLEANFILES+=   assym.inc genassym.o
 DEPENDOBJS+=   genassym.o
 DPSRCS+=   offset.inc
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r348877 - head/share/mk

2019-06-10 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jun 10 19:38:35 2019
New Revision: 348877
URL: https://svnweb.freebsd.org/changeset/base/348877

Log:
  DPSRCS need to be built before recursing.
  
  MFC after:2 weeks
  Sponsored by: DellEMC

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Mon Jun 10 19:26:57 2019(r348876)
+++ head/share/mk/bsd.progs.mk  Mon Jun 10 19:38:35 2019(r348877)
@@ -95,7 +95,7 @@ $v =
 # Find common sources among the PROGS to depend on them before building
 # anything.  This allows parallelization without them each fighting over
 # the same objects.
-_PROGS_COMMON_SRCS=
+_PROGS_COMMON_SRCS= ${DPSRCS}
 _PROGS_ALL_SRCS=
 .for p in ${PROGS}
 .for s in ${SRCS.${p}}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


  1   2   3   4   5   6   7   8   9   10   >