summaryrefslogtreecommitdiff
path: root/www/php4
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-10-20 17:46:50 +0000
committerjlam <jlam@pkgsrc.org>2001-10-20 17:46:50 +0000
commitc99b20643998fbd913c451fe940a1ee722f80120 (patch)
treedf17133f991485f538a1c6ae50c995c47168ebd8 /www/php4
parentc495a2602619f089da1e6f1a060f89d744c5aff8 (diff)
downloadpkgsrc-c99b20643998fbd913c451fe940a1ee722f80120.tar.gz
Only link -lgcc whole-archive on NetBSD ELF platforms, to allow a.out
platforms to correctly links this package.
Diffstat (limited to 'www/php4')
-rw-r--r--www/php4/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/www/php4/Makefile b/www/php4/Makefile
index 280f3e78779..55a02a65beb 100644
--- a/www/php4/Makefile
+++ b/www/php4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2001/10/16 12:44:16 tron Exp $
+# $NetBSD: Makefile,v 1.16 2001/10/20 17:46:50 jlam Exp $
.include "Makefile.php"
@@ -28,13 +28,14 @@ FILES_SUBST+= CP=${CP:Q}
FILES_SUBST+= RM=${RM:Q}
FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
-# On NetBSD, we need to link libgcc.a whole-archive so that certain symbols
-# from the C++ implementation (__get_eh_context, etc.) referenced by DSOs
-# written in C++ will resolve correctly. We need to prefix the linker flags
-# "-whole-archive -lgcc -no-whole-archive" with "-Wl," to force all of the
-# flags to be passed down to the linker without change.
+# On NetBSD ELF platforms, we need to link libgcc.a whole-archive so that
+# certain symbols from the C++ implementation (__get_eh_context, etc.)
+# referenced by DSOs written in C++ will resolve correctly. We need to
+# prefix the linker flags "-whole-archive -lgcc -no-whole-archive" with
+# "-Wl," to force all of the flags to be passed down to the linker through
+# libtool without change.
#
-.if ${OPSYS} == "NetBSD"
+.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
LINK_LIBGCC_LDFLAGS= -Wl,--whole-archive -Wl,-lgcc -Wl,--no-whole-archive
MAKE_ENV+= LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
.endif