Skip to content
Snippets Groups Projects
Commit fabf8fd6 authored by Sören Tempel's avatar Sören Tempel
Browse files

testing/cyclone: backport fix for test-167 and enable it

parent 6d23e30a
No related branches found
No related tags found
No related merge requests found
From fa58b9d538bab5c87fc2040e561b3eca31acbe39 Mon Sep 17 00:00:00 2001
From: Justin Ethier <justin.ethier@gmail.com>
Date: Sun, 8 Aug 2021 21:47:31 -0400
Subject: [PATCH] `fxbit-set?` properly handles negative `i`
---
srfi/143.sld | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/srfi/143.sld b/srfi/143.sld
index d94a216a..b147e0fa 100644
--- a/srfi/143.sld
+++ b/srfi/143.sld
@@ -50,7 +50,7 @@
fxarithmetic-shift
fxarithmetic-shift-left fxarithmetic-shift-right
fxbit-count
- fxif fxbit-set? fxcopy-bit
+ fxif fxcopy-bit
fxfirst-set-bit
fxbit-field
mask
@@ -170,7 +170,12 @@
(fxior (fxand mask n0)
(fxand (fxnot mask) n1)))
- (define-c fxbit-set?
+ (define (fxbit-set? index i)
+ (or (%fxbit-set? index i)
+ (and (negative? i)
+ (>= index (fxlength i)))))
+
+ (define-c %fxbit-set?
"(void* data, int argc, closure _, object k, object index, object i)"
" Cyc_check_fixnum(data, index);
Cyc_check_fixnum(data, i);
......@@ -2,7 +2,7 @@
# Maintainer:
pkgname=cyclone
pkgver=0.31.0
pkgrel=1
pkgrel=2
pkgdesc="A compiler for application development with R7RS Scheme"
url="https://justinethier.github.io/cyclone/"
# mips64: crashes during compilation of first Scheme file with cyclone
......@@ -13,7 +13,8 @@ makedepends="ck-dev cyclone-bootstrap"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/justinethier/cyclone/archive/refs/tags/v$pkgver.tar.gz
0001-Flush-current-output-port-after-writing-prompt-to-it.patch
0002-Don-t-use-conditional-assignment-operator-for-CFLAGS.patch"
0002-Don-t-use-conditional-assignment-operator-for-CFLAGS.patch
0003-fxbit-set-properly-handles-negative-i.patch"
export PREFIX=/usr
export DATADIR=$PREFIX/lib/cyclone
......@@ -32,14 +33,6 @@ export DATADIR=$PREFIX/lib/cyclone
# Flags to use build cyclone compiler, instead of cyclone-bootstrap.
_local_cyclone="./cyclone -I . -COPT '-Iinclude' -CLNK '-L.'"
prepare() {
default_prepare
# Disable test failing on armhf, armv7 and ppc64le for now.
# See https://github.com/justinethier/cyclone/issues/475
sed -i ./tests/srfi-143-tests.scm -e '/test-167/d'
}
build() {
# Build the cyclone compiler using cyclone-bootstrap.
PATH="$PATH:/usr/lib/cyclone-bootstrap/bin" make -j1 cyclone
......@@ -71,4 +64,5 @@ sha512sums="
2671dab73a519c3d7dd49ff820a5137bd5bc90d6313e80874941d59eea9e10436b9b71dfcd7ab79b014c26e259e1ef0a4472d84a3d3514c48222bc24a2da766f cyclone-0.31.0.tar.gz
7d03d91ca50ff23da518ad3e65da5e957b9d5f2d338748c22a9fde59c6d684b90cea2c3f43f390f11bf894a37ccdd53704686d26ac093bcd97fcb557a6f910a2 0001-Flush-current-output-port-after-writing-prompt-to-it.patch
205d0931b36c473ad104ece71f27e3e61de557a4faa5f3bb5ee30c16e87b8cb2a429b1d3945b5e489a111e029d030a32f3304ac283cd605135f16d96fb421267 0002-Don-t-use-conditional-assignment-operator-for-CFLAGS.patch
f31782f163dda6ca6953631f058c7ef99d49d9f3c8669a9b3b783999738d219d29433c30855d1d7eff4ea11dc990f590739c55a08c457c5e7bdd86e6e96be354 0003-fxbit-set-properly-handles-negative-i.patch
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment