[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#889841: binutils: Please add support for new architecture "riscv64" (RISC-V 64 bits little-endian)



Package: binutils
Version: 2.30-2
Severity: wishlist
Tags: patch
Control: user debian-riscv@lists.debian.org
Control: usertag -1 + riscv64

Hello,

Please find below a patch to add support for the riscv64 architecture.
It is already supported upstream, some only changes in the debian/
directory are needed.

Please note however that while this architecture is supported in dpkg
testing/unstable, it is not supported yet in dpkg stable, and that will
cause the package to be rejected by dak. I'll ping this bug report once
it is available. In the meantime it allows people to review the patch or
to use it to build a local version of binutils with the patch.

Thanks


diff -Nru binutils-2.30/debian/control binutils-2.30/debian/control
--- binutils-2.30/debian/control	2018-01-06 05:16:11.000000000 +0100
+++ binutils-2.30/debian/control	2018-02-07 12:17:03.000000000 +0100
@@ -674,6 +673,33 @@
 Description: GNU binary utilities, for powerpc64-linux-gnu target (debug symbols)
  This package provides debug symbols for binutils-powerpc64-linux-gnu.
 
+Package: binutils-riscv64-linux-gnu
+Priority: optional
+Architecture: riscv64 amd64 i386 x32
+Multi-Arch: foreign
+Depends: binutils-common (= ${binary:Version}),
+  ${shlibs:Depends}, ${extraDepends}
+Suggests: binutils-doc (= ${source:Version})
+Provides: 
+Breaks: binutils (<< 2.29-6)
+Replaces: binutils (<< 2.29-6)
+Description: GNU binary utilities, for riscv64-linux-gnu target
+ This package provides GNU assembler, linker and binary utilities
+ for the riscv64-linux-gnu target, for use in a cross-compilation
+ environment.
+ .
+ You don't need this package unless you plan to cross-compile programs
+ for riscv64-linux-gnu.
+
+Package: binutils-riscv64-linux-gnu-dbg
+Section: debug
+Priority: optional
+Architecture: riscv64 amd64 i386 x32
+Multi-Arch: foreign
+Depends: binutils-riscv64-linux-gnu (= ${binary:Version})
+Description: GNU binary utilities, for riscv64-linux-gnu target (debug symbols)
+ This package provides debug symbols for binutils-riscv64-linux-gnu.
+
 Package: binutils-sh4-linux-gnu
 Priority: optional
 Architecture: sh4 amd64 i386 x32
diff -Nru binutils-2.30/debian/rules binutils-2.30/debian/rules
--- binutils-2.30/debian/rules	2018-01-29 14:31:02.000000000 +0100
+++ binutils-2.30/debian/rules	2018-02-07 12:17:03.000000000 +0100
@@ -98,7 +98,7 @@
 
 NATIVE_ARCHS ?= amd64 i386 arm64 armhf armel mips mipsel mips64el \
 	ppc64el s390x
-NATIVE_ARCHS += alpha hppa ia64 m68k mips64 powerpc powerpcspe ppc64 sh4 sparc64 x32
+NATIVE_ARCHS += alpha hppa ia64 m68k mips64 powerpc powerpcspe ppc64 riscv64 sh4 sparc64 x32
 NATIVE_ARCHS += hurd-i386 kfreebsd-amd64 kfreebsd-i386
 NATIVE_ARCHS += mipsn32 mipsn32el
 NATIVE_ARCHS += mipsn32r6 mipsn32r6el mipsr6 mipsr6el mips64r6 mips64r6el
@@ -115,7 +115,7 @@
       CROSS_ARCHS += mips mipsel mips64el
       CROSS_ARCHS += alpha hppa m68k
       CROSS_ARCHS += mips64 mipsn32 mipsn32el
-      CROSS_ARCHS += powerpc powerpcspe ppc64 sh4 sparc64
+      CROSS_ARCHS += powerpc powerpcspe ppc64 riscv64 sh4 sparc64
       CROSS_ARCHS += mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el
       CROSS_ARCHS += ia64
       CROSS_ARCHS += kfreebsd-amd64 kfreebsd-i386 hurd-i386
@@ -163,6 +163,7 @@
 HOST_ARCHS_mips64el = amd64 i386 x32
 HOST_ARCHS_powerpcspe = amd64 i386 x32
 HOST_ARCHS_ppc64 = amd64 i386 x32 ppc64el
+HOST_ARCHS_riscv64 = amd64 i386 x32
 HOST_ARCHS_sh4 = amd64 i386 x32
 HOST_ARCHS_sparc64 = amd64 i386 x32
 
@@ -682,6 +683,7 @@
 	powerpc-linux-gnu \
 	powerpc64-linux-gnu \
 	powerpc64le-linux-gnu \
+	riscv64-linux-gnu \
 	s390-linux-gnu \
 	s390x-linux-gnu \
 	sh-linux-gnu \


Reply to: