summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordrochner <drochner>2003-06-06 17:13:31 +0000
committerdrochner <drochner>2003-06-06 17:13:31 +0000
commit06cfc55af2c525bf562a695feb4c5a30d88374af (patch)
treeb85e56b39b64de58e42e5232c5f533b4f80802c6 /mk
parenta5106549b0916277bc03debda4b505a5019fc8ef (diff)
downloadpkgsrc-06cfc55af2c525bf562a695feb4c5a30d88374af.tar.gz
Introduce a variable "LINK_ALL_LIBGCC_HACK" which
is "-Wl,--whole-archive -lgcc -Wl,--no-whole-archive" on NetBSD-1.5* and empty otherwise. This is needed on build of programs which dlopen() extension libraries. (Some pkgs do the libgcc linking already, but independantly of the OS version.)
Diffstat (limited to 'mk')
-rw-r--r--mk/defs.NetBSD.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk
index 0ef3687edb6..3d0635425f5 100644
--- a/mk/defs.NetBSD.mk
+++ b/mk/defs.NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.48 2003/04/15 05:29:47 grant Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.49 2003/06/06 17:13:31 drochner Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -132,6 +132,12 @@ _USE_RPATH= yes # add rpath to LDFLAGS
_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+# for programs which use dlopen()
+# not necessary since 1.6 (shared libs are linked against libgcc_pic)
+.if !empty(OS_VERSION:M1.5*)
+LINK_ALL_LIBGCC_HACK= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
+.endif
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip