On Fri, Sep 30, 2016 at 04:45:01PM +0100, Richard W.M. Jones wrote:
> Signed-off-by: Richard W.M. Jones <rjo...@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.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to