Skip to content

Commit

Permalink
add OPSYS_{,NO_}WHOLE_ARCHIVE_FLAG which defines the argument passed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
grant committed Apr 15, 2003
1 parent 174752a commit 9d857e6
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 9 deletions.
5 changes: 4 additions & 1 deletion 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.
#
Expand Down Expand Up @@ -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}"

Expand Down
7 changes: 6 additions & 1 deletion 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()
Expand Down Expand Up @@ -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}
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion 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.

Expand Down Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion 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.

Expand Down Expand Up @@ -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-*-*
Expand Down

0 comments on commit 9d857e6

Please sign in to comment.