Author: dim
Date: Sat Mar 16 15:45:15 2019
New Revision: 345236
URL: https://svnweb.freebsd.org/changeset/base/345236

Log:
  Connect lib/libomp to the build.
  
  * Set MK_OPENMP to yes by default only on amd64, for now.
  * Bump __FreeBSD_version to signal this addition.
  * Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes.
  * Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h.
  * Regenerate src.conf(5) with new WITH/WITHOUT fragments.
  
  Relnotes:     yes
  PR:           236062
  MFC after:    1 month
  X-MFC-With:   r344779

Added:
  head/tools/build/options/WITHOUT_OPENMP   (contents, props changed)
  head/tools/build/options/WITH_OPENMP   (contents, props changed)
Modified:
  head/gnu/lib/Makefile
  head/lib/Makefile
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk
  head/sys/sys/param.h
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/gnu/lib/Makefile
==============================================================================
--- head/gnu/lib/Makefile       Sat Mar 16 15:01:36 2019        (r345235)
+++ head/gnu/lib/Makefile       Sat Mar 16 15:45:15 2019        (r345236)
@@ -4,7 +4,10 @@
 
 SUBDIR=
 SUBDIR.${MK_DIALOG}+=  libdialog
-SUBDIR.${MK_GCC}+=     libgcov libgomp
+SUBDIR.${MK_GCC}+=     libgcov
+.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no"
+SUBDIR+=               libgomp
+.endif
 SUBDIR.${MK_SSP}+=     libssp
 SUBDIR.${MK_TESTS}+=   tests
 

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile   Sat Mar 16 15:01:36 2019        (r345235)
+++ head/lib/Makefile   Sat Mar 16 15:45:15 2019        (r345236)
@@ -196,6 +196,7 @@ _libproc=   libproc
 _librtld_db=   librtld_db
 .endif
 
+SUBDIR.${MK_OPENMP}+=  libomp
 SUBDIR.${MK_OPENSSL}+= libmp
 SUBDIR.${MK_PMC}+=     libpmc libpmcstat
 SUBDIR.${MK_RADIUS_SUPPORT}+=  libradius

Modified: head/share/man/man5/src.conf.5
==============================================================================
--- head/share/man/man5/src.conf.5      Sat Mar 16 15:01:36 2019        
(r345235)
+++ head/share/man/man5/src.conf.5      Sat Mar 16 15:45:15 2019        
(r345236)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd March 15, 2019
+.Dd March 16, 2019
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -1534,6 +1534,16 @@ Set to build the non-essential components of the
 Infiniband software stack, mostly examples.
 .It Va WITH_OPENLDAP
 Enable building openldap support for kerberos.
+.It Va WITHOUT_OPENMP
+Set to not build LLVM's OpenMP runtime.
+.Pp
+This is a default setting on
+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, powerpc/powerpcspe, riscv/riscv64 and sparc64/sparc64.
+.It Va WITH_OPENMP
+Set to build LLVM's OpenMP runtime.
+.Pp
+This is a default setting on
+amd64/amd64.
 .It Va WITHOUT_OPENSSH
 Set to not build OpenSSH.
 .It Va WITHOUT_OPENSSL

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk   Sat Mar 16 15:01:36 2019        (r345235)
+++ head/share/mk/src.opts.mk   Sat Mar 16 15:45:15 2019        (r345236)
@@ -399,6 +399,12 @@ BROKEN_OPTIONS+=NVME
 BROKEN_OPTIONS+=BSD_CRTBEGIN
 .endif
 
+.if ${COMPILER_FEATURES:Mc++11} && ${__T} == "amd64"
+__DEFAULT_YES_OPTIONS+=OPENMP
+.else
+__DEFAULT_NO_OPTIONS+=OPENMP
+.endif
+
 .include <bsd.mkopt.mk>
 
 #

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h        Sat Mar 16 15:01:36 2019        (r345235)
+++ head/sys/sys/param.h        Sat Mar 16 15:45:15 2019        (r345236)
@@ -60,7 +60,7 @@
  *             in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300015      /* Master, propagated to newvers */
+#define __FreeBSD_version 1300016      /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc       Sat Mar 16 15:01:36 
2019        (r345235)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc       Sat Mar 16 15:45:15 
2019        (r345236)
@@ -2731,7 +2731,9 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h
 OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h
 OLD_FILES+=usr/include/gcc/4.2/spe.h
 .endif
+.if ${MK_OPENMP} == no
 OLD_FILES+=usr/include/omp.h
+.endif
 OLD_FILES+=usr/lib/libgcov.a
 OLD_FILES+=usr/lib/libgomp.a
 OLD_FILES+=usr/lib/libgomp.so
@@ -7731,6 +7733,13 @@ OLD_FILES+=usr/share/man/man8/sminfo.8.gz
 OLD_FILES+=usr/share/man/man8/smpdump.8.gz
 OLD_FILES+=usr/share/man/man8/smpquery.8.gz
 OLD_FILES+=usr/share/man/man8/vendstat.8.gz
+.endif
+
+.if ${MK_OPENSSH} == no
+.if ${MK_GCC} == no
+OLD_FILES+=usr/include/omp.h
+.endif
+OLD_LIBS+=usr/lib/libomp.so
 .endif
 
 .if ${MK_OPENSSH} == no

Added: head/tools/build/options/WITHOUT_OPENMP
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_OPENMP     Sat Mar 16 15:45:15 2019        
(r345236)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build LLVM's OpenMP runtime.

Added: head/tools/build/options/WITH_OPENMP
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_OPENMP        Sat Mar 16 15:45:15 2019        
(r345236)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to build LLVM's OpenMP runtime.
_______________________________________________
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"

Reply via email to