svn commit: r346333 - in stable/11: gnu/lib lib/libomp share/man/man5 share/mk tools/build/mk tools/build/options

Dimitry Andric dim at FreeBSD.org
Wed Apr 17 20:16:51 UTC 2019


Author: dim
Date: Wed Apr 17 20:16:48 2019
New Revision: 346333
URL: https://svnweb.freebsd.org/changeset/base/346333

Log:
  After r346168, also merge build infrastructure for LLVM libomp.
  
  MFC r345235:
  
  Add lib/libomp, with a Makefile, and generated configuration headers.
  Not connected to the main build yet, as there is still the issue of the
  GNU omp.h header conflicting with the LLVM one.  (That is, if MK_GCC is
  enabled.)
  
  PR:		236062
  
  MFC r345236:
  
  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 r345242:
  
  Explicitly link libomp.so against -lpthread, as it depends on pthread
  functionality.  This should make example OpenMP programs work out of the
  box.
  
  Reported by:	jbeich
  PR:		236062, 236581
  
  MFC r345278:
  
  Also explicitly link libomp.so against -lm, as it transitively depends
  on scalbn and a few other math functions, via libcompiler-rt.  This
  should allow OpenMP programs to link with BFD linkers too.
  
  Reported by:	jbeich
  PR:		236062, 236581
  
  MFC r345282:
  
  Remove --as-needed from the linker flags for libomp.so, as these
  actually prevent the transitive dependency on libm.
  
  Reported by:	jbeich
  PR:		236062, 236581
  
  MFC r345291:
  
  Turn on MK_OPENMP for i386 by default, now that it can build.
  
  Noticed by:	jbeich
  PR:		236062, 236582

Added:
  stable/11/lib/libomp/
     - copied from r345235, head/lib/libomp/
  stable/11/tools/build/options/WITHOUT_OPENMP
     - copied unchanged from r345236, head/tools/build/options/WITHOUT_OPENMP
  stable/11/tools/build/options/WITH_OPENMP
     - copied unchanged from r345236, head/tools/build/options/WITH_OPENMP
Modified:
  stable/11/gnu/lib/Makefile
  stable/11/lib/libomp/Makefile
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/gnu/lib/Makefile
==============================================================================
--- stable/11/gnu/lib/Makefile	Wed Apr 17 20:09:01 2019	(r346332)
+++ stable/11/gnu/lib/Makefile	Wed Apr 17 20:16:48 2019	(r346333)
@@ -6,7 +6,7 @@ SUBDIR=			csu
 SUBDIR+=		libdialog
 SUBDIR+=		libgcc
 
-.if ${MK_GCC} != "no"
+.if ${MK_GCC} != "no" && ${MK_OPENMP} == "no"
 SUBDIR+= libgcov libgomp
 .endif
 

Modified: stable/11/lib/libomp/Makefile
==============================================================================
--- head/lib/libomp/Makefile	Sat Mar 16 15:01:36 2019	(r345235)
+++ stable/11/lib/libomp/Makefile	Wed Apr 17 20:16:48 2019	(r346333)
@@ -58,12 +58,14 @@ CXXFLAGS+=	-fno-exceptions
 CXXFLAGS+=	-fno-rtti
 
 LDFLAGS+=	-Wl,--warn-shared-textrel
-LDFLAGS+=	-Wl,--as-needed
 LDFLAGS+=	-Wl,--gc-sections
 LDFLAGS+=	-Wl,-z,noexecstack
 LDFLAGS+=	-Wl,-fini=__kmp_internal_end_fini
 LDFLAGS+=	-Wl,-soname,libomp.so
 
 VERSION_MAP=	${OMPSRC}/exports_so.txt
+
+LIBADD+=	pthread
+LIBADD+=	m
 
 .include <bsd.lib.mk>

Modified: stable/11/share/man/man5/src.conf.5
==============================================================================
--- stable/11/share/man/man5/src.conf.5	Wed Apr 17 20:09:01 2019	(r346332)
+++ stable/11/share/man/man5/src.conf.5	Wed Apr 17 20:16:48 2019	(r346333)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd October 10, 2018
+.Dd April 17, 2019
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -300,6 +300,8 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_CTF
 .It
+.Va WITHOUT_LOADER_ZFS
+.It
 .Va WITHOUT_ZFS
 .El
 .It Va WITHOUT_CLANG
@@ -314,6 +316,8 @@ When set, it enforces these options:
 .Va WITHOUT_CLANG_EXTRAS
 .It
 .Va WITHOUT_CLANG_FULL
+.It
+.Va WITHOUT_LLVM_COV
 .El
 .It Va WITH_CLANG
 Set to build the Clang C/C++ compiler during the normal phase of the build.
@@ -461,6 +465,8 @@ When set, it enforces these options:
 .Va WITHOUT_GNUCXX
 .It
 .Va WITHOUT_GROFF
+.It
+.Va WITHOUT_LLVM_COV
 .El
 .It Va WITHOUT_DEBUG_FILES
 Set to avoid building or installing standalone debug files for each
@@ -985,16 +991,30 @@ Set to use LLVM's LLD as the system linker, instead of
 .Pp
 This is a default setting on
 arm64/aarch64.
+.It Va WITHOUT_LLVM_COV
+Set to not build the
+.Xr llvm-cov 1
+tool.
+.Pp
+This is a default setting on
+sparc64/sparc64.
+.It Va WITH_LLVM_COV
+Set to build the
+.Xr llvm-cov 1
+tool.
+.Pp
+This is a default setting on
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64.
 .It Va WITHOUT_LLVM_LIBUNWIND
 Set to use GCC's stack unwinder (instead of LLVM's libunwind).
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
 .It Va WITH_LLVM_LIBUNWIND
 Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder).
 .Pp
 This is a default setting on
-arm64/aarch64.
+amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and pc98/i386.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
 .Pp
@@ -1067,7 +1087,12 @@ This option is a nop on all other platforms.
 Disable inclusion of GELI crypto support in the boot chain binaries.
 .Pp
 This is a default setting on
-arm/arm, arm/armeb, arm/armv6, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+.It Va WITH_LOADER_LUA
+Set to build LUA bindings for the boot loader.
+.Pp
+This is a default setting on
+amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64 and mips/mipsn32.
 .It Va WITHOUT_LOADER_OFW
 Disable building of openfirmware bootloader components.
 .Pp
@@ -1088,6 +1113,8 @@ Set to build ubldr.
 .Pp
 This is a default setting on
 arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64.
+.It Va WITHOUT_LOADER_ZFS
+Set to not build ZFS file system boot loader support.
 .It Va WITHOUT_LOCALES
 Set to not build localization files; see
 .Xr locale 1 .
@@ -1300,6 +1327,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/armeb, arm/armv6, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
+.It Va WITH_OPENMP
+Set to build LLVM's OpenMP runtime.
+.Pp
+This is a default setting on
+amd64/amd64, i386/i386 and pc98/i386.
 .It Va WITHOUT_OPENSSH
 Set to not build OpenSSH.
 .It Va WITHOUT_OPENSSL
@@ -1601,6 +1638,8 @@ When set, it enforces these options:
 .Va WITHOUT_LLD
 .It
 .Va WITHOUT_LLDB
+.It
+.Va WITHOUT_LLVM_COV
 .El
 .It Va WITHOUT_UNBOUND
 Set to not build
@@ -1651,7 +1690,7 @@ without support for the IEEE 802.1X protocol and witho
 support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS
 protocols (usable only via 802.1X).
 .It Va WITHOUT_ZFS
-Set to not build ZFS file system.
+Set to not build ZFS file system kernel module, libraries, and user commands.
 .It Va WITHOUT_ZONEINFO
 Set to not build the timezone database.
 When set, it enforces these options:

Modified: stable/11/share/mk/src.opts.mk
==============================================================================
--- stable/11/share/mk/src.opts.mk	Wed Apr 17 20:09:01 2019	(r346332)
+++ stable/11/share/mk/src.opts.mk	Wed Apr 17 20:16:48 2019	(r346333)
@@ -337,6 +337,12 @@ __DEFAULT_YES_OPTIONS+=OFED
 __DEFAULT_NO_OPTIONS+=OFED
 .endif
 
+.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "amd64" || ${__T} == "i386")
+__DEFAULT_YES_OPTIONS+=OPENMP
+.else
+__DEFAULT_NO_OPTIONS+=OPENMP
+.endif
+
 .include <bsd.mkopt.mk>
 
 #

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc	Wed Apr 17 20:09:01 2019	(r346332)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc	Wed Apr 17 20:16:48 2019	(r346333)
@@ -2429,7 +2429,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
@@ -6843,6 +6845,13 @@ OLD_FILES+=usr/share/man/man8/ntpdate.8.gz
 OLD_FILES+=usr/share/man/man8/ntpdc.8.gz
 OLD_FILES+=usr/share/man/man8/ntpq.8.gz
 OLD_FILES+=usr/share/man/man8/ntptime.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

Copied: stable/11/tools/build/options/WITHOUT_OPENMP (from r345236, head/tools/build/options/WITHOUT_OPENMP)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/11/tools/build/options/WITHOUT_OPENMP	Wed Apr 17 20:16:48 2019	(r346333, copy of r345236, head/tools/build/options/WITHOUT_OPENMP)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build LLVM's OpenMP runtime.

Copied: stable/11/tools/build/options/WITH_OPENMP (from r345236, head/tools/build/options/WITH_OPENMP)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/11/tools/build/options/WITH_OPENMP	Wed Apr 17 20:16:48 2019	(r346333, copy of r345236, head/tools/build/options/WITH_OPENMP)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to build LLVM's OpenMP runtime.


More information about the svn-src-stable mailing list