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 7C2646F87A; Wed, 28 Apr 2021 10:33:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7C2646F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619595224; bh=Y+d5WSTUFl5qhfrEjPtmJflQIl6VOpvVe+3JZsU8WH4=; 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=N/Uz8PQHzYuPDzaT5buk0VJYp5LfiH7Hye83jymXBXsCB7SAt26hNoWWlOKJOZbGp jiV0Q8PGoFNfAChhqMDH059c6nEL7TSj+Uc2JqTwOwm1BCZY213cAi6v4AX2o16n17 4w/6dIJY3lKFRMXCIeF8+tjM8B9Xjz6EeVvxCR70= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 8142C6F87A for ; Wed, 28 Apr 2021 10:33:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8142C6F87A Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1lbehY-0007ZT-K9; Wed, 28 Apr 2021 10:33:41 +0300 Date: Wed, 28 Apr 2021 10:32:39 +0300 To: Igor Munkin Message-ID: References: <5465d7bc81f04842dcdb65f222db381036c0659c.1619561872.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5465d7bc81f04842dcdb65f222db381036c0659c.1619561872.git.imun@tarantool.org> X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ECFD8CE5F05940103F64F7B2B6947DF2DC80D3601B233994182A05F538085040E483FDDC652420A3F80D713C4B6A47E906F4361A8540EB53632D82D8D01D53F4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71EAE3A63419E5AEDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375E7A1B5661595F038638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B29A482EEC388879EC4A1668AF2A8818AFE5D25F19253116ADD2E47CDBA5A96583C09775C1D3CA48CFA12191B5F2BB8629117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE73AFA331E307B52169FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E625235872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A50F6197A6C502586F4FBDC3B19D4FE8A3BE8D5D8B20F7DCC9D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AA8975497C7004E8DC03CBBC80FB495BFF6004F7A427E1D1E89F9BF096C3BD90895549CA49D099401D7E09C32AA3244CA02308202D4A9237E6571842823D2E485595C85A795C7BAE83B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmGF4M/OAxzcdVunC9vOtug== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4DEE89921D0F9228A2B4DCD3693C8D6536D46CB22DF8743B0F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Igor! Thanks for the patch! LGTM, except a few nits below. On 28.04.21, 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 +++++++++++++++----- Should we add corresponding ChangeLog entry? > 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. Typo: s/For more info/For more info,/ > + # 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.") Nit: may be the full link is better here (like we do for coredumps). Feel free to ignore. > + # 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, Sergey Kaplun