[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH rust] Add new target for GNU/Hurd
From: |
Samuel Thibault |
Subject: |
Re: [PATCH rust] Add new target for GNU/Hurd |
Date: |
Mon, 10 Jul 2023 21:53:36 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Sergey Bugaev, le lun. 10 juil. 2023 12:22:21 +0300, a ecrit:
> On Sun, Jul 9, 2023 at 1:05 PM Damien Zammit <damien@zamaudio.com> wrote:
> > supported_targets! {
> > + ("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu),
>
> Arguably the target should be i686-unknown-gnu,
llvm calls it i686-unknown-hurd-gnu (that was an intended behavior, even
when knowing that gnu tools call it i686-unknown-gnu), so we should
probably stick to that.
> > +#[stable(feature = "raw_ext", since = "1.1.0")]
> > +pub type dev_t = u64;
>
> I don't think that's correct. For one thing, dev_t is __UWORD_TYPE
> (like Rust usize) since glibc commit
> 0ec48e3337506fcd33abdd86b5ab9e331564b65c, and it was u32 before that.
Uh, that's odd. Was that part generated?
> > diff --git a/library/std/src/sys/unix/env.rs
> > b/library/std/src/sys/unix/env.rs
> > index 7f5e9b04dba..298b746e28c 100644
> > --- a/library/std/src/sys/unix/env.rs
> > +++ b/library/std/src/sys/unix/env.rs
> > @@ -173,3 +173,14 @@ pub mod os {
> > pub const EXE_SUFFIX: &str = "";
> > pub const EXE_EXTENSION: &str = "";
> > }
> > +
> > +#[cfg(target_os = "hurd")]
> > +pub mod os {
> > + pub const FAMILY: &str = "unix";
> > + pub const OS: &str = "hurd";
>
> Same here, I think "OS" should be "gnu".
I'd tend to keep it "hurd", because "gnu" is confusing for people.
Notably in llvm there are various parts called "gnu" which are the parts
shared between GNU/Linux, GNU/kFreeBSD, and GNU/Hurd.
Samuel
[PATCH rust-libc] i386-gnu: Add GNU/Hurd os, Damien Zammit, 2023/07/09