diff options
author | agc <agc@pkgsrc.org> | 2002-09-04 14:47:32 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2002-09-04 14:47:32 +0000 |
commit | cb0e38446b26c5bb3ee8b10360669165287c6faa (patch) | |
tree | c5f617edba6ae81af7be6e5d984ab9fdbe5a97f4 /www | |
parent | e3796adbcd56281dbb92ae41375bc079d3fd02f2 (diff) | |
download | pkgsrc-cb0e38446b26c5bb3ee8b10360669165287c6faa.tar.gz |
Apply patches from Lubomir Sedlacik <salo@Xtrmntr.org> 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)
Diffstat (limited to 'www')
-rw-r--r-- | www/ap-php4/Makefile | 8 | ||||
-rw-r--r-- | www/galeon/Makefile | 10 | ||||
-rw-r--r-- | www/php3/Makefile.module | 6 | ||||
-rw-r--r-- | www/php4/Makefile | 7 | ||||
-rw-r--r-- | www/php4/Makefile.module | 9 | ||||
-rw-r--r-- | www/php4/distinfo | 4 | ||||
-rw-r--r-- | www/php4/patches/patch-aa | 4 |
7 files changed, 20 insertions, 28 deletions
diff --git a/www/ap-php4/Makefile b/www/ap-php4/Makefile index f91c1e84c32..2c5d59ad8b3 100644 --- a/www/ap-php4/Makefile +++ b/www/ap-php4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2002/08/25 21:51:51 jlam Exp $ +# $NetBSD: Makefile,v 1.23 2002/09/04 14:47:39 agc Exp $ PKGNAME= ap-php-${PHP_BASE_VERS} PKGREVISION= # empty @@ -9,12 +9,8 @@ DEPENDS+= php>=${PHP_BASE_VERS}:../../www/php4 USE_BUILDLINK2= YES APACHE_MODULE= YES -.include "../../www/php4/Makefile.php" - # Ensure we export symbols in the linked shared object. -.if ${OPSYS} != "SunOS" -LDFLAGS+= -Wl,--export-dynamic -.endif +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} do-install: ${INSTALL_DATA} ${WRKSRC}/.libs/libphp4.so \ diff --git a/www/galeon/Makefile b/www/galeon/Makefile index 6db161f3f56..66947af7f9f 100644 --- a/www/galeon/Makefile +++ b/www/galeon/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2002/08/29 20:00:20 drochner Exp $ +# $NetBSD: Makefile,v 1.35 2002/09/04 14:47:41 agc Exp $ DISTNAME= galeon-1.2.5 CATEGORIES= www @@ -38,11 +38,9 @@ CONFIGURE_ARGS+= --with-mozilla-snapshot=trunk MOZ_LIBDIR= ${PREFIX}/lib/mozilla LDFLAGS+= -Wl,-R${MOZ_LIBDIR} -.if(${OBJECT_FMT} == ELF) -LDFLAGS+= -export-dynamic -.else -LIBS+= -lstdc++ -.endif + +# Ensure we export symbols in the linked shared object. +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} pre-install: ${X11PREFIX}/bin/gconftool --shutdown diff --git a/www/php3/Makefile.module b/www/php3/Makefile.module index c9e5cab48b2..57f5a14e0fe 100644 --- a/www/php3/Makefile.module +++ b/www/php3/Makefile.module @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.module,v 1.3 2002/07/24 19:45:31 jlam Exp $ +# $NetBSD: Makefile.module,v 1.4 2002/09/04 14:47:41 agc Exp $ .include "../../www/php3/Makefile.common" @@ -24,8 +24,8 @@ LD_SHAREABLE_FLAG= -G LD_SHAREABLE_FLAG= -Bshareable .endif -# Ensure we export symbols in the linked shared objects. -LDFLAGS+= -Wl,--export-dynamic +# Ensure we export symbols in the linked shared object. +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} MOD_CPPFLAGS+= -I${WRKSRC} -I${MODULESDIR} -fPIC -DPIC -DCOMPILE_DL MOD_LDFLAGS+= ${LDFLAGS:S/-Wl,//g} diff --git a/www/php4/Makefile b/www/php4/Makefile index b72f50110c6..51dff1b0bf2 100644 --- a/www/php4/Makefile +++ b/www/php4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2002/08/26 00:16:57 grant Exp $ +# $NetBSD: Makefile,v 1.26 2002/09/04 14:47:39 agc Exp $ PKGNAME= php-${PHP_BASE_VERS} PKGREVISION= # empty @@ -27,9 +27,8 @@ MAKE_ENV+= LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}" .endif # Ensure we export symbols in the linked shared object. -.if ${OPSYS} != "SunOS" -LDFLAGS+= -Wl,--export-dynamic -.endif +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} +MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}" CONF_FILES= ${EGDIR}/php.ini-recommended ${PKG_SYSCONFDIR}/php.ini OWN_DIRS= ${PREFIX}/${PHP_EXTENSION_DIR} diff --git a/www/php4/Makefile.module b/www/php4/Makefile.module index 6b10d18ab5b..dacfc42a63c 100644 --- a/www/php4/Makefile.module +++ b/www/php4/Makefile.module @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.module,v 1.17 2002/08/26 00:16:57 grant Exp $ +# $NetBSD: Makefile.module,v 1.18 2002/09/04 14:47:40 agc Exp $ # # This Makefile is provided to ease creating PHP4 packages for the extension # modules distributed in the PHP4 sources. @@ -32,10 +32,9 @@ USE_CONFIG_WRAPPER= YES USE_LIBTOOL= YES LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig -# Ensure we export symbols in the linked shared objects. -.if ${OPSYS} != "SunOS" -LDFLAGS+= -Wl,--export-dynamic -.endif +# Ensure we export symbols in the linked shared object. +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} +MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}" PLIST_SRC= ${.CURDIR}/../../www/php4/PLIST.module MESSAGE_SRC= ${.CURDIR}/../../www/php4/MESSAGE.module diff --git a/www/php4/distinfo b/www/php4/distinfo index ed9b18827e0..18d905841ad 100644 --- a/www/php4/distinfo +++ b/www/php4/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.11 2002/08/26 00:42:59 grant Exp $ +$NetBSD: distinfo,v 1.12 2002/09/04 14:47:40 agc Exp $ SHA1 (php-4.1.2.tar.gz) = fc4f9685b2b26d6e12af2e746a34fadfe57f0466 Size (php-4.1.2.tar.gz) = 3359964 bytes -SHA1 (patch-aa) = 08f98c6b41c24a2aa8fa417bba50cf0cb5f711af +SHA1 (patch-aa) = 09fb15fde09bf866d9be016839f33c889d9cefb9 SHA1 (patch-ac) = 9478c18dbe18e8c4c05dffce31fa3f923562c832 SHA1 (patch-ad) = 4ac02d0e0e5bd612254020d46292534a0e9445b0 SHA1 (patch-ae) = e7acc06a63f47053c81ab442b53c68d89d122f78 diff --git a/www/php4/patches/patch-aa b/www/php4/patches/patch-aa index 39eb7c9a362..8c517419aa1 100644 --- a/www/php4/patches/patch-aa +++ b/www/php4/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.7 2001/10/16 04:54:24 jlam Exp $ +$NetBSD: patch-aa,v 1.8 2002/09/04 14:47:40 agc Exp $ --- Makefile.in.orig Sat Apr 21 21:09:12 2001 +++ Makefile.in @@ -7,7 +7,7 @@ $NetBSD: patch-aa,v 1.7 2001/10/16 04:54:24 jlam Exp $ PROGRAM_SOURCES = stub.c PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD) -PROGRAM_LDFLAGS = -export-dynamic -+PROGRAM_LDFLAGS = -static -export-dynamic $(LINK_LIBGCC_LDFLAGS) ++PROGRAM_LDFLAGS = -static ${EXPORT_SYMBOLS_LDFLAGS} $(LINK_LIBGCC_LDFLAGS) PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD) targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM) |