All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/zsh: enable static regex module
@ 2022-07-28 19:03 Arnout Vandecappelle
  0 siblings, 0 replies; only message in thread
From: Arnout Vandecappelle @ 2022-07-28 19:03 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=ceb261cb4281e0d76f76724a30bf7e61ef59bef1
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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>
---
 package/zsh/zsh.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk
index f03a2e6982..4897620a00 100644
--- a/package/zsh/zsh.mk
+++ b/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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-28 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 19:03 [Buildroot] [git commit] package/zsh: enable static regex module Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.