Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
	Alexander Turenko <alexander.turenko@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v1] Block linker flag '--no-undefined'
Date: Thu, 9 Jul 2020 22:14:31 +0300	[thread overview]
Message-ID: <20200709191431.GJ5559@tarantool.org> (raw)
In-Reply-To: <20200709054111.GA25145@hpalx>

Sasha,

Thanks for the patch! I added the patch from upstream to point several
nits.

================================================================================

    test: fix for OpenSuSE tests build

    Found that OpenSUSE toolchain adds '--no-undefined' linker flag leading

Typo: The correct writing of the distro is openSUSE[1], so please fix it
both in commit subject and commit message.
| s/OpenS[uU]SE/openSUSE/g.

    to fails while building tests. The changes suppress this flag since
    dynamic libraries are loaded via Tarantool executable and use its
    symbols. So it is completely OK to have undefined symbols at build time.
    Feel free to adjust it on your own.

Typo: The last line was for you, not for the message, please drop it.


    Needed for #4562

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 697d1b21d..c3cd93066 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,6 +23,14 @@ endfunction()
 add_compile_flags("C;CXX"
     "-Wno-unused-parameter")
 
+# WARNING: This change affects current cmake variable scope and so
+#          a user should care to don't use it in a top level scope.
+# The dynamic libraries will be loaded from tarantool executable
+# and will use symbols from it. So it is completely okay to have
+# unresolved symbols at build time.

Minor: you can use the same part from the commit message, but I'm not
insisting. It just looks rational to me.

+string(REPLACE "-Wl,--no-undefined" ""
+	CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")

Please adjust the indentation considering the code nearby: use 4 spaces
instead of tab.

+
 if(POLICY CMP0037)
     if(CMAKE_VERSION VERSION_LESS 3.11)
         # cmake below 3.11 reserves name test. Use old policy.

================================================================================

Otherwise, LGTM.

[1]: https://www.opensuse.org/

-- 
Best regards,
IM

  reply	other threads:[~2020-07-09 19:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 12:51 Alexander V. Tikhonov
2020-07-06 20:41 ` Alexander Turenko
2020-07-08 11:37 ` Igor Munkin
2020-07-08 14:25   ` Alexander V. Tikhonov
2020-07-08 19:22   ` Alexander Turenko
2020-07-09  5:41     ` Alexander V. Tikhonov
2020-07-09 19:14       ` Igor Munkin [this message]
2020-07-14 11:39 ` Kirill Yukhin

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=20200709191431.GJ5559@tarantool.org \
    --to=imun@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=avtikhon@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] Block linker flag '\''--no-undefined'\''' \
    /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