~xdavidwu/dotfiles

c9fc0a3ffa9480d3387c4f3622f4d7796212179f — xdavidwu 2 years ago 6a67ba8
bash: mcshl: preload gcompat on musl

1.18+ libjemalloc.so bundled native needs gcompat
on executables, gcompat is loaded by interpreter stub, but minecraft
here is dlopen-ing it, thus preloading is needed
1 files changed, 4 insertions(+), 1 deletions(-)

M .bashrc
M .bashrc => .bashrc +4 -1
@@ 13,6 13,7 @@ set +H
export -n PS1
# arch set PROMPT_COMMAND for terminal title
unset PROMPT_COMMAND
unset _GCOMPAT_PRELOAD

export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"


@@ 24,6 25,8 @@ PATH="$HOME/.local/bin:$XDG_DATA_HOME/npm/bin/:$XDG_CONFIG_HOME/composer/vendor/
if [ "$OSTYPE" = msys ]; then
	export LC_ALL=zh_TW.UTF-8
	PATH="/usr/bin:/bin:/mingw64/bin:$PATH"
elif [ "$OSTYPE" = "linux-musl" ]; then
	_GCOMPAT_PRELOAD="LD_PRELOAD=/lib/libgcompat.so.0"
fi

# XDG workarounds


@@ 73,7 76,7 @@ alias sftp='sftp -p -o Compression=no'

[ -f /usr/bin/vimpager ] && alias less=vimpager
alias sway="env LC_ALL=zh_TW.utf8 sway"
alias mcshl="env ALSOFT_DRIVERS=alsa _JAVA_OPTIONS=\"-Dawt.useSystemAAFontSettings=lcd -Xmn512m -Xms2G -Xmx2G -XX:+UseTransparentHugePages -XX:MaxGCPauseMillis=50 -XX:+UseZGC $_JAVA_OPTIONS\" mcshl"
alias mcshl="env ALSOFT_DRIVERS=alsa $_GCOMPAT_PRELOAD _JAVA_OPTIONS=\"-Dawt.useSystemAAFontSettings=lcd -Xmn512m -Xms2G -Xmx2G -XX:+UseTransparentHugePages -XX:MaxGCPauseMillis=50 -XX:+UseZGC $_JAVA_OPTIONS\" mcshl"
alias tstoggle="swaymsg input 1267:9454:ELAN24EE:00_04F3:24EE events toggle"

alias laravelphpcs="phpcs --standard=PSR2 app routes config tests"