summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant>2003-04-15 05:29:45 +0000
committergrant <grant>2003-04-15 05:29:45 +0000
commit45b953713a6b67cd1849f53f66547c24be3f1acf (patch)
tree997bc471ba82fb645edc834621b9bbb6e8c2737d /mk
parent5fea26b26bde94cf19fbefb7c1daf900f238d7b8 (diff)
downloadpkgsrc-45b953713a6b67cd1849f53f66547c24be3f1acf.tar.gz
add OPSYS_{,NO_}WHOLE_ARCHIVE_FLAG which defines the argument passed
to the linker to (not) extract all symbols from static archives and export these variables to packages as {,NO_}WHOLE_ARCHIVE_FLAG. these are not currently set for IRIX.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk5
-rw-r--r--mk/bsd.prefs.mk7
-rw-r--r--mk/defs.Darwin.mk7
-rw-r--r--mk/defs.FreeBSD.mk7
-rw-r--r--mk/defs.IRIX.mk7
-rw-r--r--mk/defs.Linux.mk7
-rw-r--r--mk/defs.NetBSD.mk7
-rw-r--r--mk/defs.OpenBSD.mk7
-rw-r--r--mk/defs.SunOS.mk8
9 files changed, 53 insertions, 9 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 81496ba29ed..b0d052d48af 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1166 2003/04/15 00:57:22 grant Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1167 2003/04/15 05:29:45 grant Exp $
#
# This file is in the public domain.
#
@@ -281,6 +281,9 @@ LDFLAGS+= ${X11_LDFLAGS}
FIX_RPATH+= LDFLAGS
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
MAKE_ENV+= RPATH_FLAG="${RPATH_FLAG}"
+MAKE_ENV+= WHOLE_ARCHIVE_FLAG="${WHOLE_ARCHIVE_FLAG}"
+MAKE_ENV+= NO_WHOLE_ARCHIVE_FLAG="${NO_WHOLE_ARCHIVE_FLAG}"
+
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" M4="${M4}" YACC="${YACC}"
CONFIGURE_ENV+= RPATH_FLAG="${RPATH_FLAG}"
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 457460efa8e..2a674f88e9d 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.109 2003/03/31 02:58:01 jschauma Exp $
+# $NetBSD: bsd.prefs.mk,v 1.110 2003/04/15 05:29:46 grant Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -254,6 +254,11 @@ XMKMF_CMD?= ${X11PREFIX}/bin/xmkmf
#
RPATH_FLAG?= ${_OPSYS_RPATH_NAME}
+# WHOLE_ARCHIVE_FLAG and NO_WHOLE_ARCHIVE_FLAG publically export the
+# linker flags to extract all symbols from a static archive.
+WHOLE_ARCHIVE_FLAG?= ${_OPSYS_WHOLE_ARCHIVE_FLAG}
+NO_WHOLE_ARCHIVE_FLAG?= ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG}
+
.ifndef DIGEST
DIGEST:= ${LOCALBASE}/bin/digest
MAKEFLAGS+= DIGEST=${DIGEST}
diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk
index 2e0ecf6f74b..741401e42dc 100644
--- a/mk/defs.Darwin.mk
+++ b/mk/defs.Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Darwin.mk,v 1.49 2003/04/01 16:48:20 thorpej Exp $
+# $NetBSD: defs.Darwin.mk,v 1.50 2003/04/15 05:29:46 grant Exp $
#
# Variable definitions for the Darwin operating system.
@@ -120,6 +120,11 @@ _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= no # don't add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -Wl,-x # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.FreeBSD.mk b/mk/defs.FreeBSD.mk
index 315b22ec4c5..e2a4c13b293 100644
--- a/mk/defs.FreeBSD.mk
+++ b/mk/defs.FreeBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.FreeBSD.mk,v 1.20 2003/03/04 14:50:11 seb Exp $
+# $NetBSD: defs.FreeBSD.mk,v 1.21 2003/04/15 05:29:46 grant Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -135,6 +135,11 @@ _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.IRIX.mk b/mk/defs.IRIX.mk
index 4c49122a6da..7b543c14684 100644
--- a/mk/defs.IRIX.mk
+++ b/mk/defs.IRIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.IRIX.mk,v 1.23 2003/03/29 17:40:40 jschauma Exp $
+# $NetBSD: defs.IRIX.mk,v 1.24 2003/04/15 05:29:47 grant Exp $
#
# Variable definitions for the IRIX operating system.
@@ -122,6 +122,11 @@ _PREFORMATTED_MAN_DIR= man # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# XXX values for IRIX absent!
+#_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+#_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.Linux.mk b/mk/defs.Linux.mk
index 6e3bb124749..d5e223a5055 100644
--- a/mk/defs.Linux.mk
+++ b/mk/defs.Linux.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Linux.mk,v 1.49 2003/03/20 00:34:17 hubertf Exp $
+# $NetBSD: defs.Linux.mk,v 1.50 2003/04/15 05:29:47 grant Exp $
#
# Variable definitions for the Linux operating system.
@@ -137,6 +137,11 @@ _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk
index 737570a8e34..0ef3687edb6 100644
--- a/mk/defs.NetBSD.mk
+++ b/mk/defs.NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.47 2003/03/04 14:50:11 seb Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.48 2003/04/15 05:29:47 grant Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -127,6 +127,11 @@ _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.OpenBSD.mk b/mk/defs.OpenBSD.mk
index 71cac395a61..45aa8fb97b4 100644
--- a/mk/defs.OpenBSD.mk
+++ b/mk/defs.OpenBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.OpenBSD.mk,v 1.16 2003/03/04 14:50:11 seb Exp $
+# $NetBSD: defs.OpenBSD.mk,v 1.17 2003/04/15 05:29:47 grant Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -127,6 +127,11 @@ _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_GNU_GETTEXT= no # Don't use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
+
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
diff --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk
index 2abe1be78ef..784bca900c9 100644
--- a/mk/defs.SunOS.mk
+++ b/mk/defs.SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.SunOS.mk,v 1.59 2003/04/10 01:39:52 grant Exp $
+# $NetBSD: defs.SunOS.mk,v 1.60 2003/04/15 05:29:47 grant Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -135,6 +135,12 @@ _PREFORMATTED_MAN_DIR= man # directory where catman pages are
_USE_GNU_GETTEXT= yes # Use GNU gettext
_USE_RPATH= yes # add rpath to LDFLAGS
+# flags passed to the linker to extract all symbols from static archives.
+# this is the standard Solaris linker, /usr/ccs/bin/ld. The use of GNU
+# ld is not currently supported.
+_OPSYS_WHOLE_ARCHIVE_FLAG= -z allextract
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -z defaultextract
+
# Solaris has /usr/include/iconv.h, but it's not GNU iconv, so mark it
# incompatible.
_INCOMPAT_ICONV= SunOS-*-*