libmicro: fix build

* The 3rd test deadlocks. It's just running getenv from 2 threads.
This commit is contained in:
Adrien Destugues
2014-06-05 12:57:20 +02:00
parent f4a542bc24
commit 57f0a4387e
2 changed files with 73 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ COPYRIGHT="2013 Oracle"
HOMEPAGE="https://java.net/projects/libmicro"
SRC_URI="hg+https://hg.java.net/hg/libmicro~hg-repo#7dd95b416c3c"
REVISION="1"
ARCHITECTURES="!x86 !x86_gcc2"
ARCHITECTURES="!x86 x86_gcc2"
PROVIDES="
libmicro = $portVersion
@@ -29,11 +29,12 @@ BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
cmd:make
cmd:awk
cmd:gcc
cmd:make
"
PATCHES="libmicro-0.4.2.patchset"
PATCHES="libmicro-0.4.2.hg.patchset"
BUILD()
{
@@ -42,5 +43,11 @@ BUILD()
INSTALL()
{
make install
echo "This package does not install. Use haikuporter --test."
false
}
TEST()
{
./bench > output_$haikuVersion
}

View File

@@ -1,4 +1,4 @@
From 4beb46cb703e13ca5b6a055efec5f18c961b11fe Mon Sep 17 00:00:00 2001
From 8cef3c3f453df05b7e32f670afb786926583512e Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Sun, 26 Jan 2014 11:57:02 -0700
Subject: applying patch libmicro-0.4.1.patch
@@ -137,3 +137,64 @@ index 27d95d1..a6634a1 100644
--
1.8.3.4
From 459c52bd6b2394e867ec1657a2b6d83eed4f048d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 5 Jun 2014 12:50:10 +0200
Subject: Undo broken changes from libmicro 1.4.1 patchset.
* Comments inside a multiline in makefiles comment the whole thing. So
all benchmarks after getcontext were not compiled.
* Instead, use the ELIDED system that allows easy exclusion of
benchmarks in a platform specific way.
* Remove -l option from OPTS in the bench script, because the tests
don't know about it.
This gets the testsuite running, but the 3rd test deadlocks.
diff --git a/Makefile.Haiku b/Makefile.Haiku
index 5181d91..f034ce5 100644
--- a/Makefile.Haiku
+++ b/Makefile.Haiku
@@ -36,8 +36,11 @@ CPPFLAGS= -DUSE_SEMOP -D_REENTRANT
MATHLIB=
ELIDED_BENCHMARKS= \
+ atomic \
cachetocache \
- atomic
+ getcontext \
+ mmap \
+ setcontext
include ../Makefile.com
diff --git a/Makefile.benchmarks b/Makefile.benchmarks
index d1b1ff8..ed1923a 100644
--- a/Makefile.benchmarks
+++ b/Makefile.benchmarks
@@ -50,7 +50,7 @@ ALL= \
fcntl_ndelay \
file_lock \
fork \
-# getcontext \
+ getcontext \
getenv \
gettimeofday \
getpeername \
diff --git a/bench.sh b/bench.sh
index 24ca1d9..709cfe3 100644
--- a/bench.sh
+++ b/bench.sh
@@ -56,7 +56,7 @@ VDIR1=$VARROOT/0/1/2/3/4/5/6/7/8/9
VDIR2=$VARROOT/1/2/3/4/5/6/7/8/9/0
-OPTS="-l -E -C 200 -L -S -W"
+OPTS="-E -C 200 -L -S -W"
dd if=/dev/zero of=$TFILE bs=1024k count=10 2>/dev/null
dd if=/dev/zero of=$VFILE bs=1024k count=10 2>/dev/null
--
1.8.3.4