From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4A6515800A for ; Tue, 15 Aug 2023 00:52:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E2F072BC016; Tue, 15 Aug 2023 00:52:35 +0000 (UTC) Received: from out-120.mta0.migadu.com (out-120.mta0.migadu.com [91.218.175.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0FFA2BC016 for ; Tue, 15 Aug 2023 00:52:34 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catcream.org; s=key1; t=1692060753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YzTt7dgNTQMTSGKyz4a6aOA/Hq19YKodbmX+hXdak2k=; b=k5PS41GtmWye0ruCWBfPKxLC4Omqp8QcE4835O4NtA64e5qcAdMU+7f+Io/9ANQC3D2j4T st+lGBxvAauwYmdYf51+J8FN1yQawWfQOo1/VesCw06B4kb71Do/bdvSAKUPQLcVOOXqLX NBr2W4BxMSX1v+SoouBjL71BOpV9Iho2JhK92WoLlXAKXIjSFoequZzmMpwq8F6JWUsgvc jO09AHvN5BoPh3qj5i4VLzrrgNd52I8T8jQUc4amiXYoeoW5D4nUtCbR6/auyrnelKH+ss 3kHPqp/oHjVTToxM/khOt5Fy0Bm7JdpCbPstEkbDjxurJ4IOXZnphoMRFZ/vpA== From: catcream To: gentoo-soc@lists.gentoo.org Subject: [gentoo-soc] Weekly report 11, LLVM libc Date: Tue, 15 Aug 2023 01:49:59 +0200 Message-ID: <87il9h86ur.fsf@catcream.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Archives-Salt: 21b90e77-3a06-4423-90ca-a124a11e0be8 X-Archives-Hash: d8464ada567aad22f7d52b858652753d =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hello! In this report I will write about my work from both last week and this week. As seen in last weeks' update I got very sick but I started working again on wednesday this week. I am still not well but I can atleast sit at my computer now :) To start with I've sent my Crossdev ebuild changes to the Gentoo mailing lists and gotten feedback on the patches which I have fixed. Now it's just Crossdev itself that needs some more reviews. Secondly I have gotten initial work on limits.h merged into LLVM-libc, the plan is to add additional macros along the way. Another thing I have worked on is adding the fileno function. It currently works just as it should, but I am struggling with my test suite because it fails due to missing __llvmlibc_errno symbol. Other test that depend on errno work, and the CMake source is pretty much identical to mine, so I am unsure what goes wrong actually. Compiling the test manually and linking the object file that has __llvmlibc_errno works, but I have no clue why CMake doesn't fix that for me. Similarly I've worked on is to add the fdopen function to LLVM-libc. It currently is implemented very similar to fopen, and I think fopen could be implemented using fdopen like how it's done in musl libc https://elixir.bootlin.com/musl/v1.2.4/source/src/stdio/fopen.c#L26. It still needs a test before merging. I've also looked into two existing test suites that fail for me. The first one is platform_file (reported here: https://github.com/llvm/llvm-project/issues/64663). I think that this one fails because LLVM-libc tests uses the host libc for testing, and it ends up having duplicate standard streams in the test binary. To solve this I learned to use git-bisect to track down the commit that introduced this bug. The commit moved around std{in,out,err} definitions, and by using nm I could see that the binary before the commit did not have its own standard streams, but after the commit it provided its own (and dynamically linked to glibc which has symbol versioned standard streams). The author of the commit is aware of the issue. Another issue is an abort test that seems to fail when running a lot of tests multithreaded, I haven't looked into this much, but I will definitely take another look. When running the test by itself it always works. Two small things I have done worth mentioning is: 1) https://reviews.llvm.org/D157842 This defines __UTS_NAME_LENGTH for __APPLE__, another commit I made previously that changed wrong __unix__ checks to __linux__ made macOS targets use the generic 1024 length instead of the previous Linux specific 65. Both of those are wrong, and this commit changes it to match XNU with length 256. 2) https://github.com/gentoo/gentoo/commit/83c21c4aa868798e09be47c810f04783= 29c6dd1b This adds USE=3Dstatic-libs to sci-libs/openlibm. Openlibm currently has a lot more functions than the LLVM-libc provided libm, so it is a great alternative to use in the meantime. However, LLVM-libc only supports static linking, so therefore the USE-flag was needed. Next week I hope to merge all the Crossdev changes and also continue work on LLVM-libc. =2D --=20 catcream =2D----BEGIN PGP SIGNATURE----- iIcEARYKAC8WIQTrvBqrbtsVNc2oScop9g9HYPvztAUCZNrMTBEcY2F0QGNhdGNy ZWFtLm9yZwAKCRAp9g9HYPvztDCYAQDvR/iCVFa9mLm4a/5fWNve0BYbai6fMZOW k9/x1SBe7QD7BtFZQ43u0tP9qLRE/yeP5QHkgN508zGSVQsqcoaVGQg=3D =3DvpON =2D----END PGP SIGNATURE-----