From: jdoubleu <hi@jdoubleu.de>
To: Keith Packard <keithp@keithp.com>
Cc: newlib@sourceware.org
Subject: Re: Does newlib support x86_64-pc-linux-gnu?
Date: Tue, 17 May 2022 13:13:27 +0200 [thread overview]
Message-ID: <ccad9bea-8769-0dd3-a0f5-ca3f3dcea2d8@jdoubleu.de> (raw)
In-Reply-To: <87r14vnco6.fsf@keithp.com>
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 <hi@jdoubleu.de> 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.
>
prev parent reply other threads:[~2022-05-17 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 12:50 jdoubleu
2022-05-14 19:20 ` Keith Packard
2022-05-17 11:13 ` jdoubleu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccad9bea-8769-0dd3-a0f5-ca3f3dcea2d8@jdoubleu.de \
--to=hi@jdoubleu.de \
--cc=keithp@keithp.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).