On 2018-03-08 12:52, Aurelien Jarno wrote:
> Package: python3.6
> Version: 3.6.4-4
> Severity: wishlist
> Tags: patch
> User: debian-ri...@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.

It happened that I forgot to update debian/multiarch.h.in in my previous
patch. Please find a new version attached.

Thanks,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net
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/multiarch.h.in python3.6-3.6.4/debian/multiarch.h.in
--- python3.6-3.6.4/debian/multiarch.h.in
+++ python3.6-3.6.4/debian/multiarch.h.in
@@ -81,6 +81,12 @@
 #  include <sparc64-linux-gnu/@subdir@/@header@>
 # elif defined(__sparc__)
 #  include <sparc-linux-gnu/@subdir@/@header@>
+# elif defined(__riscv)
+#  if __riscv_xlen == 64
+#    include <riscv64-linux-gnu/@subdir@/@header@>
+#  else
+#    include <riscv32-linux-gnu/@subdir@/@header@>
+#  endif
 # else
 #   error unknown multiarch location for @header@
 # endif
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 via email to