mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
testing/csmith: new aport
https://embed.cs.utah.edu/csmith/ Tool for generating random C programs
This commit is contained in:
parent
7222accc7e
commit
3ea997b3ec
35
testing/csmith/APKBUILD
Normal file
35
testing/csmith/APKBUILD
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
|
||||||
|
pkgname=csmith
|
||||||
|
pkgver=2.3.0
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Tool for generating random C programs"
|
||||||
|
url="https://embed.cs.utah.edu/csmith/"
|
||||||
|
arch="all"
|
||||||
|
license="BSD-2-Clause"
|
||||||
|
depends=""
|
||||||
|
makedepends="m4"
|
||||||
|
subpackages="$pkgname-doc"
|
||||||
|
options="!check" # no test suite
|
||||||
|
source="https://embed.cs.utah.edu/csmith/$pkgname-$pkgver.tar.gz
|
||||||
|
support-ppc64le.patch
|
||||||
|
fix-s390x-read_time.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$pkgname-$pkgver"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$builddir"
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$builddir"
|
||||||
|
make DESTDIR="$pkgdir" install
|
||||||
|
|
||||||
|
# scripts depend on source tree to be available
|
||||||
|
rm "$pkgdir"/usr/bin/*.pl "$pkgdir"/usr/bin/*.in
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="abab6ace0fa6b1be248c3ffbac7069bcadbad7b7af5673660849c8bebf84de040afcf527b2fefbbcb68b9164a43e08684c147496fb2b25bbffef7495dba39041 csmith-2.3.0.tar.gz
|
||||||
|
eb91f89577b583b4a6200ae4b804577217ff71c5dfa956ac28b64a3556cdafec2c43a231770d68f2a50737a78f8e5981f6ceeed1e90c49d4218fde6a7b302c6c support-ppc64le.patch
|
||||||
|
a81623231bc917166a49370f3a3a48f4dd4f7a1b1573548c110e6aad31be64fadbf509c595c15c1ccedb881a735dac4e15a6a32385524c1eaa04a87eb6523fe7 fix-s390x-read_time.patch"
|
12
testing/csmith/fix-s390x-read_time.patch
Normal file
12
testing/csmith/fix-s390x-read_time.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
http://bugs.debian.org/872604
|
||||||
|
--- csmith-2.3.0/src/platform.cpp.orig
|
||||||
|
+++ csmith-2.3.0/src/platform.cpp
|
||||||
|
@@ -79,7 +79,7 @@
|
||||||
|
static unsigned long long read_time(void)
|
||||||
|
{
|
||||||
|
unsigned long long clk;
|
||||||
|
- asm volatile("stckf %0" : "=Q" (clk) : : "cc");
|
||||||
|
+ asm volatile("stck %0" : "=Q" (clk) : : "cc");
|
||||||
|
return clk;
|
||||||
|
}
|
||||||
|
# elif defined(__i386__) || defined(__x86_64__)
|
28
testing/csmith/support-ppc64le.patch
Normal file
28
testing/csmith/support-ppc64le.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From c05ee1d3edfba74e61404666de4f251b42020062 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||||
|
Date: Tue, 21 Nov 2017 08:32:25 +0900
|
||||||
|
Subject: [PATCH] Add support powerpc64le
|
||||||
|
|
||||||
|
This supports little endian of powerpc64.
|
||||||
|
|
||||||
|
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||||
|
---
|
||||||
|
src/platform.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/platform.cpp b/src/platform.cpp
|
||||||
|
index 248ae6e..ff69361 100644
|
||||||
|
--- a/src/platform.cpp
|
||||||
|
+++ b/src/platform.cpp
|
||||||
|
@@ -57,7 +57,7 @@
|
||||||
|
// from the current time.
|
||||||
|
//
|
||||||
|
#ifndef HAVE_ARC4RANDOM_BUF
|
||||||
|
-# if defined(__powerpc__) || defined(__powerpc64__)
|
||||||
|
+# if defined(__powerpc__) || defined(__powerpc64__) || defined(__powerpc64le__)
|
||||||
|
static inline unsigned long read_time(void)
|
||||||
|
{
|
||||||
|
unsigned long a;
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user