From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id 37DA13858D28 for ; Sat, 14 May 2022 19:21:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37DA13858D28 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=keithp.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=keithp.com Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 8D4EA3F32A7C; Sat, 14 May 2022 12:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1652556060; bh=NoctPtb6Y5ZNPrnOGmhE/vj6EgO/8IZO8BuVxltZUug=; h=From:To:Subject:In-Reply-To:References:Date:From; b=RwYkKt1Zg48nhoy14Jpv7OrlYSTYDsQxU7Ry9PdiqTrIpCmcgxdDHe93NAlTxoiYr VlZ+75hm5uxer3nQAlfGHliD4JpJdIyXmkTZ/Zr/3Qks6GKgQLwWd3xFkalOJx217V MREYxc8JfD9vIh7XHniIf+ALZBk7Xs6IDxBsaAr5Hm94HkKtiaVs+Re7uGQeU0+Juf 6Lvps5X2peiHwW0MxgQ32P2mpClXsVfDqdZouZQJ0to0kgSOdNvosWWVsJNvRVkCP6 KVBaTEyw112c2NrcVRoQq3e6pIxjL6sSxaEz7miIxySejlb83klbfZxytbriBSXELr 0hXxlDWxTo7SA== X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WUXrBcjIqtiO; Sat, 14 May 2022 12:20:58 -0700 (PDT) Received: from keithp.com (koto.keithp.com [192.168.11.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 72B003F32A6E; Sat, 14 May 2022 12:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1652556058; bh=NoctPtb6Y5ZNPrnOGmhE/vj6EgO/8IZO8BuVxltZUug=; h=From:To:Subject:In-Reply-To:References:Date:From; b=uH5YdQHm34hT5ZXjXTciKtSbbW8nVAnZ64Jw8hKX/bk7bA6TmyE7/2A16ZDskCV6f z553qa+R5YPOu8m4FhqMZmRmqKf1zzPPPbhQClD8NOGnvvf5nrExQLbViObGoxbj9n KGz2VPJ3nGx7smlW3fmEu5AqVxNFA8Z6NJLo5ACnI7NTpLpRkkuP9ustsZrW7X0n84 LGy3RvdStcfTqYaV+sNaQvRT+nxmlVrZ83REyPS4w4WzeCxZgoHsa68WFTdrWyAGi+ J+SyCClbvE7ccF2C4PIkbyskVqT5iOVCsFfQ9/5T5phxrMPkSs+mLH+RddT5/PDRUR BdFQ+YbEFVGUA== Received: by keithp.com (Postfix, from userid 1000) id 05BF91E601AE; Sat, 14 May 2022 12:20:58 -0700 (PDT) From: Keith Packard To: jdoubleu , newlib@sourceware.org Subject: Re: Does newlib support x86_64-pc-linux-gnu? In-Reply-To: <5027bd1e-f976-fd55-dd70-f86cc805d969@jdoubleu.de> References: <5027bd1e-f976-fd55-dd70-f86cc805d969@jdoubleu.de> Date: Sat, 14 May 2022 12:20:57 -0700 Message-ID: <87r14vnco6.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2022 19:21:04 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable jdoubleu writes: > I'm trying to run the testsuite on my linux host. Right now, all tests=20 > are linked against glibc, causing me to test glibc instead of newlib. > > This would really help me testing newlib, because I don't have any=20 > "special" hardware, nor emulators setup. It does also offer the=20 > possibility to test newlib farily easy in a CI. It's possible, and picolibc (a newlib fork) uses this in it's CI setup. What you do is link newlib *before* glibc so that you pull in the newlib upper-level functions and then use glibc for the syscalls. It does make some development easier, but there are places which are a bit funky -- the 'stat' syscall, in particular, where you need to declare struct stat so that it matches glibc but without using glibc headers (as you'll be compiling against newlib headers). It's not that hard to use an arm or risc-v emulator with semihosting support to test the library though, and that avoids issues like that. =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAmKAARkACgkQ2yIaaQAA ABFkaxAAnqBpN6MmYVbpr8D2HQqwRp2Atc95HymTnW6kJC0Db4IhOSkvl27vyJFo 01Lo6Abk8tkjaH89ze3Gj/5mUKKyNo7Q7ThOaF9bbKn8qRiYkBaQenoS91C8xD0i QRvTB1lW+qtbW2+IGagFBq99aRznLEgtpxrGf9KqOPyLSKpjqXVJWeX9NQ5A1f31 rg0BbdLj8OLB/byNSg180/fYDn/fRjycGa/T1VFGxeSIundpN9gV2OEkkjN0kh8e CuPqioUg/oPrFEUOO5dqUMJSLR4aHUfb+ULyYvERwTalsg1Orzi3pyFZmU685ZMN oLZIvNDSXSTytGDbEL05l8E1yiXJ9eqyCPjos65GtgmEyIZrmX4g9ZCM6xqWBmXS CmiHeeel5NHKMFs9XQvDmmEQZexqALxOLxYZ3bbH/e8XTa/swADe6UWbhCcm99QL JgzkZf/PtLOBC+wNcb4FHxcK54IWsyj7sF/JGi+TZxKffBJJ+rKKCZQVPBeOyAha oe1uj/UavGVqZ92I3Sz/1MBAC6KG8TS07s4/O3s6f/4RhC4piE5EjSN0u7CL4Mo1 mARRCxdeeyt+GMnO8NxCyBh4/FaeWGuH52LsUpPbAWZmkclk0hVi9AX2LGup7Su1 HR2SmMG1PfaMpcWkvU/4EwVlqXoXcTUEpMz6IuhsX6hixXCDNk4= =hJn5 -----END PGP SIGNATURE----- --=-=-=--