Date: Wed, 29 Mar 2017 14:43:28 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437204 - in head/devel: llvm-devel llvm-devel/files llvm37 llvm37/files llvm38 llvm38/files llvm39 llvm39/files llvm40 llvm40/files openmp openmp/files Message-ID: <201703291443.v2TEhSBg020574@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Wed Mar 29 14:43:28 2017 New Revision: 437204 URL: https://svnweb.freebsd.org/changeset/ports/437204 Log: devel/openmp: link libomp.so against -lm for clang 3.6+ PR: 214258 Submitted by: Yuta Satoh <nigoro.dev@gmail.com> Approved by: portmgr blanket Added: head/devel/llvm-devel/files/openmp-patch-bug32279 (contents, props changed) head/devel/llvm37/files/openmp-patch-bug32279 (contents, props changed) head/devel/llvm38/files/openmp-patch-bug32279 (contents, props changed) head/devel/llvm39/files/openmp-patch-bug32279 (contents, props changed) head/devel/llvm40/files/openmp-patch-bug32279 (contents, props changed) head/devel/openmp/files/patch-bug32279 (contents, props changed) Modified: head/devel/llvm-devel/Makefile (contents, props changed) head/devel/llvm37/Makefile (contents, props changed) head/devel/llvm38/Makefile (contents, props changed) head/devel/llvm39/Makefile (contents, props changed) head/devel/llvm40/Makefile (contents, props changed) head/devel/openmp/Makefile (contents, props changed) Modified: head/devel/llvm-devel/Makefile ============================================================================== --- head/devel/llvm-devel/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/llvm-devel/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -3,6 +3,7 @@ PORTNAME= llvm PORTVERSION= ${LLVM_MAJOR}.d${SNAPDATE} +PORTREVISION= 1 CATEGORIES= devel lang PKGNAMESUFFIX= -devel @@ -93,6 +94,7 @@ OPENMP_GH_PROJECT= openmp:openmp OPENMP_GH_SUBDIR= tools/openmp:openmp OPENMP_GH_TAGNAME= ${OPENMP_COMMIT}:openmp OPENMP_EXTRA_PATCHES= \ + ${PATCHDIR}/openmp-patch-bug32279 \ ${PATCHDIR}/openmp-patch-tools_openmp_libomptarget_CMakeLists.txt GOLD_DESC= Build the LLVM Gold plugin for LTO GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include Added: head/devel/llvm-devel/files/openmp-patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm-devel/files/openmp-patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,29 @@ +--- tools/openmp/runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompHandleFlags.cmake +@@ -156,6 +156,11 @@ function(libomp_get_libflags libflags) + if(${IA32}) + libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + libomp_append(libflags_local -lm) + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + runtime/cmake/LibompHandleFlags.cmake | 5 +++++ + runtime/cmake/LibompMicroTests.cmake | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- tools/openmp/runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompMicroTests.cmake +@@ -171,7 +171,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0) Modified: head/devel/llvm37/Makefile ============================================================================== --- head/devel/llvm37/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/llvm37/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -2,7 +2,7 @@ PORTNAME= llvm DISTVERSION= 3.7.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} DISTNAME= ${PORTNAME}-${DISTVERSION}.src @@ -74,6 +74,7 @@ LLDB_DISTFILES= lldb-${DISTVERSION}.src OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX} OPENMP_EXTRA_PATCHES= \ + ${PATCHDIR}/openmp-patch-bug32279 \ ${PATCHDIR}/openmp-patch-tools_openmp_runtime_tools_expand-vars.pl GOLD_DESC= Build the LLVM Gold plugin for LTO GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include Added: head/devel/llvm37/files/openmp-patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm37/files/openmp-patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,25 @@ +--- tools/openmp/runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:57:00 UTC ++++ tools/openmp/runtime/cmake/LibompHandleFlags.cmake +@@ -165,6 +165,11 @@ function(libomp_get_fflags fflags) + if(${IA32}) + libomp_append(fflags_local -m32 LIBOMP_HAVE_M32_FORTRAN_FLAG) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(fflags_local ${fflags_local} ${LIBOMP_FFLAGS}) + libomp_setup_flags(fflags_local) + set(${fflags} ${fflags_local} PARENT_SCOPE) +--- tools/openmp/runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:57:29 UTC ++++ tools/openmp/runtime/cmake/LibompMicroTests.cmake +@@ -168,7 +168,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + elseif(APPLE) + set(libomp_expected_library_deps /usr/lib/libSystem.B.dylib) + elseif(WIN32) Modified: head/devel/llvm38/Makefile ============================================================================== --- head/devel/llvm38/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/llvm38/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -2,7 +2,7 @@ PORTNAME= llvm DISTVERSION= 3.8.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} DISTNAME= ${PORTNAME}-${DISTVERSION}.src @@ -76,6 +76,7 @@ LLDB_BUILD_DEPENDS= swig:devel/swig13 LLDB_DISTFILES= lldb-${DISTVERSION}.src${EXTRACT_SUFX} OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX} +OPENMP_EXTRA_PATCHES= ${PATCHDIR}/openmp-patch-bug32279 GOLD_DESC= Build the LLVM Gold plugin for LTO GOLD_CMAKE_ON= -DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include GOLD_BUILD_DEPENDS= ${LOCALBASE}/bin/ld.gold:devel/binutils Added: head/devel/llvm38/files/openmp-patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm38/files/openmp-patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,29 @@ +--- tools/openmp/runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompHandleFlags.cmake +@@ -156,6 +156,11 @@ function(libomp_get_libflags libflags) + if(${IA32}) + libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + libomp_append(libflags_local -lm) + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + runtime/cmake/LibompHandleFlags.cmake | 5 +++++ + runtime/cmake/LibompMicroTests.cmake | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- tools/openmp/runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompMicroTests.cmake +@@ -171,7 +171,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0) Modified: head/devel/llvm39/Makefile ============================================================================== --- head/devel/llvm39/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/llvm39/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -2,7 +2,7 @@ PORTNAME= llvm DISTVERSION= 3.9.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} PKGNAMESUFFIX= ${LLVM_SUFFIX} @@ -92,6 +92,7 @@ LLDB_USES= execinfo LLDB_VARS= _USES_PYTHON=python OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX} +OPENMP_EXTRA_PATCHES= ${PATCHDIR}/openmp-patch-bug32279 # Emulate USE_GITHUB's ${WRKSRC_tag} to reduce diffs to ../llvm-devel .for option in CLANG COMPILER_RT EXTRAS LLD LLDB OPENMP Added: head/devel/llvm39/files/openmp-patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm39/files/openmp-patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,29 @@ +--- tools/openmp/runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompHandleFlags.cmake +@@ -156,6 +156,11 @@ function(libomp_get_libflags libflags) + if(${IA32}) + libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + libomp_append(libflags_local -lm) + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + runtime/cmake/LibompHandleFlags.cmake | 5 +++++ + runtime/cmake/LibompMicroTests.cmake | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- tools/openmp/runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompMicroTests.cmake +@@ -171,7 +171,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0) Modified: head/devel/llvm40/Makefile ============================================================================== --- head/devel/llvm40/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/llvm40/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -2,6 +2,7 @@ PORTNAME= llvm DISTVERSION= 4.0.0 +PORTREVISION= 1 CATEGORIES= devel lang MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR} PKGNAMESUFFIX= ${LLVM_SUFFIX} @@ -88,6 +89,7 @@ LLDB_USES= execinfo LLDB_VARS= _USES_PYTHON=python OPENMP_DESC= Install libomp, the LLVM OpenMP runtime library OPENMP_DISTFILES= openmp-${DISTVERSION}.src${EXTRACT_SUFX} +OPENMP_EXTRA_PATCHES= ${PATCHDIR}/openmp-patch-bug32279 # Emulate USE_GITHUB's ${WRKSRC_tag} to reduce diffs to ../llvm-devel .for option in CLANG COMPILER_RT EXTRAS LLD LLDB OPENMP Added: head/devel/llvm40/files/openmp-patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm40/files/openmp-patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,29 @@ +--- tools/openmp/runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompHandleFlags.cmake +@@ -156,6 +156,11 @@ function(libomp_get_libflags libflags) + if(${IA32}) + libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + libomp_append(libflags_local -lm) + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + runtime/cmake/LibompHandleFlags.cmake | 5 +++++ + runtime/cmake/LibompMicroTests.cmake | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- tools/openmp/runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:50:48 UTC ++++ tools/openmp/runtime/cmake/LibompMicroTests.cmake +@@ -171,7 +171,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0) Modified: head/devel/openmp/Makefile ============================================================================== --- head/devel/openmp/Makefile Wed Mar 29 14:15:04 2017 (r437203) +++ head/devel/openmp/Makefile Wed Mar 29 14:43:28 2017 (r437204) @@ -3,6 +3,7 @@ PORTNAME= openmp DISTVERSION= 4.0.0 DISTVERSIONSUFFIX= .src +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://llvm.org/releases/${DISTVERSION}/ Added: head/devel/openmp/files/patch-bug32279 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/openmp/files/patch-bug32279 Wed Mar 29 14:43:28 2017 (r437204) @@ -0,0 +1,29 @@ +--- runtime/cmake/LibompHandleFlags.cmake.orig 2017-03-16 15:50:48 UTC ++++ runtime/cmake/LibompHandleFlags.cmake +@@ -156,6 +156,11 @@ function(libomp_get_libflags libflags) + if(${IA32}) + libomp_append(libflags_local -lirc_pic LIBOMP_HAVE_IRC_PIC_LIBRARY) + endif() ++ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ libomp_append(libflags_local "-lm") ++ libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG) ++ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + libomp_append(libflags_local -lm) + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + runtime/cmake/LibompHandleFlags.cmake | 5 +++++ + runtime/cmake/LibompMicroTests.cmake | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- runtime/cmake/LibompMicroTests.cmake.orig 2017-03-16 15:50:48 UTC ++++ runtime/cmake/LibompMicroTests.cmake +@@ -171,7 +171,7 @@ add_custom_command( + add_custom_target(libomp-test-deps DEPENDS test-deps/.success) + set(libomp_expected_library_deps) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- set(libomp_expected_library_deps libc.so.7 libthr.so.3) ++ set(libomp_expected_library_deps libc.so.7 libthr.so.3 libm.so.5) + libomp_append(libomp_expected_library_deps libhwloc.so.5 LIBOMP_USE_HWLOC) + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703291443.v2TEhSBg020574>