Skip to content

Commit

Permalink
ci(austinp): link libbfd statically (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
P403n1x87 authored Oct 20, 2022
1 parent 3194c9e commit 74efe06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AC_LANG([C])
# Checks for libraries.
AC_CHECK_HEADER(libunwind-ptrace.h, [
AM_CONDITIONAL(BUILD_AUSTINP, true)
AUSTINP_CFLAGS="-DAUSTINP"
AUSTINP_CFLAGS="-DAUSTINP -fPIC"
AUSTINP_LDADD="-l:libunwind-ptrace.a -l:liblzma.a -l:libunwind-generic.a -l:libunwind.a"
echo "including build of austinp"
], [
Expand All @@ -32,20 +32,22 @@ AC_CHECK_HEADER(libunwind-ptrace.h, [
AC_CHECK_LIB(bfd, bfd_openr, [
AC_DEFINE([HAVE_BFD], [1], ["Compile with BFD support"])
AUSTINP_CFLAGS+=" -DHAVE_BFD"
AUSTINP_LDADD+=" -lbfd"
AUSTINP_LDADD+=" -l:libbfd.a -l:libz.a"
echo "enabling symbol resolution support for austinp"
], [
echo "austinp will be built without symbol resolution support: missing libbfd"
])
AC_CHECK_LIB(iberty, bfd_demangle, [
AC_DEFINE([HAVE_LIBERTY], [1], ["Compile with C++ name demangling support"])
AUSTINP_CFLAGS+=" -DHAVE_LIBERTY"
AUSTINP_LDADD+=" -l:libiberty.a"
echo "enabling C++ name demangling support for austinp"
], [
echo "austinp will be built without C++ names demangling support: missing libiberty"
], [
-lbfd
])
AUSTINP_LDADD+=" -ldl"

AC_SUBST(AUSTINP_CFLAGS, [$AUSTINP_CFLAGS])
AC_SUBST(AUSTINP_LDADD, [$AUSTINP_LDADD])
Expand Down

0 comments on commit 74efe06

Please sign in to comment.