Re: Heads up: OFED build by default

2018-08-07 Thread Mark Millard via freebsd-stable
OFED in head lead to the following in order for ci.freebsd.org's
FreeBSD-head-amd64-gcc builds to not fail/stop in
all_subdir_lib/ofed :

Author: jhb
Date: Mon Aug  6 23:51:08 2018
New Revision: 337399
URL: 
https://svnweb.freebsd.org/changeset/base/337399


Log:
  Make the system C11 atomics headers fully compatible with external GCC.
  
  The  and  headers already included support for
  C11 atomics via intrinsincs in modern versions of GCC, but these versions
  tried to "hide" atomic variables inside a wrapper structure.  This wrapper
  is not compatible with GCC's internal  header, so that if
  GCC's  was used together with , use of C11
  atomics would fail to compile.  Fix this by not hiding atomic variables
  in a structure for modern versions of GCC.  The headers already avoid
  using a wrapper structure on clang.
  
  Note that this wrapper was only used if C11 was not enabled (e.g.
  via -std=c99), so this also fixes compile failures if a modern version
  of GCC was used with -std=c11 but with FreeBSD's  instead
  of GCC's  and this change fixes that case as well.
  
  Reported by:  Mark Millard
  Reviewed by:  kib
  Differential Revision:
https://reviews.freebsd.org/D16585


Modified:
  head/sys/sys/cdefs.h
  head/sys/sys/stdatomic.h


Without this FreeBSD-head-amd64-gcc was getting:

--- all_subdir_lib/ofed ---
In file included from /workspace/src/contrib/ofed/librdmacm/cma.h:43:0,
from /workspace/src/contrib/ofed/librdmacm/acm.c:42:
/workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_init':
/workspace/src/contrib/ofed/librdmacm/cma.h:60:2: error: invalid initializer
 atomic_store(&lock->cnt, 0);
 ^
In file included from /workspace/src/contrib/ofed/librdmacm/acm.c:42:0:
/workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_acquire':
/workspace/src/contrib/ofed/librdmacm/cma.h:68:2: error: operand type 'struct 
 *' is incompatible with argument 1 of '__atomic_fetch_add'
 if (atomic_fetch_add(&lock->cnt, 1) > 0)
 ^~
/workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_release':
/workspace/src/contrib/ofed/librdmacm/cma.h:73:2: error: operand type 'struct 
 *' is incompatible with argument 1 of '__atomic_fetch_sub'
 if (atomic_fetch_sub(&lock->cnt, 1) > 1)
 ^~
. . .
--- all_subdir_lib/ofed ---
*** [acm.o] Error code 1


Side notes:

A modern enough /usr/ports avoids the devel/*-gcc
the separate float.h problem: -r476273 fixed
/devel/powerpc64-gcc (the master port for
devel/*-gcc ports) to avoid this.

With both fixes in place I was able to buildworld
buildkernel via amd64's xtoolchain ( so via its
use of devel/amd64-gcc ). (The build servers likely
do not have -r476273 yet.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

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


Heads up: OFED build by default

2018-08-07 Thread Konstantin Belousov
I am going to merge revisions r336568, r336569, and r336570 from HEAD to
stable/11. They enable the build of the OFED libraries by default, and
move the build of most of the utilities under the WITH_OFED_EXTRA knob.
Also as a minor fix, since libpcap lives in /lib and depends on two OFED
libraries, these libraries are moved into /lib.

I do not expect that any user of stable/11 would be seriosly affected by
the change.  Small detail is that / filesystem becomes somewhat larger.
Slightly bigger detail is that if you really need OpenSM or some of the
utilities, you should use WITH_OFED_EXTRA instead of WITH_OFED knob.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"