summaryrefslogtreecommitdiff
path: root/dev-util/libabigail/files/libabigail-2.0-musl.patch
blob: 6057c65622a643e70885115e5f183af867cd2975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--- a/configure.ac
+++ b/configure.ac
@@ -143,6 +143,7 @@
 dnl *************************************************
 
 AC_PROG_CXX
+AC_CANONICAL_HOST
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_INSTALL
 
@@ -201,6 +202,12 @@
       [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
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,12 +41,12 @@
 abg-symtab-reader.cc			\
 $(VIZ_SOURCES)
 
-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)
--- a/tools/abisym.cc
+++ b/tools/abisym.cc
@@ -11,6 +11,7 @@
 /// in its symbol tables and report what it sees.
 
 #include <elf.h>
+#include <libgen.h>
 #include <cstring>
 #include <iostream>
 #include <sstream>
--- 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>
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -37,7 +37,8 @@
 
 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