Skip to content

Instantly share code, notes, and snippets.

@jmontleon
Created July 27, 2024 20:16
Show Gist options
  • Save jmontleon/82f3609506e0c8f201bf78873b4a49a4 to your computer and use it in GitHub Desktop.
Save jmontleon/82f3609506e0c8f201bf78873b4a49a4 to your computer and use it in GitHub Desktop.
pypy.spec riscv64 diff
$ diff -uNr pypy.spec.orig pypy.spec
--- pypy.spec.orig 2024-07-27 16:15:01.992423633 -0400
+++ pypy.spec 2024-07-27 16:15:11.430444109 -0400
@@ -16,7 +16,7 @@
Name: pypy
Version: %{basever}.15
%global pyversion 2.7
-Release: %autorelease
+Release: %autorelease.riscv64.0.1
Summary: Python implementation with a Just-In-Time compiler
# PyPy is MIT
@@ -265,7 +265,7 @@
BuildRequires: python-rpm-macros
-%ifnarch s390
+%ifnarch s390 riscv64
BuildRequires: valgrind-devel
%endif
@@ -495,6 +495,10 @@
%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /')
%endif
+%ifarch riscv64
+export PYPY_MULTIARCH=riscv64-linux-gnu
+%endif
+
BuildPyPy() {
ExeName=$1
Options=$2
@@ -582,7 +586,12 @@
$INTERP ../../rpython/bin/rpython \
%{gcrootfinder_options} \
$Options \
+%ifarch riscv64
+ targetpypystandalone \
+ --withoutmod-_continuation
+%else
targetpypystandalone
+%endif
echo "--------------------------------------------------------------"
echo "--------------------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment