mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 16:20:08 +02:00
should be created so that it can be upstreamed as some point, such as replacing -lm with $LIBM etc.
125 lines
3.8 KiB
Diff
125 lines
3.8 KiB
Diff
diff -urN libMicro-0.4.1/bench.sh libMicro-0.4.1-haiku/bench.sh
|
|
--- libMicro-0.4.1/bench.sh 2011-05-11 00:58:23.061079552 +0000
|
|
+++ libMicro-0.4.1-haiku/bench.sh 2012-07-23 22:10:32.466616320 +0000
|
|
@@ -56,7 +56,7 @@
|
|
VDIR2=$VARROOT/1/2/3/4/5/6/7/8/9/0
|
|
|
|
|
|
-OPTS="-E -C 200 -L -S -W"
|
|
+OPTS="-l -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
|
|
@@ -65,7 +65,7 @@
|
|
|
|
touch $IFILE
|
|
|
|
-ARCH=`arch -k`
|
|
+ARCH=`uname -m`
|
|
|
|
# produce benchmark header for easier comparisons
|
|
|
|
diff -urN libMicro-0.4.1/cascade_flock.c libMicro-0.4.1-haiku/cascade_flock.c
|
|
--- libMicro-0.4.1/cascade_flock.c 2011-05-11 00:58:23.063176704 +0000
|
|
+++ libMicro-0.4.1-haiku/cascade_flock.c 2012-07-23 22:02:58.843579392 +0000
|
|
@@ -50,7 +50,7 @@
|
|
#include "libmicro.h"
|
|
|
|
#ifndef LOCK_EX
|
|
-#include "/usr/ucbinclude/sys/file.h"
|
|
+#include "sys/file.h"
|
|
extern int flock(int fd, int operation);
|
|
#endif
|
|
|
|
diff -urN libMicro-0.4.1/Makefile.benchmarks libMicro-0.4.1-haiku/Makefile.benchmarks
|
|
--- libMicro-0.4.1/Makefile.benchmarks 2011-05-11 00:58:23.066584576 +0000
|
|
+++ libMicro-0.4.1-haiku/Makefile.benchmarks 2012-07-23 22:09:00.531365888 +0000
|
|
@@ -50,7 +50,7 @@
|
|
fcntl_ndelay \
|
|
file_lock \
|
|
fork \
|
|
- getcontext \
|
|
+# getcontext \
|
|
getenv \
|
|
gettimeofday \
|
|
getpeername \
|
|
diff -urN libMicro-0.4.1/Makefile.com libMicro-0.4.1-haiku/Makefile.com
|
|
--- libMicro-0.4.1/Makefile.com 2011-05-11 00:58:23.057147392 +0000
|
|
+++ libMicro-0.4.1-haiku/Makefile.com 2012-07-23 22:08:55.440664064 +0000
|
|
@@ -54,10 +54,10 @@
|
|
|
|
|
|
$(EXTRA_CFILES:%.c=%.lint):
|
|
- $(LINT) ../$(@:%.lint=%.c) -I. -mu -lc libmicro.ln -lm
|
|
+ $(LINT) ../$(@:%.lint=%.c) -I. -mu -lc libmicro.ln
|
|
|
|
%.lint: ../%.c libmicro.ln
|
|
- $(LINT) -mu $(CPPFLAGS) $< libmicro.ln -lpthread -lsocket -lnsl -lm
|
|
+ $(LINT) -mu $(CPPFLAGS) $< libmicro.ln -lnetwork
|
|
|
|
%.o: ../%.c
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
@@ -107,13 +107,13 @@
|
|
echo "char * compiler_version = \""`$(COMPILER_VERSION_CMD)`"\";" > tattle.h
|
|
echo "char * CC = \""$(CC)"\";" >> tattle.h
|
|
echo "char * extra_compiler_flags = \""$(extra_CFLAGS)"\";" >> tattle.h
|
|
- $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lrt -lm
|
|
+ $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a
|
|
|
|
$(ELIDED_BENCHMARKS): ../elided.c
|
|
$(CC) -o $(@) ../elided.c
|
|
|
|
%: libmicro.a %.o
|
|
- $(CC) -o $(@) $(@).o $($(@)_EXTRA_DEPS) $(CFLAGS) libmicro.a $($(@)_EXTRA_LIBS) $(EXTRA_LIBS) -lpthread -lm
|
|
+ $(CC) -o $(@) $(@).o $($(@)_EXTRA_DEPS) $(CFLAGS) libmicro.a $($(@)_EXTRA_LIBS) $(EXTRA_LIBS) -lnetwork
|
|
|
|
exec: exec_bin
|
|
|
|
diff -urN libMicro-0.4.1/Makefile.Haiku libMicro-0.4.1-haiku/Makefile.Haiku
|
|
--- libMicro-0.4.1/Makefile.Haiku 1970-01-01 00:00:00.000000000 +0000
|
|
+++ libMicro-0.4.1-haiku/Makefile.Haiku 2012-07-23 22:08:51.105381888 +0000
|
|
@@ -0,0 +1,43 @@
|
|
+#
|
|
+# CDDL HEADER START
|
|
+#
|
|
+# The contents of this file are subject to the terms
|
|
+# of the Common Development and Distribution License
|
|
+# (the "License"). You may not use this file except
|
|
+# in compliance with the License.
|
|
+#
|
|
+# You can obtain a copy of the license at
|
|
+# src/OPENSOLARIS.LICENSE
|
|
+# or http://www.opensolaris.org/os/licensing.
|
|
+# See the License for the specific language governing
|
|
+# permissions and limitations under the License.
|
|
+#
|
|
+# When distributing Covered Code, include this CDDL
|
|
+# HEADER in each file and include the License file at
|
|
+# usr/src/OPENSOLARIS.LICENSE. If applicable,
|
|
+# add the following below this CDDL HEADER, with the
|
|
+# fields enclosed by brackets "[]" replaced with your
|
|
+# own identifying information: Portions Copyright [yyyy]
|
|
+# [name of copyright owner]
|
|
+#
|
|
+# CDDL HEADER END
|
|
+#
|
|
+
|
|
+#
|
|
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
|
+# Use is subject to license terms.
|
|
+#
|
|
+
|
|
+
|
|
+CC= gcc
|
|
+
|
|
+#CFLAGS= -O -DUSE_SEMOP
|
|
+CPPFLAGS= -DUSE_SEMOP -D_REENTRANT
|
|
+MATHLIB=
|
|
+
|
|
+ELIDED_BENCHMARKS= \
|
|
+ cachetocache \
|
|
+ atomic
|
|
+
|
|
+
|
|
+include ../Makefile.com
|