pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/shells/zsh Improve handling of "ZSH_STATIC" again:
details: https://anonhg.NetBSD.org/pkgsrc/rev/3faa59ebc7a9
branches: trunk
changeset: 479683:3faa59ebc7a9
user: tron <tron%pkgsrc.org@localhost>
date: Fri Aug 20 11:48:46 2004 +0000
description:
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:
shells/zsh/Makefile.common | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 57e33fdc0313 -r 3faa59ebc7a9 shells/zsh/Makefile.common
--- a/shells/zsh/Makefile.common Fri Aug 20 11:47:40 2004 +0000
+++ b/shells/zsh/Makefile.common Fri Aug 20 11:48:46 2004 +0000
@@ -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 @@
.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
Home |
Main Index |
Thread Index |
Old Index