[systemd-devel] [PATCH] architecture: Add support for the RISC-V architecture.

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Feb 10 14:26:33 UTC 2017


On Fri, Feb 10, 2017 at 12:45:51PM +0000, Richard W.M. Jones wrote:
> On Fri, Sep 30, 2016 at 04:45:01PM +0100, Richard W.M. Jones wrote:
> > Signed-off-by: Richard W.M. Jones <rjones at redhat.com>
> > ---
> >  src/basic/architecture.c | 14 ++++++++++++++
> >  src/basic/architecture.h | 16 ++++++++++++++++
> >  2 files changed, 30 insertions(+)
> > 
> > diff --git a/src/basic/architecture.c b/src/basic/architecture.c
> > index b1c8e91..e1412be 100644
> > --- a/src/basic/architecture.c
> > +++ b/src/basic/architecture.c
> > @@ -123,6 +123,17 @@ int uname_architecture(void) {
> >                  { "crisv32",    ARCHITECTURE_CRIS     },
> >  #elif defined(__nios2__)
> >                  { "nios2",      ARCHITECTURE_NIOS2    },
> > +#elif defined(__riscv__)
> > +                { "riscv32",    ARCHITECTURE_RISCV32  },
> > +                { "riscv64",    ARCHITECTURE_RISCV64  },
> > +                { "riscv128",   ARCHITECTURE_RISCV128 },
> > +#  if __SIZEOF_POINTER__ == 4
> > +                { "riscv",      ARCHITECTURE_RISCV32  },
> > +#  elif __SIZEOF_POINTER__ == 8
> > +                { "riscv",      ARCHITECTURE_RISCV64  },
> > +#  elif __SIZEOF_POINTER__ == 16
> > +                { "riscv",      ARCHITECTURE_RISCV128 },
> > +#  endif
> 
> I just want to say that after this change, RISC-V unilaterally removed
> __riscv__ (and __riscv64 etc which other projects were using).  I'm
> very annoyed about that as it breaks many patches that I sent upstream
> including to systemd.
> 
> GCC changes for RISC-V have subsequently been accepted upstream, so
> they cannot do this again.
> 
> The change is simply s/__riscv__/__riscv/g ie:
> 
> > -#elif defined(__riscv__)
> > +#elif defined(__riscv)
> 
> As we will need to rebuild the whole of Fedora/RISC-V to cope with
> this and other changes, I don't currently have a working GCC (and less
> still a working systemd) so I can't submit a formal patch right now.
> 
> Rich.

https://github.com/systemd/systemd/pull/5304

Zbyszek


More information about the systemd-devel mailing list