Fix the build on architectures that the JIT doesn't support
- build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs
This commit is contained in:
parent
d853ff6a5b
commit
3ca83f1944
39
pypy.spec
39
pypy.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pypy
|
Name: pypy
|
||||||
Version: 1.4.1
|
Version: 1.4.1
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Summary: Python implementation with a Just-In-Time compiler
|
Summary: Python implementation with a Just-In-Time compiler
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -74,7 +74,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||||||
# [Timer] Total: --- 5215.3 s
|
# [Timer] Total: --- 5215.3 s
|
||||||
|
|
||||||
|
|
||||||
# Should we build a "pypy" binary? (with jit)
|
# We will build a "pypy" binary.
|
||||||
|
#
|
||||||
|
# Unfortunately, the JIT support is only available on some architectures.
|
||||||
|
#
|
||||||
# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the
|
# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the
|
||||||
# following options:
|
# following options:
|
||||||
# 'i386', 'x86'
|
# 'i386', 'x86'
|
||||||
@ -82,6 +85,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||||||
# 'x86_64'
|
# 'x86_64'
|
||||||
# 'cli'
|
# 'cli'
|
||||||
# 'llvm'
|
# 'llvm'
|
||||||
|
#
|
||||||
|
# We will only build with JIT support on those architectures, and build without
|
||||||
|
# it on the other archs. The resulting binary will typically be slower than
|
||||||
|
# CPython for the latter case.
|
||||||
|
#
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
# FIXME: is there a better way of expressing "intel" here?
|
# FIXME: is there a better way of expressing "intel" here?
|
||||||
%global with_jit 1
|
%global with_jit 1
|
||||||
@ -225,8 +233,16 @@ BuildRequires: /usr/bin/execstack
|
|||||||
Requires: pypy-libs = %{version}-%{release}
|
Requires: pypy-libs = %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PyPy's implementation of Python, featuring a Just-In-Time compiler, and various
|
PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU
|
||||||
optimized implementations of the standard types (strings, dictionaries, etc)
|
architectures, and various optimized implementations of the standard types
|
||||||
|
(strings, dictionaries, etc)
|
||||||
|
|
||||||
|
%if 0%{with_jit}
|
||||||
|
This build of PyPy has JIT-compilation enabled.
|
||||||
|
%else
|
||||||
|
This build of PyPy has JIT-compilation disabled, as it is not supported on this
|
||||||
|
CPU architecture.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
@ -411,11 +427,12 @@ BuildPyPy() {
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
%if 0%{with_jit}
|
|
||||||
BuildPyPy \
|
BuildPyPy \
|
||||||
pypy \
|
pypy \
|
||||||
"-Ojit"
|
%if 0%{with_jit}
|
||||||
|
"-Ojit" \
|
||||||
%endif
|
%endif
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%if 0%{with_stackless}
|
%if 0%{with_stackless}
|
||||||
BuildPyPy \
|
BuildPyPy \
|
||||||
@ -448,9 +465,7 @@ InstallPyPy() {
|
|||||||
|
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
|
|
||||||
%if 0%{with_jit}
|
|
||||||
InstallPyPy pypy
|
InstallPyPy pypy
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{with_stackless}
|
%if 0%{with_stackless}
|
||||||
InstallPyPy pypy-stackless
|
InstallPyPy pypy-stackless
|
||||||
@ -799,9 +814,7 @@ CheckPyPy() {
|
|||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
%if 0%{with_jit}
|
|
||||||
CheckPyPy pypy
|
CheckPyPy pypy
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{with_stackless}
|
%if 0%{with_stackless}
|
||||||
CheckPyPy pypy-stackless
|
CheckPyPy pypy-stackless
|
||||||
@ -825,12 +838,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{pypyprefix}/lib_pypy/
|
%{pypyprefix}/lib_pypy/
|
||||||
%{pypyprefix}/site-packages/
|
%{pypyprefix}/site-packages/
|
||||||
|
|
||||||
%if 0%{with_jit}
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE README
|
%doc LICENSE README
|
||||||
%{_bindir}/pypy
|
%{_bindir}/pypy
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -847,6 +858,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 20 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-10
|
||||||
|
- build a /usr/bin/pypy (but without the JIT compiler) on architectures that
|
||||||
|
don't support the JIT, so that they do at least have something that runs
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-9
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user