From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 642D3445320 for ; Thu, 9 Jul 2020 22:24:48 +0300 (MSK) Date: Thu, 9 Jul 2020 22:14:31 +0300 From: Igor Munkin Message-ID: <20200709191431.GJ5559@tarantool.org> References: <81870339991bd3f54fc532b631f48d8bf4aa2b57.1594039762.git.avtikhon@tarantool.org> <20200708113726.GH5559@tarantool.org> <20200708192200.vwd7thsmsjurdtql@tkn_work_nb> <20200709054111.GA25145@hpalx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200709054111.GA25145@hpalx> Subject: Re: [Tarantool-patches] [PATCH v1] Block linker flag '--no-undefined' List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander V. Tikhonov" Cc: tarantool-patches@dev.tarantool.org, Alexander Turenko 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