Bläddra i källkod

package/zsh: enable static regex module

the builtin string =~ regexp operator needs to load the regex
module. This operator is used very often in zsh scripts, so
link it statically to avoid the overhead of dynamic loading.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Norbert Lange 3 år sedan
förälder
incheckning
ceb261cb42
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6 0
      package/zsh/zsh.mk

+ 6 - 0
package/zsh/zsh.mk

@@ -49,6 +49,12 @@ ZSH_CONF_OPTS += \
 	zsh_cv_sys_dynamic_strip_lib=yes
 endif
 
+# regex is commonly used by completion scripts, link it statically
+define ZSH_USE_STATIC_REGEX_MODULE
+	$(SED) 's,echo dynamic,echo static,' $(@D)/Src/Modules/regex.mdd
+endef
+ZSH_POST_PATCH_HOOKS += ZSH_USE_STATIC_REGEX_MODULE
+
 # Add /bin/zsh to /etc/shells otherwise some login tools like dropbear
 # can reject the user connection. See man shells.
 define ZSH_ADD_ZSH_TO_SHELLS