mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-02 01:28:42 +08:00
Add libc-bench
This commit is contained in:
parent
a58b49d363
commit
541585e186
34
recipes/libc-bench/recipe.sh
Normal file
34
recipes/libc-bench/recipe.sh
Normal file
@ -0,0 +1,34 @@
|
||||
VERSION=20110206
|
||||
TAR=http://www.etalabs.net/releases/libc-bench-$VERSION.tar.gz
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
make -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -v "$dest/bin"
|
||||
cp -v "libc-bench" "$dest/bin"
|
||||
skip=1
|
||||
}
|
||||
42
recipes/libc-bench/redox.patch
Normal file
42
recipes/libc-bench/redox.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff -ruw source/Makefile source-new/Makefile
|
||||
--- source/Makefile 2011-01-31 00:13:00.000000000 -0700
|
||||
+++ source-new/Makefile 2018-12-25 09:07:37.564520567 -0700
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
CFLAGS = -Os
|
||||
LDFLAGS = -static
|
||||
-LIBS = -lpthread -lrt -lpthread
|
||||
+LIBS = -lpthread
|
||||
|
||||
|
||||
all: libc-bench
|
||||
diff -ruw source/utf8.c source-new/utf8.c
|
||||
--- source/utf8.c 2011-01-24 20:08:38.000000000 -0700
|
||||
+++ source-new/utf8.c 2018-12-25 08:52:35.893821291 -0700
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
-#include <langinfo.h>
|
||||
+//#include <langinfo.h>
|
||||
|
||||
size_t b_utf8_bigbuf(void *dummy)
|
||||
{
|
||||
@@ -18,7 +18,7 @@
|
||||
|| setlocale(LC_CTYPE, "en.UTF-8")
|
||||
|| setlocale(LC_CTYPE, "de_DE-8")
|
||||
|| setlocale(LC_CTYPE, "fr_FR-8");
|
||||
- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
|
||||
+ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
|
||||
|
||||
buf = malloc(500000);
|
||||
wbuf = malloc(500000*sizeof(wchar_t));
|
||||
@@ -56,7 +56,7 @@
|
||||
|| setlocale(LC_CTYPE, "en.UTF-8")
|
||||
|| setlocale(LC_CTYPE, "de_DE-8")
|
||||
|| setlocale(LC_CTYPE, "fr_FR-8");
|
||||
- if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
|
||||
+ //if (strcmp(nl_langinfo(CODESET), "UTF-8")) return -1;
|
||||
|
||||
buf = malloc(500000);
|
||||
l = 0;
|
||||
Loading…
Reference in New Issue
Block a user