From 4d68f0d040c47a98e008e28ba146c6d12000262c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 15 Jul 2024 11:12:14 +0200 Subject: [PATCH] package/dhrystone: cleanup patch stack dhrystone is basically a dead project, so there is no Git repo available anywhere, no new release, nothing. Despite that, let's reformat the patches with "git format-patch", keep the original authorship but add my SoB since I'm reintroducing the patches, and indicate the Upstream: status. Signed-off-by: Thomas Petazzoni (cherry picked from commit 95013777cf93548eee7ac3010b513d354e8b0a30) Signed-off-by: Peter Korsgaard --- .checkpackageignore | 5 ---- ...y-the-number-of-runs-on-the-command.patch} | 22 ++++++++++---- ...m-system-rather-than-requiring-via-C.patch | 29 +++++++++++++++++++ package/dhrystone/0002-HZ.patch | 17 ----------- package/dhrystone/0003-exit.patch | 14 --------- ...trust-the-exit-status-of-the-program.patch | 26 +++++++++++++++++ ...et-prototypes-for-malloc-exit-strcpy.patch | 27 +++++++++++++++++ package/dhrystone/0004-headers.patch | 15 ---------- ...-with-C-library-using-NO_PROTOTYPES.patch} | 20 ++++++++++--- 9 files changed, 115 insertions(+), 60 deletions(-) rename package/dhrystone/{0001-cmdline-nruns.patch => 0001-let-people-specify-the-number-of-runs-on-the-command.patch} (66%) create mode 100644 package/dhrystone/0002-Get-HZ-value-from-system-rather-than-requiring-via-C.patch delete mode 100644 package/dhrystone/0002-HZ.patch delete mode 100644 package/dhrystone/0003-exit.patch create mode 100644 package/dhrystone/0003-trust-the-exit-status-of-the-program.patch create mode 100644 package/dhrystone/0004-get-prototypes-for-malloc-exit-strcpy.patch delete mode 100644 package/dhrystone/0004-headers.patch rename package/dhrystone/{0005-prototypes.patch => 0005-Avoid-collision-with-C-library-using-NO_PROTOTYPES.patch} (59%) diff --git a/.checkpackageignore b/.checkpackageignore index 4eff91e184..962ba03fe2 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -513,11 +513,6 @@ package/dhcp/S80dhcp-server Shellcheck lib_sysv.Variables package/dhcp/dhclient-script Shellcheck lib_shellscript.TrailingSpace package/dhcpcd/S41dhcpcd lib_sysv.Indent lib_sysv.Variables package/dhcpdump/0001-use-non-bsd-structures.patch lib_patch.Upstream -package/dhrystone/0001-cmdline-nruns.patch lib_patch.Sob lib_patch.Upstream -package/dhrystone/0002-HZ.patch lib_patch.Sob lib_patch.Upstream -package/dhrystone/0003-exit.patch lib_patch.Sob lib_patch.Upstream -package/dhrystone/0004-headers.patch lib_patch.Sob lib_patch.Upstream -package/dhrystone/0005-prototypes.patch lib_patch.Sob lib_patch.Upstream package/dht/0001-cmake.patch lib_patch.Upstream package/dillo/0001-usr-local-include.patch lib_patch.Upstream package/dillo/0002-Fix-openssl-detection.patch lib_patch.Upstream diff --git a/package/dhrystone/0001-cmdline-nruns.patch b/package/dhrystone/0001-let-people-specify-the-number-of-runs-on-the-command.patch similarity index 66% rename from package/dhrystone/0001-cmdline-nruns.patch rename to package/dhrystone/0001-let-people-specify-the-number-of-runs-on-the-command.patch index 1164610cca..b185826847 100644 --- a/package/dhrystone/0001-cmdline-nruns.patch +++ b/package/dhrystone/0001-let-people-specify-the-number-of-runs-on-the-command.patch @@ -1,10 +1,19 @@ -let people specify the number of runs on the command line +From 16d84fa7ecea8102680c9610d4186c4f54936b07 Mon Sep 17 00:00:00 2001 +From: Vivi Li +Date: Mon, 15 Jul 2024 11:07:11 +0200 +Subject: [PATCH] let people specify the number of runs on the command line -Patch by Vivi Li +Upstream: dead +Signed-off-by: Thomas Petazzoni +--- + dhry_1.c | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) +diff --git a/dhry_1.c b/dhry_1.c +index 7ab02a8..97bd30f 100644 --- a/dhry_1.c +++ b/dhry_1.c -@@ -66,7 +70,7 @@ +@@ -66,7 +66,7 @@ float Microseconds, /* end of variables for time measurement */ @@ -13,7 +22,7 @@ Patch by Vivi Li /*****/ /* main program, corresponds to procedures */ -@@ -101,6 +105,13 @@ +@@ -101,6 +101,13 @@ main () /* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */ /* overflow may occur for this array element. */ @@ -27,7 +36,7 @@ Patch by Vivi Li printf ("\n"); printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n"); printf ("\n"); -@@ -114,13 +125,17 @@ +@@ -114,13 +121,17 @@ main () printf ("Program compiled without 'register' attribute\n"); printf ("\n"); } @@ -51,3 +60,6 @@ Patch by Vivi Li printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs); +-- +2.45.2 + diff --git a/package/dhrystone/0002-Get-HZ-value-from-system-rather-than-requiring-via-C.patch b/package/dhrystone/0002-Get-HZ-value-from-system-rather-than-requiring-via-C.patch new file mode 100644 index 0000000000..064a1a9524 --- /dev/null +++ b/package/dhrystone/0002-Get-HZ-value-from-system-rather-than-requiring-via-C.patch @@ -0,0 +1,29 @@ +From 7d890402dc5a32a72d5bc0532c87576937c18eb7 Mon Sep 17 00:00:00 2001 +From: Robin Getz +Date: Mon, 15 Jul 2024 11:07:54 +0200 +Subject: [PATCH] Get HZ value from system rather than requiring via CPPFLAGS + +Upstream: dead +Signed-off-by: Thomas Petazzoni +--- + dhry.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dhry.h b/dhry.h +index 1714562..482d343 100644 +--- a/dhry.h ++++ b/dhry.h +@@ -359,6 +359,10 @@ + /* for "times" */ + #endif + ++#ifndef HZ ++#include ++#endif ++ + #define Mic_secs_Per_Second 1000000.0 + /* Berkeley UNIX C returns process times in seconds/HZ */ + +-- +2.45.2 + diff --git a/package/dhrystone/0002-HZ.patch b/package/dhrystone/0002-HZ.patch deleted file mode 100644 index e3b8a0e05d..0000000000 --- a/package/dhrystone/0002-HZ.patch +++ /dev/null @@ -1,17 +0,0 @@ -Get HZ value from system rather than requiring via CPPFLAGS - -Patch by Robin Getz - ---- a/dhry.h -+++ b/dhry.h -@@ -359,6 +359,10 @@ - /* for "times" */ - #endif - -+#ifndef HZ -+#include -+#endif -+ - #define Mic_secs_Per_Second 1000000.0 - /* Berkeley UNIX C returns process times in seconds/HZ */ - diff --git a/package/dhrystone/0003-exit.patch b/package/dhrystone/0003-exit.patch deleted file mode 100644 index 8d99f4e5d7..0000000000 --- a/package/dhrystone/0003-exit.patch +++ /dev/null @@ -1,14 +0,0 @@ -trust the exit status of the program - -Patch by Robin Getz - ---- a/dhry_1.c -+++ b/dhry_1.c -@@ -274,6 +289,7 @@ - printf ("\n"); - } - -+ exit(0); - } - - diff --git a/package/dhrystone/0003-trust-the-exit-status-of-the-program.patch b/package/dhrystone/0003-trust-the-exit-status-of-the-program.patch new file mode 100644 index 0000000000..b7bc2b306c --- /dev/null +++ b/package/dhrystone/0003-trust-the-exit-status-of-the-program.patch @@ -0,0 +1,26 @@ +From acd266448386c805c0afded780a5d7e6903bb485 Mon Sep 17 00:00:00 2001 +From: Robin Getz +Date: Mon, 15 Jul 2024 11:08:43 +0200 +Subject: [PATCH] trust the exit status of the program + +Upstream: dead +Signed-off-by: Thomas Petazzoni +--- + dhry_1.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dhry_1.c b/dhry_1.c +index 97bd30f..358bdc3 100644 +--- a/dhry_1.c ++++ b/dhry_1.c +@@ -285,6 +285,7 @@ main(int argc, char *argv[]) + printf ("\n"); + } + ++ exit(0); + } + + +-- +2.45.2 + diff --git a/package/dhrystone/0004-get-prototypes-for-malloc-exit-strcpy.patch b/package/dhrystone/0004-get-prototypes-for-malloc-exit-strcpy.patch new file mode 100644 index 0000000000..e925f1e781 --- /dev/null +++ b/package/dhrystone/0004-get-prototypes-for-malloc-exit-strcpy.patch @@ -0,0 +1,27 @@ +From 85dcf4ca20a60689479bcb143ecf8c0402822abe Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 15 Jul 2024 11:09:18 +0200 +Subject: [PATCH] get prototypes for malloc/exit/strcpy + +Upstream: dead +Signed-off-by: Thomas Petazzoni +--- + dhry.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dhry.h b/dhry.h +index 482d343..825ef35 100644 +--- a/dhry.h ++++ b/dhry.h +@@ -388,6 +388,8 @@ + /* General definitions: */ + + #include ++#include ++#include + /* for strcpy, strcmp */ + + #define Null 0 +-- +2.45.2 + diff --git a/package/dhrystone/0004-headers.patch b/package/dhrystone/0004-headers.patch deleted file mode 100644 index 82bb60d92d..0000000000 --- a/package/dhrystone/0004-headers.patch +++ /dev/null @@ -1,15 +0,0 @@ -get prototypes for malloc/exit/strcpy - -Patch by Mike Frysinger - ---- a/dhry.h -+++ b/dhry.h -@@ -388,6 +388,8 @@ - /* General definitions: */ - - #include -+#include -+#include - /* for strcpy, strcmp */ - - #define Null 0 diff --git a/package/dhrystone/0005-prototypes.patch b/package/dhrystone/0005-Avoid-collision-with-C-library-using-NO_PROTOTYPES.patch similarity index 59% rename from package/dhrystone/0005-prototypes.patch rename to package/dhrystone/0005-Avoid-collision-with-C-library-using-NO_PROTOTYPES.patch index 7fdcf94ee9..4cffc25a8d 100644 --- a/package/dhrystone/0005-prototypes.patch +++ b/package/dhrystone/0005-Avoid-collision-with-C-library-using-NO_PROTOTYPES.patch @@ -1,10 +1,19 @@ -Avoid collision with C library using NO_PROTOTYPES found in code already +From 9a701143fc38fd9f5373af70dfd5f0da0bc8e04a Mon Sep 17 00:00:00 2001 +From: Robin Getz +Date: Mon, 15 Jul 2024 11:09:55 +0200 +Subject: [PATCH] Avoid collision with C library using NO_PROTOTYPES -Patch by Robin Getz +Upstream: dead +Signed-off-by: Thomas Petazzoni +--- + dhry_1.c | 6 ++++++ + 1 file changed, 6 insertions(+) +diff --git a/dhry_1.c b/dhry_1.c +index 358bdc3..3ed1716 100644 --- a/dhry_1.c +++ b/dhry_1.c -@@ -28,7 +28,9 @@ +@@ -28,7 +28,9 @@ char Ch_1_Glob, int Arr_1_Glob [50]; int Arr_2_Glob [50] [50]; @@ -14,7 +23,7 @@ Patch by Robin Getz Enumeration Func_1 (); /* forward declaration necessary since Enumeration may not simply be int */ -@@ -45,14 +45,18 @@ +@@ -45,14 +47,18 @@ Enumeration Func_1 (); #ifdef TIMES struct tms time_info; @@ -33,3 +42,6 @@ Patch by Robin Getz #define Too_Small_Time 2 /* Measurements should last at least 2 seconds */ #endif +-- +2.45.2 +