summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2021-12-09 21:21:26 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2021-12-09 21:21:26 +0000
commit80768081b445a3a571d8c43c0d69e9c3719a9956 (patch)
tree8fbbb7daefa7d1e3fe891243bbc822c9bbaa949f
parent2021-12-09 21:06:39 UTC (diff)
parentdev-util/oprofile: fix build with gcc12 (diff)
downloadgentoo-80768081b445a3a571d8c43c0d69e9c3719a9956.tar.gz
gentoo-80768081b445a3a571d8c43c0d69e9c3719a9956.tar.bz2
gentoo-80768081b445a3a571d8c43c0d69e9c3719a9956.zip
Merge updates from master
-rw-r--r--dev-util/oprofile/files/gcc12.patch27
-rw-r--r--dev-util/oprofile/oprofile-1.4.0.ebuild1
2 files changed, 28 insertions, 0 deletions
diff --git a/dev-util/oprofile/files/gcc12.patch b/dev-util/oprofile/files/gcc12.patch
new file mode 100644
index 000000000000..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 <slyich@gmail.com>
+---
+ 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