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 CE16615C7C0F; Thu, 27 Nov 2025 12:59:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE16615C7C0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1764237594; bh=Y7iuZxEMlCRC2SvJ4P76FV5kPy0WdavH5DCWSzyanSc=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=qF2zJHVVlERN9oXToFaF3FCCvzAp1nfcHpRFiDki3YytFyq4EthiWTQWPH1GKw7Ro GSpP6npsZEzoRMlt+Bzxm5iOQP7yzkC5B2WSywopseZglnf/6NN3yLJu/gEqIOHhjj O9lejRG83mDeyhUaL+BsiKGdaBogcRQyt6Srrysw= Received: from send127.i.mail.ru (send127.i.mail.ru [89.221.237.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 73FD815C7C0F for ; Thu, 27 Nov 2025 12:59:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 73FD815C7C0F Received: by exim-smtp-6c58c594f5-nsfv4 with esmtpa (envelope-from ) id 1vOYn2-000000008Ow-18fp; Thu, 27 Nov 2025 12:59:52 +0300 Date: Thu, 27 Nov 2025 12:59:51 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <0d0437d54ff1d6878afe5ec627c795b3b1c9bf8e.1763991490.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD990A6E13C587E340DC6F89212000343031163D0A1F1E1F57700894C459B0CD1B950CFFFDC888374F0C7A4B249DE6549FD4DAEE570DAA01669F98759DEAA339CEDD64C754CAC7C657B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71BDE6A359BD5B800EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB553375660CC9DC0D4886FBE8FD34826A20C3FBB3C6E53E381452C315385B467454832302389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6957A4DEDD2346B42CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE72F88032165008D51731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5191DCB6B6961AD735002B1117B3ED69653D8D19B7FB160728D59E407A97E9958823CB91A9FED034534781492E4B8EEAD0942DC5495D0595EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65905AF36500172F0A3D4AE04130748EB423EF8AA08A54D16396BAB57AB6593A92CA04E47DABD9C3379B8341EE9D5BE9A0A830B38A4E39A903723E2C3E8746DB59A2927D3BDB76CDC268CD93680B12512CF4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVcWupAQoUeGvzMVsEUzFUq8= X-DA7885C5: EE509B9CEB48A993F255D290C0D534F9536FAD42D650C7FF420B36BAAD12594DB02E2A16300914595B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2423289E78BD2659C9D7D2CEB88EDD0CC68204D77D185BED6E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] macOS: Workaround for buggy XCode 15.0 - 15.2 linker. 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review! See my answers below. On 26.11.25, Sergey Bronnikov wrote: > Hi, Sergey, > > thanks for the patch! LGTM with a minor comment. > > Sergey > > On 11/24/25 23:26, Sergey Kaplun wrote: > > From: Mike Pall > > > > Thanks to Carlo Cabrera. > > > > (cherry picked from commit b2915e9ab55b999429b4d1931097064c4e17de53) > > > > The previous commit removes emitting the `.subsections_via_symbols` [1] > > directive for macOS. Nevertheless, the aforementioned Xcode linker > > versions produce incorrect code for the VM without this directive. > > > > As a fix for old versions of macOS, this patch adds emitting this > I would add exact macOS versions, according to [1] it is: 15000000 > 1. As discussed offline, this is exactly the problem with the Xcode version, and this macro specifies the corresponding Xcode versions. > https://stackoverflow.com/questions/19387043/how-can-i-reliably-detect-the-version-of-clang-at-preprocessing-time#comment137533353_19391724 > > > directive in the buildvm. > > > > [1]:https://reviews.llvm.org/D79926 > > > > Sergey Kaplun: > > * added the description for the problem > > > > Part of tarantool/tarantool#11691 I've added the link to the machO format as you suggested: | macOS: Workaround for buggy XCode 15.0 - 15.2 linker. | | Thanks to Carlo Cabrera. | | (cherry picked from commit b2915e9ab55b999429b4d1931097064c4e17de53) | | The previous commit removes emitting the `.subsections_via_symbols` | [1][2] directive for macOS. Nevertheless, the aforementioned Xcode linker | versions produce incorrect code for the VM without this directive. | | As a fix for old versions of macOS, this patch adds emitting this | directive in the buildvm. | | [1]: https://reviews.llvm.org/D79926 | [2]: https://github.com/aidansteele/osx-abi-macho-file-format-reference | | Sergey Kaplun: | * added the description for the problem | | Part of tarantool/tarantool#11691 > > --- > > src/host/buildvm_asm.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c > > index 43595b31..fc09d71a 100644 > > --- a/src/host/buildvm_asm.c > > +++ b/src/host/buildvm_asm.c > > @@ -347,6 +347,10 @@ void emit_asm(BuildCtx *ctx) > > fprintf(ctx->fp, "\t.ident \"%s\"\n", ctx->dasm_ident); > > break; > > case BUILD_machasm: > > +#if defined(__apple_build_version__) && __apple_build_version__ >= 15000000 && __apple_build_version__ < 15000300 > > + /* Workaround for XCode 15.0 - 15.2. */ > > __apple_build_version__ defines a macOS version. But macOS 15 includes > XCode 16, see [2], not 15.x > > So there is an inconsistency in condition and comment. I would list > macOS versions in a comment like this > > "Workaround for macOS 15, 15.1 and 15.2" to avoid misinterpretation due > to non-strict inequality with 15000300. > > Also, I would include a link to [2] to the commit message. > > 2. > https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes The same about the comment above. > > > + fprintf(ctx->fp, "\t.subsections_via_symbols\n"); > > +#endif > > fprintf(ctx->fp, > > "\t.cstring\n" > > "\t.ascii \"%s\\0\"\n", ctx->dasm_ident); -- Best regards, Sergey Kaplun