From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from deimos.uberspace.de (deimos.uberspace.de [185.26.156.152]) by sourceware.org (Postfix) with ESMTPS id 68D103858D3C for ; Tue, 17 May 2022 11:13:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 68D103858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=jdoubleu.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jdoubleu.de Received: (qmail 22750 invoked by uid 989); 17 May 2022 11:13:33 -0000 Authentication-Results: deimos.uberspace.de; auth=pass (plain) Message-ID: Date: Tue, 17 May 2022 13:13:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: Does newlib support x86_64-pc-linux-gnu? Content-Language: de-DE To: Keith Packard References: <5027bd1e-f976-fd55-dd70-f86cc805d969@jdoubleu.de> <87r14vnco6.fsf@keithp.com> Cc: newlib@sourceware.org From: jdoubleu In-Reply-To: <87r14vnco6.fsf@keithp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Bar: -- X-Rspamd-Report: BAYES_HAM(-2.972562) MIME_GOOD(-0.1) SUBJECT_ENDS_QUESTION(1) X-Rspamd-Score: -2.072562 Received: from unknown (HELO unkown) (::1) by deimos.uberspace.de (Haraka/2.8.28) with ESMTPSA; Tue, 17 May 2022 13:13:33 +0200 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: Tue, 17 May 2022 11:13:37 -0000 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 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. >