From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/ibm-powerpc-utils/, sys-apps/ibm-powerpc-utils/files/
Date: Sun, 30 May 2021 14:02:29 +0000 (UTC) [thread overview]
Message-ID: <1622383337.9f43b91a9e3987fbb5aa958d0b32ed5759d7c230.grobian@gentoo> (raw)
commit: 9f43b91a9e3987fbb5aa958d0b32ed5759d7c230
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun May 30 14:02:17 2021 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun May 30 14:02:17 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f43b91a
sys-apps/ibm-powerpc-utils: fix build using musl
Closes: https://bugs.gentoo.org/779109
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
.../files/ibm-powerpc-utils-1.3.8-musl.patch | 95 ++++++++++++++++++++++
.../ibm-powerpc-utils-1.3.8-r1.ebuild | 3 +-
.../ibm-powerpc-utils-99999.ebuild | 3 +-
3 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.8-musl.patch b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.8-musl.patch
new file mode 100644
index 00000000000..5357e5fdcef
--- /dev/null
+++ b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.8-musl.patch
@@ -0,0 +1,95 @@
+From ec0eb99a402ff9371965c2c8726bc400674215b7 Mon Sep 17 00:00:00 2001
+From: Fabian Groffen <grobian@gentoo.org>
+Date: Fri, 21 May 2021 11:25:21 +0200
+Subject: [PATCH] add includes/defines for musl libc support
+
+- add some missing includes to get proper definitions for beXXtoh and
+ PATH_MAX
+- guard backtrace() from execinfo.h usage for it is glibc only
+
+PR: https://github.com/ibm-power-utilities/powerpc-utils/pull/63
+Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+---
+ src/common/cpu_info_helpers.c | 1 +
+ src/drmgr/common.c | 6 ++++++
+ src/drmgr/dr.h | 1 +
+ src/rtas_dbg.c | 1 +
+ 4 files changed, 9 insertions(+)
+
+diff --git a/src/common/cpu_info_helpers.c b/src/common/cpu_info_helpers.c
+index 3d08ff7..925f220 100644
+--- a/src/common/cpu_info_helpers.c
++++ b/src/common/cpu_info_helpers.c
+@@ -29,6 +29,7 @@
+ #include <errno.h>
+ #include <stdbool.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include "cpu_info_helpers.h"
+diff --git a/src/drmgr/common.c b/src/drmgr/common.c
+index 5e8135b..32cf805 100644
+--- a/src/drmgr/common.c
++++ b/src/drmgr/common.c
+@@ -28,7 +28,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <dirent.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <ctype.h>
+ #include <sys/wait.h>
+ #include <endian.h>
+@@ -853,6 +855,7 @@ sighandler(int signo)
+ say(ERROR, "Received signal %d, attempting to cleanup and exit\n",
+ signo);
+
++#ifdef __GLIBC__
+ if (log_fd) {
+ void *callstack[128];
+ int sz;
+@@ -860,6 +863,7 @@ sighandler(int signo)
+ sz = backtrace(callstack, 128);
+ backtrace_symbols_fd(callstack, sz, log_fd);
+ }
++#endif
+
+ dr_fini();
+ exit(-1);
+@@ -925,8 +929,10 @@ sig_setup(void)
+ if (sigaction(SIGBUS, &sigact, NULL))
+ return -1;
+
++#ifdef __GLIBC__
+ /* dummy call to backtrace to get symbol loaded */
+ backtrace(callstack, 128);
++#endif
+ return 0;
+ }
+
+diff --git a/src/drmgr/dr.h b/src/drmgr/dr.h
+index f171bfe..b32d49a 100644
+--- a/src/drmgr/dr.h
++++ b/src/drmgr/dr.h
+@@ -26,6 +26,7 @@
+ #include <nl_types.h>
+ #include <unistd.h>
+ #include <stdarg.h>
++#include <limits.h>
+ #include "rtas_calls.h"
+ #include "drpci.h"
+
+diff --git a/src/rtas_dbg.c b/src/rtas_dbg.c
+index 526e78b..ebc7474 100644
+--- a/src/rtas_dbg.c
++++ b/src/rtas_dbg.c
+@@ -32,6 +32,7 @@
+ #include <getopt.h>
+ #include <dirent.h>
+ #include <string.h>
++#include <endian.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ #include <linux/unistd.h>
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.8-r1.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.8-r1.ebuild
index d828529d968..01005efd85f 100644
--- a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.8-r1.ebuild
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,6 +22,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.3.5-docdir.patch
+ "${FILESDIR}"/${P}-musl.patch
)
src_prepare() {
diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-99999.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-99999.ebuild
index b6e7ae3be80..d4d181b373a 100644
--- a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-99999.ebuild
+++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-99999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -20,6 +20,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.3.5-docdir.patch
+ "${FILESDIR}"/${P}-musl.patch # PR #63
)
src_prepare() {
next reply other threads:[~2021-05-30 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-30 14:02 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-01 12:48 [gentoo-commits] repo/gentoo:master commit in: sys-apps/ibm-powerpc-utils/, sys-apps/ibm-powerpc-utils/files/ Jeroen Roovers
2018-12-01 12:48 Jeroen Roovers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1622383337.9f43b91a9e3987fbb5aa958d0b32ed5759d7c230.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox