diff options
author | tron <tron> | 2004-08-20 11:48:46 +0000 |
---|---|---|
committer | tron <tron> | 2004-08-20 11:48:46 +0000 |
commit | c829303b91da6f83391a517ab00fb89dfdb1dde7 (patch) | |
tree | 0927248ce2ff013c7a188a6e6c7818d9c4322de1 /shells | |
parent | 6614ccb0b5a6aa7b0b4b6b94305c1af7d1a733d9 (diff) | |
download | pkgsrc-c829303b91da6f83391a517ab00fb89dfdb1dde7.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.common | 17 |
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 |