Re: Does newlib support x86_64-pc-linux-gnu?

jdoubleu <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hi Keith,

thanks for the info! I'll try that approach out.

But you're right, it's probably better to just run an emulator.


Cheers
---
πŸ™ŽπŸ»β€β™‚οΈ jdoubleu
On 5/14/2022 9:20 PM, Keith Packard wrote:
> 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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.