All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] Dhrystone: add recipe 2.1
@ 2017-08-21 10:23 Jose Alarcon
  2017-08-21 12:35 ` ✗ patchtest: failure for " Patchwork
  2017-08-21 12:35 ` [meta-oe][PATCH] " Jussi Kukkonen
  0 siblings, 2 replies; 5+ messages in thread
From: Jose Alarcon @ 2017-08-21 10:23 UTC (permalink / raw)
  To: openembedded-core

Dhrystone is a synthetic computing benchmark program developed
in 1984 by Reinhold P. Weicker intended to be representative of
system (integer) programming.

https://en.wikipedia.org/wiki/Dhrystone

Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
---
 .../dhrystone/dhrystone-2.1/dhrystone.patch        | 81 ++++++++++++++++++++++
 .../recipes-benchmark/dhrystone/dhrystone_2.1.bb   | 26 +++++++
 2 files changed, 107 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch
 create mode 100644 meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb

diff --git a/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch b/meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch
new file mode 100644
index 0000000..ae93aba
--- /dev/null
+++ b/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-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb b/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb
new file mode 100644
index 0000000..a11e8cf
--- /dev/null
+++ b/meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Dhrystone CPU benchmark"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
+
+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"
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✗ patchtest: failure for Dhrystone: add recipe 2.1
  2017-08-21 10:23 [meta-oe][PATCH] Dhrystone: add recipe 2.1 Jose Alarcon
@ 2017-08-21 12:35 ` Patchwork
  2017-08-21 12:35 ` [meta-oe][PATCH] " Jussi Kukkonen
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-08-21 12:35 UTC (permalink / raw)
  To: Jose Alarcon; +Cc: openembedded-core

== Series Details ==

Series: Dhrystone: add recipe 2.1
Revision: 1
URL   : https://patchwork.openembedded.org/series/8390/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence] 
  Suggested fix    Add Upstream-Status: <status> to the header of meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch (possible values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] Dhrystone: add recipe 2.1
  2017-08-21 10:23 [meta-oe][PATCH] Dhrystone: add recipe 2.1 Jose Alarcon
  2017-08-21 12:35 ` ✗ patchtest: failure for " Patchwork
@ 2017-08-21 12:35 ` Jussi Kukkonen
  2017-08-21 18:16   ` Khem Raj
  1 sibling, 1 reply; 5+ messages in thread
From: Jussi Kukkonen @ 2017-08-21 12:35 UTC (permalink / raw)
  To: Jose Alarcon; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On 21 August 2017 at 13:23, Jose Alarcon <jose.alarcon@ge.com> wrote:

> Dhrystone is a synthetic computing benchmark program developed
> in 1984 by Reinhold P. Weicker intended to be representative of
> system (integer) programming.
>
> https://en.wikipedia.org/wiki/Dhrystone
>
> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
> ---
>  .../dhrystone/dhrystone-2.1/dhrystone.patch        | 81
> ++++++++++++++++++++++
>  .../recipes-benchmark/dhrystone/dhrystone_2.1.bb   | 26 +++++++
>  2 files changed, 107 insertions(+)
>  create mode 100644 meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/
> dhrystone.patch
>  create mode 100644 meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb


Hi,

Please send meta-oe patches to openembedded-devel@lists.openembedded.org.

Also this part is unlikely to be welcome on oe-devel either:
> LICENSE = "Proprietary"

I think I remember seeing a dhrystone recipe submission with an open source
license (NCSA maybe?) last year .

Cheers,
  Jussi

[-- Attachment #2: Type: text/html, Size: 2043 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-oe][PATCH] Dhrystone: add recipe 2.1
  2017-08-21 12:35 ` [meta-oe][PATCH] " Jussi Kukkonen
@ 2017-08-21 18:16   ` Khem Raj
  2017-08-22  4:53     ` EXT: " Jose Alarcon
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2017-08-21 18:16 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

On Mon, Aug 21, 2017 at 5:35 AM, Jussi Kukkonen
<jussi.kukkonen@intel.com> wrote:
> On 21 August 2017 at 13:23, Jose Alarcon <jose.alarcon@ge.com> wrote:
>>
>> Dhrystone is a synthetic computing benchmark program developed
>> in 1984 by Reinhold P. Weicker intended to be representative of
>> system (integer) programming.
>>
>> https://en.wikipedia.org/wiki/Dhrystone
>>
>> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
>> ---
>>  .../dhrystone/dhrystone-2.1/dhrystone.patch        | 81
>> ++++++++++++++++++++++
>>  .../recipes-benchmark/dhrystone/dhrystone_2.1.bb   | 26 +++++++
>>  2 files changed, 107 insertions(+)
>>  create mode 100644
>> meta-oe/recipes-benchmark/dhrystone/dhrystone-2.1/dhrystone.patch
>>  create mode 100644 meta-oe/recipes-benchmark/dhrystone/dhrystone_2.1.bb
>
>
> Hi,
>
> Please send meta-oe patches to openembedded-devel@lists.openembedded.org.
>
> Also this part is unlikely to be welcome on oe-devel either:
>> LICENSE = "Proprietary"
>
> I think I remember seeing a dhrystone recipe submission with an open source
> license (NCSA maybe?) last year .

https://patchwork.openembedded.org/patch/129975/

a v2 was expected, which I cant find so it never got applied. if you
are interested rework the v1 and test it out. Submit a v2 and we can
take it further along the line.

>
> Cheers,
>   Jussi
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: EXT: Re: [meta-oe][PATCH] Dhrystone: add recipe 2.1
  2017-08-21 18:16   ` Khem Raj
@ 2017-08-22  4:53     ` Jose Alarcon
  0 siblings, 0 replies; 5+ messages in thread
From: Jose Alarcon @ 2017-08-22  4:53 UTC (permalink / raw)
  To: Khem Raj, Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

Hello,

Thank you for your comments


On 21.08.2017 21:16, Khem Raj wrote:
> On Mon, Aug 21, 2017 at 5:35 AM, Jussi Kukkonen
> <jussi.kukkonen@intel.com> wrote:
>> On 21 August 2017 at 13:23, Jose Alarcon <jose.alarcon@ge.com> wrote:

<snip>
>>
>> Hi,
>>
>> Please send meta-oe patches to openembedded-devel@lists.openembedded.org.

My bad. I will send the v2 to the correct list.

>>
>> Also this part is unlikely to be welcome on oe-devel either:
>>> LICENSE = "Proprietary"
>> I think I remember seeing a dhrystone recipe submission with an open source
>> license (NCSA maybe?) last year .
> https://patchwork.openembedded.org/patch/129975/
>
> a v2 was expected, which I cant find so it never got applied. if you
> are interested rework the v1 and test it out. Submit a v2 and we can
> take it further along the line.

About the license, I couldn't find any in the source of Dhrystone.

There is an Android package that mentions NCSA. I believe that Public
Domain would be more appropriate in this case.

I wasn't able to find a dhrystone package in Debian or Fedora to double
check about the license.

Thanks,

--
Jose


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-22  4:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 10:23 [meta-oe][PATCH] Dhrystone: add recipe 2.1 Jose Alarcon
2017-08-21 12:35 ` ✗ patchtest: failure for " Patchwork
2017-08-21 12:35 ` [meta-oe][PATCH] " Jussi Kukkonen
2017-08-21 18:16   ` Khem Raj
2017-08-22  4:53     ` EXT: " Jose Alarcon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.