From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 4BB566FC8C; Wed, 31 Mar 2021 01:14:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4BB566FC8C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617142477; bh=76KgFN5Udz8/AIXpgQYJA0an/OdIRI/f+jvcneX7ukg=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DqKrGyssspDof8Cg635Nw1jFbyp/wskZpcE6WplJ3MHD3dEONPj1xws81KDjtjI1u zPyY30fsHbsk6AXQYcWJpJfkKSxTE9+u+oPBqskd8L/XShM6Cqu4kbSdt8ugCQPm5M 2gSFgR8hnGsL+ylvEaybSr8QMCPrqRTCsXEvLPNw= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 1028E6FC8C for ; Wed, 31 Mar 2021 01:14:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1028E6FC8C Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lRMcu-0002HY-7V; Wed, 31 Mar 2021 01:14:20 +0300 Date: Wed, 31 Mar 2021 01:14:10 +0300 To: Sergey Kaplun Message-ID: <20210330221410.GS29703@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E3294DD38BE31D7797EF84C856624A09E4809182A05F538085040289977396DBBE4018913AA01E7C862B2EE849830B5C8735D05125E322ED0AA13 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79A02CDD1178524C2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E5A8E5ECB3FF24018638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF9BF46104ABBBA0E90788034D271EB4E3A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C34C82C86BFC697D19117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE493D58E677C372A3F4780CB4917E5AABA03C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5CD5510418DF1BA9177C79C4EB67E83FAAF04A856341E9F7DD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34ECB3E21D3CD9CB4FB216BF8E91D80B9A6816AABA400CC2F180EEEAEE456824064A642789CC626A4C1D7E09C32AA3244C79B81ACC8AD8F53064987696D47B87A7F2F5F14F68F1805B927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojfQIxm2xDGoY9Zvh8bHT3Sg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822F6523104C8947563116348B84B44F8C4A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 02/30] test: add compiling for C libs from PUC-Rio-Lua5.1 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for the patch! LGTM, except the nits below. I propose the following rewording for commit subject: | test: build auxiliary C libs from PUC-Rio-Lua5.1 On 26.03.21, Sergey Kaplun wrote: > This patch adds commands to create additional LuaC libraries for tests Minor: these are not "commands" but "rules". > in . Also, it renames `luaL_reg` to `luaL_Reg` in > and to be consistent with the current LuaJIT's LuaC API. > > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > test/PUC-Lua-5.1-tests/CMakeLists.txt | 3 +- > test/PUC-Lua-5.1-tests/libs/CMakeLists.txt | 48 +++++++++++++++++++++- > test/PUC-Lua-5.1-tests/libs/lib1.c | 2 +- > test/PUC-Lua-5.1-tests/libs/lib2.c | 2 +- > 4 files changed, 51 insertions(+), 4 deletions(-) > > diff --git a/test/PUC-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Lua-5.1-tests/CMakeLists.txt > index 773db0d..3c31aae 100644 > --- a/test/PUC-Lua-5.1-tests/CMakeLists.txt > +++ b/test/PUC-Lua-5.1-tests/CMakeLists.txt > @@ -16,7 +16,8 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > # variable as proposed in the first case. > set(LUA_PATH "?\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua") Side note: I see no LUA_CPATH, but I grepped the spots where lib*.so are required and found that package.cpath is tweaked right there. Hence LUA_CPATH is excess, isn't it? > > diff --git a/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > index f24e7f3..aa64a44 100644 > --- a/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > +++ b/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > @@ -4,11 +4,57 @@ > # See the rationale in the root CMakeLists.txt. > cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > > +# Build additional C libraries for tests. > +macro(BuildTestCLib lib sources) > + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") Minor: I personally would strip this option out for all remaining systems (i.e. *BSD too), since we have no guarantee the CMake defaults won't be broken on other distros sometime. Feel free to ignore (but it'll be on your conscience). > + # XXX: This is necessary mostly for openSUSE builds, see also > + # https://bugzilla.suse.com/show_bug.cgi?id=1012388. > + # Just strip out the linker flag to suppress this linker > + # option. > + string(REPLACE "-Wl,--no-undefined" "" > + CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" > + ) > + endif() > +endmacro() > + > +BuildTestCLib(lib1 lib1.c) Typo: excess whitespace. > +BuildTestCLib(lib11 lib1.c lib11.c) > +BuildTestCLib(lib2 lib2.c) Typo: excess whitespace. > +BuildTestCLib(lib21 lib2.c lib21.c) > + > +# Create exact copy of the lib2 library for tests in attrib.lua. Typo: s/create exact copy/create the exact copy/. > +set(LIB2ORIG "${CMAKE_CURRENT_BINARY_DIR}/lib2${CMAKE_SHARED_LIBRARY_SUFFIX}") > +set(LIB2COPY "${CMAKE_CURRENT_BINARY_DIR}/-lib2${CMAKE_SHARED_LIBRARY_SUFFIX}") > -- > 2.31.0 > -- Best regards, IM