Re: Does newlib support x86_64-pc-linux-gnu?
Keith Packard <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
jdoubleu <[email protected]> writes: > I'm trying to run the testsuite on my linux host. Right now, all tests > 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 > "special" hardware, nor emulators setup. It does also offer the > 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. -- -keith
signature.asc
(application/pgp-signature, 832 B)
-----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-----