mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
stress_ng: update to version 0.16.05 (#9528)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
From 521487e8ee65dd3e5a636b6f037eae9718e321a5 Mon Sep 17 00:00:00 2001
|
||||
From 7e2a6de23a1536e2a4607f574f6acbb8d14e75bd Mon Sep 17 00:00:00 2001
|
||||
From: David Karoly <david.karoly@outlook.com>
|
||||
Date: Sat, 1 Oct 2022 21:04:09 +0200
|
||||
Subject: stress-touch: fix build
|
||||
|
||||
|
||||
diff --git a/stress-touch.c b/stress-touch.c
|
||||
index 9e412d5..2601fd0 100644
|
||||
index dfcfe2c..1648cf4 100644
|
||||
--- a/stress-touch.c
|
||||
+++ b/stress-touch.c
|
||||
@@ -185,7 +185,7 @@ static void stress_touch_dir_clean(const stress_args_t *args)
|
||||
@@ -187,7 +187,7 @@ static void stress_touch_dir_clean(const stress_args_t *args)
|
||||
if (!dir)
|
||||
return;
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
@@ -1,72 +0,0 @@
|
||||
From 23ea2d5e549bc7dab80b08cce909a3558bfbb270 Mon Sep 17 00:00:00 2001
|
||||
From: David Karoly <david.karoly@outlook.com>
|
||||
Date: Fri, 26 Nov 2021 17:45:23 +0000
|
||||
Subject: disable too large alignment on 32-bit Haiku
|
||||
|
||||
|
||||
diff --git a/stress-icache.c b/stress-icache.c
|
||||
index c53ecb3..2cc01e2 100644
|
||||
--- a/stress-icache.c
|
||||
+++ b/stress-icache.c
|
||||
@@ -169,14 +169,14 @@ func_name(const stress_args_t *args) \
|
||||
return EXIT_SUCCESS; \
|
||||
}
|
||||
|
||||
-#if defined(HAVE_ALIGNED_64K)
|
||||
-STRESS_ICACHE_FUNC(stress_icache_func_64K, SIZE_64K)
|
||||
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
|
||||
+STRESS_ICACHE_FUNC(stress_icache_func_64K, SIZE_4K)
|
||||
#endif
|
||||
STRESS_ICACHE_FUNC(stress_icache_func_16K, SIZE_16K)
|
||||
STRESS_ICACHE_FUNC(stress_icache_func_4K, SIZE_4K)
|
||||
|
||||
-#if defined(HAVE_ALIGNED_64K)
|
||||
-STRESS_ICACHE(stress_icache_64K, SIZE_64K, stress_icache_func_64K)
|
||||
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
|
||||
+STRESS_ICACHE(stress_icache_64K, SIZE_4K, stress_icache_func_64K)
|
||||
#endif
|
||||
STRESS_ICACHE(stress_icache_16K, SIZE_16K, stress_icache_func_16K)
|
||||
STRESS_ICACHE(stress_icache_4K, SIZE_4K, stress_icache_func_4K)
|
||||
@@ -201,13 +201,13 @@ static int stress_icache(const stress_args_t *args)
|
||||
case SIZE_16K:
|
||||
ret = stress_icache_16K(args);
|
||||
break;
|
||||
-#if defined(HAVE_ALIGNED_64K)
|
||||
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
|
||||
case SIZE_64K:
|
||||
ret = stress_icache_64K(args);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
-#if defined(HAVE_ALIGNED_64K)
|
||||
+#if defined(HAVE_ALIGNED_64K) && !defined(__HAIKU__)
|
||||
pr_inf("%s: page size %zu is not %u or %u or %u, cannot test\n",
|
||||
args->name, args->page_size,
|
||||
SIZE_4K, SIZE_16K, SIZE_64K);
|
||||
diff --git a/stress-vecfp.c b/stress-vecfp.c
|
||||
index aa2b379..01da054 100644
|
||||
--- a/stress-vecfp.c
|
||||
+++ b/stress-vecfp.c
|
||||
@@ -58,11 +58,19 @@ typedef double (*stress_vecfp_func_t)(
|
||||
/*
|
||||
* float vectors, named by vfloatwN where N = number of elements width
|
||||
*/
|
||||
+#ifdef __HAIKU__
|
||||
+#define VEC_TYPE_T(type, elements) \
|
||||
+typedef union { \
|
||||
+ type v __attribute__ ((vector_size(sizeof(type) * elements)));\
|
||||
+ type f[elements]; \
|
||||
+} stress_vecfp_ ## type ## _ ## elements ## _t;
|
||||
+#else
|
||||
#define VEC_TYPE_T(type, elements) \
|
||||
typedef union { \
|
||||
type v ALIGNED(2048) __attribute__ ((vector_size(sizeof(type) * elements)));\
|
||||
type f[elements] ALIGNED(2048); \
|
||||
} stress_vecfp_ ## type ## _ ## elements ## _t;
|
||||
+#endif
|
||||
|
||||
VEC_TYPE_T(float, 256)
|
||||
VEC_TYPE_T(float, 128)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From eb5424b865e9b0a93dfac32d5c2d86bd19095c24 Mon Sep 17 00:00:00 2001
|
||||
From: David Karoly <david.karoly@outlook.com>
|
||||
Date: Fri, 26 Nov 2021 17:45:23 +0000
|
||||
Subject: disable too large alignment on 32-bit Haiku
|
||||
|
||||
|
||||
diff --git a/stress-vecfp.c b/stress-vecfp.c
|
||||
index 5277266..f45b189 100644
|
||||
--- a/stress-vecfp.c
|
||||
+++ b/stress-vecfp.c
|
||||
@@ -63,11 +63,19 @@ typedef double (*stress_vecfp_func_t)(
|
||||
/*
|
||||
* float vectors, named by vfloatwN where N = number of elements width
|
||||
*/
|
||||
+#ifdef __HAIKU__
|
||||
+#define VEC_TYPE_T(type, elements) \
|
||||
+typedef union { \
|
||||
+ type v __attribute__ ((vector_size(sizeof(type) * elements)));\
|
||||
+ type f[elements]; \
|
||||
+} stress_vecfp_ ## type ## _ ## elements ## _t;
|
||||
+#else
|
||||
#define VEC_TYPE_T(type, elements) \
|
||||
typedef union { \
|
||||
type v ALIGNED(2048) __attribute__ ((vector_size(sizeof(type) * elements)));\
|
||||
type f[elements] ALIGNED(2048); \
|
||||
} stress_vecfp_ ## type ## _ ## elements ## _t;
|
||||
+#endif
|
||||
|
||||
VEC_TYPE_T(float, 256)
|
||||
VEC_TYPE_T(float, 128)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -36,7 +36,7 @@ LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/ColinIanKing/stress-ng/archive/V$portVersion.zip"
|
||||
SOURCE_DIR="stress-ng-$portVersion"
|
||||
CHECKSUM_SHA256="9af9f7ba0ea4db5d10074bb96416a7506b989a05f2b30a6eaa9d18a8da817ff6"
|
||||
CHECKSUM_SHA256="0f547caafbddb8f73e2308c392592b4ba268c251c7f9f3c1e87fe8aa78e44d21"
|
||||
PATCHES="stress_ng-$portVersion.patchset"
|
||||
|
||||
if [ $effectiveTargetArchitecture = x86 ]; then
|
||||
@@ -79,4 +79,7 @@ INSTALL()
|
||||
{
|
||||
mkdir -p $prefix/bin
|
||||
cp stress-ng $prefix/bin/
|
||||
|
||||
install -m 755 -d $dataDir/bash-completion/completions
|
||||
install -m 644 bash-completion/stress-ng $dataDir/bash-completion/completions/stress-ng
|
||||
}
|
||||
Reference in New Issue
Block a user