From cb0e38446b26c5bb3ee8b10360669165287c6faa Mon Sep 17 00:00:00 2001 From: agc Date: Wed, 4 Sep 2002 14:47:32 +0000 Subject: Apply patches from Lubomir Sedlacik in PR 18115 to generalise the linker flags used to export symbols by setting them on a per-OS basis. > many packages force -Wl,-export-dynamic which is not portable outside GNU ld > and cause problems e.g. on Solaris. some of these packages use if > conditionals either only for NetBSD or except SunOS, but the state is not > coherent and it may complicate later when support for new OS is added to > pkgsrc (e.g. ongoing work on HP-UX support). > > jlam proposed the following framework in discussion on tech-pkg: > > http://mail-index.netbsd.org/tech-pkg/2002/06/21/0009.html > > now, ${EXPORT_SYMBOLS_LDFLAGS} is used instead of directly defining > -Wl,-export-dynamic which is set in appropriate defs.*.mk to reasonable > values. packages should be converted to this framework by: > > 1) replacing LDFLAGS+= -Wl,-export-dynamic and LIBS+= -export-dynamic with: > > LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} > > 2) for use in patchfiles, add this variable to MAKE_ENV if needed: > > MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS=${EXPORT_SYMBOLS_LDFLAGS} > > 3) replace occurances of -Wl,-export-dynamic and -export-dynamic in patch > files with: > > $(EXPORT_SYMBOLS_LDFLAGS) --- audio/kdemultimedia3/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'audio/kdemultimedia3') diff --git a/audio/kdemultimedia3/Makefile b/audio/kdemultimedia3/Makefile index de7b26c5c9b..e1a1b2f2cf4 100644 --- a/audio/kdemultimedia3/Makefile +++ b/audio/kdemultimedia3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2002/08/28 07:15:26 skrll Exp $ +# $NetBSD: Makefile,v 1.5 2002/09/04 14:47:35 agc Exp $ DISTNAME= kdemultimedia-3.0.3 CATEGORIES= audio @@ -10,11 +10,8 @@ DEPENDS+= xanim>=2.80.0:../../graphics/xanim USE_BUILDLINK_ONLY= YES -.include "../../mk/bsd.prefs.mk" - -.if ${OPSYS} == "NetBSD" -LIBS= -Wl,--export-dynamic -.endif +# Ensure we export symbols in the linked shared object. +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} PTHREAD_OPT+= require -- cgit v1.2.3