riscvarchive / riscv-linux

RISC-V Linux Port
606 stars 210 forks source link

"uname -m" reports "riscv", not "riscv64" #17

Closed palmer-dabbelt closed 8 years ago

palmer-dabbelt commented 9 years ago

This causes config.{guess,sub} to fail because the upstreamed tuple is "riscv64-unknown-linux-gnu", not "riscv-unknown-linux-gnu". There's a super easy fix: apply the following patch and "make ARCH=riscv64", but since the patch touches "linux/Makefile" it can't be merged here because of how riscv-linux.git is setup.

diff --git a/Makefile b/Makefile
index 95a0e82..6e2ff96 100644
--- a/Makefile
+++ b/Makefile
@@ -263,6 +263,14 @@ ifeq ($(ARCH),x86_64)
         SRCARCH := x86
 endif

+# Additional ARCH settings for RISC-V
+ifeq ($(ARCH),riscv32)
+       SRCARCH := riscv
+endif
+ifeq ($(ARCH),riscv64)
+       SRCARCH := riscv
+endif
+
 # Additional ARCH settings for sparc
 ifeq ($(ARCH),sparc32)
        SRCARCH := sparc

This isn't so important because you can always just "./configure --build=riscv64-unknown-linux-gnu", but it is a bit of a headache...

sirnewton01 commented 9 years ago

+1

I'm interested in building a debian port. It'll be important to have consistent naming across the board.

manuelafm commented 8 years ago

It would be quite nice if this could be resolved, for the reasons pointed out by Palmer.

terpstra commented 8 years ago

Hi. I am not 100% clear on the state of this repository. I just got bit by this issue at the RISC-V workshop. Is there someone actively maintaining this repository? If not, I can try to merge some of this stuff in.

aswaterman commented 8 years ago

I've only been passively maintaining it. I'd appreciate the help.

a0u commented 8 years ago

PR #48 fixes the immediate issue with the uts.machine field without needing to modify the top-level Makefile.