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 1704F6F87A; Wed, 28 Apr 2021 17:11:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1704F6F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619619070; bh=krWXVuGUIuziajJZ1AXhpaShawdc7UXuFH9iTSFEUK0=; 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=MWZ/DyS08LfXTNuNHsRGMBxdGvki0va2J0tdHf8Wkwk/sKOsjeHvQwfhzBxiI8Y7z cG9tK6a1y8pB5kvWMXEMgn3lV466Ev28xUX/YwB2TiHWw2hzYy9yiUqFxlA5jq5qgv ennASKXdlimWZcJ4VRcrGlifkaeZeh4FztAB8iEI= 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 642586F87A for ; Wed, 28 Apr 2021 17:11:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 642586F87A Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lbkuB-0002ue-Fi; Wed, 28 Apr 2021 17:11:07 +0300 Date: Wed, 28 Apr 2021 16:49:56 +0300 To: Sergey Ostanevich Message-ID: <20210428134956.GC24014@tarantool.org> References: <5465d7bc81f04842dcdb65f222db381036c0659c.1619561872.git.imun@tarantool.org> 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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ECFD8CE5F0594010172C8F5787C1B7A21B115C62DFC52C90182A05F53808504064656BE0C8763A75BC5B19E4C99FB48F4D6A53C9258B5E9F4826B1DE57BE1282 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7059B0D8AC717918AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377548186386978BE68638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2C9E1D1EEB401DFD1578504AEA1E8A2B92AAFC1FEE5B068F7D2E47CDBA5A96583C09775C1D3CA48CF90BCC82C2C62A6D1117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE74601F13E4625331C9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F616AD31D0D18CD5C6D8C47C27EEC5E9FB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5AEDB9A0A808DC3BE2F9305F6FD6D98C9F11E29658AF01084D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F804B400765FFFF9709EA2B90DBEEF482430904E36CA4689F5CC95AB46977310C1CC9EED1F58C8F41D7E09C32AA3244C90FEE401F634A386EDBCD82C0497E22239C99C45E8D137E98D5DD81C2BAB7D1D X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojoCaqxM2e5sqpQHv8wiDlng== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638222C54B96F39A1DA25EFF83521D2C44707A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] build: fix linker flags for executable on MacOS 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" Sergos, Thanks for your review! On 28.04.21, Sergey Ostanevich wrote: > Thanks for the patch, LGTM. Added your tag: | Reviewed-by: Sergey Ostanevich > > Sergos > > > > On 28 Apr 2021, at 01:46, Igor Munkin wrote: > > > > This patch fixes inaccuracy in Tarantool build configuration introduced > > by commit 07c83aab5c066ca75c149112b331b4dbb81b3f38 ('build: adjust > > LuaJIT build system'). All those MacOS-related tweaks for __PAGEZERO > > size and preferred load address for the bundle are necessary only for > > builds with 32-bit GC area on 64-bit host. The only case fitting these > > conditions is x86_64 with no LUAJIT_ENABLE_GC64. All other 64-bit builds > > use 64-bit GC area unconditionally. > > > > Part of #5983 > > Needed for #5629 > > Follows up #4862 > > > > Signed-off-by: Igor Munkin > > --- > > > > This patch partially fixes the build on M1. I tested it on tntmac07 > > alongside with the changes Nikita made for libcoro[1]. As a result > > Tarantool has been successfully built, but fails to start. CI looks to > > be OK[2] except the known problems with ASAN[3]. > > > > Issue: https://github.com/tarantool/tarantool/issues/5983 > > Branch: https://github.com/tarantool/tarantool/tree/imun/gh-5983-fix-build-on-m1 > > > > [1]: https://github.com/tarantool/tarantool/commit/309ce38 > > [2]: https://github.com/tarantool/tarantool/commit/5465d7b > > [3]: https://github.com/tarantool/tarantool/issues/6031 > > > > > > cmake/luajit.cmake | 20 +++++++++++++++----- > > 1 file changed, 15 insertions(+), 5 deletions(-) > > > > diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake > > index 3d37164e8..9390d0dfd 100644 > > --- a/cmake/luajit.cmake > > +++ b/cmake/luajit.cmake > > @@ -73,11 +73,21 @@ if(ENABLE_ASAN) > > add_definitions(-DLUAJIT_USE_ASAN=1) > > endif() > > > > -if(TARGET_OS_DARWIN) > > - # Necessary to make LuaJIT (and Tarantool) work on Darwin, see > > - # http://luajit.org/install.html. > > - set(CMAKE_EXE_LINKER_FLAGS > > - "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") > > +if(TARGET_OS_DARWIN AND NOT LUAJIT_ENABLE_GC64) > > + # XXX: This is not the best idea to build LuaJIT on MacOS > > + # with GC64 disabled. But nobody will stop you from this. > > + # You are warned. For more info see the following issue. > > + # https://github.com/tarantool/tarantool/issues/2643 > > + message(WARNING "LUAJIT_ENABLE_GC64 is disabled for MacOS. " > > + "See #2643, why this is not a good idea.") > > + # XXX: Necessary to make LuaJIT (and hence Tarantool) work on > > + # Darwin/x86_64, see the following links for more info: > > + # * http://luajit.org/install.html#embed > > + # * https://github.com/tarantool/luajit/blob/789820a/cmake/SetTargetFlags.cmake > > + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") > > + set(CMAKE_EXE_LINKER_FLAGS > > + "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") > > + endif() > > endif() > > > > # Define the locations for LuaJIT sources and artefacts. > > -- > > 2.25.0 > > > -- Best regards, IM