* [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0
@ 2016-01-31 10:14 Bernd Kuhls
2016-01-31 10:14 ` [Buildroot] [PATCH 2/2] package/oprofile: fux musl build Bernd Kuhls
2016-01-31 22:47 ` [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Bernd Kuhls @ 2016-01-31 10:14 UTC (permalink / raw)
To: buildroot
Removed patch applied upstream:
http://sourceforge.net/p/oprofile/oprofile/ci/f357d40c9f64f3ea2dccf5f9abdff84b2ac62e6f/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
.../0001-Include-time.h-for-nanosleep.patch | 44 ----------------------
package/oprofile/oprofile.hash | 5 ++-
package/oprofile/oprofile.mk | 2 +-
3 files changed, 4 insertions(+), 47 deletions(-)
delete mode 100644 package/oprofile/0001-Include-time.h-for-nanosleep.patch
diff --git a/package/oprofile/0001-Include-time.h-for-nanosleep.patch b/package/oprofile/0001-Include-time.h-for-nanosleep.patch
deleted file mode 100644
index d4a9ca2..0000000
--- a/package/oprofile/0001-Include-time.h-for-nanosleep.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c5b93c33a81d7c52dc6089387e415f2d653f758f Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Mon, 29 Dec 2014 11:43:51 +0100
-Subject: [PATCH] Include <time.h> for nanosleep()
-
-The nanosleep() function prototype is in <time.h>, so this header file
-should be included whenever nanosleep() is used. Not including it
-causes some issues when building OProfile against a non-thread capable
-version of the uClibc C library, probably because in such situation,
-<time.h> does not get included by another header.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- pe_counting/ocount.cpp | 1 +
- pe_profiling/operf.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/pe_counting/ocount.cpp b/pe_counting/ocount.cpp
-index 07dfd0c..fba29eb 100644
---- a/pe_counting/ocount.cpp
-+++ b/pe_counting/ocount.cpp
-@@ -28,6 +28,7 @@
- #include <getopt.h>
- #include <sys/time.h>
- #include <math.h>
-+#include <time.h>
-
- #include "op_pe_utils.h"
- #include "ocount_counter.h"
-diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp
-index 04a25d9..4238754 100644
---- a/pe_profiling/operf.cpp
-+++ b/pe_profiling/operf.cpp
-@@ -33,6 +33,7 @@
- #include <sys/wait.h>
- #include <ftw.h>
- #include <getopt.h>
-+#include <time.h>
- #include <iostream>
- #include "operf_utils.h"
- #include "op_pe_utils.h"
---
-2.1.0
-
diff --git a/package/oprofile/oprofile.hash b/package/oprofile/oprofile.hash
index b6ab3ba..cc15ed1 100644
--- a/package/oprofile/oprofile.hash
+++ b/package/oprofile/oprofile.hash
@@ -1,2 +1,3 @@
-# Locally computed:
-sha256 847110b4ecdcf8c8353cd38f94c1b704aad4bfcd9453e38b88d112cfb7e3c45a oprofile-1.0.0.tar.gz
+# From http://sourceforge.net/projects/oprofile/files/oprofile/oprofile-1.1.0/
+sha1 38c0d8812fe605f6ddd1cd183a482aa7605c0e81 oprofile-1.1.0.tar.gz
+md5 248c4c069f9476f427fa7195563f9867 oprofile-1.1.0.tar.gz
diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk
index f27e06e..d91ddab 100644
--- a/package/oprofile/oprofile.mk
+++ b/package/oprofile/oprofile.mk
@@ -4,7 +4,7 @@
#
################################################################################
-OPROFILE_VERSION = 1.0.0
+OPROFILE_VERSION = 1.1.0
OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION)
OPROFILE_LICENSE = GPLv2+
OPROFILE_LICENSE_FILES = COPYING
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/oprofile: fux musl build
2016-01-31 10:14 [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Bernd Kuhls
@ 2016-01-31 10:14 ` Bernd Kuhls
2016-02-02 13:02 ` Arnout Vandecappelle
2016-01-31 22:47 ` [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Bernd Kuhls @ 2016-01-31 10:14 UTC (permalink / raw)
To: buildroot
The build error has not yet been found by the autobuilders:
operf.cpp: In function ?int __delete_old_previous_sample_data(const char*, const stat*, int, FTW*)?:
operf.cpp:862:10: error: ?FTW_STOP? was not declared in this scope
return FTW_STOP;
^
operf.cpp:864:10: error: ?FTW_CONTINUE? was not declared in this scope
return FTW_CONTINUE;
^
operf.cpp: In function ?void convert_sample_data()?:
operf.cpp:899:41: error: ?FTW_ACTIONRETVAL? was not declared in this scope
int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/oprofile/0001-musl.patch | 53 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 package/oprofile/0001-musl.patch
diff --git a/package/oprofile/0001-musl.patch b/package/oprofile/0001-musl.patch
new file mode 100644
index 0000000..95ae200
--- /dev/null
+++ b/package/oprofile/0001-musl.patch
@@ -0,0 +1,53 @@
+Fix musl build
+
+Downloaded from:
+https://github.com/openwrt-mirror/openwrt/blob/f22d5e25660106a48727c7aa5d1a73e4171a7987/package/devel/oprofile/patches/100-musl.patch
+after I found a hint for the patch here:
+http://patchwork.openembedded.org/patch/112675/
+
+Because openwrt removed the oprofile package from their repo last week
+https://github.com/openwrt-mirror/openwrt/commit/aaf46a8524e138e1673a398e8d2dd9357405b313#diff-fe14456f94abf436d997e2c01c10f3bd
+I decided to put this patch into the buildroot repo instead of adding
+_PATCH to oprofile.mk
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- a/pe_profiling/operf.cpp
++++ b/pe_profiling/operf.cpp
+@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
+ int tflag __attribute__((unused)),
+ struct FTW *ftwbuf __attribute__((unused)))
+ {
++ int err;
++
+ if (remove(fpath)) {
++ err = errno;
+ perror("sample data removal error");
+- return FTW_STOP;
++ return err;
+ } else {
+- return FTW_CONTINUE;
++ return 0;
+ }
+ }
+
+@@ -896,7 +899,7 @@ static void convert_sample_data(void)
+ return;
+
+ if (!operf_options::append) {
+- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
++ int flags = FTW_DEPTH;
+ errno = 0;
+ if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
+ errno != ENOENT) {
+--- a/libop/op_events.c
++++ b/libop/op_events.c
+@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
+ static u64 parse_long_hex(char const * str)
+ {
+ u64 value;
+- if (sscanf(str, "%Lx", &value) != 1)
++ if (sscanf(str, "0x%llx", &value) != 1)
+ parse_error("expected long hexadecimal value");
+
+ fflush(stderr);
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0
2016-01-31 10:14 [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Bernd Kuhls
2016-01-31 10:14 ` [Buildroot] [PATCH 2/2] package/oprofile: fux musl build Bernd Kuhls
@ 2016-01-31 22:47 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-01-31 22:47 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Sun, 31 Jan 2016 11:14:48 +0100, Bernd Kuhls wrote:
> Removed patch applied upstream:
> http://sourceforge.net/p/oprofile/oprofile/ci/f357d40c9f64f3ea2dccf5f9abdff84b2ac62e6f/
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> .../0001-Include-time.h-for-nanosleep.patch | 44 ----------------------
> package/oprofile/oprofile.hash | 5 ++-
> package/oprofile/oprofile.mk | 2 +-
> 3 files changed, 4 insertions(+), 47 deletions(-)
> delete mode 100644 package/oprofile/0001-Include-time.h-for-nanosleep.patch
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/oprofile: fux musl build
2016-01-31 10:14 ` [Buildroot] [PATCH 2/2] package/oprofile: fux musl build Bernd Kuhls
@ 2016-02-02 13:02 ` Arnout Vandecappelle
0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2016-02-02 13:02 UTC (permalink / raw)
To: buildroot
On 31-01-16 11:14, Bernd Kuhls wrote:
> The build error has not yet been found by the autobuilders:
>
> operf.cpp: In function ?int __delete_old_previous_sample_data(const char*, const stat*, int, FTW*)?:
> operf.cpp:862:10: error: ?FTW_STOP? was not declared in this scope
> return FTW_STOP;
> ^
> operf.cpp:864:10: error: ?FTW_CONTINUE? was not declared in this scope
> return FTW_CONTINUE;
> ^
> operf.cpp: In function ?void convert_sample_data()?:
> operf.cpp:899:41: error: ?FTW_ACTIONRETVAL? was not declared in this scope
> int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/oprofile/0001-musl.patch | 53 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
> create mode 100644 package/oprofile/0001-musl.patch
>
> diff --git a/package/oprofile/0001-musl.patch b/package/oprofile/0001-musl.patch
> new file mode 100644
> index 0000000..95ae200
> --- /dev/null
> +++ b/package/oprofile/0001-musl.patch
> @@ -0,0 +1,53 @@
> +Fix musl build
> +
> +Downloaded from:
> +https://github.com/openwrt-mirror/openwrt/blob/f22d5e25660106a48727c7aa5d1a73e4171a7987/package/devel/oprofile/patches/100-musl.patch
> +after I found a hint for the patch here:
> +http://patchwork.openembedded.org/patch/112675/
> +
> +Because openwrt removed the oprofile package from their repo last week
> +https://github.com/openwrt-mirror/openwrt/commit/aaf46a8524e138e1673a398e8d2dd9357405b313#diff-fe14456f94abf436d997e2c01c10f3bd
> +I decided to put this patch into the buildroot repo instead of adding
> +_PATCH to oprofile.mk
Commit message could be a lot better:
Remove non-Posix use of FTW_ACTIONRETVAL
The musl implementation of nftw doesn't support the glibc extension
FTW_ACTIONRETVAL. Since none of the features of FTW_ACTIONRETVAL are
used here, just use the normal nftw return value.
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +
> +--- a/pe_profiling/operf.cpp
> ++++ b/pe_profiling/operf.cpp
> +@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
> + int tflag __attribute__((unused)),
> + struct FTW *ftwbuf __attribute__((unused)))
> + {
> ++ int err;
> ++
> + if (remove(fpath)) {
> ++ err = errno;
> + perror("sample data removal error");
> +- return FTW_STOP;
> ++ return err;
> + } else {
> +- return FTW_CONTINUE;
> ++ return 0;
> + }
> + }
> +
> +@@ -896,7 +899,7 @@ static void convert_sample_data(void)
> + return;
> +
> + if (!operf_options::append) {
> +- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
> ++ int flags = FTW_DEPTH;
> + errno = 0;
> + if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
> + errno != ENOENT) {
> +--- a/libop/op_events.c
> ++++ b/libop/op_events.c
> +@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
> + static u64 parse_long_hex(char const * str)
> + {
> + u64 value;
> +- if (sscanf(str, "%Lx", &value) != 1)
> ++ if (sscanf(str, "0x%llx", &value) != 1)
Why is this change needed? musl supports the standard %Lx specifier, no?
Regards,
Arnout
> + parse_error("expected long hexadecimal value");
> +
> + fflush(stderr);
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-02 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-31 10:14 [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Bernd Kuhls
2016-01-31 10:14 ` [Buildroot] [PATCH 2/2] package/oprofile: fux musl build Bernd Kuhls
2016-02-02 13:02 ` Arnout Vandecappelle
2016-01-31 22:47 ` [Buildroot] [PATCH 1/2] package/oprofile: bump version to 1.1.0 Thomas Petazzoni
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.