Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(austinp): link libbfd statically #134

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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