Convert bool globals to bconds

This commit is contained in:
Miro Hrončok 2022-02-09 13:00:46 +01:00
parent d9b44f8678
commit 7ab528fd75

View File

@ -45,20 +45,20 @@ URL: http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # it on the other archs. The resulting binary will typically be slower than
# CPython for the latter case. # CPython for the latter case.
%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64
%global with_jit 1 %bcond_without jit
%else %else
%global with_jit 0 %bcond_with jit
%endif %endif
# Should we build the emacs JIT-viewing mode? # Should we build the emacs JIT-viewing mode?
%global with_emacs 1 %bcond_without emacs
# Forcibly use the shadow-stack option for detecting GC roots, rather than # Forcibly use the shadow-stack option for detecting GC roots, rather than
# relying on hacking up generated assembler with regexps: # relying on hacking up generated assembler with regexps:
%global shadow_stack 1 %bcond_without shadow_stack
# Easy way to turn off the selftests: # Easy way to turn off the selftests:
%global run_selftests 1 %bcond_without selftests
# We refer to this subdir of the source tree in a few places during the build: # We refer to this subdir of the source tree in a few places during the build:
%global goal_dir pypy/goal %global goal_dir pypy/goal
@ -151,7 +151,7 @@ BuildRequires: valgrind-devel
BuildRequires: time BuildRequires: time
BuildRequires: /usr/bin/free BuildRequires: /usr/bin/free
%if %{run_selftests} %if %{with selftests}
# Used by the selftests, though not by the build: # Used by the selftests, though not by the build:
BuildRequires: gc-devel BuildRequires: gc-devel
@ -163,7 +163,7 @@ BuildRequires: /usr/bin/execstack
BuildRequires: /usr/bin/patchelf BuildRequires: /usr/bin/patchelf
# For byte-compiling the JIT-viewing mode: # For byte-compiling the JIT-viewing mode:
%if %{with_emacs} %if %{with emacs}
BuildRequires: emacs BuildRequires: emacs
%endif %endif
@ -199,7 +199,7 @@ PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler
on some CPU architectures, and various optimized implementations on some CPU architectures, and various optimized implementations
of the standard types (strings, dictionaries, etc.). of the standard types (strings, dictionaries, etc.).
%if 0%{with_jit} %if %{with jit}
This build of PyPy has JIT-compilation enabled. This build of PyPy has JIT-compilation enabled.
%else %else
This build of PyPy has JIT-compilation disabled, as it is not supported on this This build of PyPy has JIT-compilation disabled, as it is not supported on this
@ -212,7 +212,7 @@ Summary: Run-time libraries used by PyPy implementations of Python %{pyversion}
# We supply an emacs mode for the JIT viewer. # We supply an emacs mode for the JIT viewer.
# (This doesn't bring in all of emacs, just the directory structure) # (This doesn't bring in all of emacs, just the directory structure)
%if %{with_emacs} %if %{with emacs}
Requires: emacs-filesystem >= %{_emacs_version} Requires: emacs-filesystem >= %{_emacs_version}
%endif %endif
@ -380,7 +380,7 @@ BuildPyPy() {
# How will we track garbage-collection roots in the generated code? # How will we track garbage-collection roots in the generated code?
# http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html # http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
%if 0%{shadow_stack} %if %{with shadow_stack}
# This is the most portable option, and avoids a reliance on non-guaranteed # This is the most portable option, and avoids a reliance on non-guaranteed
# behaviors within GCC's code generator: use an explicitly-maintained stack # behaviors within GCC's code generator: use an explicitly-maintained stack
# of root pointers: # of root pointers:
@ -449,14 +449,14 @@ BuildPyPy() {
BuildPyPy \ BuildPyPy \
pypy3 \ pypy3 \
%if 0%{with_jit} %if %{with jit}
"-Ojit" \ "-Ojit" \
%else %else
"-O2" \ "-O2" \
%endif %endif
%{nil} %{nil}
%if %{with_emacs} %if %{with emacs}
%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el
%endif %endif
@ -595,7 +595,7 @@ find \
# are acceptable. # are acceptable.
# Install the JIT trace mode for Emacs: # Install the JIT trace mode for Emacs:
%if %{with_emacs} %if %{with emacs}
mkdir -p %{buildroot}/%{_emacs_sitelispdir} mkdir -p %{buildroot}/%{_emacs_sitelispdir}
cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el
cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc
@ -735,9 +735,9 @@ CheckPyPy() {
echo "--------------------------------------------------------------" echo "--------------------------------------------------------------"
} }
%if %{run_selftests} %if %{with selftests}
CheckPyPy pypy%{pyversion}-c CheckPyPy pypy%{pyversion}-c
%endif # run_selftests %endif # with selftests
# Because there's a bunch of binary subpackages and creating # Because there's a bunch of binary subpackages and creating
# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that # /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that
@ -757,7 +757,7 @@ CheckPyPy pypy%{pyversion}-c
%endif %endif
%{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version}
%if %{with_emacs} %if %{with emacs}
%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el
%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc
%endif %endif