* [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging"
@ 2023-02-07 14:21 Sven Püschel
2023-02-07 14:21 ` [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions Sven Püschel
2023-02-10 11:13 ` [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Michael Olbrich
0 siblings, 2 replies; 4+ messages in thread
From: Sven Püschel @ 2023-02-07 14:21 UTC (permalink / raw)
To: ptxdist; +Cc: Sven Püschel
This reverts commit 81761ccf73cb470e310f121f9e62e926e7f7f4aa.
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
patches/lmbench-3.0-a9/autogen.sh | 1 +
.../lmbench-3.0-a9-autotoolize.diff | 258 +++++
...lmbench-3.0-a9-remove-old-buildsystem.diff | 924 ++++++++++++++++++
| 37 +
patches/lmbench-3.0-a9/series | 3 +
rules/lmbench.in | 14 +
rules/lmbench.make | 102 ++
7 files changed, 1339 insertions(+)
create mode 120000 patches/lmbench-3.0-a9/autogen.sh
create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
create mode 100644 patches/lmbench-3.0-a9/series
create mode 100644 rules/lmbench.in
create mode 100644 rules/lmbench.make
diff --git a/patches/lmbench-3.0-a9/autogen.sh b/patches/lmbench-3.0-a9/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/lmbench-3.0-a9/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
new file mode 100644
index 000000000..b41b77b91
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
@@ -0,0 +1,258 @@
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Subject: Add autotool based build system
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ Makefile.am | 3 +
+ autogen.sh | 22 ++++++++++++
+ configure.ac | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/Makefile.am | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 226 insertions(+)
+
+Index: b/Makefile.am
+===================================================================
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,3 @@
++SUBDIRS = \
++ src
++
+Index: b/autogen.sh
+===================================================================
+--- /dev/null
++++ b/autogen.sh
+@@ -0,0 +1,22 @@
++#!/bin/bash
++
++#
++# usage:
++#
++# banner <target name>
++#
++banner() {
++ echo
++ TG=`echo $1 | sed -e "s,/.*/,,g"`
++ LINE=`echo $TG |sed -e "s/./-/g"`
++ echo $LINE
++ echo $TG
++ echo $LINE
++ echo
++}
++
++banner "autoreconf"
++
++autoreconf --force --install --symlink -Wall || exit $?
++
++banner "Finished"
+Index: b/configure.ac
+===================================================================
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,101 @@
++AC_PREREQ(2.59)
++
++AC_INIT([lmbench], [trunk], [bugs@pengutronix.de])
++AC_CONFIG_SRCDIR([src/lmdd.c])
++AC_CANONICAL_BUILD
++AC_CANONICAL_HOST
++
++AM_MAINTAINER_MODE
++
++CFLAGS="${CFLAGS} -W -Wall"
++
++#
++# libtool library versioning stuff
++#
++# Library code modified: REVISION++
++# Interfaces changed/added/removed: CURRENT++ REVISION=0
++# Interfaces added: AGE++
++# Interfaces removed: AGE=0
++LT_CURRENT=0
++LT_REVISION=0
++LT_AGE=0
++AC_SUBST(LT_CURRENT)
++AC_SUBST(LT_REVISION)
++AC_SUBST(LT_AGE)
++
++
++#
++# Checks for programs.
++#
++AC_PROG_CC
++AC_PROG_LIBTOOL
++
++AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
++
++
++#
++# Debugging
++#
++AC_MSG_CHECKING([whether to enable debugging])
++AC_ARG_ENABLE(debug,
++ AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]),
++ [case "$enableval" in
++ y | yes) CONFIG_DEBUG=yes ;;
++ *) CONFIG_DEBUG=no ;;
++ esac],
++ [CONFIG_DEBUG=no])
++AC_MSG_RESULT([${CONFIG_DEBUG}])
++if test "${CONFIG_DEBUG}" = "yes"; then
++ CFLAGS="${CFLAGS} -Werror -Wsign-compare -Wfloat-equal -Wformat-security -g -O1"
++ AC_DEFINE(DEBUG, 1, [debugging])
++else
++ CFLAGS="${CFLAGS} -O2"
++fi
++
++
++#
++# header file checks
++#
++
++AC_CHECK_HEADER([pmap_clnt.h],[CFLAGS="${CFLAGS} -DHAVE_pmap_clnt_h"])
++
++
++#
++# type checks
++#
++
++AC_CHECK_TYPE([uint],[CFLAGS="${CFLAGS} -DHAVE_uint"])
++AC_CHECK_TYPE([uint64],[CFLAGS="${CFLAGS} -DHAVE_uint64"])
++AC_CHECK_TYPE([uint64_t],[CFLAGS="${CFLAGS} -DHAVE_uint64_t"])
++AC_CHECK_TYPE([int64],[CFLAGS="${CFLAGS} -DHAVE_int64"])
++AC_CHECK_TYPE([int64_t],[CFLAGS="${CFLAGS} -DHAVE_int64_t"])
++AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"])
++AC_CHECK_TYPE([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"])
++
++AC_COMPILE_IFELSE(
++[
++ #include <stdlib.h>
++ main() { srand48(973); return (int)(1.0E9 * drand48()); }
++],
++[CFLAGS="${CFLAGS} -DHAVE_DRAND48"])
++
++AC_COMPILE_IFELSE(
++[
++ #include <stdlib.h>
++ main() { srand(973); return (10 * rand()) / RAND_MAX; }
++],
++[CFLAGS="${CFLAGS} -DHAVE_RAND"])
++
++AC_COMPILE_IFELSE(
++[
++ #include <stdlib.h>
++ main() { srandom(973); return (10 * random()) / RAND_MAX; }
++],
++[CFLAGS="${CFLAGS} -DHAVE_RANDOM"])
++
++AC_CONFIG_FILES([
++ Makefile
++ src/Makefile
++])
++AC_OUTPUT
++
+Index: b/src/Makefile.am
+===================================================================
+--- /dev/null
++++ b/src/Makefile.am
+@@ -0,0 +1,100 @@
++bin_PROGRAMS = \
++ bw_file_rd \
++ bw_mem \
++ bw_file_rd \
++ bw_mem \
++ bw_mmap_rd \
++ bw_pipe \
++ bw_tcp \
++ bw_unix \
++ hello \
++ lat_select \
++ lat_pipe \
++ lat_rpc \
++ lat_syscall \
++ lat_tcp \
++ lat_udp \
++ lat_mmap \
++ mhz \
++ lat_proc \
++ lat_pagefault \
++ lat_connect \
++ lat_fs \
++ lat_sig \
++ lat_mem_rd \
++ lat_ctx \
++ lat_sem \
++ memsize \
++ lat_unix \
++ lmdd \
++ timing_o \
++ enough \
++ msleep \
++ loop_o \
++ lat_fifo \
++ lmhttp \
++ lat_http \
++ lat_fcntl \
++ disk \
++ lat_unix_connect \
++ flushdisk \
++ lat_ops \
++ line \
++ tlb \
++ par_mem \
++ par_ops \
++ stream
++
++flushdisk_CPPFLAGS = \
++ -DMAIN
++
++LDADD = \
++ liblmbench.la
++
++lib_LTLIBRARIES = \
++ liblmbench.la
++
++AM_CPPFLAGS = \
++ -I$(top_srcdir)/include \
++ -I$(top_builddir)/include
++# $(libpv_CFLAGS) \
++# $(libstiebel_CFLAGS)
++
++EXTRA_DIST = \
++ autogen.sh
++
++MAINTAINERCLEANFILES = \
++ configure \
++ aclocal.m4 \
++ Makefile.in
++
++#pkgconfigdir = $(libdir)/pkgconfig
++#pkgconfig_DATA = libactor-@name@.pc
++
++#
++# library
++#
++
++#include_HEADERS = \
++# libactor-@name@.h
++
++liblmbench_la_SOURCES = \
++ lib_tcp.c \
++ lib_udp.c \
++ lib_unix.c \
++ lib_timing.c \
++ lib_mem.c \
++ lib_stats.c \
++ lib_debug.c \
++ lib_sched.c \
++ getopt.c
++
++liblmbench_la_LDFLAGS = \
++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
++ -Wl,-no-undefined \
++ -lm
++
++#libactor_@name@_la_LIBADD = \
++# $(libpv_LIBS) \
++# $(libstiebel_LIBS)
++
diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
new file mode 100644
index 000000000..21c1ed39d
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
@@ -0,0 +1,924 @@
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Subject: Add autotool based build system
+
+In order to provide an autotool based build system, remove the old one.
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ Makefile | 74 --------
+ results/Makefile | 333 -------------------------------------
+ src/Makefile | 489 -------------------------------------------------------
+ 3 files changed, 896 deletions(-)
+
+Index: lmbench-3.0-a9/Makefile
+===================================================================
+--- lmbench-3.0-a9.orig/Makefile
++++ /dev/null
+@@ -1,74 +0,0 @@
+-# Makefile for top level of lmbench
+-# $Id$
+-
+-# Possible things to $(MAKE):
+-#
+-# build (default) go to the source directory and build the benchmark
+-# results go to the source directory and build and run the benchmark
+-# rerun run the benchmark again
+-# see see the results that came with this release
+-# Go to the results directory and read the Makefile.
+-# doc.lpr print the documentation
+-# doc.x preview the documentation (needs X, groff, pic, etc)
+-# clean go to the subdirs and $(MAKE) clean
+-# get $(MAKE) sure all files are checked out
+-# shar build a shippable shar archive
+-
+-SHELL=/bin/sh
+-
+-build:
+- cd src && $(MAKE)
+-
+-results: FRC
+- cd src && $(MAKE) results
+-
+-rerun:
+- cd src && $(MAKE) rerun
+-
+-see:
+- cd results && $(MAKE) summary >summary.out 2>summary.errs
+- cd results && $(MAKE) percent >percent.out 2>percent.errs
+-
+-doc.lpr:
+- cd doc && $(MAKE) PS && lpr *.PS
+-
+-doc.x:
+- cd doc && $(MAKE) x
+-
+-clobber clean:
+- for i in doc src results scripts; do \
+- echo ===== $$i =====; \
+- (cd $$i && $(MAKE) clean); \
+- done
+- /bin/rm -rf bin/*
+- -bk clean
+-
+-get:
+- for i in doc src results scripts; do \
+- echo ===== $$i =====; \
+- (cd $$i && bk get -q); \
+- done
+- @co -q
+-
+-info:
+- for i in doc src results scripts; do \
+- echo ===== $$i =====; \
+- (cd $$i && info); \
+- done
+-
+-release: scripts/mkrelease
+- scripts/mkrelease
+-
+-scripts/mkrelease:
+- cd scripts && co mkrelease
+-
+-# XXX - . must be named lmbench for this to work
+-shar:
+- $(MAKE) clean
+- co -q Makefile
+- $(MAKE) get
+- cd .. && \
+- find lmbench -type f -print | egrep -v 'noship|RCS' > /tmp/FILES
+- cd .. && shar -S -a -n lmbench1.0 -L 50K < /tmp/FILES
+-
+-FRC:
+Index: lmbench-3.0-a9/results/Makefile
+===================================================================
+--- lmbench-3.0-a9.orig/results/Makefile
++++ /dev/null
+@@ -1,333 +0,0 @@
+-# Makefile for lmbench results.
+-# $Id$
+-#
+-# Usage: make [ LIST="aix/* sunos/* ..." ] [ what ]
+-#
+-# What to make:
+-# print Prints the results 1 per page.
+-# ps Saves the postscript of 1 per page in PS/PS
+-# 4.ps Saves the postscript of 4 per page in PS/PS4
+-# 8.ps Saves the postscript of 8 per page in PS/PS8
+-# x Previews 1 per page using groff -X
+-# summary [default] Ascii summary of the results
+-# stats Do statistics over a set of results
+-# roff Print the ascii summaries into a roff file
+-# slides Makes the pic for inclusion in slides
+-#
+-# This Makefile requires groff, gpic, and perl. You could try it with
+-# other *roff processors; I have no idea if it works.
+-#
+-# XXX - this is all out of date.
+-#
+-# There are three sorts of graphical results:
+-#
+-# 1. Bargraphs comparing each system in the LIST on the measurements listed
+-# in the BG list below (pretty much everything).
+-# 2. A 2-D graph for each system in LIST, displaying context switch times
+-# as a function of (# of processes, size of each process).
+-# 3. A 2-D graph for each system in LIST, displaying memory read times as
+-# a function of (stride size, memory size).
+-#
+-# The bargraphs are in a format of my own - the perl script in scripts
+-# called bargraph takes them as input and produces pic as output.
+-# It is a pretty straightforward format, you could probably incorparate
+-# into some Windows spreadsheet if you wanted to. See tmp/*.bg after
+-# running make in this directory.
+-#
+-# The 2-D graphs are in a format that can (probably) be read by Xgraph.
+-# I've added a few extensions for titles, etc., that you could just
+-# take out. See tmp/mem.* after running a make in this directory.
+-#
+-# This Makefile is of marginal usefulness to a site with just one machine.
+-# I intend to make results available so that people can compare, as well
+-# as a service where you can compare your results against the "best of
+-# the breed" for each vendor, as well as against best of the lot.
+-
+-# List of result files to process. Defaults to everything.
+-LIST= `$(SCRIPTS)getlist $(LST)`
+-
+-# Grrrrr
+-SHELL=/bin/sh
+-
+-SCRIPTS=../scripts/
+-SRCS= ../scripts/allctx ../scripts/allmem ../scripts/bargraph \
+- ../scripts/bghtml ../scripts/getbg ../scripts/getbw \
+- ../scripts/getctx ../scripts/getdisk ../scripts/getlist \
+- ../scripts/getmax ../scripts/getmem ../scripts/getpercent \
+- ../scripts/getresults ../scripts/getsummary ../scripts/gifs \
+- ../scripts/graph ../scripts/html-list ../scripts/html-man \
+- ../scripts/os ../scripts/percent ../scripts/save \
+- ../scripts/stats ../scripts/xroff
+-
+-MISC= tmp/misc_mhz.bg \
+- tmp/lat_ctx.bg \
+- tmp/lat_ctx8.bg \
+- tmp/lat_nullsys.bg \
+- tmp/lat_signal.bg \
+- tmp/lat_pagefault.bg \
+- tmp/lat_mappings.bg \
+- tmp/lat_fs_create.bg
+-
+-PROC= tmp/lat_nullproc.bg \
+- tmp/lat_simpleproc.bg \
+- tmp/lat_shproc.bg
+-
+-LATENCY= \
+- tmp/lat_pipe.bg \
+- tmp/lat_connect.bg \
+- tmp/lat_udp_local.bg \
+- tmp/lat_rpc_udp_local.bg \
+- tmp/lat_tcp_local.bg \
+- tmp/lat_rpc_tcp_local.bg
+-
+-BANDWIDTH= \
+- tmp/bw_pipe.bg \
+- tmp/bw_tcp_local.bg \
+- tmp/bw_file.bg \
+- tmp/bw_reread.bg \
+- tmp/bw_mmap.bg \
+- tmp/bw_bcopy_libc.bg \
+- tmp/bw_bcopy_unrolled.bg \
+- tmp/bw_mem_rdsum.bg \
+- tmp/bw_mem_wr.bg
+-
+-BG= $(MISC) $(PROC) $(LATENCY) $(BANDWIDTH)
+-
+-MK=@$(MAKE) -s
+-PRINT=groff -p | lpr -h
+-PS=groff -p | $(SCRIPTS)save PS/PS
+-PS8UP=groff -p | mpage -P- -8 -a | $(SCRIPTS)save PS/PS8
+-PS4UP=groff -p | mpage -P- -4 -a | $(SCRIPTS)save PS/PS4
+-SIZE=-big
+-IMAGE=pbm
+-CLOSE=
+-GMEM=$(CLOSE) -grid -logx -xm -below
+-GCTX=$(CLOSE) -grid -below
+-GDISK=-below -close -grid -nolines
+-#IMAGE=gifmono
+-
+-summary: $(SRCS)
+- @$(SCRIPTS)getsummary $(LIST)
+-
+-percent: $(SRCS)
+- @$(SCRIPTS)getpercent $(LIST)
+-
+-stats: $(SRCS)
+- $(SCRIPTS)getsummary $(LIST) | $(SCRIPTS)percent
+-
+-roff:
+- echo .nf > summary.roff
+- echo .ft CB >> summary.roff
+- echo .ps 12 >> summary.roff
+- echo .po .35i >> summary.roff
+- echo .sp .5i >> summary.roff
+- make LIST="$(LIST)" summary >> summary.roff
+- echo .bp >> summary.roff
+- echo .sp .5i >> summary.roff
+- make LIST="$(LIST)" percent >> summary.roff
+-
+-list:
+- @echo $(LIST)
+-
+-print: ctx mem disk bwfile bwmem
+-
+-8:
+- $(MK) LIST="$(LIST)" PRINT="groff -p | mpage -P -8 -a | lpr -h" print
+-
+-8.ps 8ps 8up:
+- $(MK) LIST="$(LIST)" PRINT="$(PS8UP)" print
+-
+-4.ps 4ps 4up:
+- $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" print
+-
+-ps:
+- $(MK) LIST="$(LIST)" PRINT="$(PS)" print
+-
+-smallps:
+- $(MK) LIST="$(LIST)" SIZE= PRINT="groff -p | $(SCRIPTS)save PS/smallPS" print
+-
+-x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" print
+-
+-ctx.x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" ctx
+-
+-ctx.ps4:
+- $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" ctx
+-
+-mem.x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" mem
+-
+-disk.x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" disk
+-
+-bwfile.ps:
+- $(MK) LIST="$(LIST)" PRINT="$(PS)" bwfile
+-
+-bwfile.x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwfile
+-
+-bwmem.ps:
+- $(MK) LIST="$(LIST)" PRINT="$(PS)" bwmem
+-
+-bwmem.x:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwmem
+-
+-smallx:
+- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" SIZE= print
+-
+-slides:
+- $(MK) LIST="$(LIST)" SIZE=-slide bargraphs.slides ctx.slides mem.slides
+-
+-paper:
+- $(MK) LIST="$(LIST)" tbl.paper ctx.paper mem.paper
+-
+-# XXX - this has to be made incremental, doing everything over from
+-# scratch makes you want a Ghz machine.
+-html: dirs
+- -make clean
+- #$(SCRIPTS)bghtml $(BG)
+- $(SCRIPTS)html-list $(LIST)
+- $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
+- #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
+- $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
+- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
+- $(MK) LIST="$(LIST)" SIZE= NOOP=-noop PRINT="$(PS)" \
+- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
+- gs -sOutputFile=HTML/ctx%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS < /dev/null
+- gs -sOutputFile=HTML/mem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.1 < /dev/null
+- gs -sOutputFile=HTML/disk%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.2 < /dev/null
+- gs -sOutputFile=HTML/bwfile%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.3 < /dev/null
+- gs -sOutputFile=HTML/bwmem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.4 < /dev/null
+- gs -sOutputFile=HTML/ctx-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.5 < /dev/null
+- gs -sOutputFile=HTML/mem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.6 < /dev/null
+- gs -sOutputFile=HTML/bwfile-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.7 < /dev/null
+- gs -sOutputFile=HTML/bwmem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.8 < /dev/null
+- $(SCRIPTS)/gifs
+- rm HTML/*.pbm HTML/___tmp*
+-
+-htmltest: dirs
+- -make clean
+- #$(SCRIPTS)bghtml $(BG)
+- $(SCRIPTS)html-list $(LIST)
+- $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
+- #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
+- $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
+- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
+-
+-bghtml:
+- $(SCRIPTS)bghtml $(BG)
+-
+-html-list:
+- $(SCRIPTS)html-list $(LIST)
+-
+-ctx: dirs
+- $(SCRIPTS)getctx $(LIST) > tmp/FILES
+- @if [ -s tmp/FILES ]; \
+- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
+- for i in `cat tmp/FILES`; \
+- do $(SCRIPTS)graph $(SIZE) $(GCTX) $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT); \
+- else echo No context switch data in $(LIST); \
+- fi
+-
+-disk: dirs
+- if [ X$(NOOP) = X ]; then \
+- $(SCRIPTS)getdisk $(LIST) > tmp/FILES; \
+- if [ -s tmp/FILES ]; \
+- then for i in `cat tmp/FILES`; \
+- do $(SCRIPTS)graph $(SIZE) $(GDISK) $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT); \
+- else echo No disk data in $(LIST); \
+- fi; \
+- fi
+-
+-mem: dirs
+- $(SCRIPTS)getmem $(LIST) > tmp/FILES
+- if [ -s tmp/FILES ]; \
+- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
+- for i in `cat tmp/FILES`; \
+- do $(SCRIPTS)graph $(SIZE) $(GMEM) -nomarks $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT); \
+- else echo No memory latency data in $(LIST); \
+- fi
+-
+-bwfile: dirs
+- $(SCRIPTS)getbw $(LIST) > tmp/FILES
+- if [ -s tmp/FILES ]; \
+- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
+- for i in `cat tmp/FILES`; \
+- do $(SCRIPTS)graph $(SIZE) $(GMEM) -logy $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT); \
+- else echo No file bandwidth data in $(LIST); \
+- fi
+-
+-bwmem: dirs
+- $(SCRIPTS)getbw -all $(LIST) > tmp/FILES
+- if [ -s tmp/FILES ]; \
+- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
+- for i in `cat tmp/FILES`; \
+- do $(SCRIPTS)graph -halfgrid -gthk_5 -thk2 -medium \
+- -nomarks -nolabels -grapheach $(GMEM) \
+- -logy %P="'`basename $$i`'" $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT); \
+- else echo No memory bandwidth data in $(LIST); \
+- fi
+-
+-tbl.paper:
+- $(SCRIPTS)getbg -paper $(LIST)
+-
+-
+-bargraphs.1st: dirs
+- $(SCRIPTS)getbg -nosort $(LIST)
+- #$(SCRIPTS)getmax -v $(PROC)
+- #$(SCRIPTS)getmax -v $(LATENCY)
+- #$(SCRIPTS)getmax -v -half $(BANDWIDTH)
+-
+-bargraphs: bargraphs.1st
+- for i in $(BG); \
+- do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PRINT)
+-
+-bargraphs.slides: bargraphs.1st
+- for i in $(BG); \
+- do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i > $${i}.pic; \
+- done
+-
+-bargraphs.8up: bargraphs.1st
+- for i in $(BG); \
+- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PS8UP)
+-
+-latency.8up: bargraphs.1st
+- for i in $(LATENCY); \
+- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PS8UP)
+-
+-bw.8up: bargraphs.1st
+- for i in $(BANDWIDTH); \
+- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
+- echo .bp; \
+- done | sed '$$d' | $(PS8UP)
+-
+-get: # nothing to do
+-
+-clean:
+- /bin/rm -f PS/* GIF/* HTML/* tmp/* summary.roff
+- -bk clean
+-
+-distclean:
+- /bin/rm -fr PS GIF HTML tmp summary.roff
+-
+-dirs:
+- @if [ ! -d tmp ]; then mkdir tmp; fi
+- @if [ ! -d PS ]; then mkdir PS; fi
+- @if [ ! -d HTML ]; then mkdir HTML; fi
+Index: lmbench-3.0-a9/src/Makefile
+===================================================================
+--- lmbench-3.0-a9.orig/src/Makefile
++++ /dev/null
+@@ -1,489 +0,0 @@
+-# $Id$
+-
+-# Make targets:
+-#
+-# lmbench [default] builds the benchmark suite for the current os/arch
+-# results builds, configures run parameters, and runs the benchmark
+-# rerun reruns the benchmark using the same parameters as last time
+-# scaling reruns the benchmark using same parameters as last time,
+-# except it asks what scaling value to use
+-# hardware reruns the hardware benchmarks using the same parameters
+-# os reruns the OS benchmarks using the same parameters
+-# clean cleans out sources and run configuration
+-# clobber clean and removes the bin directories
+-# shar obsolete, use cd .. && make shar
+-# depend builds make dependencies (needs gcc)
+-# debug builds all the benchmarks with '-g' debugging flag
+-# assembler builds the .s files for each benchmark
+-#
+-# This is largely self configuring. Most stuff is pretty portable.
+-#
+-# If you don't have gcc, try make CC=cc and see if that works.
+-#
+-# If you want to do cross-compilation try make OS=armv5tel-linux-gnu
+-# or whatever your OS string should be in the target environment.
+-# Since many embedded development environments also have a special
+-# cross-compiler, you might want to also select a particular compiler,
+-# so your build command would look something like:
+-# make OS=armv5tel-linux-gnu CC=gcc-arm
+-#
+-# Overriding the OS and CC make parameters needs to be done as an
+-# argument to make, not as an environment variable. See above comments.
+-#
+-
+-# I finally know why Larry Wall's Makefile says "Grrrr".
+-SHELL=/bin/sh
+-
+-CC=`../scripts/compiler`
+-MAKE=`../scripts/make`
+-AR=ar
+-ARCREATE=cr
+-
+-# base of installation location
+-BASE=/usr/local
+-O= ../bin/unknown
+-D= ../doc
+-TRUE=/bin/true
+-OS=`../scripts/os`
+-TARGET=`../scripts/target`
+-BINDIR=../bin/$(OS)
+-CONFIG=../bin/$(OS)/`../scripts/config`
+-UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \
+- ../scripts/info ../scripts/info-template ../scripts/version \
+- ../scripts/config ../scripts/config-run ../scripts/results \
+- ../scripts/lmbench ../scripts/make ../scripts/build
+-INSTALL=cp
+-RESULTS=Results/$(OS)
+-SAMPLES=lmbench/Results/aix/rs6000 lmbench/Results/hpux/snake \
+- lmbench/Results/irix/indigo2 lmbench/Results/linux/pentium \
+- lmbench/Results/osf1/alpha lmbench/Results/solaris/ss20*
+-
+-COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+-
+-INCS = bench.h lib_mem.h lib_tcp.h lib_udp.h stats.h timing.h
+-
+-SRCS = bw_file_rd.c bw_mem.c bw_mmap_rd.c bw_pipe.c bw_tcp.c bw_udp.c \
+- bw_unix.c \
+- cache.c clock.c disk.c enough.c flushdisk.c getopt.c hello.c \
+- lat_connect.c lat_ctx.c lat_fcntl.c lat_fifo.c lat_fs.c \
+- lat_mem_rd.c lat_mmap.c lat_ops.c lat_pagefault.c lat_pipe.c \
+- lat_proc.c lat_rpc.c lat_select.c lat_sig.c lat_syscall.c \
+- lat_tcp.c lat_udp.c lat_unix.c lat_unix_connect.c lat_sem.c \
+- lat_usleep.c lat_pmake.c \
+- lib_debug.c lib_mem.c lib_stats.c lib_tcp.c lib_timing.c \
+- lib_udp.c lib_unix.c lib_sched.c \
+- line.c lmdd.c lmhttp.c par_mem.c par_ops.c loop_o.c memsize.c \
+- mhz.c msleep.c rhttp.c seek.c timing_o.c tlb.c stream.c \
+- bench.h lib_debug.h lib_tcp.h lib_udp.h lib_unix.h names.h \
+- stats.h timing.h version.h
+-
+-ASMS = $O/bw_file_rd.s $O/bw_mem.s $O/bw_mmap_rd.s $O/bw_pipe.s \
+- $O/bw_tcp.s $O/bw_udp.s $O/bw_unix.s $O/clock.s \
+- $O/disk.s $O/enough.s $O/flushdisk.s $O/getopt.s $O/hello.s \
+- $O/lat_connect.s $O/lat_ctx.s lat_fcntl.s $O/lat_fifo.s \
+- $O/lat_fs.s $O/lat_mem_rd.s $O/lat_mmap.s $O/lat_ops.s \
+- $O/lat_pagefault.s $O/lat_pipe.s $O/lat_proc.s $O/lat_rpc.s \
+- $O/lat_select.s $O/lat_sig.s $O/lat_syscall.s $O/lat_tcp.s \
+- $O/lat_udp.s $O/lat_unix.s $O/lat_unix_connect.s $O/lat_sem.s \
+- $O/lib_debug.s $O/lib_mem.s \
+- $O/lib_stats.s $O/lib_tcp.s $O/lib_timing.s $O/lib_udp.s \
+- $O/lib_unix.s $O/lib_sched.s \
+- $O/line.s $O/lmdd.s $O/lmhttp.s $O/par_mem.s \
+- $O/par_ops.s $O/loop_o.s $O/memsize.s $O/mhz.s $O/msleep.s \
+- $O/rhttp.s $O/timing_o.s $O/tlb.s $O/stream.s \
+- $O/cache.s $O/lat_dram_page.s $O/lat_pmake.s $O/lat_rand.s \
+- $O/lat_usleep.s $O/lat_cmd.s
+-EXES = $O/bw_file_rd $O/bw_mem $O/bw_mmap_rd $O/bw_pipe $O/bw_tcp \
+- $O/bw_unix $O/hello \
+- $O/lat_select $O/lat_pipe $O/lat_rpc $O/lat_syscall $O/lat_tcp \
+- $O/lat_udp $O/lat_mmap $O/mhz $O/lat_proc $O/lat_pagefault \
+- $O/lat_connect $O/lat_fs $O/lat_sig $O/lat_mem_rd $O/lat_ctx \
+- $O/lat_sem \
+- $O/memsize $O/lat_unix $O/lmdd $O/timing_o $O/enough \
+- $O/msleep $O/loop_o $O/lat_fifo $O/lmhttp $O/lat_http \
+- $O/lat_fcntl $O/disk $O/lat_unix_connect $O/flushdisk \
+- $O/lat_ops $O/line $O/tlb $O/par_mem $O/par_ops \
+- $O/stream
+-OPT_EXES=$O/cache $O/lat_dram_page $O/lat_pmake $O/lat_rand \
+- $O/lat_usleep $O/lat_cmd
+-LIBOBJS= $O/lib_tcp.o $O/lib_udp.o $O/lib_unix.o $O/lib_timing.o \
+- $O/lib_mem.o $O/lib_stats.o $O/lib_debug.o $O/getopt.o \
+- $O/lib_sched.o
+-
+-lmbench: $(UTILS)
+- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build all
+- -@env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="k$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build opt
+-
+-results: lmbench
+- @env OS="${OS}" ../scripts/config-run
+- @env OS="${OS}" ../scripts/results
+-
+-rerun: lmbench
+- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
+- @env OS="${OS}" ../scripts/results
+-
+-scaling: lmbench
+- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; \
+- else ../scripts/config-scaling $(CONFIG); fi
+- @env OS="${OS}" ../scripts/results
+-
+-hardware: lmbench
+- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
+- @env OS="${OS}" BENCHMARK_HARDWARE=YES BENCHMARK_OS=NO ../scripts/results
+-
+-os: lmbench
+- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
+- @env OS="${OS}" BENCHMARK_HARDWARE=NO BENCHMARK_OS=YES ../scripts/results
+-
+-install: lmbench
+- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build install-target
+-
+-install-target:
+- if [ ! -d $(BASE) ]; then mkdir $(BASE); fi
+- if [ ! -d $(BASE)/bin ]; then mkdir $(BASE)/bin; fi
+- if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi
+- if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi
+- cp $(EXES) $(BASE)/bin
+- cp $(INCS) $(BASE)/include
+- cp $O/lmbench.a $(BASE)/lib/libmbench.a
+- cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
+-
+-
+-# No special handling for all these
+-all: $(EXES) $O/lmbench
+-opt: $(OPT_EXES)
+-asm: $(ASMS)
+-$(ASMS):
+- $(CC) -S $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ `basename $@ .s`.c
+-
+-Wall:
+- @env CFLAGS="-g -O -Wall" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt
+-
+-debug:
+- @env CFLAGS="-g -O -DDEBUG" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt
+-
+-assembler:
+- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build asm
+-
+-
+-tag:
+- ROOT=`cat ../CVS/Root`; \
+- MODULE=`cat ../CVS/Repository`; \
+- VERSION=`../scripts/version`; \
+- TAG=`echo lmbench_$${VERSION} | sed -e 's/-/_/g' -e 's/\\./_/g'`; \
+- cd .. \
+- && cvs -d$${ROOT} tag -c "$${TAG}"
+-
+-dist:
+- SRCDIR=`pwd`; \
+- ROOT=`cat ../CVS/Root`; \
+- MODULE=`cat ../CVS/Repository`; \
+- VERSION=`../scripts/version`; \
+- cd /tmp \
+- && cvs -d$${ROOT} export -Dtomorrow \
+- -d $${MODULE}-$${VERSION} $${MODULE} \
+- && chmod +x $${MODULE}-$${VERSION}/scripts/[a-z]* \
+- && mv $${MODULE}-$${VERSION} lmbench-$${VERSION} \
+- && tar czf $${SRCDIR}/../../lmbench-$${VERSION}.tgz \
+- lmbench-$${VERSION} \
+- && rm -rf lmbench-$${VERSION};
+-
+-clean:
+- /bin/rm -f ../bin/*/CONFIG ../bin/*/*.[oas]
+- /bin/rm -f *.[oas]
+-
+-clobber:
+- /bin/rm -rf ../bin* SHAR
+-
+-shar:
+- cd ../.. && shar lmbench/Results/Makefile $(SAMPLES) lmbench/scripts/* lmbench/src/Makefile lmbench/src/*.[ch] > lmbench/SHAR
+-
+-depend: ../scripts/depend
+- ../scripts/depend
+-
+-testmake: $(SRCS) $(UTILS) # used by scripts/make to test gmake
+- @true
+-
+-.PHONY: lmbench results rerun hardware os install all Wall debug \
+- install install-target dist get edit get-e clean clobber \
+- share depend testmake
+-
+-$O/lmbench : ../scripts/lmbench version.h
+- rm -f $O/lmbench
+- VERSION=`../scripts/version`; \
+- sed -e "s/<version>/$${VERSION}/g" < ../scripts/lmbench > $O/lmbench
+- chmod +x $O/lmbench
+-
+-$O/lmbench.a: $(LIBOBJS)
+- /bin/rm -f $O/lmbench.a
+- $(AR) $(ARCREATE) $O/lmbench.a $(LIBOBJS)
+- -ranlib $O/lmbench.a
+-
+-$O/lib_timing.o : lib_timing.c $(INCS)
+- $(COMPILE) -c lib_timing.c -o $O/lib_timing.o
+-$O/lib_mem.o : lib_mem.c $(INCS)
+- $(COMPILE) -c lib_mem.c -o $O/lib_mem.o
+-$O/lib_tcp.o : lib_tcp.c $(INCS)
+- $(COMPILE) -c lib_tcp.c -o $O/lib_tcp.o
+-$O/lib_udp.o : lib_udp.c $(INCS)
+- $(COMPILE) -c lib_udp.c -o $O/lib_udp.o
+-$O/lib_unix.o : lib_unix.c $(INCS)
+- $(COMPILE) -c lib_unix.c -o $O/lib_unix.o
+-$O/lib_debug.o : lib_debug.c $(INCS)
+- $(COMPILE) -c lib_debug.c -o $O/lib_debug.o
+-$O/lib_stats.o : lib_stats.c $(INCS)
+- $(COMPILE) -c lib_stats.c -o $O/lib_stats.o
+-$O/lib_sched.o : lib_sched.c $(INCS)
+- $(COMPILE) -c lib_sched.c -o $O/lib_sched.o
+-$O/getopt.o : getopt.c $(INCS)
+- $(COMPILE) -c getopt.c -o $O/getopt.o
+-
+-$(UTILS) :
+- -cd ../scripts; make get
+-
+-# Do not remove the next line, $(MAKE) depend needs it
+-# MAKEDEPEND follows
+-$O/rhttp.s:rhttp.c timing.h stats.h bench.h
+-$O/rhttp: rhttp.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/rhttp rhttp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/http.s:http.c timing.h stats.h bench.h
+-$O/http: http.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/http http.c $O/lmbench.a $(LDLIBS)
+-
+-$O/flushdisk.s:flushdisk.c
+-$O/flushdisk: flushdisk.c
+- $(COMPILE) -DMAIN -o $O/flushdisk flushdisk.c
+-
+-$O/mhz.s: mhz.c timing.h stats.h bench.h
+-$O/mhz: mhz.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/mhz mhz.c $O/lmbench.a $(LDLIBS) -lm
+-
+-$O/lat_ctx.s: lat_ctx.c timing.h stats.h bench.h
+-$O/lat_ctx: lat_ctx.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_ctx lat_ctx.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lmhttp.s:lmhttp.c timing.h stats.h bench.h
+-$O/lmhttp: lmhttp.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lmhttp lmhttp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_http.s:lat_http.c timing.h stats.h bench.h
+-$O/lat_http: lat_http.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_http lat_http.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_file_rd.s:bw_file_rd.c timing.h stats.h bench.h
+-$O/bw_file_rd: bw_file_rd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_file_rd bw_file_rd.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_mem.s:bw_mem.c timing.h stats.h bench.h
+-$O/bw_mem: bw_mem.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_mem bw_mem.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_mmap_rd.s:bw_mmap_rd.c timing.h stats.h bench.h
+-$O/bw_mmap_rd: bw_mmap_rd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_mmap_rd bw_mmap_rd.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_pipe.s:bw_pipe.c timing.h stats.h bench.h
+-$O/bw_pipe: bw_pipe.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_pipe bw_pipe.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_tcp.s:bw_tcp.c bench.h timing.h stats.h lib_tcp.h
+-$O/bw_tcp: bw_tcp.c bench.h timing.h stats.h lib_tcp.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_tcp bw_tcp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_udp.s:bw_udp.c bench.h timing.h stats.h lib_udp.h
+-$O/bw_udp: bw_udp.c bench.h timing.h stats.h lib_udp.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_udp bw_udp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/bw_unix.s:bw_unix.c timing.h stats.h bench.h
+-$O/bw_unix: bw_unix.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/bw_unix bw_unix.c $O/lmbench.a $(LDLIBS)
+-
+-$O/disk.s:disk.c flushdisk.c bench.h timing.h stats.h lib_tcp.h
+-$O/disk: disk.c flushdisk.c bench.h timing.h stats.h lib_tcp.h $O/lmbench.a
+- $(COMPILE) -o $O/disk disk.c $O/lmbench.a $(LDLIBS)
+-
+-$O/clock.s:clock.c timing.h stats.h bench.h
+-$O/clock: clock.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/clock clock.c $O/lmbench.a $(LDLIBS)
+-
+-$O/hello.s:hello.c
+-$O/hello: hello.c $O/lmbench.a
+- $(COMPILE) -o $O/hello hello.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_alarm.s:lat_alarm.c timing.h stats.h bench.h
+-$O/lat_alarm: lat_alarm.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_alarm lat_alarm.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_connect.s:lat_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h
+-$O/lat_connect: lat_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_connect lat_connect.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_unix_connect.s:lat_unix_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h
+-$O/lat_unix_connect: lat_unix_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_unix_connect lat_unix_connect.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_fs.s:lat_fs.c timing.h stats.h bench.h
+-$O/lat_fs: lat_fs.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_fs lat_fs.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_fcntl.s:lat_fcntl.c timing.h stats.h bench.h
+-$O/lat_fcntl: lat_fcntl.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_fcntl lat_fcntl.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mem_rd.s:lat_mem_rd.c timing.h stats.h bench.h
+-$O/lat_mem_rd: lat_mem_rd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mem_rd lat_mem_rd.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mem_rd2.s:lat_mem_rd2.c timing.h stats.h bench.h
+-$O/lat_mem_rd2: lat_mem_rd2.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mem_rd2 lat_mem_rd2.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mem_wr.s:lat_mem_wr.c timing.h stats.h bench.h
+-$O/lat_mem_wr: lat_mem_wr.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mem_wr lat_mem_wr.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mem_wr2.s:lat_mem_wr2.c timing.h stats.h bench.h
+-$O/lat_mem_wr2: lat_mem_wr2.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mem_wr2 lat_mem_wr2.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mmap.s:lat_mmap.c timing.h stats.h bench.h
+-$O/lat_mmap: lat_mmap.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mmap lat_mmap.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_mmaprd.s:lat_mmaprd.c timing.h stats.h bench.h
+-$O/lat_mmaprd: lat_mmaprd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_mmaprd lat_mmaprd.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_ops.s:lat_ops.c timing.h stats.h bench.h
+-$O/lat_ops: lat_ops.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_ops lat_ops.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_pagefault.s:lat_pagefault.c timing.h stats.h bench.h
+-$O/lat_pagefault: lat_pagefault.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_pagefault lat_pagefault.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_pipe.s:lat_pipe.c timing.h stats.h bench.h
+-$O/lat_pipe: lat_pipe.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_pipe lat_pipe.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_fifo.s:lat_fifo.c timing.h stats.h bench.h
+-$O/lat_fifo: lat_fifo.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_fifo lat_fifo.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_proc.s:lat_proc.c timing.h stats.h bench.h
+-$O/lat_proc: lat_proc.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_proc lat_proc.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_rpc.s:lat_rpc.c timing.h stats.h bench.h
+-$O/lat_rpc: lat_rpc.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_rpc lat_rpc.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_sig.s:lat_sig.c timing.h stats.h bench.h
+-$O/lat_sig: lat_sig.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_sig lat_sig.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_syscall.s:lat_syscall.c timing.h stats.h bench.h
+-$O/lat_syscall: lat_syscall.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_syscall lat_syscall.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_select.s: lat_select.c timing.h stats.h bench.h
+-$O/lat_select: lat_select.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_select lat_select.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_tcp.s:lat_tcp.c timing.h stats.h bench.h lib_tcp.h
+-$O/lat_tcp: lat_tcp.c timing.h stats.h bench.h lib_tcp.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_tcp lat_tcp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_udp.s:lat_udp.c timing.h stats.h bench.h lib_udp.h
+-$O/lat_udp: lat_udp.c timing.h stats.h bench.h lib_udp.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_udp lat_udp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_unix.s:lat_unix.c timing.h stats.h bench.h
+-$O/lat_unix: lat_unix.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_unix lat_unix.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lib_tcp.s:lib_tcp.c bench.h lib_tcp.h
+-$O/lib_tcp: lib_tcp.c bench.h lib_tcp.h $O/lmbench.a
+- $(COMPILE) -o $O/lib_tcp lib_tcp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lib_udp.s:lib_udp.c bench.h lib_udp.h
+-$O/lib_udp: lib_udp.c bench.h lib_udp.h $O/lmbench.a
+- $(COMPILE) -o $O/lib_udp lib_udp.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lmdd.s:lmdd.c timing.h stats.h bench.h
+-$O/lmdd: lmdd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lmdd lmdd.c $O/lmbench.a $(LDLIBS)
+-
+-$O/enough.s:enough.c timing.h stats.h bench.h
+-$O/enough: enough.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/enough enough.c $O/lmbench.a $(LDLIBS)
+-
+-$O/loop_o.s:loop_o.c timing.h stats.h bench.h
+-$O/loop_o: loop_o.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/loop_o loop_o.c $O/lmbench.a $(LDLIBS)
+-
+-$O/timing_o.s:timing_o.c timing.h stats.h bench.h
+-$O/timing_o: timing_o.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/timing_o timing_o.c $O/lmbench.a $(LDLIBS)
+-
+-$O/memsize.s:memsize.c timing.h stats.h bench.h
+-$O/memsize: memsize.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/memsize memsize.c $O/lmbench.a $(LDLIBS)
+-
+-$O/msleep.s:msleep.c timing.h stats.h bench.h
+-$O/msleep: msleep.c timing.h stats.h bench.h
+- $(COMPILE) -o $O/msleep msleep.c
+-
+-$O/line.s: line.c timing.h stats.h bench.h
+-$O/line: line.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/line line.c $O/lmbench.a $(LDLIBS)
+-
+-$O/tlb.s:tlb.c timing.h stats.h bench.h
+-$O/tlb: tlb.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/tlb tlb.c $O/lmbench.a $(LDLIBS)
+-
+-$O/cache.s:cache.c timing.h stats.h bench.h
+-$O/cache: cache.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/cache cache.c $O/lmbench.a $(LDLIBS)
+-
+-$O/par_mem.s:par_mem.c timing.h stats.h bench.h
+-$O/par_mem: par_mem.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/par_mem par_mem.c $O/lmbench.a $(LDLIBS)
+-
+-$O/par_ops.s:par_ops.c timing.h stats.h bench.h
+-$O/par_ops: par_ops.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/par_ops par_ops.c $O/lmbench.a $(LDLIBS)
+-
+-$O/stream.s:stream.c timing.h stats.h bench.h
+-$O/stream: stream.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/stream stream.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_sem.s:lat_sem.c timing.h stats.h bench.h
+-$O/lat_sem: lat_sem.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_sem lat_sem.c $O/lmbench.a $(LDLIBS)
+-
+-$O/par_list.s:par_list.c timing.h stats.h bench.h
+-$O/par_list: par_list.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/par_list par_list.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_dram_page.s:lat_dram_page.c timing.h stats.h bench.h
+-$O/lat_dram_page: lat_dram_page.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_dram_page lat_dram_page.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_usleep.s:lat_usleep.c timing.h stats.h bench.h
+-$O/lat_usleep: lat_usleep.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_usleep lat_usleep.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_pmake.s:lat_pmake.c timing.h stats.h bench.h
+-$O/lat_pmake: lat_pmake.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_pmake lat_pmake.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_rand.s:lat_rand.c timing.h stats.h bench.h
+-$O/lat_rand: lat_rand.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_rand lat_rand.c $O/lmbench.a $(LDLIBS)
+-
+-$O/lat_cmd.s:lat_cmd.c timing.h stats.h bench.h
+-$O/lat_cmd: lat_cmd.c timing.h stats.h bench.h $O/lmbench.a
+- $(COMPILE) -o $O/lat_cmd lat_cmd.c $O/lmbench.a $(LDLIBS)
+-
--git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
new file mode 100644
index 000000000..07ef7b144
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
@@ -0,0 +1,37 @@
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Subject: minor cleanups
+
+Add missing header file, add a cast to silence compiler.
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+---
+
+--- lmbench-3.0-a9-orig/src/lib_tcp.c 2006-06-27 18:27:19.000000000 +0200
++++ lmbench-3.0-a9/src/lib_tcp.c 2009-04-09 17:56:50.000000000 +0200
+@@ -7,6 +7,7 @@
+ */
+ #define _LIB /* bench.h needs this */
+ #include "bench.h"
++#include <rpc/pmap_clnt.h>
+
+ /*
+ * Get a TCP socket, bind it, figure out the port,
+@@ -148,7 +149,7 @@
+ fprintf(stderr, "Client port %d\n", sockport(sock));
+ #endif
+ sock_optimize(sock, rdwr);
+- if (!h || host != save_host || prog != save_prog) {
++ if (!h || host != save_host || prog != (int)save_prog) {
+ save_host = host; /* XXX - counting on them not
+ * changing it - benchmark only.
+ */
+--- lmbench-3.0-a9-orig/src/lib_udp.c 2006-06-27 18:27:20.000000000 +0200
++++ lmbench-3.0-a9/src/lib_udp.c 2009-04-09 17:57:19.000000000 +0200
+@@ -7,6 +7,7 @@
+ */
+ #define _LIB /* bench.h needs this */
+ #include "bench.h"
++#include <rpc/pmap_clnt.h>
+
+ /*
+ * Get a UDP socket, bind it, figure out the port,
diff --git a/patches/lmbench-3.0-a9/series b/patches/lmbench-3.0-a9/series
new file mode 100644
index 000000000..0c4ffef30
--- /dev/null
+++ b/patches/lmbench-3.0-a9/series
@@ -0,0 +1,3 @@
+lmbench-3.0-a9-remove-old-buildsystem.diff
+lmbench-3.0-a9-autotoolize.diff
+lmbench-3.0-a9-rpcheaders.diff
diff --git a/rules/lmbench.in b/rules/lmbench.in
new file mode 100644
index 000000000..f3d78e8e6
--- /dev/null
+++ b/rules/lmbench.in
@@ -0,0 +1,14 @@
+## SECTION=staging
+## old section:
+### SECTION=test_suites
+
+config LMBENCH
+ tristate
+ select LIBC_M
+ select GCCLIBS_GCC_S
+ prompt "lmbench"
+ help
+ Various tools for performance analysis
+
+ STAGING: remove in PTXdist 2022.01.0
+ Upstream dead and fails to build with gcc 10.
diff --git a/rules/lmbench.make b/rules/lmbench.make
new file mode 100644
index 000000000..382a9793e
--- /dev/null
+++ b/rules/lmbench.make
@@ -0,0 +1,102 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2009 by Robert Schwebel
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LMBENCH) += lmbench
+
+#
+# Paths and names
+#
+LMBENCH_VERSION := 3.0-a9
+LMBENCH_MD5 := b3351a3294db66a72e2864a199d37cbf
+LMBENCH := lmbench-$(LMBENCH_VERSION)
+LMBENCH_SUFFIX := tgz
+LMBENCH_URL := $(call ptx/mirror, SF, lmbench/$(LMBENCH).$(LMBENCH_SUFFIX))
+LMBENCH_SOURCE := $(SRCDIR)/$(LMBENCH).$(LMBENCH_SUFFIX)
+LMBENCH_DIR := $(BUILDDIR)/$(LMBENCH)
+LMBENCH_LICENSE := GPL-2.0-only with exceptions
+LMBENCH_LICENSE_FILES := \
+ file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://COPYING-2;md5=8e9aee2ccc75d61d107e43794a25cdf9
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LMBENCH_CONF_TOOL := autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/lmbench.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, lmbench)
+ @$(call install_fixup, lmbench,PRIORITY,optional)
+ @$(call install_fixup, lmbench,SECTION,base)
+ @$(call install_fixup, lmbench,AUTHOR,"Robert Schwebel")
+ @$(call install_fixup, lmbench,DESCRIPTION,missing)
+
+ for file in \
+ /usr/bin/par_mem \
+ /usr/bin/lat_tcp \
+ /usr/bin/par_ops \
+ /usr/bin/lat_mmap \
+ /usr/bin/hello \
+ /usr/bin/bw_unix \
+ /usr/bin/lat_syscall \
+ /usr/bin/lat_sem \
+ /usr/bin/lat_fs \
+ /usr/bin/loop_o \
+ /usr/bin/lat_fcntl \
+ /usr/bin/lat_unix \
+ /usr/bin/bw_tcp \
+ /usr/bin/lat_rpc \
+ /usr/bin/lat_unix_connect \
+ /usr/bin/bw_file_rd \
+ /usr/bin/disk \
+ /usr/bin/lat_mem_rd \
+ /usr/bin/lat_select \
+ /usr/bin/lat_connect \
+ /usr/bin/lat_fifo \
+ /usr/bin/line \
+ /usr/bin/timing_o \
+ /usr/bin/lat_ctx \
+ /usr/bin/bw_mem \
+ /usr/bin/lat_sig \
+ /usr/bin/lat_pipe \
+ /usr/bin/lat_pagefault \
+ /usr/bin/lmhttp \
+ /usr/bin/tlb \
+ /usr/bin/bw_pipe \
+ /usr/bin/mhz \
+ /usr/bin/lat_http \
+ /usr/bin/msleep \
+ /usr/bin/lat_ops \
+ /usr/bin/lat_udp \
+ /usr/bin/stream \
+ /usr/bin/enough \
+ /usr/bin/flushdisk \
+ /usr/bin/lmdd \
+ /usr/bin/lat_proc \
+ /usr/bin/bw_mmap_rd \
+ /usr/bin/memsize \
+ ; do \
+ $(call install_copy, lmbench, 0, 0, 0755, -, $$file); \
+ done
+
+ @$(call install_lib, lmbench, 0, 0, 0644, liblmbench)
+
+ @$(call install_finish, lmbench)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions
2023-02-07 14:21 [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Sven Püschel
@ 2023-02-07 14:21 ` Sven Püschel
2023-02-10 11:14 ` Michael Olbrich
2023-02-10 11:13 ` [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Michael Olbrich
1 sibling, 1 reply; 4+ messages in thread
From: Sven Püschel @ 2023-02-07 14:21 UTC (permalink / raw)
To: ptxdist; +Cc: Sven Püschel
GCC removed the SunRPC implementation, therefore we're now using
libtirpc. Also added a patch to include the correct header for
socklen_t, so that autotools cannot fail to detect the type presence correctly.
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
.../lmbench-3.0-a9-add-libtirpc.diff | 50 +++++++++++++++++++
.../lmbench-3.0-a9-fix_socklen_t.diff | 19 +++++++
patches/lmbench-3.0-a9/series | 2 +
rules/lmbench.in | 9 ++--
4 files changed, 74 insertions(+), 6 deletions(-)
create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
new file mode 100644
index 000000000..cebe67f73
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
@@ -0,0 +1,50 @@
+commit 3cabac2f5b1688fc35a3e6af890d1b0193b8c840
+Author: Sven Püschel <s.pueschel@pengutronix.de>
+Date: Wed Feb 1 08:17:38 2023 +0000
+
+ added libtirpc
+
+diff --git a/configure.ac b/configure.ac
+index 0d935e8..415203b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,8 +27,39 @@ AC_SUBST(LT_AGE)
+ #
+ # Checks for programs.
+ #
++
++# Function copied and modified from http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=aclocal/libtirpc.m4;h=bddae022693100c810edff042d51b145c8f411a6;hb=HEAD
++dnl Checks for TI-RPC library and headers
++dnl
++AC_DEFUN([AC_LIBTIRPC], [
++
++ PKG_PROG_PKG_CONFIG([0.9.0])
++ PKG_CHECK_MODULES([TIRPC], [libtirpc],
++ [LIBS="${LIBS} ${TIRPC_LIBS}"
++ AM_CFLAGS="${AM_CFLAGS} ${TIRPC_CFLAGS}"
++ AC_DEFINE([HAVE_LIBTIRPC], [1],
++ [Define to 1 if you have and wish to use libtirpc.])])
++
++ AS_IF([test -n "${LIBTIRPC}"],
++ [AC_CHECK_LIB([tirpc], [authgss_free_private_data],
++ [AC_DEFINE([HAVE_AUTHGSS_FREE_PRIVATE_DATA], [1],
++ [Define to 1 if your rpcsec library provides authgss_free_private_data])],,
++ [${LIBS}])])
++
++ AS_IF([test -n "${LIBTIRPC}"],
++ [AC_CHECK_LIB([tirpc], [libtirpc_set_debug],
++ [AC_DEFINE([HAVE_LIBTIRPC_SET_DEBUG], [1],
++ [Define to 1 if your tirpc library provides libtirpc_set_debug])],,
++ [${LIBS}])])
++
++ AC_SUBST([AM_CFLAGS])
++ AC_SUBST([LIBS])
++
++])dnl
++
+ AC_PROG_CC
+ AC_PROG_LIBTOOL
++AC_LIBTIRPC
+
+ AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
+
diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
new file mode 100644
index 000000000..e1cba8373
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
@@ -0,0 +1,19 @@
+commit eacfb4af1ecfafa1a0486643c81f313eb183eaa8
+Author: Sven Püschel <s.pueschel@pengutronix.de>
+Date: Wed Feb 1 08:54:07 2023 +0000
+
+ Added missing include for socklen_t check
+
+diff --git a/configure.ac b/configure.ac
+index 415203b..c29e794 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,7 +100,7 @@ AC_CHECK_TYPE([uint64],[CFLAGS="${CFLAGS} -DHAVE_uint64"])
+ AC_CHECK_TYPE([uint64_t],[CFLAGS="${CFLAGS} -DHAVE_uint64_t"])
+ AC_CHECK_TYPE([int64],[CFLAGS="${CFLAGS} -DHAVE_int64"])
+ AC_CHECK_TYPE([int64_t],[CFLAGS="${CFLAGS} -DHAVE_int64_t"])
+-AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"])
++AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"], [], [[#include <sys/socket.h>]])
+ AC_CHECK_TYPE([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"])
+
+ AC_COMPILE_IFELSE(
diff --git a/patches/lmbench-3.0-a9/series b/patches/lmbench-3.0-a9/series
index 0c4ffef30..b2a777897 100644
--- a/patches/lmbench-3.0-a9/series
+++ b/patches/lmbench-3.0-a9/series
@@ -1,3 +1,5 @@
lmbench-3.0-a9-remove-old-buildsystem.diff
lmbench-3.0-a9-autotoolize.diff
lmbench-3.0-a9-rpcheaders.diff
+lmbench-3.0-a9-add-libtirpc.diff
+lmbench-3.0-a9-fix_socklen_t.diff
diff --git a/rules/lmbench.in b/rules/lmbench.in
index f3d78e8e6..2e6d5fbcb 100644
--- a/rules/lmbench.in
+++ b/rules/lmbench.in
@@ -1,14 +1,11 @@
-## SECTION=staging
-## old section:
-### SECTION=test_suites
+## SECTION=test_suites
config LMBENCH
tristate
select LIBC_M
select GCCLIBS_GCC_S
+ # glibc has removed the SunRPC implementation, see https://fedoraproject.org/wiki/Changes/SunRPCRemoval, therefore we use libtirpc
+ select LIBTIRPC
prompt "lmbench"
help
Various tools for performance analysis
-
- STAGING: remove in PTXdist 2022.01.0
- Upstream dead and fails to build with gcc 10.
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging"
2023-02-07 14:21 [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Sven Püschel
2023-02-07 14:21 ` [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions Sven Püschel
@ 2023-02-10 11:13 ` Michael Olbrich
1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2023-02-10 11:13 UTC (permalink / raw)
To: Sven Püschel; +Cc: ptxdist
On Tue, Feb 07, 2023 at 03:21:38PM +0100, Sven Püschel wrote:
> This reverts commit 81761ccf73cb470e310f121f9e62e926e7f7f4aa.
>
> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
> ---
> patches/lmbench-3.0-a9/autogen.sh | 1 +
> .../lmbench-3.0-a9-autotoolize.diff | 258 +++++
> ...lmbench-3.0-a9-remove-old-buildsystem.diff | 924 ++++++++++++++++++
> .../lmbench-3.0-a9-rpcheaders.diff | 37 +
> patches/lmbench-3.0-a9/series | 3 +
> rules/lmbench.in | 14 +
> rules/lmbench.make | 102 ++
> 7 files changed, 1339 insertions(+)
> create mode 120000 patches/lmbench-3.0-a9/autogen.sh
> create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
> create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
> create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
> create mode 100644 patches/lmbench-3.0-a9/series
> create mode 100644 rules/lmbench.in
> create mode 100644 rules/lmbench.make
>
> diff --git a/patches/lmbench-3.0-a9/autogen.sh b/patches/lmbench-3.0-a9/autogen.sh
> new file mode 120000
> index 000000000..9f8a4cb7d
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
> new file mode 100644
> index 000000000..b41b77b91
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff
> @@ -0,0 +1,258 @@
> +From: Robert Schwebel <r.schwebel@pengutronix.de>
> +Subject: Add autotool based build system
> +
> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> +
> +---
> + Makefile.am | 3 +
> + autogen.sh | 22 ++++++++++++
> + configure.ac | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + src/Makefile.am | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + 4 files changed, 226 insertions(+)
> +
> +Index: b/Makefile.am
> +===================================================================
> +--- /dev/null
> ++++ b/Makefile.am
> +@@ -0,0 +1,3 @@
> ++SUBDIRS = \
> ++ src
> ++
> +Index: b/autogen.sh
> +===================================================================
> +--- /dev/null
> ++++ b/autogen.sh
> +@@ -0,0 +1,22 @@
> ++#!/bin/bash
> ++
> ++#
> ++# usage:
> ++#
> ++# banner <target name>
> ++#
> ++banner() {
> ++ echo
> ++ TG=`echo $1 | sed -e "s,/.*/,,g"`
> ++ LINE=`echo $TG |sed -e "s/./-/g"`
> ++ echo $LINE
> ++ echo $TG
> ++ echo $LINE
> ++ echo
> ++}
> ++
> ++banner "autoreconf"
> ++
> ++autoreconf --force --install --symlink -Wall || exit $?
> ++
> ++banner "Finished"
> +Index: b/configure.ac
> +===================================================================
> +--- /dev/null
> ++++ b/configure.ac
> +@@ -0,0 +1,101 @@
> ++AC_PREREQ(2.59)
> ++
> ++AC_INIT([lmbench], [trunk], [bugs@pengutronix.de])
> ++AC_CONFIG_SRCDIR([src/lmdd.c])
> ++AC_CANONICAL_BUILD
> ++AC_CANONICAL_HOST
> ++
> ++AM_MAINTAINER_MODE
> ++
> ++CFLAGS="${CFLAGS} -W -Wall"
> ++
> ++#
> ++# libtool library versioning stuff
> ++#
> ++# Library code modified: REVISION++
> ++# Interfaces changed/added/removed: CURRENT++ REVISION=0
> ++# Interfaces added: AGE++
> ++# Interfaces removed: AGE=0
> ++LT_CURRENT=0
> ++LT_REVISION=0
> ++LT_AGE=0
> ++AC_SUBST(LT_CURRENT)
> ++AC_SUBST(LT_REVISION)
> ++AC_SUBST(LT_AGE)
> ++
> ++
> ++#
> ++# Checks for programs.
> ++#
> ++AC_PROG_CC
> ++AC_PROG_LIBTOOL
> ++
> ++AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
> ++
> ++
> ++#
> ++# Debugging
> ++#
> ++AC_MSG_CHECKING([whether to enable debugging])
> ++AC_ARG_ENABLE(debug,
> ++ AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]),
> ++ [case "$enableval" in
> ++ y | yes) CONFIG_DEBUG=yes ;;
> ++ *) CONFIG_DEBUG=no ;;
> ++ esac],
> ++ [CONFIG_DEBUG=no])
> ++AC_MSG_RESULT([${CONFIG_DEBUG}])
> ++if test "${CONFIG_DEBUG}" = "yes"; then
> ++ CFLAGS="${CFLAGS} -Werror -Wsign-compare -Wfloat-equal -Wformat-security -g -O1"
> ++ AC_DEFINE(DEBUG, 1, [debugging])
> ++else
> ++ CFLAGS="${CFLAGS} -O2"
> ++fi
> ++
> ++
> ++#
> ++# header file checks
> ++#
> ++
> ++AC_CHECK_HEADER([pmap_clnt.h],[CFLAGS="${CFLAGS} -DHAVE_pmap_clnt_h"])
> ++
> ++
> ++#
> ++# type checks
> ++#
> ++
> ++AC_CHECK_TYPE([uint],[CFLAGS="${CFLAGS} -DHAVE_uint"])
> ++AC_CHECK_TYPE([uint64],[CFLAGS="${CFLAGS} -DHAVE_uint64"])
> ++AC_CHECK_TYPE([uint64_t],[CFLAGS="${CFLAGS} -DHAVE_uint64_t"])
> ++AC_CHECK_TYPE([int64],[CFLAGS="${CFLAGS} -DHAVE_int64"])
> ++AC_CHECK_TYPE([int64_t],[CFLAGS="${CFLAGS} -DHAVE_int64_t"])
> ++AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"])
> ++AC_CHECK_TYPE([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"])
> ++
> ++AC_COMPILE_IFELSE(
> ++[
> ++ #include <stdlib.h>
> ++ main() { srand48(973); return (int)(1.0E9 * drand48()); }
> ++],
> ++[CFLAGS="${CFLAGS} -DHAVE_DRAND48"])
> ++
> ++AC_COMPILE_IFELSE(
> ++[
> ++ #include <stdlib.h>
> ++ main() { srand(973); return (10 * rand()) / RAND_MAX; }
> ++],
> ++[CFLAGS="${CFLAGS} -DHAVE_RAND"])
> ++
> ++AC_COMPILE_IFELSE(
> ++[
> ++ #include <stdlib.h>
> ++ main() { srandom(973); return (10 * random()) / RAND_MAX; }
> ++],
> ++[CFLAGS="${CFLAGS} -DHAVE_RANDOM"])
> ++
> ++AC_CONFIG_FILES([
> ++ Makefile
> ++ src/Makefile
> ++])
> ++AC_OUTPUT
> ++
> +Index: b/src/Makefile.am
> +===================================================================
> +--- /dev/null
> ++++ b/src/Makefile.am
> +@@ -0,0 +1,100 @@
> ++bin_PROGRAMS = \
> ++ bw_file_rd \
> ++ bw_mem \
> ++ bw_file_rd \
> ++ bw_mem \
> ++ bw_mmap_rd \
> ++ bw_pipe \
> ++ bw_tcp \
> ++ bw_unix \
> ++ hello \
> ++ lat_select \
> ++ lat_pipe \
> ++ lat_rpc \
> ++ lat_syscall \
> ++ lat_tcp \
> ++ lat_udp \
> ++ lat_mmap \
> ++ mhz \
> ++ lat_proc \
> ++ lat_pagefault \
> ++ lat_connect \
> ++ lat_fs \
> ++ lat_sig \
> ++ lat_mem_rd \
> ++ lat_ctx \
> ++ lat_sem \
> ++ memsize \
> ++ lat_unix \
> ++ lmdd \
> ++ timing_o \
> ++ enough \
> ++ msleep \
> ++ loop_o \
> ++ lat_fifo \
> ++ lmhttp \
> ++ lat_http \
> ++ lat_fcntl \
> ++ disk \
> ++ lat_unix_connect \
> ++ flushdisk \
> ++ lat_ops \
> ++ line \
> ++ tlb \
> ++ par_mem \
> ++ par_ops \
> ++ stream
> ++
> ++flushdisk_CPPFLAGS = \
> ++ -DMAIN
> ++
> ++LDADD = \
> ++ liblmbench.la
> ++
> ++lib_LTLIBRARIES = \
> ++ liblmbench.la
> ++
> ++AM_CPPFLAGS = \
> ++ -I$(top_srcdir)/include \
> ++ -I$(top_builddir)/include
> ++# $(libpv_CFLAGS) \
> ++# $(libstiebel_CFLAGS)
> ++
> ++EXTRA_DIST = \
> ++ autogen.sh
> ++
> ++MAINTAINERCLEANFILES = \
> ++ configure \
> ++ aclocal.m4 \
> ++ Makefile.in
> ++
> ++#pkgconfigdir = $(libdir)/pkgconfig
> ++#pkgconfig_DATA = libactor-@name@.pc
> ++
> ++#
> ++# library
> ++#
> ++
> ++#include_HEADERS = \
> ++# libactor-@name@.h
> ++
> ++liblmbench_la_SOURCES = \
> ++ lib_tcp.c \
> ++ lib_udp.c \
> ++ lib_unix.c \
> ++ lib_timing.c \
> ++ lib_mem.c \
> ++ lib_stats.c \
> ++ lib_debug.c \
> ++ lib_sched.c \
> ++ getopt.c
> ++
> ++liblmbench_la_LDFLAGS = \
> ++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
> ++ -Wl,-no-undefined \
> ++ -lm
> ++
> ++#libactor_@name@_la_LIBADD = \
> ++# $(libpv_LIBS) \
> ++# $(libstiebel_LIBS)
> ++
> diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
> new file mode 100644
> index 000000000..21c1ed39d
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff
> @@ -0,0 +1,924 @@
> +From: Robert Schwebel <r.schwebel@pengutronix.de>
> +Subject: Add autotool based build system
> +
> +In order to provide an autotool based build system, remove the old one.
> +
> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> +
> +---
> + Makefile | 74 --------
> + results/Makefile | 333 -------------------------------------
> + src/Makefile | 489 -------------------------------------------------------
> + 3 files changed, 896 deletions(-)
> +
> +Index: lmbench-3.0-a9/Makefile
> +===================================================================
> +--- lmbench-3.0-a9.orig/Makefile
> ++++ /dev/null
> +@@ -1,74 +0,0 @@
> +-# Makefile for top level of lmbench
> +-# $Id$
> +-
> +-# Possible things to $(MAKE):
> +-#
> +-# build (default) go to the source directory and build the benchmark
> +-# results go to the source directory and build and run the benchmark
> +-# rerun run the benchmark again
> +-# see see the results that came with this release
> +-# Go to the results directory and read the Makefile.
> +-# doc.lpr print the documentation
> +-# doc.x preview the documentation (needs X, groff, pic, etc)
> +-# clean go to the subdirs and $(MAKE) clean
> +-# get $(MAKE) sure all files are checked out
> +-# shar build a shippable shar archive
> +-
> +-SHELL=/bin/sh
> +-
> +-build:
> +- cd src && $(MAKE)
> +-
> +-results: FRC
> +- cd src && $(MAKE) results
> +-
> +-rerun:
> +- cd src && $(MAKE) rerun
> +-
> +-see:
> +- cd results && $(MAKE) summary >summary.out 2>summary.errs
> +- cd results && $(MAKE) percent >percent.out 2>percent.errs
> +-
> +-doc.lpr:
> +- cd doc && $(MAKE) PS && lpr *.PS
> +-
> +-doc.x:
> +- cd doc && $(MAKE) x
> +-
> +-clobber clean:
> +- for i in doc src results scripts; do \
> +- echo ===== $$i =====; \
> +- (cd $$i && $(MAKE) clean); \
> +- done
> +- /bin/rm -rf bin/*
> +- -bk clean
> +-
> +-get:
> +- for i in doc src results scripts; do \
> +- echo ===== $$i =====; \
> +- (cd $$i && bk get -q); \
> +- done
> +- @co -q
> +-
> +-info:
> +- for i in doc src results scripts; do \
> +- echo ===== $$i =====; \
> +- (cd $$i && info); \
> +- done
> +-
> +-release: scripts/mkrelease
> +- scripts/mkrelease
> +-
> +-scripts/mkrelease:
> +- cd scripts && co mkrelease
> +-
> +-# XXX - . must be named lmbench for this to work
> +-shar:
> +- $(MAKE) clean
> +- co -q Makefile
> +- $(MAKE) get
> +- cd .. && \
> +- find lmbench -type f -print | egrep -v 'noship|RCS' > /tmp/FILES
> +- cd .. && shar -S -a -n lmbench1.0 -L 50K < /tmp/FILES
> +-
> +-FRC:
> +Index: lmbench-3.0-a9/results/Makefile
> +===================================================================
> +--- lmbench-3.0-a9.orig/results/Makefile
> ++++ /dev/null
> +@@ -1,333 +0,0 @@
> +-# Makefile for lmbench results.
> +-# $Id$
> +-#
> +-# Usage: make [ LIST="aix/* sunos/* ..." ] [ what ]
> +-#
> +-# What to make:
> +-# print Prints the results 1 per page.
> +-# ps Saves the postscript of 1 per page in PS/PS
> +-# 4.ps Saves the postscript of 4 per page in PS/PS4
> +-# 8.ps Saves the postscript of 8 per page in PS/PS8
> +-# x Previews 1 per page using groff -X
> +-# summary [default] Ascii summary of the results
> +-# stats Do statistics over a set of results
> +-# roff Print the ascii summaries into a roff file
> +-# slides Makes the pic for inclusion in slides
> +-#
> +-# This Makefile requires groff, gpic, and perl. You could try it with
> +-# other *roff processors; I have no idea if it works.
> +-#
> +-# XXX - this is all out of date.
> +-#
> +-# There are three sorts of graphical results:
> +-#
> +-# 1. Bargraphs comparing each system in the LIST on the measurements listed
> +-# in the BG list below (pretty much everything).
> +-# 2. A 2-D graph for each system in LIST, displaying context switch times
> +-# as a function of (# of processes, size of each process).
> +-# 3. A 2-D graph for each system in LIST, displaying memory read times as
> +-# a function of (stride size, memory size).
> +-#
> +-# The bargraphs are in a format of my own - the perl script in scripts
> +-# called bargraph takes them as input and produces pic as output.
> +-# It is a pretty straightforward format, you could probably incorparate
> +-# into some Windows spreadsheet if you wanted to. See tmp/*.bg after
> +-# running make in this directory.
> +-#
> +-# The 2-D graphs are in a format that can (probably) be read by Xgraph.
> +-# I've added a few extensions for titles, etc., that you could just
> +-# take out. See tmp/mem.* after running a make in this directory.
> +-#
> +-# This Makefile is of marginal usefulness to a site with just one machine.
> +-# I intend to make results available so that people can compare, as well
> +-# as a service where you can compare your results against the "best of
> +-# the breed" for each vendor, as well as against best of the lot.
> +-
> +-# List of result files to process. Defaults to everything.
> +-LIST= `$(SCRIPTS)getlist $(LST)`
> +-
> +-# Grrrrr
> +-SHELL=/bin/sh
> +-
> +-SCRIPTS=../scripts/
> +-SRCS= ../scripts/allctx ../scripts/allmem ../scripts/bargraph \
> +- ../scripts/bghtml ../scripts/getbg ../scripts/getbw \
> +- ../scripts/getctx ../scripts/getdisk ../scripts/getlist \
> +- ../scripts/getmax ../scripts/getmem ../scripts/getpercent \
> +- ../scripts/getresults ../scripts/getsummary ../scripts/gifs \
> +- ../scripts/graph ../scripts/html-list ../scripts/html-man \
> +- ../scripts/os ../scripts/percent ../scripts/save \
> +- ../scripts/stats ../scripts/xroff
> +-
> +-MISC= tmp/misc_mhz.bg \
> +- tmp/lat_ctx.bg \
> +- tmp/lat_ctx8.bg \
> +- tmp/lat_nullsys.bg \
> +- tmp/lat_signal.bg \
> +- tmp/lat_pagefault.bg \
> +- tmp/lat_mappings.bg \
> +- tmp/lat_fs_create.bg
> +-
> +-PROC= tmp/lat_nullproc.bg \
> +- tmp/lat_simpleproc.bg \
> +- tmp/lat_shproc.bg
> +-
> +-LATENCY= \
> +- tmp/lat_pipe.bg \
> +- tmp/lat_connect.bg \
> +- tmp/lat_udp_local.bg \
> +- tmp/lat_rpc_udp_local.bg \
> +- tmp/lat_tcp_local.bg \
> +- tmp/lat_rpc_tcp_local.bg
> +-
> +-BANDWIDTH= \
> +- tmp/bw_pipe.bg \
> +- tmp/bw_tcp_local.bg \
> +- tmp/bw_file.bg \
> +- tmp/bw_reread.bg \
> +- tmp/bw_mmap.bg \
> +- tmp/bw_bcopy_libc.bg \
> +- tmp/bw_bcopy_unrolled.bg \
> +- tmp/bw_mem_rdsum.bg \
> +- tmp/bw_mem_wr.bg
> +-
> +-BG= $(MISC) $(PROC) $(LATENCY) $(BANDWIDTH)
> +-
> +-MK=@$(MAKE) -s
> +-PRINT=groff -p | lpr -h
> +-PS=groff -p | $(SCRIPTS)save PS/PS
> +-PS8UP=groff -p | mpage -P- -8 -a | $(SCRIPTS)save PS/PS8
> +-PS4UP=groff -p | mpage -P- -4 -a | $(SCRIPTS)save PS/PS4
> +-SIZE=-big
> +-IMAGE=pbm
> +-CLOSE=
> +-GMEM=$(CLOSE) -grid -logx -xm -below
> +-GCTX=$(CLOSE) -grid -below
> +-GDISK=-below -close -grid -nolines
> +-#IMAGE=gifmono
> +-
> +-summary: $(SRCS)
> +- @$(SCRIPTS)getsummary $(LIST)
> +-
> +-percent: $(SRCS)
> +- @$(SCRIPTS)getpercent $(LIST)
> +-
> +-stats: $(SRCS)
> +- $(SCRIPTS)getsummary $(LIST) | $(SCRIPTS)percent
> +-
> +-roff:
> +- echo .nf > summary.roff
> +- echo .ft CB >> summary.roff
> +- echo .ps 12 >> summary.roff
> +- echo .po .35i >> summary.roff
> +- echo .sp .5i >> summary.roff
> +- make LIST="$(LIST)" summary >> summary.roff
> +- echo .bp >> summary.roff
> +- echo .sp .5i >> summary.roff
> +- make LIST="$(LIST)" percent >> summary.roff
> +-
> +-list:
> +- @echo $(LIST)
> +-
> +-print: ctx mem disk bwfile bwmem
> +-
> +-8:
> +- $(MK) LIST="$(LIST)" PRINT="groff -p | mpage -P -8 -a | lpr -h" print
> +-
> +-8.ps 8ps 8up:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS8UP)" print
> +-
> +-4.ps 4ps 4up:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" print
> +-
> +-ps:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS)" print
> +-
> +-smallps:
> +- $(MK) LIST="$(LIST)" SIZE= PRINT="groff -p | $(SCRIPTS)save PS/smallPS" print
> +-
> +-x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" print
> +-
> +-ctx.x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" ctx
> +-
> +-ctx.ps4:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" ctx
> +-
> +-mem.x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" mem
> +-
> +-disk.x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" disk
> +-
> +-bwfile.ps:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS)" bwfile
> +-
> +-bwfile.x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwfile
> +-
> +-bwmem.ps:
> +- $(MK) LIST="$(LIST)" PRINT="$(PS)" bwmem
> +-
> +-bwmem.x:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwmem
> +-
> +-smallx:
> +- $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" SIZE= print
> +-
> +-slides:
> +- $(MK) LIST="$(LIST)" SIZE=-slide bargraphs.slides ctx.slides mem.slides
> +-
> +-paper:
> +- $(MK) LIST="$(LIST)" tbl.paper ctx.paper mem.paper
> +-
> +-# XXX - this has to be made incremental, doing everything over from
> +-# scratch makes you want a Ghz machine.
> +-html: dirs
> +- -make clean
> +- #$(SCRIPTS)bghtml $(BG)
> +- $(SCRIPTS)html-list $(LIST)
> +- $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
> +- #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
> +- $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
> +- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
> +- $(MK) LIST="$(LIST)" SIZE= NOOP=-noop PRINT="$(PS)" \
> +- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
> +- gs -sOutputFile=HTML/ctx%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS < /dev/null
> +- gs -sOutputFile=HTML/mem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.1 < /dev/null
> +- gs -sOutputFile=HTML/disk%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.2 < /dev/null
> +- gs -sOutputFile=HTML/bwfile%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.3 < /dev/null
> +- gs -sOutputFile=HTML/bwmem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.4 < /dev/null
> +- gs -sOutputFile=HTML/ctx-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.5 < /dev/null
> +- gs -sOutputFile=HTML/mem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.6 < /dev/null
> +- gs -sOutputFile=HTML/bwfile-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.7 < /dev/null
> +- gs -sOutputFile=HTML/bwmem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.8 < /dev/null
> +- $(SCRIPTS)/gifs
> +- rm HTML/*.pbm HTML/___tmp*
> +-
> +-htmltest: dirs
> +- -make clean
> +- #$(SCRIPTS)bghtml $(BG)
> +- $(SCRIPTS)html-list $(LIST)
> +- $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
> +- #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
> +- $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
> +- GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
> +-
> +-bghtml:
> +- $(SCRIPTS)bghtml $(BG)
> +-
> +-html-list:
> +- $(SCRIPTS)html-list $(LIST)
> +-
> +-ctx: dirs
> +- $(SCRIPTS)getctx $(LIST) > tmp/FILES
> +- @if [ -s tmp/FILES ]; \
> +- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
> +- for i in `cat tmp/FILES`; \
> +- do $(SCRIPTS)graph $(SIZE) $(GCTX) $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT); \
> +- else echo No context switch data in $(LIST); \
> +- fi
> +-
> +-disk: dirs
> +- if [ X$(NOOP) = X ]; then \
> +- $(SCRIPTS)getdisk $(LIST) > tmp/FILES; \
> +- if [ -s tmp/FILES ]; \
> +- then for i in `cat tmp/FILES`; \
> +- do $(SCRIPTS)graph $(SIZE) $(GDISK) $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT); \
> +- else echo No disk data in $(LIST); \
> +- fi; \
> +- fi
> +-
> +-mem: dirs
> +- $(SCRIPTS)getmem $(LIST) > tmp/FILES
> +- if [ -s tmp/FILES ]; \
> +- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
> +- for i in `cat tmp/FILES`; \
> +- do $(SCRIPTS)graph $(SIZE) $(GMEM) -nomarks $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT); \
> +- else echo No memory latency data in $(LIST); \
> +- fi
> +-
> +-bwfile: dirs
> +- $(SCRIPTS)getbw $(LIST) > tmp/FILES
> +- if [ -s tmp/FILES ]; \
> +- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
> +- for i in `cat tmp/FILES`; \
> +- do $(SCRIPTS)graph $(SIZE) $(GMEM) -logy $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT); \
> +- else echo No file bandwidth data in $(LIST); \
> +- fi
> +-
> +-bwmem: dirs
> +- $(SCRIPTS)getbw -all $(LIST) > tmp/FILES
> +- if [ -s tmp/FILES ]; \
> +- then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
> +- for i in `cat tmp/FILES`; \
> +- do $(SCRIPTS)graph -halfgrid -gthk_5 -thk2 -medium \
> +- -nomarks -nolabels -grapheach $(GMEM) \
> +- -logy %P="'`basename $$i`'" $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT); \
> +- else echo No memory bandwidth data in $(LIST); \
> +- fi
> +-
> +-tbl.paper:
> +- $(SCRIPTS)getbg -paper $(LIST)
> +-
> +-
> +-bargraphs.1st: dirs
> +- $(SCRIPTS)getbg -nosort $(LIST)
> +- #$(SCRIPTS)getmax -v $(PROC)
> +- #$(SCRIPTS)getmax -v $(LATENCY)
> +- #$(SCRIPTS)getmax -v -half $(BANDWIDTH)
> +-
> +-bargraphs: bargraphs.1st
> +- for i in $(BG); \
> +- do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PRINT)
> +-
> +-bargraphs.slides: bargraphs.1st
> +- for i in $(BG); \
> +- do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i > $${i}.pic; \
> +- done
> +-
> +-bargraphs.8up: bargraphs.1st
> +- for i in $(BG); \
> +- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PS8UP)
> +-
> +-latency.8up: bargraphs.1st
> +- for i in $(LATENCY); \
> +- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PS8UP)
> +-
> +-bw.8up: bargraphs.1st
> +- for i in $(BANDWIDTH); \
> +- do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
> +- echo .bp; \
> +- done | sed '$$d' | $(PS8UP)
> +-
> +-get: # nothing to do
> +-
> +-clean:
> +- /bin/rm -f PS/* GIF/* HTML/* tmp/* summary.roff
> +- -bk clean
> +-
> +-distclean:
> +- /bin/rm -fr PS GIF HTML tmp summary.roff
> +-
> +-dirs:
> +- @if [ ! -d tmp ]; then mkdir tmp; fi
> +- @if [ ! -d PS ]; then mkdir PS; fi
> +- @if [ ! -d HTML ]; then mkdir HTML; fi
> +Index: lmbench-3.0-a9/src/Makefile
> +===================================================================
> +--- lmbench-3.0-a9.orig/src/Makefile
> ++++ /dev/null
> +@@ -1,489 +0,0 @@
> +-# $Id$
> +-
> +-# Make targets:
> +-#
> +-# lmbench [default] builds the benchmark suite for the current os/arch
> +-# results builds, configures run parameters, and runs the benchmark
> +-# rerun reruns the benchmark using the same parameters as last time
> +-# scaling reruns the benchmark using same parameters as last time,
> +-# except it asks what scaling value to use
> +-# hardware reruns the hardware benchmarks using the same parameters
> +-# os reruns the OS benchmarks using the same parameters
> +-# clean cleans out sources and run configuration
> +-# clobber clean and removes the bin directories
> +-# shar obsolete, use cd .. && make shar
> +-# depend builds make dependencies (needs gcc)
> +-# debug builds all the benchmarks with '-g' debugging flag
> +-# assembler builds the .s files for each benchmark
> +-#
> +-# This is largely self configuring. Most stuff is pretty portable.
> +-#
> +-# If you don't have gcc, try make CC=cc and see if that works.
> +-#
> +-# If you want to do cross-compilation try make OS=armv5tel-linux-gnu
> +-# or whatever your OS string should be in the target environment.
> +-# Since many embedded development environments also have a special
> +-# cross-compiler, you might want to also select a particular compiler,
> +-# so your build command would look something like:
> +-# make OS=armv5tel-linux-gnu CC=gcc-arm
> +-#
> +-# Overriding the OS and CC make parameters needs to be done as an
> +-# argument to make, not as an environment variable. See above comments.
> +-#
> +-
> +-# I finally know why Larry Wall's Makefile says "Grrrr".
> +-SHELL=/bin/sh
> +-
> +-CC=`../scripts/compiler`
> +-MAKE=`../scripts/make`
> +-AR=ar
> +-ARCREATE=cr
> +-
> +-# base of installation location
> +-BASE=/usr/local
> +-O= ../bin/unknown
> +-D= ../doc
> +-TRUE=/bin/true
> +-OS=`../scripts/os`
> +-TARGET=`../scripts/target`
> +-BINDIR=../bin/$(OS)
> +-CONFIG=../bin/$(OS)/`../scripts/config`
> +-UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \
> +- ../scripts/info ../scripts/info-template ../scripts/version \
> +- ../scripts/config ../scripts/config-run ../scripts/results \
> +- ../scripts/lmbench ../scripts/make ../scripts/build
> +-INSTALL=cp
> +-RESULTS=Results/$(OS)
> +-SAMPLES=lmbench/Results/aix/rs6000 lmbench/Results/hpux/snake \
> +- lmbench/Results/irix/indigo2 lmbench/Results/linux/pentium \
> +- lmbench/Results/osf1/alpha lmbench/Results/solaris/ss20*
> +-
> +-COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
> +-
> +-INCS = bench.h lib_mem.h lib_tcp.h lib_udp.h stats.h timing.h
> +-
> +-SRCS = bw_file_rd.c bw_mem.c bw_mmap_rd.c bw_pipe.c bw_tcp.c bw_udp.c \
> +- bw_unix.c \
> +- cache.c clock.c disk.c enough.c flushdisk.c getopt.c hello.c \
> +- lat_connect.c lat_ctx.c lat_fcntl.c lat_fifo.c lat_fs.c \
> +- lat_mem_rd.c lat_mmap.c lat_ops.c lat_pagefault.c lat_pipe.c \
> +- lat_proc.c lat_rpc.c lat_select.c lat_sig.c lat_syscall.c \
> +- lat_tcp.c lat_udp.c lat_unix.c lat_unix_connect.c lat_sem.c \
> +- lat_usleep.c lat_pmake.c \
> +- lib_debug.c lib_mem.c lib_stats.c lib_tcp.c lib_timing.c \
> +- lib_udp.c lib_unix.c lib_sched.c \
> +- line.c lmdd.c lmhttp.c par_mem.c par_ops.c loop_o.c memsize.c \
> +- mhz.c msleep.c rhttp.c seek.c timing_o.c tlb.c stream.c \
> +- bench.h lib_debug.h lib_tcp.h lib_udp.h lib_unix.h names.h \
> +- stats.h timing.h version.h
> +-
> +-ASMS = $O/bw_file_rd.s $O/bw_mem.s $O/bw_mmap_rd.s $O/bw_pipe.s \
> +- $O/bw_tcp.s $O/bw_udp.s $O/bw_unix.s $O/clock.s \
> +- $O/disk.s $O/enough.s $O/flushdisk.s $O/getopt.s $O/hello.s \
> +- $O/lat_connect.s $O/lat_ctx.s lat_fcntl.s $O/lat_fifo.s \
> +- $O/lat_fs.s $O/lat_mem_rd.s $O/lat_mmap.s $O/lat_ops.s \
> +- $O/lat_pagefault.s $O/lat_pipe.s $O/lat_proc.s $O/lat_rpc.s \
> +- $O/lat_select.s $O/lat_sig.s $O/lat_syscall.s $O/lat_tcp.s \
> +- $O/lat_udp.s $O/lat_unix.s $O/lat_unix_connect.s $O/lat_sem.s \
> +- $O/lib_debug.s $O/lib_mem.s \
> +- $O/lib_stats.s $O/lib_tcp.s $O/lib_timing.s $O/lib_udp.s \
> +- $O/lib_unix.s $O/lib_sched.s \
> +- $O/line.s $O/lmdd.s $O/lmhttp.s $O/par_mem.s \
> +- $O/par_ops.s $O/loop_o.s $O/memsize.s $O/mhz.s $O/msleep.s \
> +- $O/rhttp.s $O/timing_o.s $O/tlb.s $O/stream.s \
> +- $O/cache.s $O/lat_dram_page.s $O/lat_pmake.s $O/lat_rand.s \
> +- $O/lat_usleep.s $O/lat_cmd.s
> +-EXES = $O/bw_file_rd $O/bw_mem $O/bw_mmap_rd $O/bw_pipe $O/bw_tcp \
> +- $O/bw_unix $O/hello \
> +- $O/lat_select $O/lat_pipe $O/lat_rpc $O/lat_syscall $O/lat_tcp \
> +- $O/lat_udp $O/lat_mmap $O/mhz $O/lat_proc $O/lat_pagefault \
> +- $O/lat_connect $O/lat_fs $O/lat_sig $O/lat_mem_rd $O/lat_ctx \
> +- $O/lat_sem \
> +- $O/memsize $O/lat_unix $O/lmdd $O/timing_o $O/enough \
> +- $O/msleep $O/loop_o $O/lat_fifo $O/lmhttp $O/lat_http \
> +- $O/lat_fcntl $O/disk $O/lat_unix_connect $O/flushdisk \
> +- $O/lat_ops $O/line $O/tlb $O/par_mem $O/par_ops \
> +- $O/stream
> +-OPT_EXES=$O/cache $O/lat_dram_page $O/lat_pmake $O/lat_rand \
> +- $O/lat_usleep $O/lat_cmd
> +-LIBOBJS= $O/lib_tcp.o $O/lib_udp.o $O/lib_unix.o $O/lib_timing.o \
> +- $O/lib_mem.o $O/lib_stats.o $O/lib_debug.o $O/getopt.o \
> +- $O/lib_sched.o
> +-
> +-lmbench: $(UTILS)
> +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build all
> +- -@env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="k$(MAKEFLAGS)" CC="$(CC)" OS="$(OS)" ../scripts/build opt
> +-
> +-results: lmbench
> +- @env OS="${OS}" ../scripts/config-run
> +- @env OS="${OS}" ../scripts/results
> +-
> +-rerun: lmbench
> +- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
> +- @env OS="${OS}" ../scripts/results
> +-
> +-scaling: lmbench
> +- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; \
> +- else ../scripts/config-scaling $(CONFIG); fi
> +- @env OS="${OS}" ../scripts/results
> +-
> +-hardware: lmbench
> +- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
> +- @env OS="${OS}" BENCHMARK_HARDWARE=YES BENCHMARK_OS=NO ../scripts/results
> +-
> +-os: lmbench
> +- @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi
> +- @env OS="${OS}" BENCHMARK_HARDWARE=NO BENCHMARK_OS=YES ../scripts/results
> +-
> +-install: lmbench
> +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build install-target
> +-
> +-install-target:
> +- if [ ! -d $(BASE) ]; then mkdir $(BASE); fi
> +- if [ ! -d $(BASE)/bin ]; then mkdir $(BASE)/bin; fi
> +- if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi
> +- if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi
> +- cp $(EXES) $(BASE)/bin
> +- cp $(INCS) $(BASE)/include
> +- cp $O/lmbench.a $(BASE)/lib/libmbench.a
> +- cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
> +-
> +-
> +-# No special handling for all these
> +-all: $(EXES) $O/lmbench
> +-opt: $(OPT_EXES)
> +-asm: $(ASMS)
> +-$(ASMS):
> +- $(CC) -S $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ `basename $@ .s`.c
> +-
> +-Wall:
> +- @env CFLAGS="-g -O -Wall" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt
> +-
> +-debug:
> +- @env CFLAGS="-g -O -DDEBUG" MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build all opt
> +-
> +-assembler:
> +- @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build asm
> +-
> +-
> +-tag:
> +- ROOT=`cat ../CVS/Root`; \
> +- MODULE=`cat ../CVS/Repository`; \
> +- VERSION=`../scripts/version`; \
> +- TAG=`echo lmbench_$${VERSION} | sed -e 's/-/_/g' -e 's/\\./_/g'`; \
> +- cd .. \
> +- && cvs -d$${ROOT} tag -c "$${TAG}"
> +-
> +-dist:
> +- SRCDIR=`pwd`; \
> +- ROOT=`cat ../CVS/Root`; \
> +- MODULE=`cat ../CVS/Repository`; \
> +- VERSION=`../scripts/version`; \
> +- cd /tmp \
> +- && cvs -d$${ROOT} export -Dtomorrow \
> +- -d $${MODULE}-$${VERSION} $${MODULE} \
> +- && chmod +x $${MODULE}-$${VERSION}/scripts/[a-z]* \
> +- && mv $${MODULE}-$${VERSION} lmbench-$${VERSION} \
> +- && tar czf $${SRCDIR}/../../lmbench-$${VERSION}.tgz \
> +- lmbench-$${VERSION} \
> +- && rm -rf lmbench-$${VERSION};
> +-
> +-clean:
> +- /bin/rm -f ../bin/*/CONFIG ../bin/*/*.[oas]
> +- /bin/rm -f *.[oas]
> +-
> +-clobber:
> +- /bin/rm -rf ../bin* SHAR
> +-
> +-shar:
> +- cd ../.. && shar lmbench/Results/Makefile $(SAMPLES) lmbench/scripts/* lmbench/src/Makefile lmbench/src/*.[ch] > lmbench/SHAR
> +-
> +-depend: ../scripts/depend
> +- ../scripts/depend
> +-
> +-testmake: $(SRCS) $(UTILS) # used by scripts/make to test gmake
> +- @true
> +-
> +-.PHONY: lmbench results rerun hardware os install all Wall debug \
> +- install install-target dist get edit get-e clean clobber \
> +- share depend testmake
> +-
> +-$O/lmbench : ../scripts/lmbench version.h
> +- rm -f $O/lmbench
> +- VERSION=`../scripts/version`; \
> +- sed -e "s/<version>/$${VERSION}/g" < ../scripts/lmbench > $O/lmbench
> +- chmod +x $O/lmbench
> +-
> +-$O/lmbench.a: $(LIBOBJS)
> +- /bin/rm -f $O/lmbench.a
> +- $(AR) $(ARCREATE) $O/lmbench.a $(LIBOBJS)
> +- -ranlib $O/lmbench.a
> +-
> +-$O/lib_timing.o : lib_timing.c $(INCS)
> +- $(COMPILE) -c lib_timing.c -o $O/lib_timing.o
> +-$O/lib_mem.o : lib_mem.c $(INCS)
> +- $(COMPILE) -c lib_mem.c -o $O/lib_mem.o
> +-$O/lib_tcp.o : lib_tcp.c $(INCS)
> +- $(COMPILE) -c lib_tcp.c -o $O/lib_tcp.o
> +-$O/lib_udp.o : lib_udp.c $(INCS)
> +- $(COMPILE) -c lib_udp.c -o $O/lib_udp.o
> +-$O/lib_unix.o : lib_unix.c $(INCS)
> +- $(COMPILE) -c lib_unix.c -o $O/lib_unix.o
> +-$O/lib_debug.o : lib_debug.c $(INCS)
> +- $(COMPILE) -c lib_debug.c -o $O/lib_debug.o
> +-$O/lib_stats.o : lib_stats.c $(INCS)
> +- $(COMPILE) -c lib_stats.c -o $O/lib_stats.o
> +-$O/lib_sched.o : lib_sched.c $(INCS)
> +- $(COMPILE) -c lib_sched.c -o $O/lib_sched.o
> +-$O/getopt.o : getopt.c $(INCS)
> +- $(COMPILE) -c getopt.c -o $O/getopt.o
> +-
> +-$(UTILS) :
> +- -cd ../scripts; make get
> +-
> +-# Do not remove the next line, $(MAKE) depend needs it
> +-# MAKEDEPEND follows
> +-$O/rhttp.s:rhttp.c timing.h stats.h bench.h
> +-$O/rhttp: rhttp.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/rhttp rhttp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/http.s:http.c timing.h stats.h bench.h
> +-$O/http: http.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/http http.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/flushdisk.s:flushdisk.c
> +-$O/flushdisk: flushdisk.c
> +- $(COMPILE) -DMAIN -o $O/flushdisk flushdisk.c
> +-
> +-$O/mhz.s: mhz.c timing.h stats.h bench.h
> +-$O/mhz: mhz.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/mhz mhz.c $O/lmbench.a $(LDLIBS) -lm
> +-
> +-$O/lat_ctx.s: lat_ctx.c timing.h stats.h bench.h
> +-$O/lat_ctx: lat_ctx.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_ctx lat_ctx.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lmhttp.s:lmhttp.c timing.h stats.h bench.h
> +-$O/lmhttp: lmhttp.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lmhttp lmhttp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_http.s:lat_http.c timing.h stats.h bench.h
> +-$O/lat_http: lat_http.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_http lat_http.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_file_rd.s:bw_file_rd.c timing.h stats.h bench.h
> +-$O/bw_file_rd: bw_file_rd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_file_rd bw_file_rd.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_mem.s:bw_mem.c timing.h stats.h bench.h
> +-$O/bw_mem: bw_mem.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_mem bw_mem.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_mmap_rd.s:bw_mmap_rd.c timing.h stats.h bench.h
> +-$O/bw_mmap_rd: bw_mmap_rd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_mmap_rd bw_mmap_rd.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_pipe.s:bw_pipe.c timing.h stats.h bench.h
> +-$O/bw_pipe: bw_pipe.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_pipe bw_pipe.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_tcp.s:bw_tcp.c bench.h timing.h stats.h lib_tcp.h
> +-$O/bw_tcp: bw_tcp.c bench.h timing.h stats.h lib_tcp.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_tcp bw_tcp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_udp.s:bw_udp.c bench.h timing.h stats.h lib_udp.h
> +-$O/bw_udp: bw_udp.c bench.h timing.h stats.h lib_udp.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_udp bw_udp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/bw_unix.s:bw_unix.c timing.h stats.h bench.h
> +-$O/bw_unix: bw_unix.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/bw_unix bw_unix.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/disk.s:disk.c flushdisk.c bench.h timing.h stats.h lib_tcp.h
> +-$O/disk: disk.c flushdisk.c bench.h timing.h stats.h lib_tcp.h $O/lmbench.a
> +- $(COMPILE) -o $O/disk disk.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/clock.s:clock.c timing.h stats.h bench.h
> +-$O/clock: clock.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/clock clock.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/hello.s:hello.c
> +-$O/hello: hello.c $O/lmbench.a
> +- $(COMPILE) -o $O/hello hello.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_alarm.s:lat_alarm.c timing.h stats.h bench.h
> +-$O/lat_alarm: lat_alarm.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_alarm lat_alarm.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_connect.s:lat_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h
> +-$O/lat_connect: lat_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_connect lat_connect.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_unix_connect.s:lat_unix_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h
> +-$O/lat_unix_connect: lat_unix_connect.c lib_tcp.c bench.h lib_tcp.h timing.h stats.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_unix_connect lat_unix_connect.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_fs.s:lat_fs.c timing.h stats.h bench.h
> +-$O/lat_fs: lat_fs.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_fs lat_fs.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_fcntl.s:lat_fcntl.c timing.h stats.h bench.h
> +-$O/lat_fcntl: lat_fcntl.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_fcntl lat_fcntl.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mem_rd.s:lat_mem_rd.c timing.h stats.h bench.h
> +-$O/lat_mem_rd: lat_mem_rd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mem_rd lat_mem_rd.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mem_rd2.s:lat_mem_rd2.c timing.h stats.h bench.h
> +-$O/lat_mem_rd2: lat_mem_rd2.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mem_rd2 lat_mem_rd2.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mem_wr.s:lat_mem_wr.c timing.h stats.h bench.h
> +-$O/lat_mem_wr: lat_mem_wr.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mem_wr lat_mem_wr.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mem_wr2.s:lat_mem_wr2.c timing.h stats.h bench.h
> +-$O/lat_mem_wr2: lat_mem_wr2.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mem_wr2 lat_mem_wr2.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mmap.s:lat_mmap.c timing.h stats.h bench.h
> +-$O/lat_mmap: lat_mmap.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mmap lat_mmap.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_mmaprd.s:lat_mmaprd.c timing.h stats.h bench.h
> +-$O/lat_mmaprd: lat_mmaprd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_mmaprd lat_mmaprd.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_ops.s:lat_ops.c timing.h stats.h bench.h
> +-$O/lat_ops: lat_ops.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_ops lat_ops.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_pagefault.s:lat_pagefault.c timing.h stats.h bench.h
> +-$O/lat_pagefault: lat_pagefault.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_pagefault lat_pagefault.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_pipe.s:lat_pipe.c timing.h stats.h bench.h
> +-$O/lat_pipe: lat_pipe.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_pipe lat_pipe.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_fifo.s:lat_fifo.c timing.h stats.h bench.h
> +-$O/lat_fifo: lat_fifo.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_fifo lat_fifo.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_proc.s:lat_proc.c timing.h stats.h bench.h
> +-$O/lat_proc: lat_proc.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_proc lat_proc.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_rpc.s:lat_rpc.c timing.h stats.h bench.h
> +-$O/lat_rpc: lat_rpc.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_rpc lat_rpc.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_sig.s:lat_sig.c timing.h stats.h bench.h
> +-$O/lat_sig: lat_sig.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_sig lat_sig.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_syscall.s:lat_syscall.c timing.h stats.h bench.h
> +-$O/lat_syscall: lat_syscall.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_syscall lat_syscall.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_select.s: lat_select.c timing.h stats.h bench.h
> +-$O/lat_select: lat_select.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_select lat_select.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_tcp.s:lat_tcp.c timing.h stats.h bench.h lib_tcp.h
> +-$O/lat_tcp: lat_tcp.c timing.h stats.h bench.h lib_tcp.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_tcp lat_tcp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_udp.s:lat_udp.c timing.h stats.h bench.h lib_udp.h
> +-$O/lat_udp: lat_udp.c timing.h stats.h bench.h lib_udp.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_udp lat_udp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_unix.s:lat_unix.c timing.h stats.h bench.h
> +-$O/lat_unix: lat_unix.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_unix lat_unix.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lib_tcp.s:lib_tcp.c bench.h lib_tcp.h
> +-$O/lib_tcp: lib_tcp.c bench.h lib_tcp.h $O/lmbench.a
> +- $(COMPILE) -o $O/lib_tcp lib_tcp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lib_udp.s:lib_udp.c bench.h lib_udp.h
> +-$O/lib_udp: lib_udp.c bench.h lib_udp.h $O/lmbench.a
> +- $(COMPILE) -o $O/lib_udp lib_udp.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lmdd.s:lmdd.c timing.h stats.h bench.h
> +-$O/lmdd: lmdd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lmdd lmdd.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/enough.s:enough.c timing.h stats.h bench.h
> +-$O/enough: enough.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/enough enough.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/loop_o.s:loop_o.c timing.h stats.h bench.h
> +-$O/loop_o: loop_o.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/loop_o loop_o.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/timing_o.s:timing_o.c timing.h stats.h bench.h
> +-$O/timing_o: timing_o.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/timing_o timing_o.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/memsize.s:memsize.c timing.h stats.h bench.h
> +-$O/memsize: memsize.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/memsize memsize.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/msleep.s:msleep.c timing.h stats.h bench.h
> +-$O/msleep: msleep.c timing.h stats.h bench.h
> +- $(COMPILE) -o $O/msleep msleep.c
> +-
> +-$O/line.s: line.c timing.h stats.h bench.h
> +-$O/line: line.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/line line.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/tlb.s:tlb.c timing.h stats.h bench.h
> +-$O/tlb: tlb.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/tlb tlb.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/cache.s:cache.c timing.h stats.h bench.h
> +-$O/cache: cache.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/cache cache.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/par_mem.s:par_mem.c timing.h stats.h bench.h
> +-$O/par_mem: par_mem.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/par_mem par_mem.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/par_ops.s:par_ops.c timing.h stats.h bench.h
> +-$O/par_ops: par_ops.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/par_ops par_ops.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/stream.s:stream.c timing.h stats.h bench.h
> +-$O/stream: stream.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/stream stream.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_sem.s:lat_sem.c timing.h stats.h bench.h
> +-$O/lat_sem: lat_sem.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_sem lat_sem.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/par_list.s:par_list.c timing.h stats.h bench.h
> +-$O/par_list: par_list.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/par_list par_list.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_dram_page.s:lat_dram_page.c timing.h stats.h bench.h
> +-$O/lat_dram_page: lat_dram_page.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_dram_page lat_dram_page.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_usleep.s:lat_usleep.c timing.h stats.h bench.h
> +-$O/lat_usleep: lat_usleep.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_usleep lat_usleep.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_pmake.s:lat_pmake.c timing.h stats.h bench.h
> +-$O/lat_pmake: lat_pmake.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_pmake lat_pmake.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_rand.s:lat_rand.c timing.h stats.h bench.h
> +-$O/lat_rand: lat_rand.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_rand lat_rand.c $O/lmbench.a $(LDLIBS)
> +-
> +-$O/lat_cmd.s:lat_cmd.c timing.h stats.h bench.h
> +-$O/lat_cmd: lat_cmd.c timing.h stats.h bench.h $O/lmbench.a
> +- $(COMPILE) -o $O/lat_cmd lat_cmd.c $O/lmbench.a $(LDLIBS)
> +-
> diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
> new file mode 100644
> index 000000000..07ef7b144
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff
> @@ -0,0 +1,37 @@
> +From: Robert Schwebel <r.schwebel@pengutronix.de>
> +Subject: minor cleanups
> +
> +Add missing header file, add a cast to silence compiler.
> +
> +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> +---
> +
> +--- lmbench-3.0-a9-orig/src/lib_tcp.c 2006-06-27 18:27:19.000000000 +0200
> ++++ lmbench-3.0-a9/src/lib_tcp.c 2009-04-09 17:56:50.000000000 +0200
> +@@ -7,6 +7,7 @@
> + */
> + #define _LIB /* bench.h needs this */
> + #include "bench.h"
> ++#include <rpc/pmap_clnt.h>
> +
> + /*
> + * Get a TCP socket, bind it, figure out the port,
> +@@ -148,7 +149,7 @@
> + fprintf(stderr, "Client port %d\n", sockport(sock));
> + #endif
> + sock_optimize(sock, rdwr);
> +- if (!h || host != save_host || prog != save_prog) {
> ++ if (!h || host != save_host || prog != (int)save_prog) {
> + save_host = host; /* XXX - counting on them not
> + * changing it - benchmark only.
> + */
> +--- lmbench-3.0-a9-orig/src/lib_udp.c 2006-06-27 18:27:20.000000000 +0200
> ++++ lmbench-3.0-a9/src/lib_udp.c 2009-04-09 17:57:19.000000000 +0200
> +@@ -7,6 +7,7 @@
> + */
> + #define _LIB /* bench.h needs this */
> + #include "bench.h"
> ++#include <rpc/pmap_clnt.h>
> +
> + /*
> + * Get a UDP socket, bind it, figure out the port,
> diff --git a/patches/lmbench-3.0-a9/series b/patches/lmbench-3.0-a9/series
> new file mode 100644
> index 000000000..0c4ffef30
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/series
> @@ -0,0 +1,3 @@
> +lmbench-3.0-a9-remove-old-buildsystem.diff
> +lmbench-3.0-a9-autotoolize.diff
> +lmbench-3.0-a9-rpcheaders.diff
> diff --git a/rules/lmbench.in b/rules/lmbench.in
> new file mode 100644
> index 000000000..f3d78e8e6
> --- /dev/null
> +++ b/rules/lmbench.in
> @@ -0,0 +1,14 @@
> +## SECTION=staging
> +## old section:
> +### SECTION=test_suites
> +
> +config LMBENCH
> + tristate
> + select LIBC_M
> + select GCCLIBS_GCC_S
> + prompt "lmbench"
> + help
> + Various tools for performance analysis
> +
> + STAGING: remove in PTXdist 2022.01.0
> + Upstream dead and fails to build with gcc 10.
> diff --git a/rules/lmbench.make b/rules/lmbench.make
> new file mode 100644
> index 000000000..382a9793e
> --- /dev/null
> +++ b/rules/lmbench.make
> @@ -0,0 +1,102 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2009 by Robert Schwebel
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LMBENCH) += lmbench
> +
> +#
> +# Paths and names
> +#
> +LMBENCH_VERSION := 3.0-a9
> +LMBENCH_MD5 := b3351a3294db66a72e2864a199d37cbf
> +LMBENCH := lmbench-$(LMBENCH_VERSION)
> +LMBENCH_SUFFIX := tgz
> +LMBENCH_URL := $(call ptx/mirror, SF, lmbench/$(LMBENCH).$(LMBENCH_SUFFIX))
> +LMBENCH_SOURCE := $(SRCDIR)/$(LMBENCH).$(LMBENCH_SUFFIX)
> +LMBENCH_DIR := $(BUILDDIR)/$(LMBENCH)
> +LMBENCH_LICENSE := GPL-2.0-only with exceptions
> +LMBENCH_LICENSE_FILES := \
> + file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
> + file://COPYING-2;md5=8e9aee2ccc75d61d107e43794a25cdf9
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LMBENCH_CONF_TOOL := autoconf
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/lmbench.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, lmbench)
> + @$(call install_fixup, lmbench,PRIORITY,optional)
> + @$(call install_fixup, lmbench,SECTION,base)
> + @$(call install_fixup, lmbench,AUTHOR,"Robert Schwebel")
> + @$(call install_fixup, lmbench,DESCRIPTION,missing)
> +
> + for file in \
> + /usr/bin/par_mem \
> + /usr/bin/lat_tcp \
> + /usr/bin/par_ops \
> + /usr/bin/lat_mmap \
> + /usr/bin/hello \
> + /usr/bin/bw_unix \
> + /usr/bin/lat_syscall \
> + /usr/bin/lat_sem \
> + /usr/bin/lat_fs \
> + /usr/bin/loop_o \
> + /usr/bin/lat_fcntl \
> + /usr/bin/lat_unix \
> + /usr/bin/bw_tcp \
> + /usr/bin/lat_rpc \
> + /usr/bin/lat_unix_connect \
> + /usr/bin/bw_file_rd \
> + /usr/bin/disk \
> + /usr/bin/lat_mem_rd \
> + /usr/bin/lat_select \
> + /usr/bin/lat_connect \
> + /usr/bin/lat_fifo \
> + /usr/bin/line \
> + /usr/bin/timing_o \
> + /usr/bin/lat_ctx \
> + /usr/bin/bw_mem \
> + /usr/bin/lat_sig \
> + /usr/bin/lat_pipe \
> + /usr/bin/lat_pagefault \
> + /usr/bin/lmhttp \
> + /usr/bin/tlb \
> + /usr/bin/bw_pipe \
> + /usr/bin/mhz \
> + /usr/bin/lat_http \
> + /usr/bin/msleep \
> + /usr/bin/lat_ops \
> + /usr/bin/lat_udp \
> + /usr/bin/stream \
> + /usr/bin/enough \
> + /usr/bin/flushdisk \
> + /usr/bin/lmdd \
> + /usr/bin/lat_proc \
> + /usr/bin/bw_mmap_rd \
> + /usr/bin/memsize \
> + ; do \
> + $(call install_copy, lmbench, 0, 0, 0755, -, $$file); \
> + done
Please modernize this a bit. Outsize the build target:
LMBENCH_TOOLS := \
par_mem \
lat_tcp \
...
Maybe sort while at it.
And here:
@$(foreach tool, $(LMBENCH_TOOLS), \
$(call install_copy, lmbench, 0, 0, 0755, -, \
/usr/bin/$(tool))$(ptx/nl))
And please squash all commit together so that there are no broken versions
in-between.
Michael
> +
> + @$(call install_lib, lmbench, 0, 0, 0644, liblmbench)
> +
> + @$(call install_finish, lmbench)
> +
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 2.30.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions
2023-02-07 14:21 ` [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions Sven Püschel
@ 2023-02-10 11:14 ` Michael Olbrich
0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2023-02-10 11:14 UTC (permalink / raw)
To: Sven Püschel; +Cc: ptxdist
On Tue, Feb 07, 2023 at 03:21:39PM +0100, Sven Püschel wrote:
> GCC removed the SunRPC implementation, therefore we're now using
> libtirpc. Also added a patch to include the correct header for
> socklen_t, so that autotools cannot fail to detect the type presence correctly.
>
> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
> ---
> .../lmbench-3.0-a9-add-libtirpc.diff | 50 +++++++++++++++++++
> .../lmbench-3.0-a9-fix_socklen_t.diff | 19 +++++++
> patches/lmbench-3.0-a9/series | 2 +
> rules/lmbench.in | 9 ++--
> 4 files changed, 74 insertions(+), 6 deletions(-)
> create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
> create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
>
> diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
> new file mode 100644
> index 000000000..cebe67f73
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
> @@ -0,0 +1,50 @@
> +commit 3cabac2f5b1688fc35a3e6af890d1b0193b8c840
> +Author: Sven Püschel <s.pueschel@pengutronix.de>
> +Date: Wed Feb 1 08:17:38 2023 +0000
> +
> + added libtirpc
> +
> +diff --git a/configure.ac b/configure.ac
> +index 0d935e8..415203b 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -27,8 +27,39 @@ AC_SUBST(LT_AGE)
> + #
> + # Checks for programs.
> + #
> ++
> ++# Function copied and modified from http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=aclocal/libtirpc.m4;h=bddae022693100c810edff042d51b145c8f411a6;hb=HEAD
> ++dnl Checks for TI-RPC library and headers
> ++dnl
> ++AC_DEFUN([AC_LIBTIRPC], [
> ++
> ++ PKG_PROG_PKG_CONFIG([0.9.0])
> ++ PKG_CHECK_MODULES([TIRPC], [libtirpc],
> ++ [LIBS="${LIBS} ${TIRPC_LIBS}"
> ++ AM_CFLAGS="${AM_CFLAGS} ${TIRPC_CFLAGS}"
> ++ AC_DEFINE([HAVE_LIBTIRPC], [1],
> ++ [Define to 1 if you have and wish to use libtirpc.])])
> ++
> ++ AS_IF([test -n "${LIBTIRPC}"],
> ++ [AC_CHECK_LIB([tirpc], [authgss_free_private_data],
> ++ [AC_DEFINE([HAVE_AUTHGSS_FREE_PRIVATE_DATA], [1],
> ++ [Define to 1 if your rpcsec library provides authgss_free_private_data])],,
> ++ [${LIBS}])])
> ++
> ++ AS_IF([test -n "${LIBTIRPC}"],
> ++ [AC_CHECK_LIB([tirpc], [libtirpc_set_debug],
> ++ [AC_DEFINE([HAVE_LIBTIRPC_SET_DEBUG], [1],
> ++ [Define to 1 if your tirpc library provides libtirpc_set_debug])],,
> ++ [${LIBS}])])
> ++
> ++ AC_SUBST([AM_CFLAGS])
> ++ AC_SUBST([LIBS])
> ++
> ++])dnl
> ++
> + AC_PROG_CC
> + AC_PROG_LIBTOOL
> ++AC_LIBTIRPC
> +
> + AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
> +
> diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
> new file mode 100644
> index 000000000..e1cba8373
> --- /dev/null
> +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
> @@ -0,0 +1,19 @@
> +commit eacfb4af1ecfafa1a0486643c81f313eb183eaa8
> +Author: Sven Püschel <s.pueschel@pengutronix.de>
> +Date: Wed Feb 1 08:54:07 2023 +0000
> +
> + Added missing include for socklen_t check
> +
> +diff --git a/configure.ac b/configure.ac
> +index 415203b..c29e794 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -100,7 +100,7 @@ AC_CHECK_TYPE([uint64],[CFLAGS="${CFLAGS} -DHAVE_uint64"])
> + AC_CHECK_TYPE([uint64_t],[CFLAGS="${CFLAGS} -DHAVE_uint64_t"])
> + AC_CHECK_TYPE([int64],[CFLAGS="${CFLAGS} -DHAVE_int64"])
> + AC_CHECK_TYPE([int64_t],[CFLAGS="${CFLAGS} -DHAVE_int64_t"])
> +-AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"])
> ++AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"], [], [[#include <sys/socket.h>]])
> + AC_CHECK_TYPE([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"])
> +
> + AC_COMPILE_IFELSE(
> diff --git a/patches/lmbench-3.0-a9/series b/patches/lmbench-3.0-a9/series
> index 0c4ffef30..b2a777897 100644
> --- a/patches/lmbench-3.0-a9/series
> +++ b/patches/lmbench-3.0-a9/series
> @@ -1,3 +1,5 @@
> lmbench-3.0-a9-remove-old-buildsystem.diff
> lmbench-3.0-a9-autotoolize.diff
> lmbench-3.0-a9-rpcheaders.diff
> +lmbench-3.0-a9-add-libtirpc.diff
> +lmbench-3.0-a9-fix_socklen_t.diff
Please regenerate the patches with 'git ptx-patches'.
> diff --git a/rules/lmbench.in b/rules/lmbench.in
> index f3d78e8e6..2e6d5fbcb 100644
> --- a/rules/lmbench.in
> +++ b/rules/lmbench.in
> @@ -1,14 +1,11 @@
> -## SECTION=staging
> -## old section:
> -### SECTION=test_suites
> +## SECTION=test_suites
>
> config LMBENCH
> tristate
> select LIBC_M
> select GCCLIBS_GCC_S
> + # glibc has removed the SunRPC implementation, see https://fedoraproject.org/wiki/Changes/SunRPCRemoval, therefore we use libtirpc
I don't think wee need that comment here. None of the other users have it.
Add this to the patch description instead.
Michael
> + select LIBTIRPC
> prompt "lmbench"
> help
> Various tools for performance analysis
> -
> - STAGING: remove in PTXdist 2022.01.0
> - Upstream dead and fails to build with gcc 10.
> --
> 2.30.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-10 11:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 14:21 [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Sven Püschel
2023-02-07 14:21 ` [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions Sven Püschel
2023-02-10 11:14 ` Michael Olbrich
2023-02-10 11:13 ` [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox