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 726CD6F87A; Wed, 28 Apr 2021 17:06:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 726CD6F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619618766; bh=OByOs1lsGcXJQ9ogU56+hNbgv3u1Poxg1LEt46el+iQ=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aIs3yFnGM2IodH1qIo6khoKL4gjDvKuKAZqXVFNP1Fny0d+f3xmygtyT+tj6iFI/h oXlrR53iiwYh0vAVg6Y9epZGujZVeMYjfMaSDTFx8UGWaaZC1xfjU1TMeW2JBzH2gK Vd3NM6Yo3XM1oItIMQdH/ERYo1Iv1M06K8JYke/4= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (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 D5FAA6F87A for ; Wed, 28 Apr 2021 17:06:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D5FAA6F87A Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1lbkpI-0005tD-An; Wed, 28 Apr 2021 17:06:04 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) In-Reply-To: <5465d7bc81f04842dcdb65f222db381036c0659c.1619561872.git.imun@tarantool.org> Date: Wed, 28 Apr 2021 17:05:57 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5465d7bc81f04842dcdb65f222db381036c0659c.1619561872.git.imun@tarantool.org> To: Igor Munkin X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ECFD8CE5F059401062EF72DCC8B8CDABD8D4F98D4AE0C03D182A05F5380850406060BFB029438DB00E31649D7F1E497F86A5B8F08EAA0D4613652B625E3C2678 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7011EB7026DD4A9BAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FAFFEDEAEB71C4328638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2DC3E780AD6C1D23C3E513112EB4296903C743118508A179DD2E47CDBA5A96583C09775C1D3CA48CFE97D2AE7161E217F117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE78A0F7C24A37A3D769FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E625235872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5F7B6C1D398BAE202FD977DD3498DAC60807BF32DF2793615D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34B0359B88B232A0C666DF193539A0093BBB4703CDB3F2A81E2EA296825EF9842725003B5ACBED7B261D7E09C32AA3244C6E3FACC3A715D0B53A0B6BE45A80EBF64DBEAD0ED6C55A8083B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojoCaqxM2e5soleYpRdBPAKw== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E3304C9FFCA3C9E2EE5139902F4E7834C715E04FB9D86DA1AAD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 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: Sergey Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch, LGTM. Sergos > On 28 Apr 2021, at 01:46, Igor Munkin wrote: >=20 > 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. >=20 > Part of #5983 > Needed for #5629 > Follows up #4862 >=20 > Signed-off-by: Igor Munkin > --- >=20 > 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]. >=20 > Issue: https://github.com/tarantool/tarantool/issues/5983 > Branch: = https://github.com/tarantool/tarantool/tree/imun/gh-5983-fix-build-on-m1 >=20 > [1]: https://github.com/tarantool/tarantool/commit/309ce38 > [2]: https://github.com/tarantool/tarantool/commit/5465d7b > [3]: https://github.com/tarantool/tarantool/issues/6031 >=20 >=20 > cmake/luajit.cmake | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-) >=20 > 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=3D1) > endif() >=20 > -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.cmak= e > + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") > + set(CMAKE_EXE_LINKER_FLAGS > + "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 = -image_base 100000000") > + endif() > endif() >=20 > # Define the locations for LuaJIT sources and artefacts. > --=20 > 2.25.0 >=20