Enable shared libbfd library and use it in devel/fnccheck to fix a linking

problem

Reported by:	amdmi3
This commit is contained in:
Tijl Coosemans 2014-08-29 20:16:45 +00:00
parent 5fa1df901a
commit 6b92b1e69a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366561
4 changed files with 28 additions and 16 deletions

View File

@ -13,17 +13,15 @@ COMMENT= Profiling library/utilities for C/C++ programs
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
BUILD_DEPENDS= gnulibiberty>0:${PORTSDIR}/devel/gnulibiberty \
libbfd>0:${PORTSDIR}/devel/libbfd
LIB_DEPENDS= libbfd.so:${PORTSDIR}/devel/libbfd
USES= libtool
USE_AUTOTOOLS= libtoolize aclocal automake autoconf
LIBTOOLIZE_ARGS=--force
AUTOMAKE_ARGS= --force-missing --add-missing --foreign
USE_LDCONFIG= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -pthread
LIBS+= -L${LOCALBASE}/lib
STRIP= # none
@ -31,15 +29,9 @@ INFO= libfc
post-patch:
@${FIND} ${WRKSRC} -name "Makefile.am" | ${XARGS} ${REINPLACE_CMD} -e \
's|-ldl -lpthread|| ; \
s|-lbfd$$|-lbfd -liberty| ; \
's|-ldl|| ; \
s|-Wall -O3|-Wall|'
@${REINPLACE_CMD} -e \
'/^SUBDIRS/s|test||' ${WRKSRC}/Makefile.am
# XXX: work around an issue with automake-1.13 erroring out on a
# non-existent m4 directory before libtoolize creates it
pre-configure::
@${MKDIR} ${WRKSRC}/m4
.include <bsd.port.mk>

View File

@ -3,7 +3,7 @@
PORTNAME= libbfd
PORTVERSION= 2.19.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEWARE}
MASTER_SITE_SUBDIR= binutils/releases
@ -12,8 +12,6 @@ DISTNAME= binutils-${PORTVERSION}
MAINTAINER= joerg@FreeBSD.org
COMMENT= Universal BFD library from GNU binutils
BUILD_DEPENDS= ${LOCALBASE}/lib/libiberty.a:${PORTSDIR}/devel/gnulibiberty
CONFLICTS= mingw-binutils-[0-9]* binutils-[0-9]*
WRKSRC= ${WRKDIR}/binutils-${PORTVERSION}/bfd
@ -21,12 +19,21 @@ WRKSRC= ${WRKDIR}/binutils-${PORTVERSION}/bfd
USES= gmake libtool tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-install-libbfd \
--enable-commonbfdlib \
--disable-nls \
--without-pic \
--enable-shared \
--enable-targets=all \
--disable-werror
CONFIGURE_TARGET=${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL}
INFO= bfd
pre-configure:
# Configure and build pic version of libiberty
(cd ${WRKSRC}/../libiberty && \
${SETENV} CC="${CC}" CFLAGS="${CFLAGS}" CPP="${CPP}" \
CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}" ${CONFIGURE_ENV} ./configure \
${CONFIGURE_ARGS} --build=${CONFIGURE_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \
${MAKE_ARGS})
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- configure.orig
+++ configure
@@ -19503,7 +19503,7 @@ case "${host}" in
WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
fi
;;
-*-*-linux*)
+*)
# We borrow WIN32LIBADD so that the shared libbfd won't depend on
# libiberty.a.
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`

View File

@ -2,4 +2,6 @@ include/ansidecl.h
include/bfd.h
include/bfdlink.h
include/symcat.h
lib/libbfd-2.19.1.so
lib/libbfd.a
lib/libbfd.so