diff options
author | oli | 2015-10-03 14:49:53 +0200 |
---|---|---|
committer | oli | 2015-10-03 14:49:53 +0200 |
commit | 83785689ec762daa5d0ee76a3c5e4a557f37a5d8 (patch) | |
tree | cd0fb06a477e99d50e67e6918b68b52eea412ad6 | |
download | aur-83785689ec762daa5d0ee76a3c5e4a557f37a5d8.tar.gz |
updated
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | Makefile | 154 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | nbench | 3 |
4 files changed, 209 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..091169f6848a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = nbench-byte + pkgdesc = A CPU benchmark utility + pkgver = 2.2.3 + pkgrel = 2 + url = http://www.tux.org/~mayer/linux/bmark.html + arch = i686 + arch = x86_64 + arch = armv7h + license = unknown + options = !makeflags + source = http://www.tux.org/~mayer/linux/nbench-byte-2.2.3.tar.gz + source = Makefile + source = nbench + md5sums = 285dfab361080759d477ea1fe7d3093a + md5sums = 3e0850abdaa162c2b2aa05315a98fa24 + md5sums = 7db5ab75dbe53578069f708d787fc437 + +pkgname = nbench-byte + diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..e37f1962a830 --- /dev/null +++ b/Makefile @@ -0,0 +1,154 @@ +# Makefile for nbench, December 11, 1997, Uwe F. Mayer <mayer@tux.org> +# Updated February 18, 2003 + +default: nbench + +########################################################################## +# If you are using gcc-2.7.2.3 or earlier: +# The optimizer of gcc has a bug and in general you should not specify +# -funroll-loops together with -O (or -O2, -O3, etc.) +# This bug is supposed to be fixed with release 2.8 of gcc. +# +# This bug does NOT seem to have an effect on the correct compilation +# of this benchmark suite on my Linux box. However, it leads to +# the dreaded "internal compiler error" message on our alpha +# running DEC Unix 4.0b. The Linux-binary that was used to obtain +# the baseline results was nevertheless compiled with +# CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops +# +# You should leave -static in the CFLAGS so that your sysinfo can be +# compiled into the executable. + +CC = gcc + +# generic options for gcc +#CFLAGS = -s -static -Wall -O3 +CFLAGS = -Wall -O2 + +# if your gcc lets you do it, then try this one +#CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops + +# for gcc on an older Pentium type processor you can try the following +#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -m486 \ +# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ +# -falign-jumps=2 -funroll-loops + +# for a newer gcc on a newer Pentium type processor you can try the following +#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=i686 \ +# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ +# -falign-jumps=2 -funroll-loops + +# for a newer gcc on an Athlon XP type processor you can try the following +#CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -march=athlon-xp \ +# -fforce-addr -fforce-mem -falign-loops=2 -falign-functions=2 \ +# -falign-jumps=2 -funroll-loops + +# For debugging using gcc +#CFLAGS = -g -O3 -Wall -DDEBUG + +########################################################################## +# For Linux machines with more than one binary format. +# The default binaries, depends on your system whether it's elf or aout. +MACHINE= +# a.out code for linux on an elf machine +#MACHINE= -bi486-linuxaout +# elf code for linux on an a.out machine +#MACHINE= -bi486-linuxelf +# if you want a different compiler version and different binaries, for example +#MACHINE= -V2.7.2 -bi486-linuxaout + +########################################################################## +# Read the file README.nonlinux if you are not using Linux + +# for DEC Unix using cc you can try +#CC = cc +#CFLAGS = -O3 +#LINKFLAGS = -s -non_shared + +# for SunOS using cc +#CC = cc +#CFLAGS = -O3 -s + +# for DEC Ultrix using cc +#CC = cc +#CFLAGS = -O2 +#LINKFLAGS = -s + +# for a Mac with OsX and the Darwin environment +#CC = cc +#CFLAGS = -O3 -DOSX + +# For debugging using cc +#CC = cc +#CFLAGS = -g -DDEBUG + +########################################################################## +# If your system does not understand the system command "uname -s -r" +# then comment this out + +# NO_UNAME= -DNO_UNAME + +########################################################################## +# For any Unix flavor you need -DLINUX +# You also need -DLINUX to get the new indices + +DEFINES= -DLINUX $(NO_UNAME) + +########################################################################## +# For LINUX-like systems with gcc +sysinfoc.c: Makefile + ./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS) + +sysinfo.c: Makefile + ./sysinfo.sh $(CC) $(MACHINE) $(DEFINES) $(CFLAGS) + +########################################################################## +# For non-LINUX systems +# Edit the files sysinfo.c and sysinfoc.c to include your system information +# and take sysinfo.c and sysinfoc.c out of the dependencies for nbench0.o + +hardware.o: hardware.c hardware.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c hardware.c + +nbench0.o: nbench0.h nbench0.c nmglobal.h pointer.h hardware.h\ + Makefile sysinfo.c sysinfoc.c + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c nbench0.c + +emfloat.o: emfloat.h emfloat.c nmglobal.h pointer.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c emfloat.c + +pointer.h: pointer Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -o pointer pointer.c + rm -f pointer.h + if [ "4" = `./pointer` ] ; then touch pointer.h ;\ + else echo "#define LONG64" >pointer.h ; fi + +misc.o: misc.h misc.c Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c misc.c + +nbench1.o: nbench1.h nbench1.c wordcat.h nmglobal.h pointer.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c nbench1.c + +sysspec.o: sysspec.h sysspec.c nmglobal.h pointer.h Makefile + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\ + -c sysspec.c + +nbench: emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o + $(CC) $(MACHINE) $(DEFINES) $(CFLAGS) $(LINKFLAGS)\ + emfloat.o misc.o nbench0.o nbench1.o sysspec.o hardware.o\ + -o nbench -lm + +########################################################################## + +clean: + - /bin/rm -f *.o *~ \#* core a.out hello sysinfo.c sysinfoc.c \ + bug pointer pointer.h debugbit.dat + +mrproper: clean + - /bin/rm -f nbench diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3902d6390d82 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Jose Riha <jose1711 gmail com> +# Contributor: kfgz <kfgz at interia dot pl> + +pkgname=nbench-byte +pkgver=2.2.3 +pkgrel=2 +pkgdesc="A CPU benchmark utility" +arch=('i686' 'x86_64' 'armv7h') +url="http://www.tux.org/~mayer/linux/bmark.html" +license=('unknown') +options=(!makeflags) +source=(http://www.tux.org/~mayer/linux/${pkgname}-${pkgver}.tar.gz + Makefile + nbench) +md5sums=(285dfab361080759d477ea1fe7d3093a + 3e0850abdaa162c2b2aa05315a98fa24 + 7db5ab75dbe53578069f708d787fc437) + +build() { + cp Makefile "${srcdir}"/${pkgname}-${pkgver} + cd "${srcdir}"/${pkgname}-${pkgver} + make +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver} + install -dm755 "${pkgdir}"/usr/{bin,share/doc/${pkgname}} + install -m755 nbench "${pkgdir}"/usr/bin/nbench-byte + install -m755 "${srcdir}"/nbench "${pkgdir}"/usr/bin + install -m644 NNET.DAT "${pkgdir}"/usr/bin + install -m644 bdoc.txt "${pkgdir}"/usr/share/doc/${pkgname} + install -m644 Changes "${pkgdir}"/usr/share/doc/${pkgname} +} diff --git a/nbench b/nbench new file mode 100644 index 000000000000..b7ae06e6f3d0 --- /dev/null +++ b/nbench @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/bin +nbench-byte
\ No newline at end of file |