summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2004-08-20 11:48:46 +0000
committertron <tron@pkgsrc.org>2004-08-20 11:48:46 +0000
commitd3d855a78c971d8f797172a5b5be001af36e93b3 (patch)
tree0927248ce2ff013c7a188a6e6c7818d9c4322de1 /shells
parente89786bc37a9409725ed5e016b665777329e3b08 (diff)
downloadpkgsrc-d3d855a78c971d8f797172a5b5be001af36e93b3.tar.gz
Improve handling of "ZSH_STATIC" again:
1.) Only create a dynamically linked "zsh" binary if "MKDYNAMICROOT" is defined and set to "yes". This way people who still use statically linked binaries on their root filesystem will get a static binary. 2.) Link the "zsh" binary so that it use "/libexec/ld.elf_so" and shared libraries from "/lib". It now works without the "/usr" filesystem being mounted.
Diffstat (limited to 'shells')
-rw-r--r--shells/zsh/Makefile.common17
1 files changed, 15 insertions, 2 deletions
diff --git a/shells/zsh/Makefile.common b/shells/zsh/Makefile.common
index 283f867674d..4a7d30e6b81 100644
--- a/shells/zsh/Makefile.common
+++ b/shells/zsh/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.14 2004/08/20 10:36:12 tron Exp $
+# $NetBSD: Makefile.common,v 1.15 2004/08/20 11:48:46 tron Exp $
DISTNAME= zsh-${ZSH_VERSION}
CATEGORIES= shells
@@ -30,7 +30,20 @@ BUILD_DEFS+= ZSH_STATIC
.if defined(ZSH_STATIC) && !empty(ZSH_STATIC:M[Yy][Ee][Ss])
CONFIGURE_ARGS+=--disable-dynamic
-. if !(${OPSYS} == "NetBSD" && exists(/libexec/ld.elf_so))
+NETBSD_SHLINKER= /libexec/ld.elf_so
+
+. if ${OPSYS} == "NetBSD" && \
+ defined(MKDYNAMICROOT) && !empty(MKDYNAMICROOT:M[Yy][Ee][Ss]) && \
+ ${OBJECT_FMT} == "ELF" && exists(${NETBSD_SHLINKER})
+#
+# Built a dynamically linked "zsh" binary on NetBSD systems which use
+# dynamically linked binaries on the root filesystem. The binary will
+# only depend on the run-time link-editor and shared libraries on the
+# root filesystem. We use "-rpath" below by purpose because the
+# buildlink 3 framework won't filter it out.
+#
+LDFLAGS+= -Wl,-dynamic-linker=${NETBSD_SHLINKER} -rpath=/lib
+. else
LDFLAGS+= -static
. endif
.else