diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-benchmark/dhrystone | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-benchmark/dhrystone')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch | 81 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb | 26 |
2 files changed, 107 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch b/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch new file mode 100644 index 000000000..6a5350c37 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch @@ -0,0 +1,81 @@ +dhrystone: fix compilation problems + +This patch fixes two compilation errors with original +dhrystone sources: +* Redefinition of times() with wrong return type + - Fixed by commenting out the unnecessary redefinition +* Undefined identifier HZ + - Originally HZ was supposed to be the clock frequency + value for times() + - For Linux, the frequency should come from sysconf + - This patch defines global varible HZ and initializes + it from sysconf + +Additionally, this patch adds a simple Makefile. + +Upstream-status: Pending + +Sign-off-by: Kimmo Surakka <kimmo.surakka@ge.com> +Signed-off-by: Jose Alarcon <jose.alarcon@ge.com> +--- + +diff -Naur dhry.orig/dhry_1.c dhry/dhry_1.c +--- dhry.orig/dhry_1.c 2015-07-20 14:25:58.059945353 +0300 ++++ dhry/dhry_1.c 2015-07-20 12:43:25.318945353 +0300 +@@ -45,11 +45,15 @@ + + #ifdef TIMES + struct tms time_info; +-extern int times (); ++/* extern int times (); */ + /* see library function "times" */ + #define Too_Small_Time 120 + /* Measurements should last at least about 2 seconds */ + #endif ++#ifndef HZ ++#include <unistd.h> /* sysconf */ ++ long HZ; ++#endif + #ifdef TIME + extern long time(); + /* see library function "time" */ +@@ -84,6 +88,9 @@ + + /* Initializations */ + ++#ifndef HZ ++ HZ = sysconf(_SC_CLK_TCK); ++#endif + Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type)); + Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type)); + +diff -Naur dhry.orig/dhry.h dhry/dhry.h +--- dhry.orig/dhry.h 2015-07-20 14:25:58.054945353 +0300 ++++ dhry/dhry.h 2015-07-20 12:42:59.903945353 +0300 +@@ -420,4 +420,6 @@ + } variant; + } Rec_Type, *Rec_Pointer; + +- ++#ifndef HZ ++ extern long HZ; ++#endif +diff -Naur dhry.orig/Makefile dhry/Makefile +--- dhry.orig/Makefile 1970-01-01 02:00:00.000000000 +0200 ++++ dhry/Makefile 2015-07-20 14:10:45.832945353 +0300 +@@ -0,0 +1,15 @@ ++CC=gcc ++ ++all: dhry ++ ++dhry: dhry_1.o dhry_2.o ++ $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS) ++ ++dhry_1.o: dhry_1.c dhry.h ++ ++dhry_2.o: dhry_2.c dhry.h ++ ++clean: ++ rm -f *.o *~ ++ ++.PHONY: all clean diff --git a/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb b/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb new file mode 100644 index 000000000..17e8c700c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "Dhrystone CPU benchmark" +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/PD;md5=b3597d12946881e13cb3b548d1173851" + +SRC_URI = "http://www.netlib.org/benchmark/dhry-c;downloadfilename=dhry-c.shar \ + file://dhrystone.patch" +SRC_URI[md5sum] = "75aa5909c174eed98c134be2f56307da" +SRC_URI[sha256sum] = "038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e" + +# Need to override Makefile variables +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +do_unpack() { + [ -d ${S} ] || mkdir -p ${S} + cd ${S} + sh ${DL_DIR}/dhry-c.shar +} +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/dhry ${D}${bindir} +} + +# Prevent procedure merging as required by dhrystone.c: +CFLAGS += "-fno-lto" + +LDFLAGS += "-fno-lto" |