Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: alexander.turenko@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH] Fix libgomp linking for static build
Date: Mon, 10 Sep 2018 10:05:01 +0300	[thread overview]
Message-ID: <20180910070501.ngpvgefyh5cwwgaf@tarantool.org> (raw)
In-Reply-To: <672863676de78877643103e1b57820578eb21fa6.1536312243.git.kyukhin@tarantool.org>

Hello,
On 07 сен 12:17, Kirill Yukhin wrote:
> Since addition of -fopenmp to compiler also means
> addition of -lgomp to the link stage, pass -fno-openmp
> to the linking stage in case of static build. In that
> case OMP functions are statically linked into libmisc.
> 
> Also, emit error if trying to perform static build using
> clang.
> ---
> Branch: https://github.com/tarantool/tarantool/commits/kyukhin/gh-xxxx-fix-gomp-in-static-build
> Issue: n/a
I've checked in updated patch into 1.10 branch.
As per review, iteratove patch below was applied.

--
Regards, Kirill Yukhin

2 files changed, 7 insertions(+), 7 deletions(-)
cmake/compiler.cmake | 12 ++++++------
src/CMakeLists.txt   |  2 +-

modified   cmake/compiler.cmake
@@ -25,17 +25,17 @@ endif()
 if (CMAKE_COMPILER_IS_GNUCC)
 # cmake 2.8.9 and earlier doesn't support CMAKE_CXX_COMPILER_VERSION
        if (NOT CMAKE_CXX_COMPILER_VERSION)
-               execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
-                               OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
+           execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+                           OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION)
        endif()
        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
-               message(FATAL_ERROR "
-               Your GCC version is ${CMAKE_CXX_COMPILER_VERSION}, please update
-                       ")
+           message(FATAL_ERROR "
+           Your GCC version is ${CMAKE_CXX_COMPILER_VERSION}, please update
+                   ")
        endif()
 else()
      if (BUILD_STATIC)
-               message(FATAL_ERROR "Static build is supported for GCC only")
+           message(FATAL_ERROR "Static build is supported for GCC only")
      endif()
 endif()

modified   src/CMakeLists.txt
@@ -283,7 +283,7 @@ if(BUILD_STATIC)
         # against DSO version of libgomp, which implied by -fopenmp
         set (common_libraries ${common_libraries} "libgomp.a")
         set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -fno-openmp")
-    endif ()
+    endif()
 endif()

      parent reply	other threads:[~2018-09-10  7:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29  6:08 [tarantool-patches] [PATCH v4] Tarantool static build ability Georgy Kirichenko
2018-08-29 11:19 ` [tarantool-patches] " Alexander Turenko
2018-08-29 11:22 ` Alexander Turenko
2018-09-06 17:59 ` Kirill Yukhin
2018-09-07  7:30   ` [tarantool-patches] [PATCH] Fix libgomp linking for static build Kirill Yukhin
2018-09-07  9:06     ` [tarantool-patches] " Kirill Yukhin
2018-09-07  9:17   ` [tarantool-patches] " Kirill Yukhin
2018-09-07 17:10     ` [tarantool-patches] " Alexander Turenko
2018-09-10  7:05     ` Kirill Yukhin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180910070501.ngpvgefyh5cwwgaf@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] Fix libgomp linking for static build' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox