[gentoo-commits] repo/gentoo:master commit in: dev-util/oprofile/files/, dev-util/oprofile/

2021-12-09 Thread Andrew Savchenko
commit: 378d17fe2ce3bbace6a650c64fe73481d08986fe
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Thu Dec  9 21:08:05 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Thu Dec  9 21:08:37 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=378d17fe

dev-util/oprofile: fix build with gcc12

Patch by Sergei Trofimovich  gmail.com> from oprofile mail lists.

Package-Manager: Portage-3.0.29, Repoman-3.0.3
Signed-off-by: Andrew Savchenko  gentoo.org>

 dev-util/oprofile/files/gcc12.patch | 27 +++
 dev-util/oprofile/oprofile-1.4.0.ebuild |  1 +
 2 files changed, 28 insertions(+)

diff --git a/dev-util/oprofile/files/gcc12.patch 
b/dev-util/oprofile/files/gcc12.patch
new file mode 100644
index ..96f56d6a7ea7
--- /dev/null
+++ b/dev-util/oprofile/files/gcc12.patch
@@ -0,0 +1,27 @@
+`gcc-12` will forbid std::string(nullptr_t) constructors
+(as they never had a defined behaviour):
+
+operf_stats.cpp:182:24: error: use of deleted function 
'std::__cxx11::basic_string...; std::nullptr_t = std::nullptr_t]'
+  182 | return NULL;
+  |^~~~
+
+Signed-off-by: Sergei Trofimovich 
+---
+ libperf_events/operf_stats.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libperf_events/operf_stats.cpp b/libperf_events/operf_stats.cpp
+index 3cc28a75..a7bd0aec 100644
+--- a/libperf_events/operf_stats.cpp
 b/libperf_events/operf_stats.cpp
+@@ -179,7 +179,7 @@ static string create_stats_dir(string const & 
cur_sampledir)
+   if (rc && (errno != EEXIST)) {
+   cerr << "Error trying to create stats dir. " << endl;
+   perror("mkdir failed with");
+-  return NULL;
++  return "";
+   }
+   return stats_dir;
+ }
+-- 
+2.33.1

diff --git a/dev-util/oprofile/oprofile-1.4.0.ebuild 
b/dev-util/oprofile/oprofile-1.4.0.ebuild
index 2526034bec1b..8c623f03696c 100644
--- a/dev-util/oprofile/oprofile-1.4.0.ebuild
+++ b/dev-util/oprofile/oprofile-1.4.0.ebuild
@@ -47,6 +47,7 @@ pkg_setup() {
 
 src_prepare() {
eapply "${FILESDIR}/musl.patch"
+   eapply "${FILESDIR}/gcc12.patch"
# bug 723092
sed -i 's/==/=/g' configure.ac || die
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/oprofile/files/, dev-util/oprofile/

2020-09-05 Thread Andrew Savchenko
commit: 44046f58059e057b3cddd7ce286cd71e6de81955
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Sat Sep  5 10:59:57 2020 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Sat Sep  5 11:05:18 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44046f58

dev-util/oprofile: fix build with musl

Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Andrew Savchenko  gentoo.org>

 dev-util/oprofile/files/musl.patch  | 23 +++
 dev-util/oprofile/oprofile-1.4.0.ebuild |  3 ++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/dev-util/oprofile/files/musl.patch 
b/dev-util/oprofile/files/musl.patch
new file mode 100644
index 000..985eeece7bd
--- /dev/null
+++ b/dev-util/oprofile/files/musl.patch
@@ -0,0 +1,23 @@
+--- oprofile-1.4.0/pe_profiling/operf.cpp.orig 2016-08-08 18:03:27.0 
+0300
 oprofile-1.4.0/pe_profiling/operf.cpp  2020-09-05 12:45:55.237558495 
+0300
+@@ -860,9 +860,9 @@
+ {
+   if (remove(fpath)) {
+   perror("sample data removal error");
+-  return FTW_STOP;
++  return 1;
+   } else {
+-  return FTW_CONTINUE;
++  return 0;
+   }
+ }
+ 
+@@ -897,7 +897,7 @@
+   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) {

diff --git a/dev-util/oprofile/oprofile-1.4.0.ebuild 
b/dev-util/oprofile/oprofile-1.4.0.ebuild
index e881632d5f3..485fdf66c1f 100644
--- a/dev-util/oprofile/oprofile-1.4.0.ebuild
+++ b/dev-util/oprofile/oprofile-1.4.0.ebuild
@@ -20,7 +20,7 @@ BDEPEND="
 CDEPEND="
>=dev-libs/popt-1.7-r1
sys-libs/binutils-libs:=
-   >=sys-libs/glibc-2.3.2-r1
+   elibc_glibc? ( >=sys-libs/glibc-2.3.2-r1 )
ppc64? ( dev-libs/libpfm )
 "
 DEPEND="${CDEPEND}
@@ -46,6 +46,7 @@ pkg_setup() {
 }
 
 src_prepare() {
+   eapply "${FILESDIR}/musl.patch"
# bug 723092
sed -i 's/==/=/g' configure.ac || die
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/oprofile/files/, dev-util/oprofile/

2016-11-21 Thread Andrew Savchenko
commit: 4ea581785bda37bc01a20fbf5095c087e3bcda26
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Mon Nov 21 22:36:50 2016 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Mon Nov 21 22:36:50 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ea58178

dev-util/oprofile: fix bug 60

Remove -ftemplate-depth-50 limitation from configure: this is not
sufficient depth with gcc-6.2, see bug 60 for details.

Package-Manager: portage-2.3.2
Signed-off-by: Andrew Savchenko  gentoo.org>

 .../oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch| 10 ++
 dev-util/oprofile/oprofile-1.1.0-r1.ebuild |  5 -
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch 
b/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch
new file mode 100644
index ..01fc869
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.1.0-gcc6-template-depth.patch
@@ -0,0 +1,10 @@
+--- oprofile-1.1.0/configure.ac.orig   2015-07-21 17:53:27.0 +0300
 oprofile-1.1.0/configure.ac2016-11-22 01:15:31.329067697 +0300
+@@ -320,7 +320,6 @@
+ AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-Wall])
+ AX_CFLAGS_OPTION(OP_CFLAGS,[-fno-common])
+ AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-fno-common])
+-AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-ftemplate-depth-50])
+ AX_CFLAGS_OPTION(OP_CFLAGS,[-Wdeclaration-after-statement])
+ 
+ dnl enable option to use GCC test coverage

diff --git a/dev-util/oprofile/oprofile-1.1.0-r1.ebuild 
b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
index 6e83c7c..57474e7 100644
--- a/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
+++ b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI="5"
-inherit eutils java-pkg-opt-2 linux-info multilib user
+inherit autotools eutils java-pkg-opt-2 linux-info multilib user
 
 MY_P=${PN}-${PV/_/-}
 DESCRIPTION="A transparent low-overhead system-wide profiler"
