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

Bug#892328: python3.6: Please add support for riscv64



Package: python3.6
Version: 3.6.4-4
Severity: wishlist
Tags: patch
User: debian-riscv@lists.debian.org
Usertags: riscv64

The python3 configure script doesn't know about the platform triplet of
the riscv64 architecture. In addition it requires a small symbols
update. Please find attached a patch to fix both issues.

Note that the same applies to python3.7. Please tell me if you prefer
a separate bug for it.

Thanks.
diff -Nru python3.6-3.6.4/debian/libpython.symbols.in python3.6-3.6.4/debian/libpython.symbols.in
--- python3.6-3.6.4/debian/libpython.symbols.in
+++ python3.6-3.6.4/debian/libpython.symbols.in
@@ -1367,8 +1367,8 @@
  _PyParser_TokenNames@Base @SVER@
  _PyRandom_Fini@Base @SVER@
  _PyRandom_Init@Base @SVER@
- (arch=alpha amd64 arm64 ia64 mips64 mips64el mips64r6 mips64r6el ppc64el kfreebsd-amd64)_PySHA3_KeccakF1600_FastLoop_Absorb@Base @SVER@
- (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64)_PySHA3_KeccakP1600_AddByte@Base @SVER@
+ (arch=alpha amd64 arm64 ia64 mips64 mips64el mips64r6 mips64r6el ppc64el kfreebsd-amd64 riscv64)_PySHA3_KeccakF1600_FastLoop_Absorb@Base @SVER@
+ (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64 !riscv64)_PySHA3_KeccakP1600_AddByte@Base @SVER@
  _PySHA3_KeccakP1600_AddBytes@Base @SVER@
  _PySHA3_KeccakP1600_AddBytesInLane@Base @SVER@
  _PySHA3_KeccakP1600_AddLanes@Base @SVER@
@@ -1385,8 +1385,8 @@
  _PySHA3_KeccakP1600_OverwriteWithZeroes@Base @SVER@
  _PySHA3_KeccakP1600_Permute_12rounds@Base @SVER@
  _PySHA3_KeccakP1600_Permute_24rounds@Base @SVER@
- (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64)_PySHA3_KeccakP1600_Permute_Nrounds@Base @SVER@
- (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64)_PySHA3_KeccakP1600_SetBytesInLaneToZero@Base @SVER@
+ (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64 !riscv64)_PySHA3_KeccakP1600_Permute_Nrounds@Base @SVER@
+ (arch=!alpha !amd64 !arm64 !ia64 !mips64 !mips64el !mips64r6 !mips64r6el !ppc64el !kfreebsd-amd64 !riscv64)_PySHA3_KeccakP1600_SetBytesInLaneToZero@Base @SVER@
  _PySHA3_KeccakWidth1600_Sponge@Base @SVER@
  _PySHA3_KeccakWidth1600_SpongeAbsorb@Base @SVER@
  _PySHA3_KeccakWidth1600_SpongeAbsorbLastFewBits@Base @SVER@
diff -Nru python3.6-3.6.4/debian/patches/riscv64.diff python3.6-3.6.4/debian/patches/riscv64.diff
--- python3.6-3.6.4/debian/patches/riscv64.diff
+++ python3.6-3.6.4/debian/patches/riscv64.diff
@@ -0,0 +1,17 @@
+--- python3.6-3.6.4.orig/configure.ac
++++ python3.6-3.6.4/configure.ac
+@@ -866,6 +866,14 @@ cat >> conftest.c <<EOF
+         sparc64-linux-gnu
+ # elif defined(__sparc__)
+         sparc-linux-gnu
++# elif defined(__riscv)
++#  if __riscv_xlen == 32
++        riscv32-linux-gnu
++#  elif __riscv_xlen == 64
++        riscv64-linux-gnu
++#  else
++#   error unknown platform triplet
++#  endif
+ # else
+ #   error unknown platform triplet
+ # endif
diff -Nru python3.6-3.6.4/debian/patches/series python3.6-3.6.4/debian/patches/series
--- python3.6-3.6.4/debian/patches/series
+++ python3.6-3.6.4/debian/patches/series
@@ -35,3 +35,4 @@
 mips-r6.diff
 local-doc-references.diff
 doc-build-texinfo.diff
+riscv64.diff

Reply to: