Date: Tue, 24 Sep 2019 18:21:10 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org Cc: svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r512582 - head/math/suitesparse Message-ID: <1rw5-4qdl-wny@FreeBSD.org> In-Reply-To: <20190924155630.GD56546@graf.pompo.net> (Thierry Thomas's message of "Tue, 24 Sep 2019 17:56:30 %2B0200") References: <201909221249.x8MCnoxJ014032@repo.freebsd.org> <tv91-693k-wny@FreeBSD.org> <20190924155630.GD56546@graf.pompo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain Thierry Thomas <thierry@freebsd.org> writes: > Le mar. 24 sept. 19 =E0 16:51:27 +0200, Jan Beich <jbeich@FreeBSD.org> > =E9crivait=A0: > >> > LIB_DEPENDS=3D libmetis.so:math/metis \ >> > + libomp.so:devel/openmp \ >> >> Breaks all platforms except amd64 and i386, even Clang-based ones like >> aarch64, armv6, armv7. See ONLY_FOR_ARCHS in devel/openmp. > > Is there a way to request a compiler < C++11 and require openmp when not > in base? Bug 210337 tried to support USES=compiler:openmp on Clang but never finished. I have an improved version (attached) but it wasn't finished as well. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=openmp.diff >From 0596faa1a7260b72cc04a5bb97aea76c91fe6083 Mon Sep 17 00:00:00 2001 From: Jan Beich <jbeich@FreeBSD.org> Date: Sat, 11 May 2019 12:48:02 +0000 Subject: [PATCH] Add Clang support to USES=openmp on amd64 PR: 210337 Exp-run by: antoine Submitted by: bapt, jmd (based on) Differential Revision: https://reviews.freebsd.org/D6362 --- Mk/Uses/compiler.mk | 17 ++++++++++++----- biology/canu/Makefile | 1 + biology/iqtree/Makefile | 1 + graphics/colmap/Makefile | 8 ++------ math/ceres-solver/Makefile | 7 ++----- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Mk/Uses/compiler.mk b/Mk/Uses/compiler.mk index cbc2d4699daf..58cae2352b82 100644 --- a/Mk/Uses/compiler.mk +++ b/Mk/Uses/compiler.mk @@ -60,7 +60,7 @@ _COMPILER_ARGS+= features .elif ${compiler_ARGS} == env _COMPILER_ARGS+= env .elif ${compiler_ARGS} == openmp -_COMPILER_ARGS+= env openmp +_COMPILER_ARGS+= features openmp .elif ${compiler_ARGS} == nestedfct _COMPILER_ARGS+= env nestedfct .else @@ -113,10 +113,17 @@ ALT_COMPILER_TYPE= gcc CHOSEN_COMPILER_TYPE= ${COMPILER_TYPE} .if ${_COMPILER_ARGS:Mopenmp} -.if ${COMPILER_TYPE} == clang -USE_GCC= yes -CHOSEN_COMPILER_TYPE= gcc -.endif +# Fortran code may use OpenMP, so keep GCC for now +# i386 needs libatomic for #pragma omp atomic +. if ${COMPILER_TYPE} == clang && ! ${USES:Mfortran*} && \ + (${ARCH} == amd64 || ${ARCH} == powerpc64 || ${ARCH} == i386 && exists(/usr/lib/libatomic.so)) +. if !exists(/usr/include/omp.h) +_USES_POST+= localbase:ldflags +LIB_DEPENDS+= libomp.so:devel/openmp +. endif +. else +_COMPILER_ARGS:=${_COMPILER_ARGS:Nopenmp} gcc-c++11-lib +. endif .endif .if ${_COMPILER_ARGS:Mnestedfct} diff --git a/biology/canu/Makefile b/biology/canu/Makefile index ed3a3a71cc62..71d2569698a7 100644 --- a/biology/canu/Makefile +++ b/biology/canu/Makefile @@ -16,6 +16,7 @@ LIB_DEPENDS= libboost_regex.so:devel/boost-libs RUN_DEPENDS= gnuplot:math/gnuplot USES= compiler:openmp gmake perl5 +USE_GCC= yes USE_JAVA= yes USE_GITHUB= yes diff --git a/biology/iqtree/Makefile b/biology/iqtree/Makefile index dc4e206e0d39..60d9aa5b5710 100644 --- a/biology/iqtree/Makefile +++ b/biology/iqtree/Makefile @@ -17,6 +17,7 @@ BROKEN_armv7= fails to compile: unrecognized command line options '-m32' and '- BROKEN_powerpc64= fails to build: GCC version must be at least 4.8! USES= cmake compiler:openmp eigen:3 +USE_GCC= yes USE_GITHUB= yes GH_ACCOUNT= Cibiv GH_PROJECT= IQ-TREE diff --git a/graphics/colmap/Makefile b/graphics/colmap/Makefile index b062b7782e8a..86c6ee2f8931 100644 --- a/graphics/colmap/Makefile +++ b/graphics/colmap/Makefile @@ -27,7 +27,7 @@ LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libfreeimage.so:graphics/freeimage \ libceres.so:math/ceres-solver -USES= cmake compiler:${OPENMP}c++11-lib eigen:3 localbase qt:5 sqlite +USES= cmake eigen:3 localbase qt:5 sqlite USE_GITHUB= yes USE_GL= gl glew USE_QT= qmake_build buildtools_build core gui opengl_build widgets @@ -49,12 +49,8 @@ DOCS_BUILD_DEPENDS= gmake:devel/gmake \ DOCS_PORTDOCS= * OPENMP_USES= compiler:openmp +OPENMP_USES_OFF= compiler:c++11-lib OPENMP_CMAKE_BOOL= OPENMP_ENABLED -.if ${MACHINE_ARCH} == i386 || !exists(/usr/include/omp.h) -# XXX base/230888 via #pragma omp atomic -# XXX ports/199603 + ports/210337 -OPENMP_VARS= OPENMP=gcc- -.endif SIMD_CMAKE_BOOL= SIMD_ENABLED diff --git a/math/ceres-solver/Makefile b/math/ceres-solver/Makefile index d9fde8de3565..14674db79b8c 100644 --- a/math/ceres-solver/Makefile +++ b/math/ceres-solver/Makefile @@ -14,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libglog.so:devel/glog RUN_DEPENDS:= ${BUILD_DEPENDS:Meigen*} -USES= cmake compiler:${OPENMP}c++11-lib eigen:3 localbase shebangfix +USES= cmake eigen:3 localbase shebangfix USE_GITHUB= yes USE_LDCONFIG= yes SHEBANG_FILES= examples/slam/pose_graph_*/plot_results.py \ @@ -51,11 +51,8 @@ GFLAGS_LIB_DEPENDS= libgflags.so:devel/gflags GFLAGS_CMAKE_BOOL= GFLAGS OPENMP_USES= compiler:openmp +OPENMP_USES_OFF= compiler:c++11-lib OPENMP_CMAKE_BOOL= OPENMP -.if !exists(/usr/include/omp.h) -# XXX ports/199603 + ports/210337 -OPENMP_VARS= OPENMP=gcc- -.endif SCHUR_DESC= Fixed-size schur specializations SCHUR_CMAKE_BOOL= SCHUR_SPECIALIZATIONS --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1rw5-4qdl-wny>