@@ -46,6 +46,9 @@ pkg_setup() {
 src_prepare() {
# fix bug #594178
epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
+   # bug #60
+   epatch "${FILESDIR}/${PN}-1.1.0-gcc6-template-depth.patch"
+   eautoreconf
 }
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/oprofile/files/, dev-util/oprofile/

2016-09-29 Thread Andrew Savchenko
commit: 52be505267c2a9485045472a47990a8eaed6b1fd
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Thu Sep 29 16:19:59 2016 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Thu Sep 29 16:21:31 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52be5052

dev-util/oprofile: fix bug 594178

Add gcc-6 love. Patch from upstream commits by Peter Levine
plevine457/gmail.com.

Package-Manager: portage-2.3.1
Signed-off-by: Andrew Savchenko  gentoo.org>

 dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch | 30 +++
 dev-util/oprofile/oprofile-0.9.9-r1.ebuild|  3 ++-
 dev-util/oprofile/oprofile-0.9.9-r2.ebuild|  1 +
 dev-util/oprofile/oprofile-1.1.0-r1.ebuild|  7 +-
 4 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch 
b/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch
new file mode 100644
index ..ab3ca7c
--- /dev/null
+++ b/dev-util/oprofile/files/oprofile-1.1.0-gcc6.patch
@@ -0,0 +1,30 @@
+--- a/libop/op_alloc_counter.c
 b/libop/op_alloc_counter.c
+@@ -171,7 +171,7 @@
+   /* no counters then probably perfmon managing perfmon hw */
+   if (nr_counters <= 0) {
+   nr_counters = op_get_nr_counters(cpu_type);
+-  unavailable_counters = (~0) << nr_counters;
++  unavailable_counters = (~0U) << nr_counters;
+   }
+ 
+   /* Check to see if we have enough physical counters to map events*/
+--- a/libutil++/op_bfd.cpp
 b/libutil++/op_bfd.cpp
+@@ -535,15 +535,13 @@
+ {
+   op_bfd_symbol const & sym = syms[sym_idx];
+ 
+-  bool const verbose = cverb << (vbfd & vlevel1);
+-
+   if (anon_obj)
+   start = sym.vma();
+   else
+   start = sym.filepos();
+   end = start + sym.size();
+ 
+-  if (!verbose)
++  if (!(cverb << (vbfd & vlevel1)))
+   return;
+ 
+   io_state state(cverb << (vbfd & vlevel1));

diff --git a/dev-util/oprofile/oprofile-0.9.9-r1.ebuild 
b/dev-util/oprofile/oprofile-0.9.9-r1.ebuild
index ee1c018..65ccf5a 100644
--- a/dev-util/oprofile/oprofile-0.9.9-r1.ebuild
+++ b/dev-util/oprofile/oprofile-0.9.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -50,6 +50,7 @@ src_prepare() {
epatch "${FILESDIR}/${P}-gcc-4.9-non-ppc.patch"
epatch "${FILESDIR}/${P}-gcc-4.9-unused.patch"
epatch "${FILESDIR}/${PN}-1.0.0-athlon.patch"
+   epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
eautoreconf
 }
 

diff --git a/dev-util/oprofile/oprofile-0.9.9-r2.ebuild 
b/dev-util/oprofile/oprofile-0.9.9-r2.ebuild
index 95dc5a5..2abc919 100644
--- a/dev-util/oprofile/oprofile-0.9.9-r2.ebuild
+++ b/dev-util/oprofile/oprofile-0.9.9-r2.ebuild
@@ -51,6 +51,7 @@ src_prepare() {
epatch "${FILESDIR}/${P}-gcc-4.9-non-ppc.patch"
epatch "${FILESDIR}/${P}-gcc-4.9-unused.patch"
epatch "${FILESDIR}/${PN}-1.0.0-athlon.patch"
+   epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
eautoreconf
 }
 

diff --git a/dev-util/oprofile/oprofile-1.1.0-r1.ebuild 
b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
index 914d365..6e83c7c 100644
--- a/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
+++ b/dev-util/oprofile/oprofile-1.1.0-r1.ebuild
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI="5"
-inherit java-pkg-opt-2 linux-info multilib user
+inherit eutils java-pkg-opt-2 linux-info multilib user
 
 MY_P=${PN}-${PV/_/-}
 DESCRIPTION="A transparent low-overhead system-wide profiler"
@@ -43,6 +43,11 @@ pkg_setup() {
use java && java-pkg_init
 }
 
+src_prepare() {
+   # fix bug #594178
+   epatch "${FILESDIR}/${PN}-1.1.0-gcc6.patch"
+}
+
 src_configure() {
econf \
--disable-werror \