public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: libabigail@sourceware.org
Cc: David Seifert <soap@gentoo.org>
Subject: [PATCH] Find fts-standalone on musl
Date: Sat, 29 Jan 2022 20:31:07 +0100	[thread overview]
Message-ID: <20220129193107.2706650-1-soap@gentoo.org> (raw)

Bug: https://bugs.gentoo.org/831571
---
 configure.ac      | 7 +++++++
 src/Makefile.am   | 4 ++--
 tools/Makefile.am | 3 ++-
 tools/abisym.cc   | 1 +
 tools/kmidiff.cc  | 1 -
 5 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 29130175..019bdbac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,7 @@ dnl check for dependencies
 dnl *************************************************
 
 AC_PROG_CXX
+AC_CANONICAL_HOST
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_INSTALL
 
@@ -219,6 +220,12 @@ AS_IF([test "x$ac_cv_bad_fts" = "xyes"],
       [CFLAGS="$CFLAGS -DBAD_FTS=1",
        CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
 
+dnl On musl, we need to find fts-standalone
+AS_CASE(
+  [${host_os}], [*-musl*], [
+    PKG_CHECK_MODULES([FTS], [fts-standalone])
+])
+
 dnl Check for dependency: libelf, libdw, libebl (elfutils)
 dnl Note that we need to use at least elfutils 0.159 but
 dnl at that time elfutils didnt have pkgconfig capabilities
diff --git a/src/Makefile.am b/src/Makefile.am
index 29da1ecf..1591224f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,12 +46,12 @@ if CTF_READER
 libabigail_la_SOURCES += abg-ctf-reader.cc
 endif
 
-libabigail_la_LIBADD = $(DEPS_LIBS)
+libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS)
 libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined
 
 CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\"
 
 AM_CPPFLAGS=\
-$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) \
+$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) $(FTS_CFLAGS) \
 -Wall -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include \
 -I$(abs_top_builddir)/include -I$(abs_top_builddir)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 648a71b5..f7592b60 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -37,7 +37,8 @@ abicompat_LDADD = $(abs_top_builddir)/src/libabigail.la
 
 abipkgdiff_SOURCES = abipkgdiff.cc
 abipkgdiffdir = $(bindir)
-abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la
+abipkgdiff_CPPFLAGS = $(FTS_CFLAGS)
+abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la $(FTS_LIBS)
 abipkgdiff_LDFLAGS = -pthread
 
 kmidiff_SOURCES = kmidiff.cc
diff --git a/tools/abisym.cc b/tools/abisym.cc
index a8fe19cd..a105e4ff 100644
--- a/tools/abisym.cc
+++ b/tools/abisym.cc
@@ -12,6 +12,7 @@
 
 #include <libgen.h>
 #include <elf.h>
+#include <libgen.h>
 #include <cstring>
 #include <iostream>
 #include <sstream>
diff --git a/tools/kmidiff.cc b/tools/kmidiff.cc
index b802348f..2e88baa7 100644
--- a/tools/kmidiff.cc
+++ b/tools/kmidiff.cc
@@ -11,7 +11,6 @@
 
 #include <sys/types.h>
 #include <dirent.h>
-#include <fts.h>
 #include <cstring>
 #include <string>
 #include <vector>
-- 
2.35.0


             reply	other threads:[~2022-01-29 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 19:31 David Seifert [this message]
2022-01-29 19:43 ` David Seifert
2022-02-07 14:13 ` Dodji Seketeli
     [not found] <20220207141759.1712914-1-soap@gentoo.org>
2022-02-07 15:28 ` Dodji Seketeli
2022-02-07 15:36   ` David Seifert

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=20220129193107.2706650-1-soap@gentoo.org \
    --to=soap@gentoo.org \
    --cc=libabigail@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).